]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_admins.php
Module-related code moved, deprecated templates deleted, internals stats are now...
[mailer.git] / inc / modules / admin / what-config_admins.php
index 552a7b84f0d2c04e51cf6419b68919e5ef31ccc9..f53b8c206a06a4eb96d9b5808112b0a4358a0eab 100644 (file)
@@ -47,7 +47,7 @@ addMenuDescription('admin', __FILE__);
 
 if ((isFormSent('edit')) && (countPostSelection() > 0)) {
        // Edit ACLs
-       $OUT = ''; $SW = 2;
+       $OUT = '';
        foreach (postRequestParameter('sel') as $id => $selected) {
                // Load data for the id
                $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1",
@@ -57,7 +57,6 @@ if ((isFormSent('edit')) && (countPostSelection() > 0)) {
 
                // Prepare data for the row template
                $content = array(
-                       'sw'               => $SW,
                        'id'               => $id,
                        'admins_selection' => generateOptionList('admins', 'id', 'login', $adminId, 'default_acl'),
                        'action_selection' => adminMenuSelectionBox_DEPRECATED('action', $action, $id),
@@ -66,8 +65,8 @@ if ((isFormSent('edit')) && (countPostSelection() > 0)) {
                                '/ARRAY/',
                                array('allow', 'deny'),
                                array(
-                                       getMessage('ADMINS_ALLOW_MODE'),
-                                       getMessage('ADMINS_DENY_MODE')
+                                       '{--ADMINS_ALLOW_MODE--}',
+                                       '{--ADMINS_DENY_MODE--}'
                                ),
                                $mode
                        ),
@@ -75,8 +74,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0)) {
 
                // Load row template
                $OUT .= loadTemplate('admin_config_admins_edit_row', true, $content);
-               $SW = 3 - $SW;
-       }
+       } // END - foreach
 
        // Load main template
        loadTemplate('admin_config_admins_edit', false, $OUT);
@@ -106,7 +104,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0)) {
        loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ENTRIES_CHANGED--}');
 } elseif ((isFormSent('del')) && (countPostSelection() > 0)) {
        // Delete ACLs
-       $OUT = ''; $SW = 2;
+       $OUT = '';
        foreach (postRequestParameter('sel') as $id => $selected) {
                // Load data for the id
                $result = SQL_QUERY_ESC("SELECT `id`, `admin_id`, `action_menu`, `what_menu`, `access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1",
@@ -117,12 +115,8 @@ if ((isFormSent('edit')) && (countPostSelection() > 0)) {
                // Get admin mode
                $content['access_mode'] = '{--ADMINS_' . strtoupper($content['access_mode']) . '_MODE--}';
 
-               // Add color switch
-               $content['sw'] = $SW;
-
                // Load row template and switch colors
                $OUT .= loadTemplate('admin_config_admins_del_row', true, $content);
-               $SW = 3 - $SW;
        } // END - foreach
 
        // Load main template
@@ -201,17 +195,13 @@ VALUES ('%s','%s','%s','%s')",
        // Entries found?
        if (SQL_NUMROWS($result_acls) > 0) {
                // List ACLs
-               $OUT = ''; $SW = 2;
+               $OUT = '';
                while ($content = SQL_FETCHARRAY($result_acls)) {
                        // Generate mode string
                        $content['access_mode'] = '{--ADMINS_' . strtoupper($content['access_mode']) . '_MODE--}';
 
-                       // Add color switch
-                       $content['sw'] = $SW;
-
                        // Load row template and switch colors
                        $OUT .= loadTemplate('admin_config_admins_row', true, $content);
-                       $SW = 3 - $SW;
                } // END - while
 
                // Free memory
@@ -229,8 +219,8 @@ VALUES ('%s','%s','%s','%s')",
                '/ARRAY/',
                array('allow', 'deny'),
                array(
-                       getMessage('ADMINS_ALLOW_MODE'),
-                       getMessage('ADMINS_DENY_MODE')
+                       'ADMINS_ALLOW_MODE--}',
+                       'ADMINS_DENY_MODE--}'
                )
        );