From 4b44fa8a220f14a0572a41617e459e6d139fd6da Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 24 Nov 2003 11:34:49 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20s=E9curit=E9=20acc=E9s=20client=20et=20?= =?UTF-8?q?utilisation=20de=20la=20classe=20BarGraph?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/stats/month.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/htdocs/commande/stats/month.php b/htdocs/commande/stats/month.php index c66839b9a9b..52fecd3d451 100644 --- a/htdocs/commande/stats/month.php +++ b/htdocs/commande/stats/month.php @@ -19,12 +19,19 @@ * $Source$ * */ - require("./pre.inc.php"); require("../commande.class.php"); -require("../../graph.class.php"); require("./commandestats.class.php"); +/* + * Sécurité accés client + */ +if ($user->societe_id > 0) +{ + $action = ''; + $socidp = $user->societe_id; +} + llxHeader(); $mesg = ''; @@ -34,7 +41,7 @@ $mesg = ''; * */ -$stats = new CommandeStats($db); +$stats = new CommandeStats($db, $socidp); $year = $_GET["year"]; @@ -49,7 +56,7 @@ $data = $stats->getNbCommandeByMonth($year); $filev = "/document/images/commande$year.png"; -$px = new Graph($data); +$px = new BarGraph($data); $px->SetMaxValue($px->GetMaxValue()); $px->SetWidth(500); $px->SetHeight(280); @@ -69,7 +76,7 @@ for ($i = 1 ; $i < 13 ; $i++) $file_amount = "/document/images/commandeamount.png"; -$px = new Graph($data); +$px = new BarGraph($data); $px->SetMaxValue($px->GetAmountMaxValue()); $px->SetWidth(500); $px->SetHeight(250); @@ -85,7 +92,7 @@ for ($i = 1 ; $i < 13 ; $i++) $data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]); } $file_avg = "/document/images/commandeaverage.png"; -$px = new Graph($data); +$px = new BarGraph($data); $px->SetMaxValue($px->GetAmountMaxValue()); $px->SetWidth(500); $px->SetHeight(250);