X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_admins.php;h=360ec7b2e5e3d9eddbca256c8931085599747f22;hp=6040a1f3addf9ae893b2ee5b8a27db7933bd82ff;hb=f2aeaab0cd313b2eeb151642455ed558f6b186dc;hpb=f5ebd83b36f343022977241bd9b570051ece4b0f diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index 6040a1f3ad..360ec7b2e5 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -44,7 +45,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { +if ((isFormSent('edit')) && (countPostSelection() > 0)) { // Edit ACLs $OUT = ''; $SW = 2; foreach (postRequestParameter('sel') as $id => $selected) { @@ -79,7 +80,7 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Load main template loadTemplate('admin_config_admins_edit', false, $OUT); -} elseif ((isPostRequestParameterSet('change')) && (countPostSelection() > 0)) { +} elseif ((isFormSent('change')) && (countPostSelection() > 0)) { // Change entries foreach (postRequestParameter('sel') as $id => $selected) { // Secure id @@ -102,8 +103,8 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { } // END - if // Entries changed - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_CHANGED')); -} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0)) { + loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ENTRIES_CHANGED--}'); +} elseif ((isFormSent('del')) && (countPostSelection() > 0)) { // Delete ACLs $OUT = ''; $SW = 2; foreach (postRequestParameter('sel') as $id => $selected) { @@ -118,7 +119,7 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { if (empty($what)) $what = '---'; // Get admin mode - $mode = getMessage('ADMINS_'.strtoupper($mode).'_MODE'); + $mode = '{--ADMINS_' . strtoupper($mode) . '_MODE--}'; // Generate link $admin = generateAdminLink($admin); @@ -140,7 +141,7 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Load main template loadTemplate('admin_config_admins_del', false, $OUT); -} elseif ((isPostRequestParameterSet('remove')) && (countPostSelection() > 0)) { +} elseif ((isFormSent('remove')) && (countPostSelection() > 0)) { // Remove entries // @TODO Rewrite this to filter 'run_sqls' foreach (postRequestParameter('sel') as $id => $selected) { @@ -154,8 +155,8 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { } // END - if // Entries deleted - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_DELETED')); -} elseif (isPostRequestParameterSet('add')) { + loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ENTRIES_DELETED--}'); +} elseif (isFormSent('add')) { // Check if everything is fine... $mode = getAdminDefaultAcl(bigintval(postRequestParameter('admin_id'))); @@ -173,7 +174,7 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Main or sub menu selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1", array(bigintval(postRequestParameter('admin_id')), postRequestParameter('action_menu'), postRequestParameter('what_menu')), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Finally add the new ACL SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_acls` (admin_id, action_menu, what_menu, access_mode) VALUES ('%s','%s','%s','%s')", @@ -183,7 +184,7 @@ VALUES ('%s','%s','%s','%s')", postRequestParameter('what_menu'), postRequestParameter('mode') ), __FILE__, __LINE__); - $content = getMessage('ADMIN_ADMINS_ACL_SAVED'); + $content = '{--ADMIN_ADMINS_ACL_SAVED--}'; // Update cache when installed if (isExtensionActive('cache')) { @@ -191,18 +192,18 @@ VALUES ('%s','%s','%s','%s')", } // END - if } else { // ACL does already exist! - $content = getMessage('ADMIN_ADMINS_ACL_ALREADY_ADDED'); + $content = '{--ADMIN_ADMINS_ACL_ALREADY_ADDED--}'; } // Free memory SQL_FREERESULT($result); } else { // No menu selected makes also no sence... - $content = getMessage('ADMIN_ADMINS_SELECT_ACTION_WHAT'); + $content = '{--ADMIN_ADMINS_SELECT_ACTION_WHAT--}'; } } else { // Same mode makes no sence... - $content = getMessage('ADMIN_ADMINS_SAME_MODE_SELECTED'); + $content = '{--ADMIN_ADMINS_SAME_MODE_SELECTED--}'; } // Display message @@ -221,7 +222,7 @@ VALUES ('%s','%s','%s','%s')", if (empty($content['what_menu'])) $content['what_menu'] = '---'; // Get mode - $content['access_mode'] = getMessage('ADMINS_'.strtoupper($content['access_mode']).'_MODE'); + $content['access_mode'] = '{--ADMINS_' . strtoupper($content['access_mode']) . '_MODE--}'; // Prepare data for the row template $content = array( @@ -262,5 +263,5 @@ VALUES ('%s','%s','%s','%s')", loadTemplate('admin_admins_add_acl', false, $content); } -// +// [EOF] ?>