$smarty->assign('newCommissionStatus', '1'); } if (isset($_GET['delete_pay'])) { $smarty->assign('delete_payment', 1); } if (isset($_GET['delete_commission'])) { $smarty->assign('delete_commission', 1); } $smarty->assign('CurrDate', $CurrDate); $smarty->assign('show_tables', $show_tables); $smarty->assign('from', html_spchars($_GET['from'])); $smarty->assign('till', html_spchars($_GET['till'])); $smarty->assign('Error_DateFormat', $error_date_format); $smarty->assign('REQUEST_URI', $XREQUEST_URI); $smarty->assign('htmlEmailNewCommission', settingCallHtmlFunction('CONF_AFFILIATE_EMAIL_NEW_COMMISSION')); $smarty->assign('htmlEmailNewPayment', settingCallHtmlFunction('CONF_AFFILIATE_EMAIL_NEW_PAYMENT')); $smarty->assign('htmlEnabledSettings', settingCallHtmlFunction('CONF_AFFILIATE_PROGRAM_ENABLED')); $smarty->assign('htmlAmountPercent', settingCallHtmlFunction('CONF_AFFILIATE_AMOUNT_PERCENT')); $smarty->assign("admin_sub_dpt", "custord_affiliate.tpl"); if (!isset($_POST['NEW_PAYMENT'])) { $smarty->assign('NEW_PAYMENT', array('xDate' => $CurrDate)); } if (!isset($_POST['NEW_COMMISSION'])) { $smarty->assign('NEW_COMMISSION', array('xDate' => $CurrDate)); } if (isset($_GET['edCustomerID'])) { $smarty->assign('edCustomerLogin', regGetLoginById(intval($_GET['edCustomerID']))); } break; } }
if (!$className) { continue; } eval("\$module = new " . $className . "();"); if ($module->get_id() == $_GET["setting_up"]) { $shipping_module = $module; break; } } } $constants = $shipping_module->settings_list(); $settings = array(); $controls = array(); foreach ($constants as $constant) { $settings[] = settingGetSetting($constant); $controls[] = settingCallHtmlFunction($constant); } if (isset($_POST['save'])) { Redirect(set_query('Pustishka=')); } $smarty->assign("settings", $settings); $smarty->assign("controls", $controls); $smarty->assign("shipping_module", $shipping_module); $smarty->assign("constant_managment", 1); } else { $shipping_configs = modGetAllInstalledModuleObjs(SHIPPING_RATE_MODULE); foreach ($shipping_configs as $_Ind => $_Conf) { $shipping_configs[$_Ind] = array('ConfigID' => $_Conf->get_id(), 'ConfigName' => $_Conf->title, 'ConfigClassName' => get_class($_Conf)); } $shipping_modules = array(); $shipping_methods_by_modules = array();
if (CONF_BACKEND_SAFEMODE) { Redirect(ADMIN_FILE . "?dpt=custord&sub=discounts&safemode=yes"); } dscDeleteOrderPriceDiscount($_GET["delete"]); Redirect(ADMIN_FILE . "?dpt=custord&sub=discounts"); } if (isset($_GET["error"])) { $smarty->assign("error", 1); } if (isset($_POST["discount_type_save"])) { if (CONF_BACKEND_SAFEMODE) { Redirect(ADMIN_FILE . "?dpt=custord&sub=discounts&safemode=yes"); } $_POST["save"] = 1; } $control = settingCallHtmlFunction("CONF_DISCOUNT_TYPE"); if (isset($_POST["discount_type_save"])) { Redirect(ADMIN_FILE . "?dpt=custord&sub=discounts"); } $smarty->assign("control", $control); if (isset($_POST["save_order_price_discounts"])) { if (CONF_BACKEND_SAFEMODE) { Redirect(ADMIN_FILE . "?dpt=custord&sub=discounts&safemode=yes"); } $error = false; $data = ScanPostVariableWithId(array("percent_discount", "price_range")); foreach ($data as $discount_id => $val) { if (!dscUpdateOrderPriceDiscount($discount_id, $val["price_range"], (double) $val["percent_discount"])) { $error = true; } }