Initial commit

This commit is contained in:
2020-01-27 08:56:08 +01:00
commit b7525048d6
27129 changed files with 3409855 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Commande.class.php");
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Venteprod.class.php");
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_3mois.php");
$mois = date("m");
$annee = date("Y");
$values = array();
$days = array();
$ts = $_REQUEST['ts'];
for($i=0;$i<13;$i++){
$moisorig = date("m", $ts);
$values[] = calc(date("m", $ts), date("Y", $ts), 100, 1);
$days[] = trouve_mois(date("m", $ts)) . " " . date("Y", $ts);
while(date("m", $ts) == $moisorig) $ts +=1000;
}
include_once(realpath(dirname(__FILE__)) . "/../../../../lib/artichow/LinePlot.class.php");
$graph = new archiGraph(968, 200);
$graph->border->hide();
$graph->title = new archiLabel("Progression du chiffre d'Affaires sur 12 mois.",new archiFileFont(ARTICHOW_FONT.'/Arial', 10));
$plot = new archiLinePlot($values);
// $plot->setBackgroundColor(new archiColor(240, 240, 240));
$plot->hideLine(TRUE);
$plot->setFillColor(new archiColor(180, 180, 180, 75));
//$plot->grid->setBackgroundColor(new archiColor(235, 235, 180, 60));
$plot->grid->hideVertical();
$plot->yAxis->setLabelPrecision(2);
$plot->xAxis->setLabelText($days);
$plot->mark->setType(archiMark::IMAGE);
$plot->mark->setImage(new archiFileImage("../gfx/point_graph.png"));
$plot->label->set($values);
$plot->label->setColor(new archiColor(236, 128, 0));
$plot->label->move(0, -12);
$plot->label->setFont(new archiFileFont(ARTICHOW_FONT.'/Arial', 8));
$plot->label->setPadding(3, 1, 1, 0);
$plot->setSpace(2, 2, NULL, NULL);
$graph->add($plot);
$graph->draw();
?>

View File

@@ -0,0 +1,62 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Commande.class.php");
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Venteprod.class.php");
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_heures.php");
$mois = date("m");
$annee = date("Y");
$values = array();
$h = array();
for($i=0;$i<24;$i++){
$values[] = ca($i, 100, 1);
if(strlen($i) == 1)
$h[] = "0" . $i;
else
$h[] = $i;
}
include_once(realpath(dirname(__FILE__)) . "/../../../../lib/artichow/LinePlot.class.php");
$graph = new archiGraph(968, 200);
$graph->border->hide();
$graph->title = new archiLabel("Progression du chiffre d'Affaires par heure.",new archiFileFont(ARTICHOW_FONT.'/Arial', 10));
$plot = new archiLinePlot($values);
// $plot->setBackgroundColor(new archiColor(240, 240, 240));
$plot->hideLine(TRUE);
$plot->setFillColor(new archiColor(180, 180, 180, 75));
//$plot->grid->setBackgroundColor(new archiColor(235, 235, 180, 60));
$plot->grid->hideVertical();
$plot->yAxis->setLabelPrecision(2);
$plot->xAxis->setLabelText($h);
$plot->mark->setType(archiMark::IMAGE);
$plot->mark->setImage(new archiFileImage("../gfx/point_graph.png"));
$plot->label->set($values);
$plot->label->setColor(new archiColor(236, 128, 0));
$plot->label->move(0, -12);
$plot->label->setFont(new archiFileFont(ARTICHOW_FONT.'/Arial', 8));
$plot->label->setPadding(3, 1, 1, 0);
$plot->setSpace(2, 2, NULL, NULL);
$graph->add($plot);
$graph->draw();
?>

View File

@@ -0,0 +1,70 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Commande.class.php");
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Venteprod.class.php");
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_jours.php");
$mois = date("m");
$annee = date("Y");
$values = array();
$j = array();
$debut = mktime (0, 0, 0, 1, 1, date("Y"));
$now = mktime();
for($i=$debut; $i<=$now; $i+=86400){
$jour = date("w", $i);
$liste[$jour][] = date("Y-m-d", $i);
}
for($i=1;$i<7;$i++){
$values[] = ca($i, $liste, 100, 1);
$j[] = trouve_jour($i);
}
$values[] = ca(0, $liste, 100, 1);
$j[] = trouve_jour(0);
include_once(realpath(dirname(__FILE__)) . "/../../../../lib/artichow/LinePlot.class.php");
$graph = new archiGraph(968, 200);
$graph->border->hide();
$graph->title = new archiLabel("Progression du chiffre d'Affaires par jour.",new archiFileFont(ARTICHOW_FONT.'/Arial', 10));
$plot = new archiLinePlot($values);
// $plot->setBackgroundColor(new archiColor(240, 240, 240));
$plot->hideLine(TRUE);
$plot->setFillColor(new archiColor(180, 180, 180, 75));
//$plot->grid->setBackgroundColor(new archiColor(235, 235, 180, 60));
$plot->grid->hideVertical();
$plot->yAxis->setLabelPrecision(2);
$plot->xAxis->setLabelText($j);
$plot->mark->setType(archiMark::IMAGE);
$plot->mark->setImage(new archiFileImage("../gfx/point_graph.png"));
$plot->label->set($values);
$plot->label->setColor(new archiColor(236, 128, 0));
$plot->label->move(0, -12);
$plot->label->setFont(new archiFileFont(ARTICHOW_FONT.'/Arial', 8));
$plot->label->setPadding(3, 1, 1, 0);
$plot->setSpace(2, 2, NULL, NULL);
$graph->add($plot);
$graph->draw();
?>

