]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-memedit.php
- Surfbar further extended, currently broken!
[mailer.git] / inc / modules / admin / what-memedit.php
index fc93c8932d8bf1e0ad105ed6287210d2ec07399b..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);
 }
@@ -53,17 +52,14 @@ if (!empty($_GET['sub']))
 $chk = 0;
 if (!empty($_POST['sel'])) $chk = SELECTION_COUNT($_POST['sel']);
 
-OPEN_TABLE("100%", "admin_content admin_content_align", "");
 // List all menu points and make them editable
-OUTPUT_HTML("<br /><br /></FONT>
-<DIV align=\"center\">");
 if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 {
        // Edit menu entries
        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)
                {
@@ -110,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)
                {
@@ -152,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)
                {
@@ -196,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);
@@ -265,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
        {
@@ -325,7 +321,6 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
                LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MENUS_FOUND);
        }
 }
-OUTPUT_HTML("</DIV>");
-CLOSE_TABLE();
+
 //
 ?>