]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/doubler_functions.php
All 'online' table queries should be placed in ext-online.php
[mailer.git] / inc / libs / doubler_functions.php
index be2f18c129327382f249c9cd55a6f0165523c759..01720837be8084dde3ebc6e6afd307d71b730fb3 100644 (file)
@@ -40,18 +40,17 @@ if (!defined('__SECURITY')) {
 // Generates a HTML table based on given data
 // @TODO Lame description
 function DOUBLER_GENERATE_TABLE ($uid="0", $done='N', $ref='N', $sort="ASC") {
-       global $_CONFIG;
        if (empty($cnt)) $cnt = 0;
        $ADD = ""; $DT_MODE = 0;
        if ($uid > 0) {
                // Load entries only from a single user
                $ADD = " AND userid='".bigintval($uid)."'";
                $MODE = "member"; $COLS = "4"; $DT_MODE = "2";
-               $NOT_FOUND = DOUBLER_MEMBER_NO_ENTRIES_FOUND;
+               $NOT_FOUND = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND');
        } else {
                // Guest mode!
                $MODE = "guest"; $COLS = "3"; $DT_MODE = "3";
-               $NOT_FOUND = DOUBLER_GUEST_NO_ENTRIES_FOUND;
+               $NOT_FOUND = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND');
        }
 
        if (($done == "Y") && ($sort == "ASC")) {
@@ -70,7 +69,7 @@ function DOUBLER_GENERATE_TABLE ($uid="0", $done='N', $ref='N', $sort="ASC") {
 FROM `{!_MYSQL_PREFIX!}_doubler`
 WHERE completed='".$done."' AND is_ref='".$ref."'".$ADD."
 ORDER BY timemark ".$sort."
-LIMIT ".$limit, __FILE__, __LINE__);
+LIMIT ".$limit, __FUNCTION__, __LINE__);
 
        if (SQL_NUMROWS($result) > 0) {
                // List entries
@@ -123,7 +122,7 @@ function DOUBLER_GET_TOTAL_POINTS_LEFT() {
 
        if (getConfig('doubler_jackpot') == "Y") {
                // Load jackpot
-               $result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FILE__, __LINE__);
+               $result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FUNCTION__, __LINE__);
                list($jackpot) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);