$uid = bigintval($_GET['u_id']);
// Check if the user already exists
- $result_user = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
array($uid), __FILE__, __LINE__);
// User found?
if (EXT_IS_ACTIVE("refback")) {
// Load all referal levels
$result_levels = SQL_QUERY("SELECT level, percents
-FROM "._MYSQL_PREFIX."_refdepths
+FROM `{!_MYSQL_PREFIX!}_refdepths`
WHERE level > 0
ORDER BY level ASC", __FILE__, __LINE__);
} else {
// Loads surname, family's name and the email address
- $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s",
+ $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
array($uid), __FILE__, __LINE__);
- $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid",
+ $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid",
array($uid), __FILE__, __LINE__);
$menge = SQL_RESULT($result , 0, 0);
$menge_lck = SQL_RESULT($result_lck, 0, 0);
SQL_FREERESULT($result_lck);
// Query for refs
- $result_levels = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s ORDER BY userid ASC",
+ $result_levels = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s ORDER BY userid ASC",
array($uid), __FILE__, __LINE__);
// Output info message
- OUTPUT_HTML(ADMIN_TOTAL_REFS_1."".ADMIN_USER_PROFILE_LINK($_GET['u_id'])."".ADMIN_TOTAL_REFS_2.$menge.ADMIN_TOTAL_REFS_3.$menge_lck.ADMIN_TOTAL_REFS_4."<br /><br />");
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), ADMIN_USER_PROFILE_LINK($_GET['u_id']), $menge, $menge_lck));
}
// Are there some levels (VERY BAD IF NONE!)
// Is the refback still active? ;-)
if (EXT_IS_ACTIVE("refback")) {
// Load all refs of this user
- $result_refs = SQL_QUERY_ESC("SELECT refid FROM "._MYSQL_PREFIX."_user_refs WHERE userid=%s AND level='%s' ORDER BY refid ASC",
+ $result_refs = SQL_QUERY_ESC("SELECT refid FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' ORDER BY refid ASC",
array($uid, $levels['level']), __FILE__, __LINE__);
//* DEBUG: */ echo $uid."/".$levels['level']."/".SQL_NUMROWS($result_refs)."<br />\n";
// Do we have levels?
if (SQL_NUMROWS($result_refs) > 0) {
// Loads surname, family's name and the email address
- $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s",
+ $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
array($uid), __FILE__, __LINE__);
- $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid",
+ $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid",
array($uid), __FILE__, __LINE__);
$menge = SQL_RESULT($result , 0, 0);
$menge_lck = SQL_RESULT($result_lck, 0, 0);
SQL_FREERESULT($result_lck);
// Output info message
- $levels['info'] = ADMIN_TOTAL_REFS_1."".ADMIN_USER_PROFILE_LINK($uid)."".ADMIN_TOTAL_REFS_2.$menge.ADMIN_TOTAL_REFS_3.$menge_lck.ADMIN_TOTAL_REFS_4;
+ $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), ADMIN_USER_PROFILE_LINK($uid), $menge, $menge_lck);
// Load all refs
$OUT_REFS = ""; $SW = 2;
while (list($refid) = SQL_FETCHROW($result_refs)) {
// Query for data
- $result_user = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
array($refid), __FILE__, __LINE__);
// Is the data there?
$data = SQL_FETCHARRAY($result_user);
// Check for referals
- $result_cnt = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s",
+ $result_cnt = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
array($refid), __FILE__, __LINE__);
// Load refs
} // END - while
} else {
// Output info message
- $levels['info'] = ADMIN_TOTAL_REFS_1."".ADMIN_USER_PROFILE_LINK($uid)."".ADMIN_TOTAL_REFS_2."0".ADMIN_TOTAL_REFS_3."0".ADMIN_TOTAL_REFS_4;
+ $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), ADMIN_USER_PROFILE_LINK($uid), "0", "0");
// No refs found
$levels['rows'] = LOAD_TEMPLATE("admin_list_refs_norefs", true, array('uid' => $uid));
$OUT .= LOAD_TEMPLATE("admin_list_refs_level", true, $levels);
} else {
// Check for referals
- $result_refs = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s",
+ $result_refs = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
array(bigintval($levels['userid'])), __FILE__, __LINE__);
$refs_cnt = SQL_RESULT($result_refs, 0, 0);
SQL_FREERESULT($result_refs);
}
} elseif (EXT_IS_ACTIVE("refback")) {
// No levels found, very bad!
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_REF_LEVELS);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_REF_LEVELS'));
} else {
// No refs made so far
- LOAD_TEMPLATE("admin_settings_saved", false, USER_REF_404);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('USER_REF_404'));
}
// Free result
SQL_FREERESULT($result_levels);
} else {
// User not found
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_MEMBER_404, $_GET['u_id']));
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_MEMBER_404'), $_GET['u_id']));
}
// Free memory