]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_points.php
Admin login fixes
[mailer.git] / inc / modules / admin / what-config_points.php
index a1e35996d6f3bad91e09dc34c61850c6e59e5e8c..f9728a8ff2cc28f2c50620cc2a240f0dc0ac23ed 100644 (file)
@@ -78,7 +78,7 @@ if (isset($_POST['ok']))
        switch ($_GET['sub'])
        {
        case "points":
-               $SQL[] = "UPDATE "._MYSQL_PREFIX."_config SET points_register='".$_POST['points_register']."', points_ref='".$_POST['points_ref']."' WHERE config='0' LIMIT 1";
+               $SQL[] = "UPDATE "._MYSQL_PREFIX."_config SET points_register='".$_POST['points_register']."', points_ref='".$_POST['points_ref']."' WHERE config=0 LIMIT 1";
                break;
 
        case "ref":
@@ -114,7 +114,7 @@ if (isset($_POST['ok']))
                // Update cache file
                if (GET_EXT_VERSION("cache") >= "0.1.2")
                {
-                       if ($CACHE->cache_file("refdepths", true)) $CACHE->cache_destroy();
+                       if ($cacheInstance->cache_file("refdepths", true)) $cacheInstance->cache_destroy();
                }
                break;
 
@@ -124,18 +124,18 @@ if (isset($_POST['ok']))
 allow_direct_pay='%s',
 reg_points_mode='%s',
 ref_payout='%d'
-WHERE config='0' LIMIT 1",
+WHERE config=0 LIMIT 1",
  $_POST['allow_direct_pay'],
- $_POST['refmode'],
+ $_POST['reg_points_mode'],
  $REF
                );
-               if (($CONFIG['ref_payout'] == 0) && ($_POST['ref_payout'] > 0))
+               if (($_CONFIG['ref_payout'] == 0) && ($_POST['ref_payout'] > 0))
                {
                        // Update account's ref_payout for "must-confirm"
                        $SQL[] = sprintf("UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=(%d - mails_confirmed)
 WHERE mails_confirmed < %d", $REF, $REF);
                }
-                elseif (($CONFIG['ref_payout'] > 0) && ($_POST['ref_payout'] == 0))
+                elseif (($_CONFIG['ref_payout'] > 0) && ($_POST['ref_payout'] == 0))
                {
                        // Update account's ref_payout for "not-must-confirm"
                        $SQL[] = "UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=0 WHERE ref_payout > 0";
@@ -165,8 +165,8 @@ WHERE mails_confirmed < %d", $REF, $REF);
                        // Destroy config cache file here...
                        if (GET_EXT_VERSION("cache") >= "0.1.2")
                        {
-                               if ($CACHE->cache_file("config", true)) $CACHE->cache_destroy();
-                               unset($CFG_CACHE);
+                               if ($cacheInstance->cache_file("config", true)) $cacheInstance->cache_destroy();
+                               unset($cacheArray);
                        }
                }
                 else
@@ -185,28 +185,28 @@ WHERE mails_confirmed < %d", $REF, $REF);
 {
        // Setup some settings like direct pay and so on
        // Including new add-mode for one-time referral bonus
-       switch ($CONFIG['allow_direct_pay'])
+       switch ($_CONFIG['allow_direct_pay'])
        {
-       case "Y":
-               define('__DIRECT_Y', " checked");
+       case 'Y':
+               define('__DIRECT_Y', ' checked');
                define('__DIRECT_N', "");
                break;
 
-       case "N":
+       case 'N':
                define('__DIRECT_Y', "");
-               define('__DIRECT_N', " checked");
+               define('__DIRECT_N', ' checked');
                break;
        }
 
        // One-time referral bonus add-mode
-       switch ($CONFIG['reg_points_mode'])
+       switch ($_CONFIG['reg_points_mode'])
        {
-               case "ref"   : define('__MODE_REF', " checked"); define('__MODE_DIRECT', "");         break;
-               case "direct": define('__MODE_REF', "");         define('__MODE_DIRECT', " checked"); break;
+               case "ref"   : define('__MODE_REF', ' checked'); define('__MODE_DIRECT', "");         break;
+               case "direct": define('__MODE_REF', "");         define('__MODE_DIRECT', ' checked'); break;
        }
 
        // Referral payout value
-       define('__REF_PAYOUT', round($CONFIG['ref_payout']));
+       define('__REF_PAYOUT', round($_CONFIG['ref_payout']));
 
        // Load template
        LOAD_TEMPLATE("admin_config_point_settings");
@@ -309,8 +309,8 @@ WHERE mails_confirmed < %d", $REF, $REF);
  elseif ($_GET['sub'] == "points")
 {
        // First points for registration and other fixed points including new add-mode for one-time referral bonus...
-       define('P_REG_VALUE', $CONFIG['points_register']);
-       define('P_REF_VALUE', $CONFIG['points_ref']);
+       define('P_REG_VALUE', $_CONFIG['points_register']);
+       define('P_REF_VALUE', $_CONFIG['points_ref']);
 
        // Load templates
        LOAD_TEMPLATE("admin_config_sub_points");