Champs opposition insee

This commit is contained in:
Michael RICOIS 2011-05-09 11:49:47 +00:00
parent e396ef3339
commit eb74503890

View File

@ -0,0 +1,15 @@
<select name="frmSaisie[moisOppositionInsee]">
<?php
setlocale (LC_TIME, 'fr_FR.UTF-8', 'fra');
$month = date("m");
for($i=0;$i<12;$i++)
{
$lastmonth = mktime(0, 0, 0, $month-$i, date("d"), date("Y"));
$selected = '';
if($i==1) $selected = 'selected';
?>
<option value="<?=date('Ym',$lastmonth)?>" <?=$selected?>><?=strftime('%B',$lastmonth)?> <?=date('Y',$lastmonth)?></option>
<?php
}
?>
</select>