Ejemplo n.º 1
0
    }
}, "orders" => function () {
    if (isset($_SESSION["active"]) && $_SESSION["role"] == "customer") {
        CustomerController::orders();
    } else {
        ViewHelper::redirect(BASE_URL);
    }
}, "orders/detail" => function () {
    if (isset($_SESSION["active"]) && $_SESSION["role"] == "customer") {
        CustomerController::orderDetail();
    } else {
        ViewHelper::redirect(BASE_URL);
    }
}, "orders/canceled" => function () {
    if (isset($_SESSION["active"]) && $_SESSION["role"] == "customer") {
        CustomerController::ordersCancelled();
    } else {
        ViewHelper::redirect(BASE_URL);
    }
}, "orders/canceled/detail" => function () {
    if (isset($_SESSION["active"]) && $_SESSION["role"] == "customer") {
        CustomerController::orderCancelledDetail();
    } else {
        ViewHelper::redirect(BASE_URL);
    }
}, "orders/proven" => function () {
    if (isset($_SESSION["active"]) && $_SESSION["role"] == "customer") {
        CustomerController::ordersProven();
    } else {
        ViewHelper::redirect(BASE_URL);
    }