} // add new manufacturer $name = $_POST["new_country_name"]; $iso2 = $_POST["new_country_iso2"]; $iso3 = $_POST["new_country_iso3"]; if ($name != "") { cnAddCountry($name, $iso2, $iso3); } // update manufacturers $data = ScanPostVariableWithId(array("country_name", "country_iso2", "country_iso3")); // update existing pictures foreach ($data as $key => $val) { cnUpdateCountry($key, $data[$key]["country_name"], $data[$key]["country_iso2"], $data[$key]["country_iso3"]); } Redirect(_getUrlToSubmit()); } $callBackParam = array(); $countries = array(); $count = 0; $navigatorHtml = GetNavigatorHtml(ADMIN_FILE . "?dpt=conf&sub=countries", 20, 'cnGetCountries', $callBackParam, $countries, $offset, $count); if (isset($_POST["save_countries"])) { Redirect(_getUrlToSubmit()); } $smarty->hassign("urlToDelete", _getUrlToDelete()); $smarty->hassign("urlToSubmit", _getUrlToSubmit()); $smarty->assign("countries", $countries); $smarty->assign("navigator", $navigatorHtml); //set sub-department template $smarty->assign("admin_sub_dpt", "conf_countries.tpl"); } }
_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 {
$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"]; } $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'; } $smarty->assign("customerID", $_GET["customerID"]); $smarty->assign("customer_details", $_GET["customer_details"]); } } $smarty->assign("admin_sub_dpt", "custord_custlist.tpl"); } }
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);
} 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);
$callBackParam = array(); if (isset($_GET["sort"])) { $callBackParam["sort"] = $_GET["sort"]; } if (isset($_GET["direction"])) { $callBackParam["direction"] = $_GET["direction"]; } $discussions = array(); $navigatorHtml = ""; $discussed_products = discGetAllDiscussedProducts(); $smarty->assign("products", $discussed_products); if (isset($_GET["productID"])) { $callBackParam["productID"] = $_GET["productID"]; $smarty->assign("productID", $_GET["productID"]); $count = 0; $navigatorHtml = GetNavigatorHtml(GetUrlToNavigate(), 20, 'discGetAllDiscussion', $callBackParam, $discussions, $offset, $count); if (count($discussions) == 0) { if (count($discussed_products) > 0) { Redirect(GetUrlToFind() . "&productID=" . $discussed_products[0]["productID"]); } else { Redirect(GetUrlToFind()); } } } else { $smarty->assign("productID", 0); } $smarty->assign("discussions", $discussions); $smarty->assign("navigator", $navigatorHtml); $smarty->hassign("fullUrl", GetFullUrl()); $smarty->hassign("urlToSort", GetUrlToSort()); $smarty->hassign("urlToFind", GetUrlToFind());
$smarty->assign("news_editor", 1); } if (isset($_POST["update_news"])) { if (CONF_BACKEND_SAFEMODE) { Redirect(_getUrlToSubmit() . "&safemode=yes"); } newsUpdateNews($_POST["add_date"], $_POST["title"], $_POST["textToPrePublication"], $_POST["textToPublication"], $_POST["textToMail"], $_POST["edit_news_id"]); if (isset($_POST["send"])) { //send news to subscribers newsSendNews($_POST["edit_news_id"]); } Redirect(_getUrlToSubmit() . "&save_successful=yes"); } if (isset($_GET["delete"])) { if (CONF_BACKEND_SAFEMODE) { Redirect(_getUrlToDelete() . "&safemode=yes"); } newsDeleteNews($_GET["delete"]); Redirect(_getUrlToDelete()); } $callBackParam = array(); $news_posts = array(); $navigatorHtml = GetNavigatorHtml(ADMIN_FILE . "?dpt=modules&sub=news", 20, 'newsGetAllNews', $callBackParam, $news_posts, $offset, $count); $smarty->assign("navigator", $navigatorHtml); $smarty->assign("news_posts", $news_posts); $smarty->hassign("urlToSubmit", _getUrlToSubmit()); $smarty->hassign("urlToDelete", _getUrlToDelete()); //set sub-department template $smarty->assign("admin_sub_dpt", "modules_news.tpl"); } }
<?php if (isset($visit_history) && isset($_SESSION["log"])) { $callBackParam = array("log" => $_SESSION["log"]); $visits = null; $offset = 0; $count = 0; $navigatorHtml = GetNavigatorHtml("index.php?visit_history=yes", 20, 'stGetVisitsByLogin', $callBackParam, $visits, $offset, $count); $smarty->assign("navigator", $navigatorHtml); $smarty->assign("visits", $visits); $smarty->assign("main_content_template", "visit_history.tpl"); }