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,177 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_3mois.php");
?>
<p align="right" class="geneva11Reg_3B4B5B"><a href="accueil.php" class="lien04">Accueil </a> <img src="gfx/suivant.gif" width="12" height="9" border="0" />
<select id="staturl">
<option value="#"></option><br />
<option value="module.php?nom=statsplus&graph=ouverture">Ventes par an</option>
<option value="module.php?nom=statsplus&graph=3mois">Ventes sur 12 mois</option>
<option value="module.php?nom=statsplus&graph=heures">Ventes par heure</option>
<option value="module.php?nom=statsplus&graph=jours">Ventes par jour</option>
<option value="module.php?nom=statsplus&graph=produits">Produits</option>
<option value="module.php?nom=statsplus&graph=commandes">Commandes</option>
<option value="module.php?nom=statsplus&graph=clients">Clients</option>
<option value="module.php?nom=statsplus&graph=paiement">Paiements</option>
</select>
<a href="module.php?nom=statsplus" class="lien04">Stats</a> <img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="#" class="lien04">Stats de ventes sur les 12 derniers mois</a>
</p>
<?php
//-2505600 * 2
if($_REQUEST['ts'] == "")
$ts = mktime(0, 0, 0, date("m"), date("d"), date("Y"))-15033600 * 2;
else
$ts = $_REQUEST['ts'];
$tssave = $ts;
for($i=0; $i<13; $i++){
$moisorig = date("m", $tssave);
while(date("m", $tssave) == $moisorig) $tssave -=1000;
}
$avant = $tssave;
$tssave = $ts;
for($i=0; $i<13; $i++){
$moisorig = date("m", $tssave);
while(date("m", $tssave) == $moisorig) $tssave +=1000;
}
$apres = $tssave;
?>
<img src="../client/plugins/statsplus/graphs/graph_3mois.php?ts=<?php echo $ts; ?>" alt="-" />
<a href="module.php?nom=statsplus&graph=3mois&ts=<?php echo $avant; ?>">Avant</a>
<a href="module.php?nom=statsplus&graph=3mois&ts=<?php echo $apres; ?>" style="padding-left: 860px;">Apres</a>
<br /><br />
<?php
for($i=0;$i<13;$i++){
$moisorig = date("m", $ts);
$caport[] = calc(date("m", $ts), date("Y", $ts), 100, 1);
$casansport[] = calc(date("m", $ts), date("Y", $ts), 100, 0);
$mois[] = trouve_mois(date("m", $ts)) . " " . date("Y", $ts);
$nb[] = calc(date("m", $ts), date("Y", $ts), 100, 1, 1);
while(date("m", $ts) == $moisorig) $ts +=1000;
}
?>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="100%" height="30" class="titre_cellule_tres_sombre">Statistiques</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="cellule_sombre">
<td width="8%" height="30">&nbsp;</td>
<td width="8%" height="30"><?php echo $mois[0]; ?></td>
<td width="8%" height="30"><?php echo $mois[1]; ?></td>
<td width="8%" height="30"><?php echo $mois[2]; ?></td>
<td width="8%" height="30"><?php echo $mois[3]; ?></td>
<td width="8%" height="30"><?php echo $mois[4]; ?></td>
<td width="8%" height="30"><?php echo $mois[5]; ?></td>
<td width="8%" height="30"><?php echo $mois[6]; ?></td>
<td width="8%" height="30"><?php echo $mois[7]; ?></td>
<td width="8%" height="30"><?php echo $mois[8]; ?></td>
<td width="8%" height="30"><?php echo $mois[9]; ?></td>
<td width="8%" height="30"><?php echo $mois[10]; ?></td>
<td width="8%" height="30"><?php echo $mois[11]; ?></td>
<td width="8%" height="30"><?php echo $mois[12]; ?></td>
</tr>
<tr class="cellule_sombre">
<td width="8%" height="30">CA TTC</td>
<td width="8%" height="30"><?php echo round($caport[0]); ?></td>
<td width="8%" height="30"><?php echo round($caport[1]); ?></td>
<td width="8%" height="30"><?php echo round($caport[2]); ?></td>
<td width="8%" height="30"><?php echo round($caport[3]); ?></td>
<td width="8%" height="30"><?php echo round($caport[4]); ?></td>
<td width="8%" height="30"><?php echo round($caport[5]); ?></td>
<td width="8%" height="30"><?php echo round($caport[6]); ?></td>
<td width="8%" height="30"><?php echo round($caport[7]); ?></td>
<td width="8%" height="30"><?php echo round($caport[8]); ?></td>
<td width="8%" height="30"><?php echo round($caport[9]); ?></td>
<td width="8%" height="30"><?php echo round($caport[10]); ?></td>
<td width="8%" height="30"><?php echo round($caport[11]); ?></td>
<td width="8%" height="30"><?php echo round($caport[12]); ?></td>
</tr>
<tr class="cellule_sombre">
<td width="8%" height="30">CA HT</td>
<td width="8%" height="30"><?php echo round($caport[0]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[1]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[2]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[3]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[4]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[5]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[6]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[7]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[8]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[9]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[10]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[11]/1.20, 0); ?></td>
<td width="8%" height="30"><?php echo round($caport[12]/1.20, 0); ?></td>
</tr>
<tr class="cellule_sombre">
<td width="8%" height="30">CA hors frais de port TTC</td>
<td width="8%" height="30"><?php echo round($casansport[0]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[1]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[2]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[3]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[4]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[5]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[6]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[7]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[8]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[9]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[10]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[11]); ?></td>
<td width="8%" height="30"><?php echo round($casansport[12]); ?></td>
</tr>
<tr class="cellule_sombre">
<td width="8%" height="30">Panier moyen TTC</td>
<td width="8%" height="30"><?php if($nb[0]) echo round($caport[0] / $nb[0], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[1]) echo round($caport[1] / $nb[1], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[2]) echo round($caport[2] / $nb[2], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[3]) echo round($caport[3] / $nb[3], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[4]) echo round($caport[4] / $nb[4], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[5]) echo round($caport[5] / $nb[5], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[6]) echo round($caport[6] / $nb[6], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[7]) echo round($caport[7] / $nb[7], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[8]) echo round($caport[8] / $nb[8], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[9]) echo round($caport[9] / $nb[9], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[10]) echo round($caport[10] / $nb[10], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[11]) echo round($caport[11] / $nb[11], 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[12]) echo round($caport[12] / $nb[12], 0); else echo "-"; ?></td>
</tr>
<tr class="cellule_sombre">
<td width="8%" height="30">Panier moyen HT</td>
<td width="8%" height="30"><?php if($nb[0]) echo round($caport[0] / $nb[0] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[1]) echo round($caport[1] / $nb[1] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[2]) echo round($caport[2] / $nb[2] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[3]) echo round($caport[3] / $nb[3] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[4]) echo round($caport[4] / $nb[4] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[5]) echo round($caport[5] / $nb[5] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[6]) echo round($caport[6] / $nb[6] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[7]) echo round($caport[7] / $nb[7] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[8]) echo round($caport[8] / $nb[8] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[9]) echo round($caport[9] / $nb[9] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[10]) echo round($caport[10] / $nb[10] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[11]) echo round($caport[11] / $nb[11] / 1.20, 0); else echo "-"; ?></td>
<td width="8%" height="30"><?php if($nb[12]) echo round($caport[12] / $nb[12] / 1.20, 0); else echo "-"; ?></td>
</tr>
</table>

