]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_points.php
Mahor rewrite:
[mailer.git] / inc / modules / admin / what-config_points.php
index 112a00992ec138c23f3f4334ddf0f82e86ca9d3f..1e93a7ff5195ce1481ba60a29d56fcea203e4a2c 100644 (file)
@@ -118,13 +118,13 @@ WHERE config=0 LIMIT 1",
  $_POST['reg_points_mode'],
  $REF
                );
-               if (($_CONFIG['ref_payout'] == 0) && ($_POST['ref_payout'] > 0))
+               if ((getConfig('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=(%s - mails_confirmed)
 WHERE mails_confirmed < %s", $REF, $REF);
                }
-                elseif (($_CONFIG['ref_payout'] > 0) && ($_POST['ref_payout'] == 0))
+                elseif ((getConfig('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";
@@ -170,28 +170,28 @@ WHERE mails_confirmed < %s", $REF, $REF);
 {
        // Setup some settings like direct pay and so on
        // Including new add-mode for one-time referal bonus
-       switch ($_CONFIG['allow_direct_pay'])
+       switch (getConfig('allow_direct_pay'))
        {
-       case 'Y':
+       case "Y":
                define('__DIRECT_Y', " checked=\"checked\"");
                define('__DIRECT_N', "");
                break;
 
-       case 'N':
+       case "N":
                define('__DIRECT_Y', "");
                define('__DIRECT_N', " checked=\"checked\"");
                break;
        }
 
        // One-time referal bonus add-mode
-       switch ($_CONFIG['reg_points_mode'])
+       switch (getConfig('reg_points_mode'))
        {
                case "ref"   : define('__MODE_REF', " checked=\"checked\""); define('__MODE_DIRECT', "");         break;
                case "direct": define('__MODE_REF', "");         define('__MODE_DIRECT', " checked=\"checked\""); break;
        }
 
        // Referal payout value
-       define('__REF_PAYOUT', round($_CONFIG['ref_payout']));
+       define('__REF_PAYOUT', round(getConfig('ref_payout')));
 
        // Load template
        LOAD_TEMPLATE("admin_config_point_settings");
@@ -294,8 +294,8 @@ WHERE mails_confirmed < %s", $REF, $REF);
  elseif ($_GET['sub'] == "points")
 {
        // First points for registration and other fixed points including new add-mode for one-time referal bonus...
-       define('P_REG_VALUE', $_CONFIG['points_register']);
-       define('P_REF_VALUE', $_CONFIG['points_ref']);
+       define('P_REG_VALUE', getConfig('points_register'));
+       define('P_REF_VALUE', getConfig('points_ref'));
 
        // Load templates
        LOAD_TEMPLATE("admin_config_sub_points");