Révision 41e59592
b/index.php | ||
---|---|---|
114 | 114 |
|
115 | 115 |
switch ($vue) { |
116 | 116 |
case "trimestre": |
117 |
$nbMois = 3; |
|
117 | 118 |
$dateDeb = date("Y/m/01", strtotime("-1 month", $tsCurrent)); |
118 | 119 |
break; |
119 | 120 |
case "année": |
121 |
$nbMois = 12; |
|
120 | 122 |
$dateDeb = date("Y/01/01", $tsCurrent); |
121 | 123 |
break; |
122 | 124 |
case "mois": |
123 | 125 |
default: |
126 |
$nbMois = 1; |
|
124 | 127 |
$dateDeb = date("Y/m/01", $tsCurrent); |
125 | 128 |
break; |
126 | 129 |
} |
... | ... | |
256 | 259 |
</form> |
257 | 260 |
<table> |
258 | 261 |
<tr> |
259 |
<td><a class="button" href="?date=<?=date("Y/m/01", strtotime("-1 month", $tsCurrent))?>&vue=<?=$vue?>"><<</a></td> |
|
262 |
<td><a class="button" title="<?=$vue?> précédent<?=$vue=="année" ? "e" : ""?>" href="?date=<?=date("Y/m/01", strtotime("-$nbMois month", $tsCurrent))?>&vue=<?=$vue?>"><<</a></td> |
|
260 | 263 |
<td align="center"> |
261 | 264 |
<a href="?date=<?=$dateCurrent?>&vue=mois">mois</a> | |
262 | 265 |
<a href="?date=<?=$dateCurrent?>&vue=trimestre">trimestre</a> | |
263 | 266 |
<a href="?date=<?=$dateCurrent?>&vue=année">année</a> |
264 |
<td><a class="button" style="float: right" href="?date=<?=date("Y/m/01", strtotime("+1 month", $tsCurrent))?>&vue=<?=$vue?>">>></a></td> |
|
267 |
<td><a class="button" title="<?=$vue?> suivant<?=$vue=="année" ? "e" : ""?>" style="float: right" href="?date=<?=date("Y/m/01", strtotime("+$nbMois month", $tsCurrent))?>&vue=<?=$vue?>">>></a></td> |
|
265 | 268 |
</tr> |
266 | 269 |
<?php |
267 |
for ($v = 0; $v == 0 || ($vue == "trimestre" && $v < 3) || ($vue == "année" && $v < 12); $v++) { |
|
270 |
for ($v = 0; $v < $nbMois; $v++) { |
|
268 | 271 |
$ts = strtotime("+$v month", strtotime($dateDeb)); |
269 | 272 |
$date_annee = date("Y", $ts); |
270 | 273 |
$date_mois = date("m", $ts); |
Formats disponibles : Unified diff