]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-edit_user.php
- Major change in LOAD_EMAIL_TEMPLATE(). The deprecated switch() block has
[mailer.git] / inc / modules / admin / what-edit_user.php
index 2feb810224bad536f585996c49d267fcd657e964..a4be4f6398bcc4cfc100d98fa20a8eba42f59ee7 100644 (file)
@@ -44,7 +44,7 @@ ADD_DESCR("admin", basename(__FILE__));
 $result_main = false;
 if (isset($_GET['u_id'])) {
        //                                    0      1        2         3      4     5      6       7         8          9           10         11
-       $result_main = SQL_QUERY_ESC("SELECT sex, 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",
+       $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($_GET['u_id'])), __FILE__, __LINE__);
 }
 
@@ -75,7 +75,7 @@ if ((SQL_NUMROWS($result_main) == 1) || (empty($_GET['u_id'])))
                {
                        // We have to add the following things: birthday and max receive mails
                        $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET
-sex='%s',
+gender='%s',
 surname='%s',
 family='%s',
 street_nr='%s',
@@ -86,7 +86,7 @@ email='%s'
 ".$ADD."
 WHERE userid=%s LIMIT 1",
  array(
-       substr($_POST['salut'], 0, 1),
+       substr($_POST['gender'], 0, 1),
        $_POST['surname'],
        $_POST['family_name'],
        $_POST['street_nr'],
@@ -110,28 +110,28 @@ WHERE userid=%s LIMIT 1",
         else
        {
                // Display form to edit
-               list($sex, $surname, $family, $street, $zip, $city, $country, $email, $bday, $bmonth, $byear, $max) = SQL_FETCHROW($result_main);
+               list($gender, $surname, $family, $street, $zip, $city, $country, $email, $bday, $bmonth, $byear, $max) = SQL_FETCHROW($result_main);
                SQL_FREERESULT($result_main);
 
                // Transfer data to constants for the template
-               switch ($sex)
+               switch ($gender)
                {
                case "M":
-                       define('_SEX_M', " selected=\"selected\"");
-                       define('_SEX_F', "");
-                       define('_SEX_C', "");
+                       define('_GENDER_M', " selected=\"selected\"");
+                       define('_GENDER_F', "");
+                       define('_GENDER_C', "");
                        break;
 
                case "F":
-                       define('_SEX_M', "");
-                       define('_SEX_F', " selected=\"selected\"");
-                       define('_SEX_C', "");
+                       define('_GENDER_M', "");
+                       define('_GENDER_F', " selected=\"selected\"");
+                       define('_GENDER_C', "");
                        break;
 
                case "C":
-                       define('_SEX_M', "");
-                       define('_SEX_F', "");
-                       define('_SEX_C', " selected=\"selected\"");
+                       define('_GENDER_M', "");
+                       define('_GENDER_F', "");
+                       define('_GENDER_C', " selected=\"selected\"");
                        break;
                }