View File

@@ -0,0 +1,84 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<p align="right" class="geneva11Reg_3B4B5B"><a href="accueil.php" class="lien04">Accueil </a> <img src="gfx/suivant.gif" width="12" height="9" border="0" />
<select id="staturl">
<option value="#"></option>
<option value="module.php?nom=statsplus&graph=ouverture">Ventes par an</option>
<option value="module.php?nom=statsplus&graph=3mois">Ventes sur 12 mois</option>
<option value="module.php?nom=statsplus&graph=heures">Ventes par heure</option>
<option value="module.php?nom=statsplus&graph=jours">Ventes par jour</option>
<option value="module.php?nom=statsplus&graph=produits">Produits</option>
<option value="module.php?nom=statsplus&graph=commandes">Commandes</option>
<option value="module.php?nom=statsplus&graph=clients">Clients</option>
<option value="module.php?nom=statsplus&graph=paiement">Paiements</option>
</select>
<img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="#" class="lien04">Stats de ventes clients</a>
</p>
<!--
<img src="../client/plugins/statsplus/graphs/graph_produits.php" alt="-" />
-->
<?php
$client = new Client();
$refer = array();
$query_test = "select id,nom,prenom from $client->table";
$resul_test = mysql_query($query_test, $client->link);
while($row_test = mysql_fetch_array($resul_test)){
$commande = new Commande();
$query_testa = "select * from $commande->table WHERE client='".$row_test[0]."' AND (statut='2' OR statut='3' OR statut='4')";
$resul_testa = mysql_query($query_testa, $commande->link);
while($row_testa = mysql_fetch_array($resul_testa)){
$venteprod = new Venteprod();
$cpta += 1;
$query_testb = "select * from $venteprod->table where commande='".$row_testa[0]."'";
$resul_testb = mysql_query($query_testb, $venteprod->link);
while($row_testb = mysql_fetch_array($resul_testb)){
$cptb += $row_testb[6];
}
}
if($cpta >=1){
$refer[] = $row_test[1].",".$row_test[2].",".$cpta.",".$cptb;
}
$cpta='';
$cptb='';
}
$annee = substr($row_test->date, 0, 4);
/*
$query_test = "select * from $commande->table where statut>=2 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);
*/
?>
<table cellpadding="0" cellspacing="0" border="0" width="100%" id="stats" class="display">
<thead>
<tr class="cellule_sombre">
<th height="30">Nom</th>
<th height="30">Pr&eacute;nom</th>
<th height="30">Nb</th>
<th height="30">C.A &euro;</th>
</tr>
</thead>
<tbody>
<?php
foreach($refer as $ref){
$cut = preg_split('#,#', $ref);
?>
<tr class="cellule_claire">
<td height="30"><?php echo $cut[0]; ?></td>
<td height="30"><?php echo $cut[1]; ?></td>
<td height="30"><?php echo $cut[2]; ?></td>
<td height="30"><?php echo ceil($cut[3]); ?></td>
</tr>
<?php
}
?>
<tbody>
</table>

