]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-guest_add.php
'what','action','module' and 'output_mode' wrapped into functions (WARNUNG: Code...
[mailer.git] / inc / modules / admin / what-guest_add.php
index fbee30723a5f56792486df2ed194c56b58b5e824..871cd7039df0036b2175a765f6c9057f78010fd1 100644 (file)
@@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Check if the admin has entered title and what-php file name...
-if (((!REQUEST_ISSET_POST(('title'))) || (!REQUEST_ISSET_POST(('menu')))) && (IS_FORM_SENT())) {
+if (((!REQUEST_ISSET_POST('title')) || (!REQUEST_ISSET_POST(('menu')))) && (isFormSent())) {
        // Abort adding the menu entry
        REQUEST_UNSET_POST('ok');
-}
+} // END - if
 
-if (!IS_FORM_SENT()) {
+if (!isFormSent()) {
        // Create arrays
        $menus = array(); $titles = array(); $below = array();
 
@@ -59,6 +59,7 @@ if (!IS_FORM_SENT()) {
        $result = SQL_QUERY("SELECT action, title, sort FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort`", __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Read menu structure
+               // @TODO Cant this be rewritten?
                while ($content = SQL_FETCHARRAY($result)) {
                        // Menu actions
                        $menus[] = $content['action'];
@@ -68,7 +69,7 @@ if (!IS_FORM_SENT()) {
 
                        // Below this menu point should the new be added so we simply increase the sort value by 1 :-)
                        $below[] = $content['sort'] + 1;
-               }
+               } // END - while
 
                // Free memory
                SQL_FREERESULT($result);
@@ -159,8 +160,8 @@ WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
        $OUT .= "</select>";
 
        define('__BELOW_SELECTION' , $OUT);
-       define('__WHAT_SELECTION'  , ADMIN_MAKE_MENU_SELECTION('guest', "what", "name"));
-       define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('guest', "action", "menu"));
+       define('__WHAT_SELECTION'  , ADMIN_MAKE_MENU_SELECTION('guest', 'what', "name"));
+       define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('guest', 'action', "menu"));
 
        // Display form
        LOAD_TEMPLATE("admin_guest_add");