private function EditHalt() { // Update the halt status of a discount with a simple query $discountId = (int) $_GET['discountId']; require_once(ISC_BASE_PATH.'/lib/api/discount.api.php'); $discount = new API_DISCOUNT(); $discount->load($discountId); if ($discount->updateField('halts', (int) $_GET['halt'])) { if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Manage_Discounts)) { $this->ManageDiscounts(GetLang('DiscountHaltSuccessfully'), MSG_SUCCESS); } else { $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('DiscountEnabledSuccessfully'), MSG_SUCCESS); } } else { if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Manage_Discounts)) { $this->ManageDiscounts(sprintf(GetLang('ErrDiscountHaltNotChanged'), $discount->error), MSG_ERROR); } else { $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(sprintf(GetLang('ErrDiscountEnabledNotChanged'), $discount->error), MSG_ERROR); } } }