View File

@@ -0,0 +1,125 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<p align="right" class="geneva11Reg_3B4B5B"><a href="accueil.php" class="lien04">Accueil </a> <img src="gfx/suivant.gif" width="12" height="9" border="0" />
<select id="staturl">
<option value="#"></option>
<option value="module.php?nom=statsplus&graph=ouverture">Ventes par an</option>
<option value="module.php?nom=statsplus&graph=3mois">Ventes sur 12 mois</option>
<option value="module.php?nom=statsplus&graph=heures">Ventes par heure</option>
<option value="module.php?nom=statsplus&graph=jours">Ventes par jour</option>
<option value="module.php?nom=statsplus&graph=produits">Produits</option>
<option value="module.php?nom=statsplus&graph=commandes">Commandes</option>
<option value="module.php?nom=statsplus&graph=clients">Clients</option>
<option value="module.php?nom=statsplus&graph=paiement">Paiements</option>
</select>
<img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="#" class="lien04">Stats commandes</a>
</p>
<!--
<img src="../client/plugins/statsplus/graphs/graph_produits.php" alt="-" />
-->
<?php
$commande = new Commande();
//$refer = array();
$query_testa = "select * from $commande->table";
$resul_testa = mysql_query($query_testa, $commande->link);
while($row_testa = mysql_fetch_array($resul_testa)){
if($row_testa[18] == 1){
$cpta +=1;
$venteprod = new Venteprod();
$query_testb = "select * from $venteprod->table where commande='".$row_testa[0]."'";
$resul_testb = mysql_query($query_testb, $venteprod->link);
while($row_testb = mysql_fetch_array($resul_testb)){
$cptab += $row_testb[6];
}
}elseif($row_testa[18] == 2){
$cptb +=1;
$venteprod = new Venteprod();
$query_testb = "select * from $venteprod->table where commande='".$row_testa[0]."'";
$resul_testb = mysql_query($query_testb, $venteprod->link);
while($row_testb = mysql_fetch_array($resul_testb)){
$cptbb += $row_testb[6];
}
}elseif($row_testa[18] == 3){
$cptc +=1;
$venteprod = new Venteprod();
$query_testb = "select * from $venteprod->table where commande='".$row_testa[0]."'";
$resul_testb = mysql_query($query_testb, $venteprod->link);
while($row_testb = mysql_fetch_array($resul_testb)){
$cptcb += $row_testb[6];
}
}elseif($row_testa[18] == 4){
$cptd +=1;
$venteprod = new Venteprod();
$query_testb = "select * from $venteprod->table where commande='".$row_testa[0]."'";
$resul_testb = mysql_query($query_testb, $venteprod->link);
while($row_testb = mysql_fetch_array($resul_testb)){
$cptdb += $row_testb[6];
}
}elseif($row_testa[18] == 5){
$cpte +=1;
$venteprod = new Venteprod();
$query_testb = "select * from $venteprod->table where commande='".$row_testa[0]."'";
$resul_testb = mysql_query($query_testb, $venteprod->link);
while($row_testb = mysql_fetch_array($resul_testb)){
$cpteb += $row_testb[6];
}
}elseif($row_testa[18] == 6){
$cptf +=1;
$venteprod = new Venteprod();
$query_testb = "select * from $venteprod->table where commande='".$row_testa[0]."'";
$resul_testb = mysql_query($query_testb, $venteprod->link);
while($row_testb = mysql_fetch_array($resul_testb)){
$cptfb += $row_testb[6];
}
}
}
$annee = substr($row_test->date, 0, 4);
/*
$query_test = "select * from $commande->table where statut>=2 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);
*/
?>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="display">
<thead>
<tr class="cellule_sombre">
<th height="30">Nb</th>
<th height="30">Non r&eacute;gl&eacute;es</th>
<th height="30">Nb</th>
<th height="30">R&eacute;gl&eacute;es</th>
<th height="30">Nb</th>
<th height="30">En Traitement</th>
<th height="30">Nb</th>
<th height="30">Exp&eacute;di&eacute;es</th>
<th height="30">Nb</th>
<th height="30">Rembours&eacute;es</th>
<th height="30">Nb</th>
<th height="30">Attente ch&egrave;que</th>
</tr>
</thead>
<tbody>
<tr class="cellule_claire">
<td height="30"><?php echo $cpta; ?></td>
<td height="30"><?php echo ceil($cptab); ?> &euro;</td>
<td height="30"><?php echo $cptb; ?></td>
<td height="30"><?php echo ceil($cptbb); ?> &euro;</td>
<td height="30"><?php echo $cptc; ?></td>
<td height="30"><?php echo ceil($cptcb); ?> &euro;</td>
<td height="30"><?php echo $cptd; ?></td>
<td height="30"><?php echo ceil($cptdb); ?> &euro;</td>
<td height="30"><?php echo $cpte; ?></td>
<td height="30"><?php echo ceil($cpteb); ?> &euro;</td>
<td height="30"><?php echo $cptf; ?></td>
<td height="30"><?php echo ceil($cptfb); ?> &euro;</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,64 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_heures.php");
?>
<p align="right" class="geneva11Reg_3B4B5B"><a href="accueil.php" class="lien04">Accueil </a> <img src="gfx/suivant.gif" width="12" height="9" border="0" />
<select id="staturl">
<option value="#"></option><br />
<option value="module.php?nom=statsplus&graph=ouverture">Ventes par an</option>
<option value="module.php?nom=statsplus&graph=3mois">Ventes sur 12 mois</option>
<option value="module.php?nom=statsplus&graph=heures">Ventes par heure</option>
<option value="module.php?nom=statsplus&graph=jours">Ventes par jour</option>
<option value="module.php?nom=statsplus&graph=produits">Produits</option>
<option value="module.php?nom=statsplus&graph=commandes">Commandes</option>
<option value="module.php?nom=statsplus&graph=clients">Clients</option>
<option value="module.php?nom=statsplus&graph=paiement">Paiements</option>
</select>
<a href="module.php?nom=statsplus" class="lien04">Stats</a> <img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="#" class="lien04">Stats de ventes par heure</a>
<?php
for($i=0;$i<24;$i++){
$caport[] = ca($i, 100, 1);
$casansport[] = ca($i, 100, 0);
$nb[] = ca($i, 100, 0, 1);
}
?>
<img src="../client/plugins/statsplus/graphs/graph_heures.php" alt="-" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="cellule_sombre">
<td height="30">Heure</td>
<td height="30">Chiffre d'affaires TTC</td>
<td height="30">Chiffre d'affaires HT</td>
<td height="30">Chiffre d'affaires hors frais de port TTC</td>
<td height="30">Panier moyen TTC</td>
<td height="30">Panier moyen HT</td>
</tr>
<?php
for($i=0; $i<24; $i ++){
?>
<tr class="cellule_sombre">
<td height="30"><?php if(strlen($i) == 1) echo "0"; echo $i; ?></td>
<td height="30"><?php echo $caport[$i]; ?></td>
<td height="30"><?php echo round($caport[$i]/1.196, 2); ?></td>
<td height="30"><?php echo $casansport[$i]; ?></td>
<td height="30"><?php if($nb[$i]) echo round($caport[$i] / $nb[$i], 2); else echo "-"; ?></td>
<td height="30"><?php if($nb[$i]) echo round($caport[$i] / $nb[$i] / 1.196, 2); else echo "-"; ?></td>
</tr>
<?php
}
?>
</table>

