SQL_FREERESULT($result);
// Yes, he is!
- if (($_GET['what'] == "add_sponsor") || ($NO_UPDATE))
+ if (($GLOBALS['what'] == "add_sponsor") || ($NO_UPDATE))
{
// Already found!
$ALREADY = true;
// 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";
$VALUES = str_repeat("%s', '", count($DATA['values']) - 1);
// Generate string
- $SQL = "INSERT INTO "._MYSQL_PREFIX."_sponsor_data (".$KEYS.") VALUES('".$VALUES."%s')";
+ $SQL = "INSERT INTO "._MYSQL_PREFIX."_sponsor_data (".$KEYS.") VALUES ('".$VALUES."%s')";
// Generate message
$MSG = SPONSOR_SET_MESSAGE(ADMIN_SPONSOR_ADDED, "added", $MSGs);
break;
default:
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
$ret = UNKNOWN_STATUS_1.$status.UNKNOWN_STATUS_2;
break;
}
// 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)) &&
$DATA[] = $_COOKIE['sponsorpass'];
// Saving data was completed... ufff...
- switch ($_GET['what'])
+ switch ($GLOBALS['what'])
{
case "account": // Change account data
if ($EMAIL)
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;
}
// 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);