<?php
/************************************************************************
- * MXChange v0.2.1 Start: 09/09/2008 *
- * ================ Last change: 09/09/2008 *
+ * Mailer v0.2.1-FINAL Start: 09/09/2008 *
+ * =================== Last change: 09/09/2008 *
* *
* -------------------------------------------------------------------- *
* File : what-reflist.php *
* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
addMenuDescription('member', __FILE__);
// Load all referal levels
-$result = SQL_QUERY_ESC("SELECT r.level, r.percents
-FROM `{?_MYSQL_PREFIX?}_refdepths` AS r
-WHERE r.level > 0
-ORDER BY r.level ASC",
-array(getMemberId()), __FILE__, __LINE__);
+$result = SQL_QUERY('SELECT
+ `level`, `percents`
+FROM
+ `{?_MYSQL_PREFIX?}_refdepths`
+WHERE
+ `level` > 0
+ORDER BY
+ `level` ASC', __FILE__, __LINE__);
// Are there some entries? (Shall be!)
-if (SQL_NUMROWS($result) > 0) {
+if (!SQL_HASZERONUMS($result)) {
// List all levels
$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Init variables
$rows = '';
$counter = '0';
- $SW = 2;
// Check for users ref in this level
foreach (getUserReferalPoints(getMemberId(), $content['level']) as $refRow) {
// Add/"translate" more content
- $refRow['sw'] = $SW;
- $refRow['points'] = translateComma($refRow['points']);
- $refRow['status'] = translateUserStatus($refRow['status']);
- $refRow['unconfirmed'] = translateComma($refRow['unconfirmed']);
$refRow['clickrate'] = translateComma($refRow['clickrate'], true, 1);
- if (empty($refRow['nickname'])) $refRow['nickname'] = '---';
// Load row template
$rows .= loadTemplate('member_ref_list_row', true, $refRow);
// Count this ref and switch color
$counter++;
- $SW = 3 - $SW;
} // END - foreach
// Remember the content
- $content['counter'] = translateComma($counter);
+ $content['counter'] = $counter;
$content['percents'] = translateComma($content['percents'], true, 1);
$content['rows'] = $rows;
loadTemplate('member_ref_list', false, $OUT);
} else {
// No entries
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_REFBACK_NO_ENTRIES'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_REFBACK_NO_ENTRIES--}');
}
// Free result
SQL_FREERESULT($result);
-//
+// [EOF]
?>