View File

@@ -0,0 +1,87 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_jours.php");
?>
<p align="right" class="geneva11Reg_3B4B5B"><a href="accueil.php" class="lien04">Accueil </a> <img src="gfx/suivant.gif" width="12" height="9" border="0" />
<select id="staturl">
<option value="#"></option><br />
<option value="module.php?nom=statsplus&graph=ouverture">Ventes par an</option>
<option value="module.php?nom=statsplus&graph=3mois">Ventes sur 12 mois</option>
<option value="module.php?nom=statsplus&graph=heures">Ventes par heure</option>
<option value="module.php?nom=statsplus&graph=jours">Ventes par jour</option>
<option value="module.php?nom=statsplus&graph=produits">Produits</option>
<option value="module.php?nom=statsplus&graph=commandes">Commandes</option>
<option value="module.php?nom=statsplus&graph=clients">Clients</option>
<option value="module.php?nom=statsplus&graph=paiement">Paiements</option>
</select>
<a href="module.php?nom=statsplus" class="lien04">Stats</a> <img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="#" class="lien04">Stats de ventes par jour</a>
</p>
<img src="../client/plugins/statsplus/graphs/graph_jours.php" alt="-" />
<?php
$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++){
$caport[] = ca($i, $liste, 100, 1);
$casansport[] = ca($i, $liste, 100, 0);
$nb[] = ca($i, $liste, 100, 1, 1);
$j[] = trouve_jour($i);
}
$caport[] = ca(0, $liste, 100, 1);
$casansport[] = ca(0, $liste, 100, 0);
$nb[] = ca(0, $liste, 100, 1, 1);
$j[] = trouve_jour(0);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="cellule_sombre">
<td height="30">Jour</td>
<td height="30">Chiffre d'affaires TTC</td>
<td height="30">Chiffre d'affaires HT</td>
<td height="30">Chiffre d'affaires hors frais de port TTC</td>
<td height="30">Panier moyen TTC</td>
<td height="30">Panier moyen HT</td>
</tr>
<?php
for($i=0; $i<count($nb); $i ++){
?>
<tr class="cellule_sombre">
<td height="30"><?php echo $j[$i]; ?></td>
<td height="30"><?php echo $caport[$i]; ?></td>
<td height="30"><?php echo round($caport[$i]/1.196, 2); ?></td>
<td height="30"><?php echo $casansport[$i]; ?></td>
<td height="30"><?php if($nb[$i]) echo round($caport[$i] / $nb[$i], 2); else echo "-"; ?></td>
<td height="30"><?php if($nb[$i]) echo round($caport[$i] / $nb[$i] / 1.196, 2); else echo "-"; ?></td>
</tr>
<?php
}
?>
</table>

