Пример #1
0
        $smarty->assign("orders_navigator", $navigatorHtml);
        $smarty->assign("user_orders", $orders);
        $smarty->assign("urlToSort", _getUrlToSort());
    } else {
        $callBackParam = array();
        _setCallBackParamsToSearchOrders($callBackParam);
        _copyDataFromGetToPage($smarty, $order_statuses);
        $orders = array();
        $offset = 0;
        $count = 0;
        $navigatorHtml = GetNavigatorHtml(_getUrlToNavigate(), 10, 'ordGetOrders', $callBackParam, $orders, $offset, $count);
        $smarty->assign("orders_navigator", $navigatorHtml);
        $smarty->assign("user_orders", $orders);
        $smarty->assign("urlToSort", _getUrlToSort());
    }
    $smarty->assign("urlToReturn", html_amp(_getReturnUrl()));
    $smarty->assign("order_statuses", $order_statuses);
    $smarty->assign("main_content_template", "order_history.tpl");
}
if (isset($order_detailed)) {
    $orderID = (int) $order_detailed;
    $smarty->assign("urlToReturn", html_amp(base64_decode($_GET["urlToReturn"])));
    $order = ordGetOrder($orderID);
    if (!$order || $order["customerID"] != regGetIdByLogin($_SESSION["log"])) {
        unset($order);
    } else {
        $orderContent = ordGetOrderContent($orderID);
        $order_status_report = xNl2Br(stGetOrderStatusReport($orderID));
        $order_statuses = ostGetOrderStatues();
        $smarty->assign("completed_order_status", ostGetCompletedOrderStatus());
        $smarty->assign("orderContent", $orderContent);
Пример #2
0
     }
     if (isset($_GET["show_all"])) {
         $smarty->assign("show_all", $_GET["show_all"]);
     }
     if (isset($_GET["status_del"])) {
         if (CONF_BACKEND_SAFEMODE) {
             //this action is forbidden when SAFE MODE is ON
             Redirect(ADMIN_FILE . "?dpt=custord&sub=new_orders&safemode=yes");
         }
         DelOrdersBySDL((int) $_GET["status_del"]);
         $smarty->assign("status_del_ok", 1);
     } else {
         $smarty->assign("status_del_ok", 0);
     }
     $smarty->hassign("urlToSort", _getUrlToSort());
     $smarty->hassign("urlToReturn", _getReturnUrl());
     $smarty->assign("order_statuses", $order_statuses);
 } else {
     if (isset($_GET["delete"])) {
         if (CONF_BACKEND_SAFEMODE) {
             //this action is forbidden when SAFE MODE is ON
             Redirect(ADMIN_FILE . "?dpt=custord&sub=new_orders&orders_detailed=yes&orderID=" . (int) $_GET["orderID"] . "&urlToReturn=" . $_GET["urlToReturn"] . "&safemode=yes");
         }
         ordDeleteOrder((int) $_GET["orderID"]);
         Redirect(base64_decode($_GET["urlToReturn"]));
     }
     if (isset($_POST["set_status"])) {
         if (CONF_BACKEND_SAFEMODE) {
             //this action is forbidden when SAFE MODE is ON
             Redirect(ADMIN_FILE . "?dpt=custord&sub=new_orders&orders_detailed=yes&orderID=" . $_GET["orderID"] . "&urlToReturn=" . $_GET["urlToReturn"] . "&safemode=yes");
         }