]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_order.php
New feature of repaying points to user/jackpot/shred added
[mailer.git] / inc / modules / admin / what-config_order.php
index 25e67a9ed585124b093d40e1751efb7cc46bd413..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'])
        {
@@ -78,6 +75,54 @@ if (isset($_POST['ok']))
                break;
        }
 
+       // Transfer other config data into constants for the template (DO NOT set $_CONFIG as global in LOAD_TEMPLATE!!!)
+       define('_CFG_UNCONFIRMED'   , $_CONFIG['unconfirmed']);
+       define('_CFG_MAX_TLENGTH'   , $_CONFIG['max_tlength']);
+
+       if ($_CONFIG['test_text'] == 'N') {
+               define('_CFG_TEST_TEXT_N', ' checked');
+               define('_CFG_TEST_TEXT_Y', "");
+       } else {
+               define('_CFG_TEST_TEXT_N', "");
+               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', "");
+       } else {
+               define('_CFG_TEST_SUBJ_N', "");
+               define('_CFG_TEST_SUBJ_Y', ' checked');
+       }
+
+       if ($_CONFIG['url_blacklist'] == 'N') {
+               define('_CFG_URL_BLIST_N', ' checked');
+               define('_CFG_URL_BLIST_Y', "");
+       } else {
+               define('_CFG_URL_BLIST_N', "");
+               define('_CFG_URL_BLIST_Y', ' checked');
+       }
+
        // Selection list
        define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST($_CONFIG['order_select']));