View File

@@ -0,0 +1,81 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_ouverture.php");
?>
<p align="right" class="geneva11Reg_3B4B5B"><a href="accueil.php" class="lien04">Accueil </a> <img src="gfx/suivant.gif" width="12" height="9" border="0" />
<select id="staturl">
<option value="#"></option><br />
<option value="module.php?nom=statsplus&graph=ouverture">Ventes par an</option>
<option value="module.php?nom=statsplus&graph=3mois">Ventes sur 12 mois</option>
<option value="module.php?nom=statsplus&graph=heures">Ventes par heure</option>
<option value="module.php?nom=statsplus&graph=jours">Ventes par jour</option>
<option value="module.php?nom=statsplus&graph=produits">Produits</option>
<option value="module.php?nom=statsplus&graph=commandes">Commandes</option>
<option value="module.php?nom=statsplus&graph=clients">Clients</option>
<option value="module.php?nom=statsplus&graph=paiement">Paiements</option>
</select>
<a href="module.php?nom=statsplus" class="lien04">Stats</a> <img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="#" class="lien04">Stats de ventes par an</a>
</p>
<img src="../client/plugins/statsplus/graphs/graph_ouverture.php" alt="-" />
<?php
$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++){
$caport[] = ca($i, 100, 1);
$casansport[] = ca($i, 100, 0);
$nb[] = ca($i, 100, 0, 1);
$lstannee[] = $i;
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="cellule_sombre">
<td height="30">Ann&eacute;e</td>
<td height="30">Chiffre d'affaires TTC</td>
<td height="30">Chiffre d'affaires HT</td>
<td height="30">Chiffre d'affaires hors frais de port TTC</td>
<td height="30">Panier moyen TTC</td>
<td height="30">Panier moyen HT</td>
</tr>
<?php
for($i=0;$i<count($caport);$i++){
?>
<tr class="cellule_sombre">
<td height="30"><?php echo $lstannee[$i]; ?></td>
<td height="30"><?php echo $caport[$i]; ?></td>
<td height="30"><?php echo round($caport[$i]/1.196, 2); ?></td>
<td height="30"><?php echo $casansport[$i]; ?></td>
<td height="30"><?php if($nb[$i]) echo round($caport[$i] / $nb[$i], 2); else echo "-"; ?></td>
<td height="30"><?php if($nb[$i]) echo round($caport[$i] / $nb[$i] / 1.196, 2); else echo "-"; ?></td>
</tr>
<?php
}
?>
</table>

View File

@@ -0,0 +1,81 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<?php
include_once(realpath(dirname(__FILE__)) . "/../calc/calc_ouverture.php");
?>
<p align="right" class="geneva11Reg_3B4B5B"><a href="accueil.php" class="lien04">Accueil </a> <img src="gfx/suivant.gif" width="12" height="9" border="0" />
<select id="staturl">
<option value="#"></option><br />
<option value="module.php?nom=statsplus&graph=ouverture">Ventes par an</option>
<option value="module.php?nom=statsplus&graph=3mois">Ventes sur 12 mois</option>
<option value="module.php?nom=statsplus&graph=heures">Ventes par heure</option>
<option value="module.php?nom=statsplus&graph=jours">Ventes par jour</option>
<option value="module.php?nom=statsplus&graph=produits">Produits</option>
<option value="module.php?nom=statsplus&graph=commandes">Commandes</option>
<option value="module.php?nom=statsplus&graph=clients">Clients</option>
<option value="module.php?nom=statsplus&graph=paiement">Paiements</option>
</select>
<a href="module.php?nom=statsplus" class="lien04">Stats</a> <img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="#" class="lien04">Stats de ventes par an</a>
</p>
<img src="../client/plugins/statsplus/graphs/graph_ouverture.php" alt="-" />
<?php
$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++){
$caport[] = ca($i, 100, 1);
$casansport[] = ca($i, 100, 0);
$nb[] = ca($i, 100, 0, 1);
$lstannee[] = $i;
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="cellule_sombre">
<td height="30">Ann&eacute;e</td>
<td height="30">Chiffre d'affaires TTC</td>
<td height="30">Chiffre d'affaires HT</td>
<td height="30">Chiffre d'affaires hors frais de port TTC</td>
<td height="30">Panier moyen TTC</td>
<td height="30">Panier moyen HT</td>
</tr>
<?php
for($i=0;$i<count($caport);$i++){
?>
<tr class="cellule_sombre">
<td height="30"><?php echo $lstannee[$i]; ?></td>
<td height="30"><?php echo $caport[$i]; ?></td>
<td height="30"><?php echo round($caport[$i]/1.196, 2); ?></td>
<td height="30"><?php echo $casansport[$i]; ?></td>
<td height="30"><?php if($nb[$i]) echo round($caport[$i] / $nb[$i], 2); else echo "-"; ?></td>
<td height="30"><?php if($nb[$i]) echo round($caport[$i] / $nb[$i] / 1.196, 2); else echo "-"; ?></td>
</tr>
<?php
}
?>
</table>

View File

@@ -0,0 +1,77 @@
<?php
include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
autorisation("statsplus");
?>
<p align="right" class="geneva11Reg_3B4B5B"><a href="accueil.php" class="lien04">Accueil </a> <img src="gfx/suivant.gif" width="12" height="9" border="0" />
<select id="staturl">
<option value="#"></option>
<option value="module.php?nom=statsplus&graph=ouverture">Ventes par an</option>
<option value="module.php?nom=statsplus&graph=3mois">Ventes sur 12 mois</option>
<option value="module.php?nom=statsplus&graph=heures">Ventes par heure</option>
<option value="module.php?nom=statsplus&graph=jours">Ventes par jour</option>
<option value="module.php?nom=statsplus&graph=produits">Produits</option>
<option value="module.php?nom=statsplus&graph=commandes">Commandes</option>
<option value="module.php?nom=statsplus&graph=clients">Clients</option>
<option value="module.php?nom=statsplus&graph=paiement">Paiements</option>
</select>
<img src="gfx/suivant.gif" width="12" height="9" border="0" /><a href="#" class="lien04">Stats de ventes produits</a>
</p>
<!--
<img src="../client/plugins/statsplus/graphs/graph_produits.php" alt="-" />
-->
<?php
$venteprod = new Venteprod();
$refer = array();
$query_test = "select * from $venteprod->table group by ref";
$resul_test = mysql_query($query_test, $venteprod->link);
while($row_test = mysql_fetch_array($resul_test)){
$query_testa = "select * from $venteprod->table where ref='".$row_test[1]."'";
$resul_testa = mysql_query($query_testa, $venteprod->link);
while($row_testa = mysql_fetch_array($resul_testa)){
$cpta += 1;
$cptb += $row_testa[6];
}
$refer[] = $row_test[1].",".$row_test[2].",".$cpta.",".$cptb;
$cpta='';
$cptb='';
}
$annee = substr($row_test->date, 0, 4);
/*
$query_test = "select * from $commande->table where statut>=2 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);
*/
?>
<table cellpadding="0" cellspacing="0" border="0" width="100%" id="stats" class="display">
<thead>
<tr class="cellule_sombre">
<th height="30">R&eacute;f&eacute;rence</th>
<th height="30">D&eacute;signation</th>
<th height="30">Qt&eacute;</th>
<th height="30">C.A &euro;</th>
</tr>
</thead>
<tbody>
<?php
foreach($refer as $ref){
$cut = preg_split('#,#', $ref);
?>
<tr class="cellule_claire">
<td height="30"><?php echo $cut[0]; ?></td>
<td height="30"><?php echo preg_replace('#- Taille.*|- Couleur.*|Taille.*|Couleur.*#is','',$cut[1]); ?></td>
<td height="30"><?php echo $cut[2]; ?></td>
<td height="30"><?php echo ceil($cut[3]); ?></td>
</tr>
<?php
}
?>
<tbody>
</table>