X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-edit_user.php;h=e8d3fbd99fc77b95ddd540922bca45de037017f3;hb=9d3e47c8ab6ff3ab7efca2a968d66a5ccf76728d;hp=831bdf064027e4e4cd758cc5520d2d107c48830d;hpb=414570c5081d337bb6c28dcf521bd8bca02f69e7;p=mailer.git diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index 831bdf0640..e8d3fbd99f 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -10,10 +10,10 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Mitgliederprofile aendern * * -------------------------------------------------------------------- * - * $Revision:: 856 $ * - * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Revision:: $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: stelzi $ * + * $Author:: $ * * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * @@ -38,46 +38,46 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } // Add description as navigation point -ADD_DESCR("admin", __FILE__); +ADD_DESCR('admin', __FILE__); // Fix a notice $result_main = false; -if (REQUEST_ISSET_GET(('uid'))) { +if (REQUEST_ISSET_GET('uid')) { // 0 1 2 3 4 5 6 7 8 9 10 11 $result_main = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, zip, city, country, email, birth_day, birth_month, birth_year, max_mails FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); } -if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET(('uid')))) +if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET('uid'))) { // User found - if (!REQUEST_ISSET_GET(('uid'))) + if (!REQUEST_ISSET_GET('uid')) { // Output selection form with all confirmed user accounts listed ADD_MEMBER_SELECTION_BOX(); } - elseif (REQUEST_ISSET_POST('edit')) + elseif (REQUEST_ISSET_POST('edit')) { // Ok, change the account... - $PASS = false; $ADD = ""; + $PASS = false; $add = ''; if ((!REQUEST_ISSET_POST(('pass1'))) && (!REQUEST_ISSET_POST(('pass2')))) { // Don't change the password $PASS = true; } - elseif ((REQUEST_POST('pass1') == REQUEST_POST('pass2'))) + elseif ((REQUEST_POST('pass1') == REQUEST_POST('pass2'))) { // Change the password $PASS = true; - $ADD = ", password='".generateHash(REQUEST_POST('pass1'))."'"; + $add = ", password='".generateHash(REQUEST_POST('pass1'))."'"; } if ($PASS) { @@ -91,31 +91,31 @@ country='%s', zip=%s, city='%s', email='%s' -".$ADD." +".$add." WHERE userid=%s LIMIT 1", - array( - substr(REQUEST_POST('gender'), 0, 1), - REQUEST_POST('surname'), - REQUEST_POST('family'), - REQUEST_POST('street_nr'), - REQUEST_POST('country'), - bigintval(REQUEST_POST('zip')), - REQUEST_POST('city'), - REQUEST_POST('email'), - bigintval(REQUEST_GET('uid')), -), __FILE__, __LINE__); + array( + substr(REQUEST_POST('gender'), 0, 1), + REQUEST_POST('surname'), + REQUEST_POST('family'), + REQUEST_POST('street_nr'), + REQUEST_POST('country'), + bigintval(REQUEST_POST('zip')), + REQUEST_POST('city'), + REQUEST_POST('email'), + bigintval(REQUEST_GET('uid')), + ), __FILE__, __LINE__); $content = USER_ACCOUNT_SAVED; } - else + else { // Problem while saving data $content = USER_ACCOUNT_NOT_SAVED; } // Load template - LOAD_TEMPLATE("admin_settings_saved", false, $content); + LOAD_TEMPLATE('admin_settings_saved', false, $content); } - else + else { // Display form to edit list($gender, $surname, $family, $street, $zip, $city, $country, $email, $bday, $bmonth, $byear, $max) = SQL_FETCHROW($result_main); @@ -124,23 +124,23 @@ WHERE userid=%s LIMIT 1", // Transfer data to constants for the template switch ($gender) { - case "M": - define('_GENDER_M', " selected=\"selected\""); - define('_GENDER_F', ""); - define('_GENDER_C', ""); - break; + case "M": + define('_GENDER_M', ' selected="selected"'); + define('_GENDER_F', ''); + define('_GENDER_C', ''); + break; - case "F": - define('_GENDER_M', ""); - define('_GENDER_F', " selected=\"selected\""); - define('_GENDER_C', ""); - break; + case "F": + define('_GENDER_M', ''); + define('_GENDER_F', ' selected="selected"'); + define('_GENDER_C', ''); + break; - case "C": - define('_GENDER_M', ""); - define('_GENDER_F', ""); - define('_GENDER_C', " selected=\"selected\""); - break; + case "C": + define('_GENDER_M', ''); + define('_GENDER_F', ''); + define('_GENDER_C', ' selected="selected"'); + break; } define('_SURNAME', $surname); define('_FAMILY', $family); define('_CITY' , $city); @@ -152,7 +152,7 @@ WHERE userid=%s LIMIT 1", } } else { // Account does not exists! - LOAD_TEMPLATE("admin_settings_saved", false, "
".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."
"); + LOAD_TEMPLATE('admin_settings_saved', false, "
".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."
"); } //