Exemplo n.º 1
0
<?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()));
Exemplo n.º 2
0
<?php

require 'conf/conf-admin.php';
echo $twig->render('valide-admin.twig', array('commandeValide' => commandesManager::getAllCommandesValide()));
Exemplo n.º 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));
Exemplo n.º 4
0
<?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()));