Пример #1
0
/**
 * replace newline symbols to <br />
 * @param mixed data for action
 * @param array which elements test
 * @return mixed
 */
function xNl2Br($_Data, $_Key = array())
{
    if (!is_array($_Data)) {
        return nl2br($_Data);
    }
    if (!is_array($_Key)) {
        $_Key = array($_Key);
    }
    foreach ($_Data as $__Key => $__Data) {
        if (count($_Key) && !is_array($__Data)) {
            if (in_array($__Key, $_Key)) {
                $_Data[$__Key] = xNl2Br($__Data, $_Key);
            }
        } else {
            $_Data[$__Key] = xNl2Br($__Data, $_Key);
        }
    }
    return $_Data;
}
Пример #2
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");
    }
}
Пример #3
0
         Redirect(ADMIN_FILE . "?dpt=custord&sub=new_orders&orders_detailed=yes&orderID=" . $_GET["orderID"] . "&urlToReturn=" . $_GET["urlToReturn"] . "&safemode=yes");
     }
     if ((int) $_POST["status"] != -1) {
         ostSetOrderStatusToOrder((int) $_GET["orderID"], $_POST["status"], isset($_POST['status_comment']) ? $_POST['status_comment'] : '', isset($_POST['notify_customer']) ? $_POST['notify_customer'] : '');
     }
     Redirect(ADMIN_FILE . "?dpt=custord&sub=new_orders&orders_detailed=yes&orderID=" . (int) $_GET["orderID"] . "&urlToReturn=" . $_GET["urlToReturn"]);
 }
 if (isset($_GET["urlToReturn"])) {
     $smarty->assign("encodedUrlToReturn", $_GET["urlToReturn"]);
 }
 if (isset($_GET["urlToReturn"])) {
     $smarty->hassign("urlToReturn", base64_decode($_GET["urlToReturn"]));
 }
 $order = ordGetOrder((int) $_GET["orderID"]);
 $orderContent = ordGetOrderContent((int) $_GET["orderID"]);
 $order_status_report = xNl2Br(stGetOrderStatusReport((int) $_GET["orderID"]));
 $order_statuses = ostGetOrderStatues();
 $smarty->assign("cancledOrderStatus", ostGetCanceledStatusId());
 $smarty->assign("orderContent", $orderContent);
 $smarty->assign("order", $order);
 //            $paymentModuleFiles = GetFilesInDirectory("core/modules/payment", "php");
 //
 //
 //            foreach ($paymentModuleFiles as $fileName)
 //                include ( $fileName );
 $paymentMethod = payGetPayModuleID($order['payment_type']);
 $currentPaymentModule = modGetModuleObj($paymentMethod["module_id"], PAYMENT_MODULE);
 if ($currentPaymentModule != null && method_exists($currentPaymentModule, 'admin_print_html')) {
     $admin_print_html = $currentPaymentModule->admin_print_html($order["orderID"]);
     if (!empty($admin_print_html)) {
         $smarty->assign("print_href", $admin_print_html);