コード例 #1
0
ファイル: promo.php プロジェクト: anti-conformiste/thelia1
<?php

require_once "auth.php";
require_once "../fonctions/divers.php";
if (!est_autorise("acces_catalogue")) {
    exit;
}
use Symfony\Component\HttpFoundation\Request;
$request = Request::createFromGlobals();
$page = $request->get('page', 1);
$pagination = new PaginationAdmin(PromoAdmin::getInstance()->getRequest('count'), $page);
$errorCode = 0;
$addError = 0;
$editError = array();
try {
    ActionsAdminPromo::getInstance()->action($request);
} catch (TheliaAdminException $e) {
    $errorCode = $e->getCode();
    switch ($errorCode) {
        case TheliaAdminException::PROMO_ADD_ERROR:
            $addError = 1;
            $errorData = $e->getData();
            break;
        case TheliaAdminException::PROMO_EDIT_ERROR:
            $editError[$request->get("id")] = 1;
            break;
    }
}
?>
<!DOCTYPE html>
<html lang="fr">
コード例 #2
0
ファイル: commande.php プロジェクト: anti-conformiste/thelia1
    case 'supprcmd':
        $commande = new Commande();
        if ($commande->charger_ref($ref)) {
            $commande->annuler();
            redirige('commande.php?page=' . $page . '&statut=' . $statut);
        }
}
if ($client != "") {
    $search .= " and client=\"{$client}\"";
}
$commande = new Commande();
if ($page == "") {
    $page = 1;
}
$query = OrderAdmin::getInstance()->getRequest('count', $search);
$pagination = new PaginationAdmin($query, $page);
if ($classement == "client") {
    $critere = "client";
    $order = "asc";
} else {
    if ($classement == "statut") {
        $critere = "statut";
        $order = "asc";
    } else {
        $critere = "date";
        $order = "desc";
    }
}
?>
<!DOCTYPE html>
<html lang="fr">