X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fsponsor_functions.php;h=499abe7e9fee74877bf93b5e78c91720c9461fcb;hb=f36ab6ae1503ee54a7c9d0083a8089286d8b37ef;hp=beebdc41cd52bb3bc716316d0f6233b860698033;hpb=aa106991e88b0dab33bf2a2d2409638e26a4c656;p=mailer.git diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index beebdc41cd..499abe7e9f 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -81,7 +81,7 @@ function SPONSOR_HANDLE_SPONSOR(&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_ST SQL_FREERESULT($result); // Yes, he is! - if (($_GET['what'] == "add_sponsor") || ($NO_UPDATE)) + if (($GLOBALS['what'] == "add_sponsor") || ($NO_UPDATE)) { // Already found! $ALREADY = true; @@ -181,7 +181,7 @@ function SPONSOR_HANDLE_SPONSOR(&$POST, $NO_UPDATE=false, $MSGs=array(), $RET_ST // Add new sponsor, first add more data $DATA['keys'][] = "sponsor_created"; $DATA['values'][] = time(); $DATA['keys'][] = "status"; - if ((!$NO_UPDATE) && (IS_ADMIN()) && ($_GET['what'] == "add_sponsor")) + if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) { // Only allowed for admin $DATA['values'][] = "PENDING"; @@ -283,6 +283,7 @@ function SPONSOR_TRANSLATE_STATUS($status) break; default: + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); $ret = UNKNOWN_STATUS_1.$status.UNKNOWN_STATUS_2; break; } @@ -444,7 +445,7 @@ function UPDATE_SPONSOR_LOGIN() // Calculate cookie lifetime, maybe we have to change this so the admin can setup a // seperate timeout for these two cookies? - $life = (time() + $_CONFIG['online_timeout']); + $life = (time() + getConfig('online_timeout')); // Is confirmed so both is fine and we can continue with login procedure $login = ((setcookie("sponsorid" , bigintval($_COOKIE['sponsorid']), $life, COOKIE_PATH)) && @@ -454,7 +455,7 @@ function UPDATE_SPONSOR_LOGIN() if ($login) { // Update last online timestamp - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data + SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET last_online='".time()."' WHERE id='%s' AND password='%s' LIMIT 1", array(bigintval($_COOKIE['sponsorid']), $_COOKIE['sponsorpass']), __FILE__, __LINE__); @@ -538,7 +539,7 @@ function SPONSOR_SAVE_DATA($POST, $content) $DATA[] = $_COOKIE['sponsorpass']; // Saving data was completed... ufff... - switch ($_GET['what']) + switch ($GLOBALS['what']) { case "account": // Change account data if ($EMAIL) @@ -567,7 +568,8 @@ function SPONSOR_SAVE_DATA($POST, $content) break; default: // Unknown sponsor what value! - $MSG = SPONSOR_UNKNOWN_WHAT_1.$_GET['what'].SPONSOR_UNKNOWN_WHAT_2; + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $GLOBALS['what'])); + $MSG = SPONSOR_UNKNOWN_WHAT_1.$GLOBALS['what'].SPONSOR_UNKNOWN_WHAT_2; $templ = ""; $subj = ""; break; } @@ -599,7 +601,7 @@ function SPONSOR_SAVE_DATA($POST, $content) // to the old address // First to old address - switch ($_GET['what']) + switch ($GLOBALS['what']) { case "account": // Change account data $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_data", $content);