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,18 @@
<?php
require_once(realpath(dirname(__FILE__)) . "/../classes/Codepromo_controleur.class.php");
class Codepromo_controleur_nbart_panier extends Codepromo_controleur{
function __construct(){
parent::__construct();
}
public static function nom(){
return "Nombre d'articles du panier";
}
public static function calcule(){
return $_SESSION['navig']->panier->nbart();
}
}
?>

View File

@@ -0,0 +1,26 @@
<?php
require_once(realpath(dirname(__FILE__)) . "/../classes/Codepromo_controleur.class.php");
class Codepromo_controleur_nbcommande_client extends Codepromo
{
public function __construct() {
parent::__construct();
}
public static function nom()
{
return "nombre de commandes passés par le client";
}
public static function calcule()
{
$query = "select count(id) as nb_commande from ".Commande::TABLE." where client=".$_SESSION['navig']->client->id." and statut not in (1,5)";
$cnx = new Cnx();
$result = mysql_query($query,$cnx->link);
return mysql_result($result, 0, "nb_commande");
}
}

View File

@@ -0,0 +1,25 @@
<?php
require_once(realpath(dirname(__FILE__)) . "/../classes/Codepromo_controleur.class.php");
class Codepromo_controleur_nbprod_panier extends Codepromo
{
public function __construct() {
parent::__construct();
}
public static function nom()
{
return "nombre total de produit(s)";
}
public static function calcule()
{
$total = 0;
foreach($_SESSION['navig']->panier->tabarticle as $index => $article){
$total += $article->quantite;
}
return $total;
}
}

View File

@@ -0,0 +1,18 @@
<?php
require_once(realpath(dirname(__FILE__)) . "/../classes/Codepromo_controleur.class.php");
class Codepromo_controleur_total_panier extends Codepromo_controleur{
function __construct(){
parent::__construct();
}
public static function nom(){
return "Total du panier";
}
public static function calcule(){
return $_SESSION['navig']->panier->total();
}
}
?>