View File

@@ -0,0 +1,71 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Commande.class.php");
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Venteprod.class.php");
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_ouverture.php");
$mois = date("m");
$annee = date("Y");
$values = array();
$days = array();
$commande = new Commande();
$query_test = "select * from $commande->table where statut>=2 and statut<>5 order by date limit 0,1";
$resul_test = mysql_query($query_test, $commande->link);
$row_test = mysql_fetch_object($resul_test);
$annee = substr($row_test->date, 0, 4);
$query_test = "select * from $commande->table where statut>=2 and statut<>5 order by date desc limit 0,1";
$resul_test = mysql_query($query_test, $commande->link);
$row_test = mysql_fetch_object($resul_test);
$anneefin = substr($row_test->date, 0, 4);
for($i=$annee;$i<=$anneefin;$i++){
$values[] = ca($i, 100, 1);
$days[] = $i;
}
include_once(realpath(dirname(__FILE__)) . "/../../../../lib/artichow/LinePlot.class.php");
$graph = new archiGraph(968, 200);
$graph->border->hide();
$graph->title = new archiLabel("Progression du chiffre d'Affaires par an.",new archiFileFont(ARTICHOW_FONT.'/Arial', 10));
$plot = new archiLinePlot($values);
// $plot->setBackgroundColor(new archiColor(240, 240, 240));
$plot->hideLine(TRUE);
$plot->setFillColor(new archiColor(180, 180, 180, 75));
//$plot->grid->setBackgroundColor(new archiColor(235, 235, 180, 60));
$plot->grid->hideVertical();
$plot->yAxis->setLabelPrecision(2);
$plot->xAxis->setLabelText($days);
$plot->mark->setType(archiMark::IMAGE);
$plot->mark->setImage(new archiFileImage("../gfx/point_graph.png"));
$plot->label->set($values);
$plot->label->setColor(new archiColor(236, 128, 0));
$plot->label->move(0, -12);
$plot->label->setFont(new archiFileFont(ARTICHOW_FONT.'/Arial', 8));
$plot->label->setPadding(3, 1, 1, 0);
$plot->setSpace(2, 2, NULL, NULL);
$graph->add($plot);
$graph->draw();
?>

View File

@@ -0,0 +1,72 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Commande.class.php");
include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Venteprod.class.php");
/*
$mois = date("m");
$annee = date("Y");
$values = array();
$days = array();
$commande = new Commande();
$query_test = "select * from $commande->table where statut>=2 and statut<>5 order by date limit 0,1";
$resul_test = mysql_query($query_test, $commande->link);
$row_test = mysql_fetch_object($resul_test);
$annee = substr($row_test->date, 0, 4);
$query_test = "select * from $commande->table where statut>=2 and statut<>5 order by date desc limit 0,1";
$resul_test = mysql_query($query_test, $commande->link);
$row_test = mysql_fetch_object($resul_test);
$anneefin = substr($row_test->date, 0, 4);
for($i=$annee;$i<=$anneefin;$i++){
$values[] = ca($i, 100, 1);
$days[] = $i;
}
include_once(realpath(dirname(__FILE__)) . "/../../../../lib/artichow/LinePlot.class.php");
$graph = new archiGraph(968, 200);
$graph->border->hide();
$graph->title = new archiLabel("Progression du chiffre d'Affaires par an.",new archiFileFont(ARTICHOW_FONT.'/Arial', 10));
$plot = new archiLinePlot($values);
// $plot->setBackgroundColor(new archiColor(240, 240, 240));
$plot->hideLine(TRUE);
$plot->setFillColor(new archiColor(180, 180, 180, 75));
//$plot->grid->setBackgroundColor(new archiColor(235, 235, 180, 60));
$plot->grid->hideVertical();
$plot->yAxis->setLabelPrecision(2);
$plot->xAxis->setLabelText($days);
$plot->mark->setType(archiMark::IMAGE);
$plot->mark->setImage(new archiFileImage("../gfx/point_graph.png"));
$plot->label->set($values);
$plot->label->setColor(new archiColor(236, 128, 0));
$plot->label->move(0, -12);
$plot->label->setFont(new archiFileFont(ARTICHOW_FONT.'/Arial', 8));
$plot->label->setPadding(3, 1, 1, 0);
$plot->setSpace(2, 2, NULL, NULL);
$graph->add($plot);
$graph->draw();
*/
?>