Ejemplo n.º 1
0
        $smarty->assign("order_statuses", $order_statuses);
        $smarty->assign("order_detailed", 1);
        $smarty->assign("main_content_template", "order_history.tpl");
    }
}
if (isset($p_order_detailed)) {
    $orderID = (int) $p_order_detailed;
    $order = ordGetOrder($orderID);
    if (!$order) {
        header("HTTP/1.0 404 Not Found");
        header("HTTP/1.1 404 Not Found");
        header("Status: 404 Not Found");
        die(ERROR_404_HTML);
    }
    if ($order["customerID"] != regGetIdByLogin($_SESSION["log"])) {
        unset($order);
        Redirect("index.php?register_authorization=yes");
    } else {
        $orderContent = ordGetOrderContent($orderID);
        $order_status_report = xNl2Br(stGetOrderStatusReport($orderID));
        $order_statuses = ostGetOrderStatues();
        $smarty->assign("completed_order_status", ostGetCompletedOrderStatus());
        $smarty->assign("orderContent", $orderContent);
        $smarty->assign("order", $order);
        $smarty->assign("https_connection_flag", 1);
        $smarty->assign("order_status_report", $order_status_report);
        $smarty->assign("order_statuses", $order_statuses);
        $smarty->assign("order_detailed", 1);
        $smarty->assign("main_content_template", "order_history.tpl");
    }
}
Ejemplo n.º 2
0
     }
     $orders = array();
     $callBackParam = array();
     $callBackParam["customerID"] = $_GET["customerID"];
     if (isset($_GET["sort"])) {
         $callBackParam["sort"] = $_GET["sort"];
     }
     if (isset($_GET["direction"])) {
         $callBackParam["direction"] = $_GET["direction"];
     }
     $count = 0;
     $navigatorHtml = GetNavigatorHtml(_getUrlToNavigate_ORDER_HISTORY(), 20, 'ordGetOrders', $callBackParam, $orders, $offset, $count);
     $smarty->hassign("urlToSubmit", _getUrlToSubmit_ORDER_HISTORY());
     $smarty->hassign("urlToSort", _getUrlToSort_ORDER_HISTORY());
     $smarty->assign("navigator", $navigatorHtml);
     $smarty->assign("order_statuses", ostGetOrderStatues());
     $smarty->assign("orders", $orders);
 }
 if ($_GET["customer_details"] == "visit_log") {
     $callBackParam = array();
     $visits = array();
     $callBackParam["log"] = regGetLoginById($_GET["customerID"]);
     $count = 0;
     $navigatorHtml = GetNavigatorHtml(_getUrlToNavigate_VISIT_LOG(), 20, 'stGetVisitsByLogin', $callBackParam, $visits, $offset, $count);
     $smarty->assign("navigator", $navigatorHtml);
     $smarty->assign("visits", $visits);
 }
 if ($_GET['customer_details'] == 'affiliate') {
     $customerID = $_GET["customerID"];
     require 'core/includes/admin/sub/custord_custlist_affiliate.php';
 }
Ejemplo n.º 3
0
            if (CONF_BACKEND_SAFEMODE) {
                Redirect(ADMIN_FILE . "?dpt=custord&sub=order_statuses&safemode=yes");
            }
            if (!ostDeleteOrderStatus($_GET["delete"])) {
                $smarty->assign("prompt", ADMIN_COULDNT_DELETE_ORDER_STATUS);
            }
        }
        if (isset($_POST["save"])) {
            if (CONF_BACKEND_SAFEMODE) {
                Redirect(ADMIN_FILE . "?dpt=custord&sub=order_statuses&safemode=yes");
            }
            if (trim($_POST["new_status_name"]) != "") {
                $sort_order = (int) $_POST["new_sort_order"];
                ostAddOrderStatus(trim($_POST["new_status_name"]), $sort_order);
            }
            $updateData = ScanPostVariableWithId(array("status_name", "sort_order"));
            foreach ($updateData as $key => $value) {
                ostUpdateOrderStatus($key, $value["status_name"], $value["sort_order"]);
            }
            Redirect(ADMIN_FILE . "?dpt=custord&sub=order_statuses&save_successful=yes");
        }
        if (isset($_GET["save_successful"])) {
            //show successful save confirmation message
            $smarty->assign("configuration_saved", 1);
        }
        $order_statues = ostGetOrderStatues(false, 'html');
        $smarty->assign("order_statues", $order_statues);
        //set sub-department template
        $smarty->assign("admin_sub_dpt", "custord_order_statuses.tpl");
    }
}
Ejemplo n.º 4
0
function setting_ORDER_STATUS_SELECT($_SettingID)
{
    $Options = array(array('title' => ADMIN_NOT_DEFINED, 'value' => 0));
    $statuses = ostGetOrderStatues(false);
    foreach ($statuses as $_statuses) {
        $Options[] = array('title' => $_statuses['status_name'], 'value' => $_statuses['statusID']);
    }
    return setting_SELECT_BOX($Options, $_SettingID);
}