New feature of repaying points to user/jackpot/shred added
[mailer.git] / inc / modules / admin / what-config_order.php
index 73fc2f7232e0e2392dd01be4f133cbab1a2d1ef1..c864f160edfd71fd1c519233d0f93f491431e7a8 100644 (file)
@@ -40,13 +40,10 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
        // Save data
        ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+} else {
        // Prepare constants for the template
        switch ($_CONFIG['order_max'])
        {
@@ -90,6 +87,26 @@ if (isset($_POST['ok']))
                define('_CFG_TEST_TEXT_Y', ' checked');
        }
 
+       switch ($_CONFIG['repay_deleted_mails']) {
+               case "REPAY":
+                       define('_CFG_REPAY_POINTS_REPAY'  , " selected=\"selected\"");
+                       define('_CFG_REPAY_POINTS_JACKPOT', "");
+                       define('_CFG_REPAY_POINTS_NONE'   , "");
+                       break;
+
+               case "JACKPOT":
+                       define('_CFG_REPAY_POINTS_REPAY'  , "");
+                       define('_CFG_REPAY_POINTS_JACKPOT', " selected=\"selected\"");
+                       define('_CFG_REPAY_POINTS_NONE'   , "");
+                       break;
+
+               case "NONE":
+                       define('_CFG_REPAY_POINTS_REPAY'  , "");
+                       define('_CFG_REPAY_POINTS_JACKPOT', "");
+                       define('_CFG_REPAY_POINTS_NONE'   , " selected=\"selected\"");
+                       break;
+       }
+
        if ($_CONFIG['test_subj'] == 'N') {
                define('_CFG_TEST_SUBJ_N', ' checked');
                define('_CFG_TEST_SUBJ_Y', "");