]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-guestedit.php
Re-added height, but smaller to make most menus appear shorter
[mailer.git] / inc / modules / admin / what-guestedit.php
index bcce3b5107f47b5da1fdfcd743ea73ebfcf73e4f..1fdbfd0ca3d61907e971785c5a310fbff8e39d40 100644 (file)
@@ -61,11 +61,11 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $count++;
-                       $result = SQL_QUERY_ESC("SELECT `title`, `action`, `what` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+                       $result = sqlQueryEscaped("SELECT `title`, `action`, `what` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval($sel)), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) == 1) {
+                       if (sqlNumRows($result) == 1) {
                                // Entry found so we load the stuff...
-                               $content = SQL_FETCHARRAY($result);
+                               $content = sqlFetchArray($result);
 
                                // Prepapre content
                                $content = array(
@@ -88,7 +88,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                        }
 
                        // Free result and switch color
-                       SQL_FREERESULT($result);
+                       sqlFreeResult($result);
                } // END - if
        } // END - foreach
 
@@ -110,11 +110,11 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $count++;
-                       $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+                       $result = sqlQueryEscaped("SELECT `title` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval($sel)), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) == 1) {
+                       if (sqlNumRows($result) == 1) {
                                // Entry found so we load the stuff...
-                               $content = SQL_FETCHARRAY($result);
+                               $content = sqlFetchArray($result);
                                $content = array(
                                        'count' => $count,
                                        'menu'  => $content['title'],
@@ -128,7 +128,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                                );
                                $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content);
                        }
-                       SQL_FREERESULT($result);
+                       sqlFreeResult($result);
                } // END - if
        } // END - foreach
 
@@ -149,11 +149,11 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $count++;
-                       $result = SQL_QUERY_ESC("SELECT `title`, `visible`, `locked` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+                       $result = sqlQueryEscaped("SELECT `title`, `visible`, `locked` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval($sel)), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) == 1) {
+                       if (sqlNumRows($result) == 1) {
                                // Entry found so we load the stuff...
-                               $content = SQL_FETCHARRAY($result);
+                               $content = sqlFetchArray($result);
                                $content = array(
                                        'count'   => $count,
                                        'menu'    => $content['title'],
@@ -172,7 +172,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                                $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content);
                        }
 
-                       SQL_FREERESULT($result);
+                       sqlFreeResult($result);
                } // END - if
        } // END - foreach
 
@@ -193,21 +193,21 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
        // By default list menus
        if (empty($subMenu)) {
                // List only main menus
-               $result = SQL_QUERY("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
+               $result = sqlQuery("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
        } else {
                // List sub menus
-               $result = SQL_QUERY_ESC("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
+               $result = sqlQueryEscaped("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
                        array($subMenu), __FILE__, __LINE__);
        }
 
        // Are there entries?
-       if (!SQL_HASZERONUMS($result)) {
+       if (!ifSqlHasZeroNums($result)) {
                // Init variables
                $count = '0';
                $OUT = '';
 
                // Process all menu entries
-               while ($content = SQL_FETCHARRAY($result)) {
+               while ($content = sqlFetchArray($result)) {
                        // Set sub value
                        $content['sub'] = $subMenu;
 
@@ -215,7 +215,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                        if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
                                // Is highest position
                                $NAVI = '<a href="{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=' . $content['sub'] . '&amp;act=' . $content['action'] . '&amp;w=' . $content['what'] . '&amp;tid=' . ($content['sort']+1) . '&amp;fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
-                       } elseif (SQL_NUMROWS($result) == $count) {
+                       } elseif (sqlNumRows($result) == $count) {
                                // Is lowest position
                                $NAVI = '<a href="{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=' . $content['sub'] . '&amp;act=' . $content['action'] . '&amp;w=' . $content['what'] . '&amp;tid=' . ($content['sort']-1) . '&amp;fid=' . $content['sort'] . '%}">{--HIGHER--}</a>';
                        } elseif ($content['sort'] > 0) {
@@ -242,7 +242,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                $content['sub']  = $subMenu;
 
                // Free memory
-               SQL_FREERESULT($result);
+               sqlFreeResult($result);
 
                // Load template
                loadTemplate('admin_edit_guest_menu', FALSE, $content);