Fixes for running SQL queries
[mailer.git] / mailid_top.php
index 8316455d88449f5a73e435be382b50db5b0629b9..f95e1af07d11824348beabf49b6075cd91e25cdd 100644 (file)
@@ -161,7 +161,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                        if (($time > 0) && ($payment > 0)) {
                                                                if (!empty($code)) {
                                                                        // Generate code
-                                                                       $img_code = GEN_RANDOM_CODE($_CONFIG['code_length'], $code, $url_uid, $DATA);
+                                                                       $img_code = GEN_RANDOM_CODE(getConfig('code_length'), $code, $url_uid, $DATA);
                                                                } // END - if
 
                                                                switch ($mode) {
@@ -225,7 +225,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                                $template = "mailid_points_done";
 
                                                                                // Right code entered add points and remove entry
-                                                                               if (($ref_pay > 0) && ($_CONFIG['allow_direct_pay'] == "N")) {
+                                                                               if (($ref_pay > 0) && (getConfig('allow_direct_pay') == "N")) {
                                                                                        // Don't add points over the referal system
                                                                                        $locked = true;
                                                                                        $template = "mailid_points_locked";
@@ -236,15 +236,15 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                                        array($url_uid), __FILE__, __LINE__);
 
                                                                                // Add points
-                                                                               unset($DEPTH);
+                                                                               unset($GLOBALS['ref_level']);
                                                                                ADD_POINTS_REFSYSTEM("mailid_okay", $url_uid, $payment, false, "0", $locked);
 
                                                                                // Shall I add bonus points for "turbo clickers" ?
                                                                                if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (function_exists('BONUS_ADD_TURBO_POINTS'))) {
                                                                                        // Is an active-rallye running and this is not a notification mail?
-                                                                                       if (($_CONFIG['bonus_active'] == "Y") && ($notify == "N")) {
+                                                                                       if ((getConfig('bonus_active') == "Y") && ($notify == "N")) {
                                                                                                // Shall I exclude the webmaster's own userid from the active-rallye?
-                                                                                               if (((($_CONFIG['bonus_uid'] == $url_uid) && ($_CONFIG['bonus_include_own'] == "Y")) || ($_CONFIG['bonus_uid'] != $url_uid)) && ($_CONFIG['def_refid'] != $url_uid)) {
+                                                                                               if ((((getConfig('bonus_uid') == $url_uid) && (getConfig('bonus_include_own') == "Y")) || (getConfig('bonus_uid') != $url_uid)) && (getConfig('def_refid') != $url_uid)) {
                                                                                                        // Add points and remember ranking are done in this function....
                                                                                                        BONUS_ADD_TURBO_POINTS($DATA, $url_uid, $type);
 
@@ -268,7 +268,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                                LOAD_TEMPLATE($template);
                                                                        } else {
                                                                                // Wrong image code! So add points to sender's account
-                                                                               unset($DEPTH);
+                                                                               unset($GLOBALS['ref_level']);
                                                                                ADD_POINTS_REFSYSTEM("mailid_payback", $sender, $payment, false, 0, false, "direct");
 
                                                                                // Load template
@@ -293,7 +293,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                                define('_TYPE_VALUE', $type);
                                                                                define('_DATA_VALUE', $DATA);
                                                                                define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
-                                                                               if ($_CONFIG['code_length'] > 0)
+                                                                               if (getConfig('code_length') > 0)
                                                                                {
                                                                                        // Generate Code
                                                                                        define('_IMAGE_CODE', IMG_CODE($code, $type, $DATA, $url_uid));