Sort years

This commit is contained in:
Laurent Destailleur 2009-01-09 22:50:58 +00:00
parent dfb4b37c9a
commit d199656812

View File

@ -85,7 +85,7 @@ if ($_POST["action"] == 'gen')
llxHeader(); llxHeader();
$titre=($year?$langs->trans("PaymentsReportsForYear",$year):$langs->trans("PaymentsReports")); $titre=($year?$langs->trans("PaymentsReportsForYear",$year):$langs->trans("PaymentsReports"));
print_titre($titre); print_fiche_titre($titre);
// Formulaire de génération // Formulaire de génération
print '<br><form method="post" action="rapport.php?year='.$year.'">'; print '<br><form method="post" action="rapport.php?year='.$year.'">';
@ -135,11 +135,16 @@ if (is_dir($dir))
{ {
if (is_dir($dir.'/'.$file) && ! eregi('^\.',$file)) if (is_dir($dir.'/'.$file) && ! eregi('^\.',$file))
{ {
$found=1; $found=1;
print '<a href="rapport.php?year='.$file.'">'.$file.'</a> '; $linkforyear[]=$file;
} }
} }
} }
asort($linkforyear);
foreach($linkforyear as $cursoryear)
{
print '<a href="rapport.php?year='.$cursoryear.'">'.$cursoryear.'</a> &nbsp;';
}
if ($year) if ($year)
{ {