Security line in all includes changed
[mailer.git] / inc / modules / admin / what-config_cats.php
index ecd7de4b83332bc340651c4b7467ae63ef261afd..d42c6bd2e8acd682a9f81db7ee0f70d83a10d441 100644 (file)
@@ -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",