Several minor rewrites, getter GET_JACKPOT_POINTS() added
[mailer.git] / inc / modules / guest / what-mediadata.php
index ac1b450..61e30b2 100644 (file)
@@ -128,15 +128,16 @@ if ($sent > 0) $clr = $clicks / $sent * 100;
 define('_clr', translateComma($clr).'%');
 
 // Load jackpot
-$result = SQL_QUERY("SELECT `points` FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE `ok`='ok' LIMIT 1", __FILE__, __LINE__);
-list($jackpot) = SQL_FETCHROW($result);
-SQL_FREERESULT($result);
+$jackpot = GET_JACKPOT_POINTS();
+
 if (empty($jackpot)) $jackpot = 0;
 define('jackpot', translateComma($jackpot));
 
 // Total referal link clicks, total logins
-$result = SQL_QUERY("SELECT DISTINCT SUM(d.ref_clicks), SUM(d.total_logins)
-FROM `{!_MYSQL_PREFIX!}_user_data` AS d", __FILE__, __LINE__);
+$result = SQL_QUERY("SELECT DISTINCT
+       SUM(d.ref_clicks), SUM(d.total_logins)
+FROM
+       `{!_MYSQL_PREFIX!}_user_data` AS d", __FILE__, __LINE__);
 list($ref, $logins) = SQL_FETCHROW($result);
 SQL_FREERESULT($result);