Affichage de l'annee Y-1

This commit is contained in:
Rodolphe Quiedeville 2006-12-06 13:44:32 +00:00
parent 7703896d59
commit 9b7a8145d2

View File

@ -115,10 +115,16 @@ if ($_GET["id"])
/* ************************************************************************** */ /* ************************************************************************** */
print "<div class=\"graph\">\n"; print "<div class=\"graph\">\n";
$year = strftime("%Y",time());
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file=entrepot-'.$entrepot->id.'-'.$year.'.png';
print '<img src="'.$url.'" alt="Valorisation du stock année '.($year).'">';
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file=entrepot-'.$entrepot->id.'.png'; if (file_exists(DOL_DATA_ROOT.'/graph/entrepot/entrepot-'.$entrepot->id.'-'.($year-1).'.png'))
{
print '<img src="'.$url.'" alt="Valorisation du stock">'; $url=DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&amp;file=entrepot-'.$entrepot->id.'-'.($year-1).'.png';
print '<br /><img src="'.$url.'" alt="Valorisation du stock année '.($year-1).'">';
}
print "</div>"; print "</div>";
} }