]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/sponsor_functions.php
Some theme fixes, debug system now forced (true)
[mailer.git] / inc / libs / sponsor_functions.php
index beebdc41cd52bb3bc716316d0f6233b860698033..5c511f85a61e96b1f2ebc002d527657b07b1f2b0 100644 (file)
@@ -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;
        }
@@ -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);