* Kurzbeschreibung : Alle generierten Refs eines Mitgliedes anzeigen *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
displayMessage(sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(getRequestElement('userid')), $totalReferrals, $totalLockedReferrals));
// Load all referral levels
- $result_levels = SQL_QUERY("SELECT
+ $result_levels = sqlQuery("SELECT
`level`,
`percents`
FROM
`level` ASC", __FILE__, __LINE__);
// Are there some levels (VERY BAD IF NONE!)
- if (!SQL_HASZERONUMS($result_levels)) {
+ if (!ifSqlHasZeroNums($result_levels)) {
// List all ref levels or entries if no refback is installed
$OUT = '';
- while ($levels = SQL_FETCHARRAY($result_levels)) {
+ while ($levels = sqlFetchArray($result_levels)) {
// 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 = sqlQueryEscaped("SELECT `refid` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `level`=%s ORDER BY `refid` ASC",
array(
$userid,
$levels['level']
), __FILE__, __LINE__);
- //* DEBUG: */ debugOutput($userid.'/'.$levels['level'].'/'.SQL_NUMROWS($result_refs));
+ //* DEBUG: */ debugOutput($userid.'/'.$levels['level'].'/'.sqlNumRows($result_refs));
// Is there levels?
- if (!SQL_HASZERONUMS($result_refs)) {
+ if (!ifSqlHasZeroNums($result_refs)) {
// Count entries
$totalReferrals = getUsersTotalReferrals($userid, $levels['level']);
$totalLockedReferrals = getUsersTotalLockedReferrals($userid, $levels['level']);
$OUT_REFS = '';
// Load all refs
- while ($content = SQL_FETCHARRAY($result_refs)) {
+ while ($content = sqlFetchArray($result_refs)) {
// Is the data there?
if (fetchUserData($content['refid'])) {
// Check for referrals
}
// Free result
- SQL_FREERESULT($result_refs);
+ sqlFreeResult($result_refs);
// Load level template
$OUT .= loadTemplate('admin_list_refs_level', TRUE, $levels);
}
// Free result
- SQL_FREERESULT($result_levels);
+ sqlFreeResult($result_levels);
} else {
// User not found
displayMessage('{%message,ADMIN_MEMBER_404=' . getRequestElement('userid') . '%}');