X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-mediadata.php;h=feaaa4fa73fca09397237348d6ae124c6e184f5f;hb=f4ce5cef593442c4ed9c1e14efe9fdb2433b9587;hp=1cac00d558a770ea834e606962652fd21c334ba2;hpb=dbb6aa4eaeff7c3bab27f143d881781380d43d41;p=mailer.git diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index 1cac00d558..feaaa4fa73 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -1,7 +1,7 @@ 0) { // @TODO Find a better formular than this one $PROJECTED = round((time() - getConfig('mt_start')) / $content['user_count'] * getConfig('mt_stage') + getConfig('mt_start')); @@ -92,28 +92,28 @@ $content['max'] = countSumTotalData('CONFIRMED', 'user_data', 'max_mails', 'stat $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 @@ -128,10 +128,10 @@ if ($sent > 0) $clr = $clicks / $sent * 100; $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 @@ -145,9 +145,9 @@ SQL_FREERESULT($result); // 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; @@ -161,9 +161,9 @@ $result = SQL_QUERY("SELECT SUM(`counter`) AS cnt, SUM(`clicks`) AS clx FROM `{? 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; @@ -174,9 +174,9 @@ $content['ref_clicks'] = $clicks; // // 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 @@ -187,7 +187,6 @@ if (isExtensionActive('beg')) { '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')) { @@ -198,7 +197,6 @@ if (isExtensionActive('doubler')) { $data = array( 'lang' => getMessage('MEDIA_DOUBLER_COUNT'), 'value' => countSumTotalData('Y','doubler','id','completed', true, " AND `points` > 0"), - 'rows' => 4 ); // Add points @@ -235,13 +233,12 @@ WHERE __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')) { @@ -257,8 +254,8 @@ ON __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 @@ -267,15 +264,14 @@ ON t.userid=d.userid", __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( @@ -299,12 +295,9 @@ $content['out_extra'] = $OUT_EXTRA; $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);