Refback will be payed now (user cannot setup currently)
[mailer.git] / inc / modules / admin / what-config_points.php
index ca9a6e7..7241b97 100644 (file)
@@ -74,7 +74,7 @@ if (isset($_POST['ok'])) {
                switch ($_GET['do'])
                {
                case "add":
-                       $SQL[] = "INSERT INTO "._MYSQL_PREFIX."_refdepths (level, percents) VALUES ('".$_POST['lvl']."', '".$_POST['perc']."')";
+                       $SQL[] = "INSERT INTO "._MYSQL_PREFIX."_refdepths (level, percents) VALUES ('".$_POST['lvl']."','".$_POST['perc']."')";
                        break;
 
                case "edit": // Change entries
@@ -83,7 +83,7 @@ if (isset($_POST['ok'])) {
                                $id = bigintval($id);
 
                                // Update entry
-                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refdepths SET level='%s', percents='%s' WHERE id=%s LIMIT 1",
+                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refdepths SET level=%s, percents='%s' WHERE id=%s LIMIT 1",
                                 array(bigintval($value), $_POST['perc'][$id], $id), __FILE__, __LINE__);
                        }
                        $TEXT = REF_DEPTHS_SAVED;
@@ -134,7 +134,7 @@ WHERE mails_confirmed < %s", $REF, $REF);
        {
                if (strpos($SQL[0], "INSERT") > -1)
                {
-                       $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_refdepths WHERE level='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_refdepths WHERE level=%s LIMIT 1",
                         array(bigintval($_POST['lvl'])), __FILE__, __LINE__);
                        SQL_FREERESULT($result);
                }
@@ -170,21 +170,21 @@ WHERE mails_confirmed < %s", $REF, $REF);
        switch ($_CONFIG['allow_direct_pay'])
        {
        case 'Y':
-               define('__DIRECT_Y', ' checked');
+               define('__DIRECT_Y', " checked");
                define('__DIRECT_N', "");
                break;
 
        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'])
        {
-               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