]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-admin_add.php
A lot has been rewritten, ext-teams added, ext-forced continued:
[mailer.git] / inc / modules / admin / what-admin_add.php
index aef693aec467b1748c17293b97f0df07a6955179..8363be5858472902e24ebbff903702efd8028267 100644 (file)
@@ -53,7 +53,7 @@ if (!isFormSent()) {
        $menus = array(); $titles = array(); $below = array();
 
        // Get all available main menus
        $menus = array(); $titles = array(); $below = array();
 
        // Get all available main menus
-       $result = SQL_QUERY("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT `action`,`title`,`sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
        if (!SQL_HASZERONUMS($result)) {
                // Read menu structure
                // @TODO Cant this be rewritten?
        if (!SQL_HASZERONUMS($result)) {
                // Read menu structure
                // @TODO Cant this be rewritten?
@@ -91,7 +91,7 @@ if (!isFormSent()) {
 
                // Load sub menus :)
                foreach ($menus as $key_main => $value_main) {
 
                // Load sub menus :)
                foreach ($menus as $key_main => $value_main) {
-                       $result = SQL_QUERY_ESC("SELECT `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
+                       $result = SQL_QUERY_ESC("SELECT `what`,`title`,`sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
                                array($value_main), __FILE__, __LINE__);
                        if (!SQL_HASZERONUMS($result)) {
                                // Init arrays
                                array($value_main), __FILE__, __LINE__);
                        if (!SQL_HASZERONUMS($result)) {
                                // Init arrays
@@ -125,13 +125,13 @@ if (!isFormSent()) {
                                        } else {
                                                $prev = $value;
                                        }
                                        } else {
                                                $prev = $value;
                                        }
-                               }
+                               } // END - foreach
                                $menus[$value_main] = $dmy;
                                $titles[$value_main] = $dmy2;
                                $below[$value_main] = $dmy3;
                                $menus[$value_main] = $dmy;
                                $titles[$value_main] = $dmy2;
                                $below[$value_main] = $dmy3;
-                       }
-               }
-       }
+                       } // END - if
+               } // END - foreach
+       } // END - if
 
        $OUT = '    <select class="form_select" name="sort" size="1">
       <option value="0">{--ADMIN_IS_FIRST_MENU--}</option>';
 
        $OUT = '    <select class="form_select" name="sort" size="1">
       <option value="0">{--ADMIN_IS_FIRST_MENU--}</option>';
@@ -145,7 +145,7 @@ if (!isFormSent()) {
                                        } // END - if
                                } // END - foreach
                                $OUT .= '</option>';
                                        } // END - if
                                } // END - foreach
                                $OUT .= '</option>';
-                       }
+                       } // END - foreach
                } else {
                        $OUT .= '      <option value="' . $m . '">' . $titles[$key] . '</option>';
                }
                } else {
                        $OUT .= '      <option value="' . $m . '">' . $titles[$key] . '</option>';
                }
@@ -163,7 +163,7 @@ if (!isFormSent()) {
        // Insert new menu entry
        if (isPostRequestParameterSet('menu')) {
                // Add sub menu
        // Insert new menu entry
        if (isPostRequestParameterSet('menu')) {
                // Add sub menu
-               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`, `what`, `title`, `descr`, `sort`) VALUES ('%s','%s','%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
                        array(
                                postRequestParameter('menu'),
                                postRequestParameter('name'),
                        array(
                                postRequestParameter('menu'),
                                postRequestParameter('name'),