Finishing touches

This commit is contained in:
Marijn Jansen
2017-01-30 23:03:50 +01:00
parent 8dfa31696c
commit 6983aa06a2

View File

@@ -43,14 +43,15 @@ $settings = getSettings();
> >
</li> </li>
<li> <li>
<label for="bday">Geboortedatum</label>
<?php $currentbday = new DateTime($settings["birthdate"]);?> <?php $currentbday = new DateTime($settings["birthdate"]);?>
<label for="bday">Geboortedatum</label>
<select name='day' id="bday"> <select name='day' id="bday">
<?php for ($day = 1; $day <= 31; $day++):?> <?php for ($day = 1; $day <= 31; $day++):?>
<option value='<?=$day?>' <option value='<?=$day?>'
<?=($day == $currentbday->format("d")) ? "selected" : ""?> <?=($day == $currentbday->format("d")) ? "selected" : ""?>
><?=$day?></option>"; >
<?=$day?>
</option>
<?php endfor; ?> <?php endfor; ?>
</select> </select>
<select name='month' id="bday"> <select name='month' id="bday">
@@ -66,15 +67,15 @@ $settings = getSettings();
</option> </option>
<?php endfor;?> <?php endfor;?>
</select> </select>
<select name='year' id="bday"> <select name='year' id="bday">
<?php <?php
$now = (new DateTime)->format("Y"); $now = (new DateTime)->format("Y");
for ($year = $now; $year >= 1900; $year--): ?> for ($year = $now; $year >= 1900; $year--): ?>
<option value='<?=$year?>' <option value='<?=$year?>'
<?=($year == $currentbday->format("Y")) ? "selected" : ""?> <?=($year == $currentbday->format("Y")) ? "selected" : ""?>
><?=$year?></option> >
<?=$year?>
</option>
<?php endfor; ?> <?php endfor; ?>
</select> </select>
</li> </li>