return;
} // END - if
-// Remember userid
-$content['userid'] = getUserId();
+// Add userid
+$content = array(
+ 'userid' => getUserId()
+);
// Init variable to prevent notices
$URL = '';
switch ($mode) {
case 'show': // Show his data
if (isExtensionActive('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",
+ // New way 1 2 3 4 5 6 7 8 9 10 11 12 13 14
+ $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(getUserId()), __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",
+ // Old way 1 2 3 4 5 6 7 8 9 10 11 12 13 14
+ $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(getUserId()), __FILE__, __LINE__);
}
- $content = SQL_FETCHARRAY($result, 0, false);
+
+ // Get line
+ $content = merge_array($content, SQL_FETCHARRAY($result, 0, false));
+
+ // Free result
SQL_FREERESULT($result);
// Translate some things
$content['country'] = generateCountryInfo($content['country_code']);
} // END - if
- // Merge data in
- $content = merge_array($content, $content);
-
// Load template
loadTemplate('member_mydata_overview', false, $content);
break;
array(getUserId()), __FILE__, __LINE__);
}
- $content = SQL_FETCHARRAY($result, 0, false);
+ // Get line
+ $content = merge_array($content, SQL_FETCHARRAY($result, 0, false));
+
+ // Free result
SQL_FREERESULT($result);
+
$content['update_check'] = $content['last_update'] + getConfig('profile_lock');
// How far is last change on his profile away from now?
$content['country'] = "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$content['country']."\" />";
}
- // Merge data in
- $content = merge_array($content, $content);
-
// Load template
loadTemplate('member_mydata_edit', false, $content);
}
// 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",
array(getUserId()), __FILE__, __LINE__);
- $content = SQL_FETCHARRAY($result, 0, false);
+
+ // Get line
+ $content = merge_array($content, SQL_FETCHARRAY($result, 0, false));
+
+ // Free result
SQL_FREERESULT($result);
+
$content['last_change'] = $content['last_update'] + getConfig('profile_lock');
// How far is last change on his profile away from now?