<?php
/************************************************************************
- * MXChange v0.2.1 Start: 12/09/2003 *
- * =============== Last change: 02/12/2006 *
+ * Mailer v0.2.1-FINAL Start: 12/09/2003 *
+ * =================== Last change: 02/12/2006 *
* *
* -------------------------------------------------------------------- *
* File : what-mediadata.php *
return;
} // END - if
-// Get total confirmed user IDs...
+// Get total confirmed user ids...
$content['user_confirmed'] = round(countSumTotalData('CONFIRMED' , 'user_data', 'userid', 'status', true));
$content['user_unconfirmed'] = round(countSumTotalData('UNCONFIRMED', 'user_data', 'userid', 'status', true));
$content['user_locked'] = round(countSumTotalData('LOCKED' , 'user_data', 'userid', 'status', true));
$content['mt_start'] = generateDateTime(getConfig('mt_start'), 3);
// Project timestamp when number of members are reached
-$PROJECTED = 0;
+$PROJECTED = '0';
if ($content['user_count'] > 0) {
// @TODO Find a better formular than this one
$PROJECTED = round((time() - getConfig('mt_start')) / $content['user_count'] * getConfig('mt_stage') + getConfig('mt_start'));
$content['rec'] = countSumTotalData('CONFIRMED', 'user_data', 'receive_mails', 'status', false, " AND `receive_mails` > 0");
// Initial lots of variables
-$bmails = 0; $sent = 0; $max = 0; $rec = 0; $clicks = 0;
+$bmails = '0'; $sent = '0'; $max = '0'; $rec = '0'; $clicks = '0';
// Mail orders (only current)
$nmails = getMediadataEntry('normal_orders');
-if (empty($nmails)) $nmails = 0;
+if (empty($nmails)) $nmails = '0';
// Mails sent so far
$clicks = getMediadataEntry('normal_clicks');
$sent = getMediadataEntry('normal_send');
-if (empty($sent)) $sent = 0;
-if (empty($clicks)) $clicks = 0;
+if (empty($sent)) $sent = '0';
+if (empty($clicks)) $clicks = '0';
// Bonus mails
if (isExtensionActive('bonus')) {
$bmails = getMediadataEntry('bonus_orders');
- if (empty($bmails)) $bmails = 0;
+ if (empty($bmails)) $bmails = '0';
// Count bonus mails clicks / sent mails
$dmy = getMediadataEntry('bonus_clicks');
$dmy2 = getMediadataEntry('bonus_send');
- if (empty($dmy)) $dmy = 0;
- if (empty($dmy2)) $dmy2 = 0;
+ if (empty($dmy)) $dmy = '0';
+ if (empty($dmy2)) $dmy2 = '0';
$sent += $dmy2; $clicks += $dmy;
} // END - if
$content['_clr'] = translateComma($clr) . '%';
// Load jackpot
-$jackpot = 0;
+$jackpot = '0';
if (isExtensionActive('jackpot')) $jackpot = getJackpotPoints();
-if (empty($jackpot)) $jackpot = 0;
+if (empty($jackpot)) $jackpot = '0';
$content['jackpot'] = translateComma($jackpot);
// Total referal link clicks, total logins
// Get total points
$points = getMediadataEntry('total_points');
-if (empty($points)) $points = 0;
-if (empty($ref)) $ref = 0;
-if (empty($logins)) $logins = 0;
+if (empty($points)) $points = '0';
+if (empty($ref)) $ref = '0';
+if (empty($logins)) $logins = '0';
$content['total_points'] = translateComma($points);
$content['total_refclicks'] = $ref;
list($views, $clicks) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
-if (empty($total)) $total = 0;
-if (empty($views)) $views = 0;
-if (empty($clicks)) $clicks = 0;
+if (empty($total)) $total = '0';
+if (empty($views)) $views = '0';
+if (empty($clicks)) $clicks = '0';
$content['ref_total'] = $total;
$content['ref_views'] = $views;
//
// Initialize Variables
-$OUT_EXTRA = ''; $ROWS_EXTRA = 2;
-$OUT_POINTS = ''; $ROWS_POINTS = 2;
-$OUT_USER = ''; $ROWS_USER = 6;
+$OUT_EXTRA = '';
+$OUT_POINTS = '';
+$OUT_USER = '';
$OUT_SPECIAL = ''; // We don't need row count here
// @TODO Rewrite all these if-blocks to filters
'value' => countSumTotalData(1, 'user_data', 'beg_clicks', 1, false, " AND `beg_clicks` > 0")
);
$OUT_EXTRA .= loadTemplate('mediadata_extra_row', true, $data);
- $ROWS_EXTRA++;
}
if (isExtensionActive('doubler')) {
$data = array(
'lang' => getMessage('MEDIA_DOUBLER_COUNT'),
'value' => countSumTotalData('Y','doubler','id','completed', true, " AND `points` > 0"),
- 'rows' => 4
);
// Add points
__FILE__, __LINE__);
list($holiday) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if (empty($holiday)) $holiday = 0;
+ if (empty($holiday)) $holiday = '0';
$data = array(
'lang' => getMessage('MEDIA_HOLIDAY_COUNT'),
'value' => $holiday
);
$OUT_USER .= loadTemplate('mediadata_extra_row', true, $data);
- $ROWS_USER++;
}
if (isExtensionActive('transfer')) {
__FILE__, __LINE__);
list($count_in, $points_in) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if (empty($count_in)) $count_in = 0;
- if (empty($points_in)) $points_in = 0;
+ if (empty($count_in)) $count_in = '0';
+ if (empty($points_in)) $points_in = '0';
$result = SQL_QUERY("SELECT COUNT(t.id), SUM(t.points)
FROM `{?_MYSQL_PREFIX?}_user_transfers_out` AS t
__FILE__, __LINE__);
list($count_out, $points_out) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if (empty($count_out)) $count_out = 0;
- if (empty($points_out)) $points_out = 0;
+ if (empty($count_out)) $count_out = '0';
+ if (empty($points_out)) $points_out = '0';
// Add header
$OUT_SPECIAL .= loadTemplate('mediadata_extra_hrow', true, getMessage('MEDIA_TRANSFER_HEADER'));
$data = array(
'lang' => getMessage('MEDIA_TRANSFER_IN_COUNT'),
'value' => $count_in,
- 'rows' => 4
);
$OUT_SPECIAL .= loadTemplate('mediadata_extra_row2', true, $data);
$data = array(
$content['out_points'] = $OUT_POINTS;
$content['out_user'] = $OUT_USER;
$content['out_special'] = $OUT_SPECIAL;
-$content['rowspan_extra'] = $ROWS_EXTRA;
-$content['rowspan_points'] = $ROWS_POINTS;
-$content['rowspan_user'] = $ROWS_USER;
// Patch timespamp
-$contentp['patch_ctime'] = generateDateTime(getConfig('patch_ctime'), 2);
+$content['patch_ctime'] = generateDateTime(getConfig('patch_ctime'), 2);
// Load template
loadTemplate('mediadata', false, $content);