]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-adminedit.php
Filters for configurable userid exclusion added:
[mailer.git] / inc / modules / admin / what-adminedit.php
index 9b629ea07e80ceda60d3ac756d55c33d69a76dd2..c446faeccf6bf9ba15a6ef516d05554c006fa552 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -60,7 +60,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
        foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $count++;
-                       $result = SQL_QUERY_ESC("SELECT `title`,`action`,`what`,`descr` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT `title`, `action`, `what`, `descr` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval($sel)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Entry found so we load the stuff...
@@ -77,7 +77,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                                );
 
                                // Load row template
-                               $OUT .= loadTemplate('admin_edit_admin_menu_row', true, $content);
+                               $OUT .= loadTemplate('admin_edit_admin_menu_row', TRUE, $content);
                        } else {
                                // Entry not found?
                                $content = array(
@@ -85,7 +85,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                                );
 
                                // Load row template
-                               $OUT .= loadTemplate('admin_menu_404_row', true, $content);
+                               $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content);
                        }
 
                        // Free result and switch color
@@ -99,7 +99,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
        $content['count'] = $count;
 
        // Load template
-       loadTemplate('admin_edit_admin_menu_form', false, $content);
+       loadTemplate('admin_edit_admin_menu_form', FALSE, $content);
 } elseif ((isFormSent('delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
        // Prepare misc content
        $content['sub'] = $subMenu;
@@ -122,13 +122,13 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                                        'count' => $count,
                                        'sel'   => $sel,
                                );
-                               $OUT .= loadTemplate('admin_delete_admin_menu_row', true, $content);
+                               $OUT .= loadTemplate('admin_delete_admin_menu_row', TRUE, $content);
                        } else {
                                // Entry not found?
                                $content = array(
                                        'sel' => $sel
                                );
-                               $OUT .= loadTemplate('admin_menu_404_row', true, $content);
+                               $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content);
                        }
                        SQL_FREERESULT($result);
                } // END - if
@@ -140,7 +140,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
        $content['count'] = $count;
 
        // Load template
-       loadTemplate('admin_delete_admin_menu', false, $content);
+       loadTemplate('admin_delete_admin_menu', FALSE, $content);
 } elseif ((isFormSent()) && (!isDemoModeActive())) {
        // An action is done...
        switch (postRequestElement('ok')) {
@@ -194,9 +194,9 @@ LIMIT 1",
        doAdminProcessMenuWeightning('admin', $AND);
 
        // Run SQL
-       $result = SQL_QUERY("SELECT `id`,`action`,`what`,`title`,`sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." ORDER BY `sort` ASC", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT `id`, `action`, `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." ORDER BY `sort` ASC", __FILE__, __LINE__);
 
-       // Do we have entries?
+       // Are there entries?
        if (!SQL_HASZERONUMS($result)) {
                // Init variables
                $OUT = '';
@@ -215,7 +215,7 @@ LIMIT 1",
                        if (($content['sort'] == '0') || (($content['sort'] == 1) && (!empty($subMenu)))) {
                                // Is highest position
                                $content['navi'] = '<a href="{%url=modules.php?module=admin&amp;what=adminedit&amp;sub=' . $content['sub'] . '&amp;act=' . $content['action'] . '&amp;w=' . $content['what'] . '&amp;tid=' . ($content['sort']+1) . '&amp;fid=' . $content['sort'] . '%}">{--LOWER--}</a>';
-                       } elseif ($count == SQL_NUMROWS($result)) {
+                       } elseif (SQL_NUMROWS($result) == $count) {
                                // Is lowest position
                                $content['navi'] = '<a href="{%url=modules.php?module=admin&amp;what=adminedit&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) {
@@ -224,10 +224,10 @@ LIMIT 1",
                        }
 
                        // Add more data to $content
-                       $content['mode'] = 'admin';
+                       $content['do'] = 'admin';
 
                        // Load row template and switch colors
-                       $OUT .= loadTemplate('admin_menu_overview_row', true, $content);
+                       $OUT .= loadTemplate('admin_menu_overview_row', TRUE, $content);
                } // END - switch
 
                // Remember all rows
@@ -238,7 +238,7 @@ LIMIT 1",
                SQL_FREERESULT($result);
 
                // Load template
-               loadTemplate('admin_edit_admin_menu', false, $content);
+               loadTemplate('admin_edit_admin_menu', FALSE, $content);
        } else {
                // Menu entries are missing... (???)
                displayMessage('{--ADMIN_NO_MENUS_FOUND--}');