<?php
/************************************************************************
- * MXChange v0.2.1 Start: 04/12/2004 *
- * ================ Last change: 12/01/2008 *
+ * Mailer v0.2.1-FINAL Start: 04/12/2004 *
+ * =================== Last change: 12/01/2008 *
* *
* -------------------------------------------------------------------- *
* File : what-payout.php *
return;
} // END - if
-$result_depths = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
-$totalPoints = '0';
-while ($content = SQL_FETCHARRAY($result_depths)) {
- // Load referal points
- $result_points = SQL_QUERY_ESC("SELECT `points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1",
- array(getMemberId(), bigintval($content['level'])), __FILE__, __LINE__);
-
- // Entry found?
- if (SQL_NUMROWS($result_points) == 1) {
- // Load points
- list($points) = SQL_FETCHROW($result_points);
-
- // Add them to total
- $totalPoints += $points;
- } // END - if
-
- // Free result
- SQL_FREERESULT($result_points);
-} // END - while
-
-// Free memory
-SQL_FREERESULT($result_depths);
+// Get total points
+$totalPoints = countSumTotalData(getMemberId(), 'user_points', 'points');
// Get used points
$usedPoints = countSumTotalData(getMemberId(), 'user_data', 'used_points');
while ($content = SQL_FETCHARRAY($result_payouts)) {
// Translate status
$content['status'] = getMessage('PAYOUT_MEMBER_STATUS_'.strtoupper($content['status']).'');
- $content['status'] = "<div class=\"member_failed\">".$content['status']."</div>";
+ $content['status'] = '<div class="member_failed">' . $content['status'] . '</div>';
// Nothing entered must be secured in member/what-payputs.php !
if ($content['allow'] == 'Y') {
// Textlink
$content['target_account'] = $content['alt'];
}
- $content['target_bank'] = "<a href=\"".generateDerefererUrl($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>";
+ $content['target_bank'] = '<a href="' . generateDerefererUrl($content['url']) . '" target="_blank">{--CLICK_HERE--}</a>';
} else {
// e-currency payout request
if (empty($content['target_account'])) $content['target_account'] = '---';
}
// Prepare data for the template
- // @TODO Rewritings: acc->target_account,bank->target_bank in templates
$content = array(
- 'sw' => $SW,
- 'acc' => $content['target_account'],
- 'points' => translateComma($content['payout_total']) . ' ' . $content['type'],
- 'bank' => $content['target_bank'],
- 'stamp' => generateDateTime($content['payout_timestamp'], 2),
- 'status' => $content['status']
+ 'sw' => $SW,
+ 'target_account' => $content['target_account'],
+ 'points' => translateComma($content['payout_total']) . ' ' . $content['type'],
+ 'target_bank' => $content['target_bank'],
+ 'payout_timestamp' => generateDateTime($content['payout_timestamp'], 2),
+ 'status' => $content['status']
);
// Load row template and switch colors