X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_cats.php;h=d42c6bd2e8acd682a9f81db7ee0f70d83a10d441;hp=ecd7de4b83332bc340651c4b7467ae63ef261afd;hb=963e55ca1ea79e255f235e359cde9f7862191dc5;hpb=6032b7018b83778f1592383238f4e0d28f718622;ds=sidebyside diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index ecd7de4b83..d42c6bd2e8 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -33,7 +33,7 @@ ************************************************************************/ // Some security stuff... -if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) { +if ((!defined('__SECURITY')) || (!IS_ADMIN())) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } @@ -66,7 +66,7 @@ if (isset($_POST['add'])) { } elseif ((isset($_POST['ok'])) && (isset($_POST['id'])) && (is_array($_POST['id']))) { // Change or delete categories... $TEXT = ""; - foreach ($_POST['id'] as $id=>$cat) { + foreach ($_POST['id'] as $id => $cat) { // Secure ID $id = bigintval($id); @@ -103,7 +103,7 @@ if (isset($_POST['add'])) { { // Delete categories $SW = 2; $OUT = ""; - foreach ($_POST['sel'] as $id=>$value) + foreach ($_POST['sel'] as $id => $value) { // Load data of category $result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1", @@ -129,7 +129,7 @@ if (isset($_POST['add'])) { } elseif ((isset($_POST['edit'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) { // Edit categories $SW = 2; $OUT = ""; - foreach ($_POST['sel'] as $id=>$value) + foreach ($_POST['sel'] as $id => $value) { // Load data from the category $result = SQL_QUERY_ESC("SELECT cat, visible, sort FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",