X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=ref.php;h=35b1e175feb92d6f829c4795330737e8a002707e;hp=5b46f1778aeb065d08d5eca7235af786bbc83f77;hb=bcabdff3613bbc285c600ac5588dcc85356e6d66;hpb=cca98f57dff720b174d21d071cee8303462485d7 diff --git a/ref.php b/ref.php index 5b46f1778a..35b1e175fe 100644 --- a/ref.php +++ b/ref.php @@ -32,14 +32,15 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require_once("inc/libs/security_functions.php"); +require("inc/libs/security_functions.php"); // Init "action" and "what" -global $what, $action; -$GLOBALS['what'] = ""; $GLOBALS['action'] = ""; +$GLOBALS['what'] = ""; +$GLOBALS['action'] = ""; // Set module -$GLOBALS['module'] = "ref"; $CSS = -1; +$GLOBALS['module'] = "ref"; +$GLOBALS['output_mode'] = -1; // Load the required file(s) require("inc/config.php"); @@ -50,7 +51,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { switch (getConfig('refid_target')) { case "register": - $URL = "modules.php?module=index&what=register&refid="; + $URL = "modules.php?module=index&what=register&refid="; break; case "index": @@ -59,15 +60,15 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { } // Get referal ID from ref or refid variable - if (!empty($_GET['ref'])) $ref = secureString($_GET['ref']); - elseif (!empty($_GET['refid'])) $ref = secureString($_GET['refid']); + if (REQUEST_ISSET_GET(('ref'))) $ref = secureString(REQUEST_GET('ref')); + elseif (REQUEST_ISSET_GET(('refid'))) $ref = secureString(REQUEST_GET('refid')); if (!empty($ref)) { // Test if nickname or numeric id if ($ref != "".($ref + 0)."") { if (EXT_IS_ACTIVE("nickname")) { // Nickname in URL, so load the ID - $result = SQL_QUERY_ESC("SELECT userid FROM `{!MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", + $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", array($ref), __FILE__, __LINE__); // Load userid @@ -93,7 +94,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) { // Is the refid valid? if ($ref > 0) { // Update ref counter - SQL_QUERY_ESC("UPDATE `{!MYSQL_PREFIX!}_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1", array(bigintval($ref)), __FILE__, __LINE__); } // END - if } else {