125 lines
4.9 KiB
PHP
125 lines
4.9 KiB
PHP
<?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églées</th>
|
|
<th height="30">Nb</th>
|
|
<th height="30">Réglées</th>
|
|
<th height="30">Nb</th>
|
|
<th height="30">En Traitement</th>
|
|
<th height="30">Nb</th>
|
|
<th height="30">Expédiées</th>
|
|
<th height="30">Nb</th>
|
|
<th height="30">Remboursées</th>
|
|
<th height="30">Nb</th>
|
|
<th height="30">Attente chèque</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="cellule_claire">
|
|
<td height="30"><?php echo $cpta; ?></td>
|
|
<td height="30"><?php echo ceil($cptab); ?> €</td>
|
|
<td height="30"><?php echo $cptb; ?></td>
|
|
<td height="30"><?php echo ceil($cptbb); ?> €</td>
|
|
<td height="30"><?php echo $cptc; ?></td>
|
|
<td height="30"><?php echo ceil($cptcb); ?> €</td>
|
|
<td height="30"><?php echo $cptd; ?></td>
|
|
<td height="30"><?php echo ceil($cptdb); ?> €</td>
|
|
<td height="30"><?php echo $cpte; ?></td>
|
|
<td height="30"><?php echo ceil($cpteb); ?> €</td>
|
|
<td height="30"><?php echo $cptf; ?></td>
|
|
<td height="30"><?php echo ceil($cptfb); ?> €</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|