X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-edit_user.php;h=05602f4958319f5baab6f956ad9473d21455e97f;hb=4f7df133f736da124e6f7bd02008b9093f736451;hp=caeaf117b1772bd699bf5f436b2714ea035b3cb8;hpb=c8d76610eb94093d4eed4fcd8a6cb72e74c8f6d8;p=mailer.git diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index caeaf117b1..05602f4958 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -18,8 +18,8 @@ * @TODO Add support for ext-country * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * 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 * * it under the terms of the GNU General Public License as published by * @@ -43,11 +43,11 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { } // END - if // Add description as navigation point -addMenuDescription('admin', __FILE__); +addYouAreHereLink('admin', __FILE__); // Fix a notice -$result_main = false; -if (isGetRequestParameterSet('userid')) { +$result_main = FALSE; +if (isGetRequestElementSet('userid')) { // Load user entry $result_main = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `street_nr`, `zip`, `city`, `country`, @@ -60,28 +60,28 @@ WHERE `userid`=%s LIMIT 1", array( - bigintval(getRequestParameter('userid')) + bigintval(getRequestElement('userid')) ), __FILE__, __LINE__); } // END - if -if ((!isGetRequestParameterSet('userid')) || (SQL_NUMROWS($result_main) == 1)) { +if ((!isGetRequestElementSet('userid')) || (SQL_NUMROWS($result_main) == 1)) { // User found - if (!isGetRequestParameterSet('userid')) { + if (!isGetRequestElementSet('userid')) { // Output selection form with all confirmed user accounts listed addMemberSelectionBox(); } elseif (isFormSent('edit')) { // Ok, change the account... - $updateUser = false; $add = ''; - if ((!isPostRequestParameterSet('pass1')) && (!isPostRequestParameterSet('pass2'))) { + $updateUser = FALSE; $add = ''; + if ((!isPostRequestElementSet('password1')) && (!isPostRequestElementSet('password2'))) { // Don't change the password - $updateUser = true; - } elseif ((postRequestParameter('pass1') == postRequestParameter('pass2'))) { + $updateUser = TRUE; + } elseif ((postRequestElement('password1') == postRequestElement('password2'))) { // Change the password - $updateUser = true; - $add = ", `password`='" . generateHash(postRequestParameter('pass1')) . "'"; + $updateUser = TRUE; + $add = ",`password`='" . generateHash(postRequestElement('password1')) . "'"; } - if ($updateUser === true) { + if ($updateUser === TRUE) { // We have to add the following things: birthday and max receive mails SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` @@ -99,15 +99,15 @@ WHERE `userid`=%s LIMIT 1", array( - substr(postRequestParameter('gender'), 0, 1), - postRequestParameter('surname'), - postRequestParameter('family'), - postRequestParameter('street_nr'), - postRequestParameter('country'), - bigintval(postRequestParameter('zip')), - postRequestParameter('city'), - postRequestParameter('email'), - bigintval(getRequestParameter('userid')), + substr(postRequestElement('gender'), 0, 1), + postRequestElement('surname'), + postRequestElement('family'), + postRequestElement('street_nr'), + postRequestElement('country'), + bigintval(postRequestElement('zip')), + postRequestElement('city'), + postRequestElement('email'), + bigintval(getRequestElement('userid')), ), __FILE__, __LINE__); $content = '{--ADMIN_USER_ACCOUNT_SAVED--}'; } else { @@ -116,25 +116,17 @@ LIMIT 1", } // Load template - loadTemplate('admin_settings_saved', false, $content); + displayMessage($content); } else { // Load entry $content = SQL_FETCHARRAY($result_main); - // Init entries - foreach (array('gender_m','gender_f','gender_c') as $entry) { - $content[$entry] = ''; - } // END - foreach - - // Prepare selections - $content['gender_' . strtolower($content['gender'])] = ' selected="selected"'; - // Load template - loadTemplate('admin_edit_user', false, $content); + loadTemplate('admin_edit_user', FALSE, $content); } } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid')))); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } // Free the result