X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fdoubler_functions.php;h=3c44736a4c689bdb9a5b0a8f34b32ae87ce580ef;hb=e5ae148596850b078c6df0878d1527b40eee33ac;hp=e437c510baa54d67a177c3110661bfdb490b493e;hpb=c3e061c0d6fc0ee8778ebaebf1c05cf2bf126703;p=mailer.git diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index e437c510ba..3c44736a4c 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -32,17 +32,17 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } + // function DOUBLER_GENERATE_TABLE($uid="0", $done='N', $ref='N', $sort="ASC") { global $_CONFIG; - if (empty($cnt)) $cnt = "0"; - $ADD = ""; $DT_MODE = "0"; + if (empty($cnt)) $cnt = 0; + $ADD = ""; $DT_MODE = 0; if ($uid > 0) { // Load entries only from a single user @@ -57,7 +57,7 @@ function DOUBLER_GENERATE_TABLE($uid="0", $done='N', $ref='N', $sort="ASC") $NOT_FOUND = DOUBLER_GUEST_NO_ENTRIES_FOUND; } - if (($done == 'Y') && ($sort == "ASC")) + if (($done == "Y") && ($sort == "ASC")) { // Already payed out points (latest payouts first) $limit = $_CONFIG['doubler_display_old']; @@ -128,15 +128,15 @@ function DOUBLER_GET_TOTAL_POINTS_LEFT() { global $_CONFIG; // Initialize variables - $points = "0"; + $points = 0; - if ($_CONFIG['doubler_own'] == 'Y') + if ($_CONFIG['doubler_own'] == "Y") { // Take points from doubler's own account $points += $_CONFIG['doubler_points'] - $_CONFIG['doubler_used']; } - if ($_CONFIG['doubler_jackpot'] == 'Y') + if ($_CONFIG['doubler_jackpot'] == "Y") { // Load jackpot $result = SQL_QUERY("SELECT points FROM "._MYSQL_PREFIX."_jackpot WHERE ok='ok' LIMIT 1", __FILE__, __LINE__);