_copyDataFromGetToPage($smarty, $order_statuses); $orders = array(); $offset = 0; $count = 0; $navigatorHtml = GetNavigatorHtml(_getUrlToNavigate(), 20, 'ordGetOrders', $callBackParam, $orders, $offset, $count); $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 {
if (isset($_GET["fActState"]) && trim($_GET["fActState"]) != "") { $callBackParam["ActState"] = $_GET["fActState"]; } if (isset($_GET["sort"])) { $callBackParam["sort"] = trim($_GET["sort"]); if (isset($_GET["direction"])) { $callBackParam["direction"] = trim($_GET["direction"]); } } $count = 0; if (isset($_GET["export_to_excel"])) { $number2showNexport = (int) $_GET["count_to_export"]; } else { $number2showNexport = 20; } $navigatorHtml = GetNavigatorHtml(_getUrlToNavigate(), $number2showNexport, 'regGetCustomers', $callBackParam, $customers, $offset, $count); if (isset($_GET["export_to_excel"])) { serExportCustomersToExcel($customers); $smarty->assign("customers_has_been_exported_succefully", 1); $smarty->assign("urlToDownloadResult", ADMIN_FILE . "?do=get_file&getFileParam=" . cryptFileParamCrypt("GetCustomerExcelSqlScript", null)); $smarty->assign("file_size", filesize("core/temp/customers.csv")); } $smarty->hassign("encodedReturnUrl", $encodedReturnUrl); $smarty->assign("search_result_string", str_replace("{N}", $count, ADMIN_N_RECORD_IS_SEARCHED)); $smarty->assign("count_to_export", count($customers)); $smarty->assign("customers", $customers); $smarty->assign("navigator", $navigatorHtml); } $smarty->hassign("urlToSort", _getUrlToSort()); $customer_groups = GetAllCustGroups(); $smarty->assign("customer_groups", $customer_groups);
if (!session_is_registered('SUBSCRIBE_MESSAGE')) { session_register('SUBSCRIBE_MESSAGE'); } $_SESSION['SUBSCRIBE_MESSAGE'] = array('Message' => str_replace('{*EMAIL*}', base64_decode($_GET["unsub"]), ADMIN_SUBSCRIPTIONS_OK_EMAIL_DELETED), 'MessageCode' => 1); Redirect(_getUrlToUnsub()); } if (isset($_GET["post_sub"])) { if (CONF_BACKEND_SAFEMODE) { Redirect(_getUrlToNavigate() . "&safemode=yes"); } SendNewsMessage($_POST["title_sub"], $_POST["message_sub"]); } $callBackParam = array(); $subscribers = array(); $count = 0; $htmlNavigator = GetNavigatorHtml(_getUrlToNavigate(), 15, 'subscrGetAllSubscriber', $callBackParam, $subscribers, $offset, $count); $smarty->hassign("urlToSubscibe", _getUrlToUnsub()); foreach ($subscribers as $key => $val) { $subscribers[$key]["Email64"] = base64_encode($subscribers[$key]["Email"]); } /** * Messages handler */ if (isset($_SESSION['SUBSCRIBE_MESSAGE'])) { if (isset($_SESSION['SUBSCRIBE_MESSAGE']['Message']) && isset($_SESSION['SUBSCRIBE_MESSAGE']['MessageCode'])) { $smarty->assign('Message', $_SESSION['SUBSCRIBE_MESSAGE']['Message']); $smarty->assign('MessageCode', $_SESSION['SUBSCRIBE_MESSAGE']['MessageCode']); unset($_SESSION['SUBSCRIBE_MESSAGE']['Message']); } } $smarty->assign("navigator", $htmlNavigator);
$smarty->assign("category_name", $row[0]); $count_row = 0; $offset = 0; $products = null; if (isset($_GET["sort"])) { $callBackParam["sort"] = $_GET["sort"]; if (isset($_GET["sort_dir"])) { $callBackParam["direction"] = $_GET["sort_dir"]; } } if (!isset($_GET["search"])) { $callBackParam["categoryID"] = $categoryID; } $callBackParam["searchInSubcategories"] = false; $count = 0; $navigatorHtml = GetNavigatorHtml(_getUrlToNavigate(), 20, 'prdSearchProductByTemplateAdmin', $callBackParam, $products, $offset, $count); for ($i = 0; $i < count($products); $i++) { $products[$i]["picture_count"] = GetPictureCount($products[$i]["productID"]); $products[$i]["thumbnail_count"] = GetThumbnailCount($products[$i]["productID"]); $products[$i]["enlarged_count"] = GetEnlargedPictureCount($products[$i]["productID"]); } $smarty->assign("navigatorHtml", $navigatorHtml); $smarty->hassign("urlToSort", _getUrlToSort()); $smarty->hassign("urlToSubmit", _getUrlToSubmit()); $smarty->hassign("urlToDelete", _getUrlToDelete()); $smarty->hassign("urlToCategoryTreeExpand", _getUrlToCategoryTreeExpand()); $smarty->assign("searched_count", str_replace("{N}", count($products), ADMIN_N_RECORD_IS_SEARCHED)); //products list $smarty->assign("products", $products); //set main template $smarty->assign("admin_sub_dpt", "catalog_products_categories.tpl");
} if (isset($_GET["direction"])) { $callBackParam["direction"] = $_GET["direction"]; } // search parametrs to advanced search if ($extraParametrsTemplate != null) { $callBackParam["extraParametrsTemplate"] = $extraParametrsTemplate; } if ($searchParamName != null) { $callBackParam["name"] = $searchParamName; } if ($rangePrice != null) { $callBackParam["price"] = $rangePrice; } $count = 0; $navigatorHtml = GetNavigatorHtml(_getUrlToNavigate($categoryID), CONF_PRODUCTS_PER_PAGE, 'prdSearchProductByTemplate', $callBackParam, $products, $offset, $count); $show_comparison = 0; $cc_products = count($products); for ($i = 0; $i < $cc_products; $i++) { $cat = catGetCategoryById($products[$i]["categoryID"]); $products[$i]["allow_products_comparison"] = $cat["allow_products_comparison"]; if ($products[$i]["allow_products_comparison"] == 1 && $categoryID == $products[$i]["categoryID"]) { $show_comparison++; } } if (CONF_PRODUCT_SORT == '1') { _sortSetting($smarty, _getUrlToSort($categoryID)); } //calculate a path to the category $smarty->assign("product_category_path", catCalculatePathToCategory($categoryID)); $smarty->assign("search_with_change_category_ability", 1);