All database names are now 'back-ticked' and constant _MYSQL_PREFIX is wrapped. Partl...
[mailer.git] / inc / modules / member / what-mydata.php
index df2c5a3fca5c6321a40a2ca8dbd67bb0fa0fe7ac..64d7f856794cd1c384b1053e7a1e10db4a2a0e7e 100644 (file)
@@ -59,13 +59,13 @@ case "show": // Show his data
        if (EXT_IS_ACTIVE("country", true))
        {
                // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
-               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
                 array(UID_VALUE), __FILE__, __LINE__);
        }
         else
        {
                // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
-               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
                 array(UID_VALUE), __FILE__, __LINE__);
        }
        $DATA = SQL_FETCHROW($result);
@@ -108,12 +108,12 @@ case "edit": // Edit data
        if (EXT_IS_ACTIVE("country", true)) {
                // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
                $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
-FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
                 array(UID_VALUE), __FILE__, __LINE__);
        } else {
                // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
                $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
-FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
                 array(UID_VALUE), __FILE__, __LINE__);
        }
 
@@ -182,7 +182,7 @@ FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
                        define('__COUNTRY_CONTENT', $OUT);
                } else {
                        // Ouput default input box
-                       define('__COUNTRY_CONTENT', "<INPUT type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\">");
+                       define('__COUNTRY_CONTENT', "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\" />");
                }
 
                // Load template
@@ -192,7 +192,7 @@ FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
 
 case "save": // Save entered data
        // Load old email / password:      0        1          2
-       $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `{!MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
         array(UID_VALUE), __FILE__, __LINE__);
        $DATA = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
@@ -229,7 +229,7 @@ case "save": // Save entered data
                        if (EXT_IS_ACTIVE("country"))
                        {
                                // New way
-                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
+                               SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET
 gender='%s', surname='%s', family='%s',
 street_nr='%s',
 country_code=%s, zip=%s, city='%s',
@@ -260,7 +260,7 @@ array(
                         else
                        {
                                // Old way
-                               SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
+                               SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET
 gender='%s', surname='%s', family='%s',
 street_nr='%s',
 country='%s', zip=%s, city='%s',
@@ -304,7 +304,7 @@ array(
        break;
 
 case "notify": // Switch off notfication
-       SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
         array($GLOBALS['userid']), __FILE__, __LINE__);
        $URL = "modules.php?module=login&amp;what=welcome&amp;msg=".urlencode(PROFILE_UPDATED);
        break;