]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-mydata.php
Tons of rewrites (SQL queries), surfbar nearly finished (working: surfing with static...
[mailer.git] / inc / modules / member / what-mydata.php
index fbcf7b56a84210e90eeae79ace50b4b947a830ad..97554795d5aff43bbd8a228289c1a93cbd5ac813 100644 (file)
@@ -65,13 +65,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
        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, sex, max_mails, receive_mails, last_update FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, sex, 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
                 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, sex, max_mails, receive_mails, last_update FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, sex, 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);
                 array(UID_VALUE), __FILE__, __LINE__);
        }
        $DATA = SQL_FETCHROW($result);
@@ -115,14 +115,14 @@ case "edit": // Edit data
        {
                // 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, sex, max_mails, receive_mails, last_update
        {
                // 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, sex, max_mails, receive_mails, last_update
-FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d 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, sex, max_mails, receive_mails, last_update
                 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, sex, max_mails, receive_mails, last_update
-FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
                 array(UID_VALUE), __FILE__, __LINE__);
        }
 
                 array(UID_VALUE), __FILE__, __LINE__);
        }
 
@@ -203,7 +203,7 @@ FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
 
 case "save": // Save entered data
        // Load old email / password:      0        1          2
 
 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=%d 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);
         array(UID_VALUE), __FILE__, __LINE__);
        $DATA = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
@@ -253,14 +253,14 @@ case "save": // Save entered data
                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET
 sex='%s', surname='%s', family='%s',
 street_nr='%s',
                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET
 sex='%s', surname='%s', family='%s',
 street_nr='%s',
-country_code=%d, zip=%d, city='%s',
+country_code=%s, zip=%s, city='%s',
 email='%s',
 email='%s',
-birth_day=%d, birth_month=%d, birth_year=%d,
-max_mails=%d,
+birth_day=%s, birth_month=%s, birth_year=%s,
+max_mails=%s,
 last_update=UNIX_TIMESTAMP()".$AND.",
 notified='N',
 last_profile_sent=UNIX_TIMESTAMP()
 last_update=UNIX_TIMESTAMP()".$AND.",
 notified='N',
 last_profile_sent=UNIX_TIMESTAMP()
-WHERE userid=%d AND password='%s' LIMIT 1",
+WHERE userid=%s AND password='%s' LIMIT 1",
 array(
        $_POST['sex'],
        $_POST['surname'],
 array(
        $_POST['sex'],
        $_POST['surname'],
@@ -284,14 +284,14 @@ array(
                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET
 sex='%s', surname='%s', family='%s',
 street_nr='%s',
                                $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET
 sex='%s', surname='%s', family='%s',
 street_nr='%s',
-country='%s', zip=%d, city='%s',
+country='%s', zip=%s, city='%s',
 email='%s',
 email='%s',
-birth_day=%d, birth_month=%d, birth_year=%d,
+birth_day=%s, birth_month=%s, birth_year=%s,
 max_mails='%s',
 last_update=UNIX_TIMESTAMP()".$AND.",
 notified='N',
 last_profile_sent=UNIX_TIMESTAMP()
 max_mails='%s',
 last_update=UNIX_TIMESTAMP()".$AND.",
 notified='N',
 last_profile_sent=UNIX_TIMESTAMP()
-WHERE userid=%d AND password='%s' LIMIT 1",
+WHERE userid=%s AND password='%s' LIMIT 1",
 array(
        $_POST['sex'],
        $_POST['surname'],
 array(
        $_POST['sex'],
        $_POST['surname'],
@@ -325,7 +325,7 @@ array(
        break;
 
 case "notify": // Switch off notfication
        break;
 
 case "notify": // Switch off notfication
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%d LIMIT 1",
+       $result = 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 = URL."/modules.php?module=login&what=welcome&msg=".urlencode(PROFILE_UPDATED);
        break;
         array($GLOBALS['userid']), __FILE__, __LINE__);
        $URL = URL."/modules.php?module=login&what=welcome&msg=".urlencode(PROFILE_UPDATED);
        break;