]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-memedit.php
Refback will be payed now (user cannot setup currently)
[mailer.git] / inc / modules / admin / what-memedit.php
index b63cc394456526b1db0a64ac483b6e799eca24f7..f14b121913e27574696473725d1d20f4bb5debe5 100644 (file)
@@ -32,8 +32,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);
 }
@@ -60,7 +59,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
        define('__SUB_VALUE', $SUB);
        define('__CHK_VALUE', $chk);
        $SW = 2; $cnt = 0; $OUT = "";
-       foreach ($_POST['sel'] as $sel=>$confirm)
+       foreach ($_POST['sel'] as $sel => $confirm)
        {
                if ($confirm == 1)
                {
@@ -107,7 +106,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
        define('__SUB_VALUE', $SUB);
        define('__CHK_VALUE', $chk);
        $SW = 2; $cnt = 0; $OUT = "";
-       foreach ($_POST['sel'] as $sel=>$confirm)
+       foreach ($_POST['sel'] as $sel => $confirm)
        {
                if ($confirm == 1)
                {
@@ -149,7 +148,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
        define('__SUB_VALUE', $SUB);
        define('__CHK_VALUE', $chk);
        $SW = 2; $cnt = 0; $OUT = "";
-       foreach ($_POST['sel'] as $sel=>$confirm)
+       foreach ($_POST['sel'] as $sel => $confirm)
        {
                if ($confirm == 1)
                {
@@ -193,7 +192,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
  elseif ((isset($_POST['ok'])) && (!IS_DEMO()))
 {
        // An act is done...
-       foreach ($_POST['sel'] as $sel=>$menu)
+       foreach ($_POST['sel'] as $sel => $menu)
        {
                $AND = "what = ''";
                $sel = bigintval($sel);
@@ -262,7 +261,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
        if (!empty($SUB))
        {
                // Edit sub menus
-               $result = SQL_QUERY("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND what != '' ORDER BY sort ASC", __FILE__, __LINE__);
+               $result = SQL_QUERY("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND what != '' AND what IS NOT NULL ORDER BY sort ASC", __FILE__, __LINE__);
        }
         else
        {