diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php
index 8c6de10c3bd..32b59d2afbd 100644
--- a/htdocs/product/stats/fiche.php
+++ b/htdocs/product/stats/fiche.php
@@ -71,14 +71,13 @@ if ($_GET["id"])
rmdir(DOL_DOCUMENT_ROOT."/document/produits");
// Création répertoire pour images générées
- $dir = DOL_DOCUMENT_ROOT."/document/produit/".$product->id;
+ $dir = $conf->produit->dir_images."/".$product->id;
if (! file_exists($dir))
{
umask(0);
- if(!file_exists(DOL_DOCUMENT_ROOT."/document/produit")) {
- mkdir(DOL_DOCUMENT_ROOT."/document");
- mkdir(DOL_DOCUMENT_ROOT."/document/produit");
+ if(!file_exists($conf->produit->dir_images)) {
+ mkdir($conf->produit->dir_images);
}
if (! mkdir($dir, 0755))
{
@@ -86,7 +85,6 @@ if ($_GET["id"])
}
}
-
$img_propal_name = "propal12mois.png";
$filenbpropal = $dir . "/" . $img_propal_name;
$filenbvente = $dir . "/vente12mois.png";
@@ -176,10 +174,10 @@ if ($_GET["id"])
print '
';
- print ' ';
+ print ' id.'/'.$img_propal_name.'" alt="Propales sur les 12 derniers mois">';
print ' | TODO AUTRE GRAPHIQUE';
diff --git a/htdocs/product/stats/month.php b/htdocs/product/stats/month.php
deleted file mode 100644
index 09b3225475b..00000000000
--- a/htdocs/product/stats/month.php
+++ /dev/null
@@ -1,108 +0,0 @@
-
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- * $Source$
- *
- */
-
-require("./pre.inc.php");
-require("../commande.class.php");
-require("../../graph.class.php");
-require("./commandestats.class.php");
-
-llxHeader();
-
-$mesg = '';
-
-/*
- *
- *
- */
-
-$stats = new CommandeStats($db);
-
-$year = $_GET["year"];
-
-print_fiche_titre('Statistiques commandes '.$year, $mesg);
-
-$dir = DOL_DOCUMENT_ROOT;
-
-////////////////////////
-
-$res = $stats->getNbCommandeByMonth($year);
-
-$data = array();
-
-for ($i = 1 ; $i < 13 ; $i++)
-{
- $data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
-}
-
-$filev = "/document/images/commande.png";
-
-$px = new Graph();
-$px->SetYLabel("Nombre de commande");
-$px->draw($dir.$filev, $data, $year);
-
-$res = $stats->getCommandeAmountByMonth($year);
-
-$data = array();
-
-for ($i = 1 ; $i < 13 ; $i++)
-{
- $data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
-}
-
-$file_amount = "/document/images/commandeamount.png";
-
-$px = new Graph();
-$px->SetYLabel("Montant des commande");
-$px->draw($dir.$file_amount, $data, $year);
-
-$res = $stats->getCommandeAverageByMonth($year);
-
-$data = array();
-
-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();
-$px->SetYLabel("Montant moyen des commande");
-$px->draw($dir.$file_avg, $data, $year);
-
-
-print '';
-print '| Nombre de commande par mois | ';
-print '';
-print ' ';
-print ' | ';
-print '| Sommes des commandes | ';
-print '';
-print ' ';
-print ' | ';
-print '| Montant moyen des commande | ';
-print '';
-print ' ';
-print ' | ';
-
-$db->close();
-
-llxFooter("Dernière modification $Date$ révision $Revision$");
-?>
|