<?php

define('PAGE', 'HOME');
require 'conf/conf-admin.php';
require 'conf/conf_page.php';
echo $twig->render('index-admin.twig', array('nbCommandes' => commandesManager::countCommandesValidees(), 'nbEncours' => commandesManager::countCommandesEncours()));
<?php

require 'conf/conf-admin.php';
echo $twig->render('valide-admin.twig', array('commandeValide' => commandesManager::getAllCommandesValide()));
Exemple #3
0
<?php

define('PAGE', 'HOME');
require 'conf/conf.php';
require 'conf/conf_page.php';
$nbArticles = isset($_SESSION['cart']) ? count($_SESSION['cart']) : '0';
echo $twig->render('index.twig', array('nbCommandes' => commandesManager::countCommandesValideesByIdClient($_SESSION['customer']['idClient']), 'nbEncours' => commandesManager::countCommandesEncoursByIdClient($_SESSION['customer']['idClient']), 'commandes' => commandesManager::getAllCommandes(), 'nbArticles' => $nbArticles, 'PAGE' => $_PAGE));
<?php

require 'conf/conf-admin.php';
if (isset($_GET['id']) && !empty($_GET['id'])) {
    $commande = commandesManager::getCommandesById($_GET['id']);
    $commande->setValide('1');
    commandesManager::updateCommandes($commande);
    Utils::redirect('en-cours-admin.php');
} elseif (isset($_GET['detail']) && !empty($_GET['detail'])) {
    Utils::redirect('detail-admin.php?id=' . $_GET['detail']);
}
echo $twig->render('en-cours-admin.twig', array('commandeEnCours' => commandesManager::getAllCommandesEnCours()));