]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-edit_user.php
'what' files should be loaded only once
[mailer.git] / inc / modules / admin / what-edit_user.php
index b9e64937b19817d4828b1def6d5f84092f07d152..6cc2e584ebcda2a6704f9b9206e76c777c0d1194 100644 (file)
@@ -19,7 +19,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * 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 *
@@ -47,12 +47,12 @@ addYouAreHereLink('admin', __FILE__);
 
 // Fix a notice
 $result_main = false;
-if (isGetRequestParameterSet('userid')) {
+if (isGetRequestElementSet('userid')) {
        // Load user entry
        $result_main = SQL_QUERY_ESC("SELECT
-       `userid`, `gender`, `surname`, `family`, `street_nr`, `zip`, `city`, `country`,
+       `userid`,`gender`,`surname`,`family`,`street_nr`,`zip`,`city`,`country`,
        `email`,
-       `birth_day`, `birth_month`, `birth_year`,
+       `birth_day`,`birth_month`,`birth_year`,
        `max_mails`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
@@ -60,25 +60,25 @@ 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'))) {
+               if ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass2'))) {
                        // Don't change the password
                        $updateUser = true;
-               } elseif ((postRequestParameter('pass1') == postRequestParameter('pass2'))) {
+               } elseif ((postRequestElement('pass1') == postRequestElement('pass2'))) {
                        // Change the password
                        $updateUser = true;
-                       $add = ", `password`='" . generateHash(postRequestParameter('pass1')) . "'";
+                       $add = ", `password`='" . generateHash(postRequestElement('pass1')) . "'";
                }
 
                if ($updateUser === true) {
@@ -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 {
@@ -126,7 +126,7 @@ LIMIT 1",
        }
 } 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