A lot rewrites from double-quote to single-quote, some fixes for extension handling...
[mailer.git] / inc / modules / admin / what-config_order.php
1 <?php
2 /************************************************************************
3  * MXChange v0.2.1                                    Start: 09/22/2004 *
4  * ================                             Last change: 09/22/2004 *
5  *                                                                      *
6  * -------------------------------------------------------------------- *
7  * File              : what-config_order.php                            *
8  * -------------------------------------------------------------------- *
9  * Short description : Configuration for order page                     *
10  * -------------------------------------------------------------------- *
11  * Kurzbeschreibung  : Konfiguration der Mailbuchungsseite              *
12  * -------------------------------------------------------------------- *
13  * $Revision::                                                        $ *
14  * $Date::                                                            $ *
15  * $Tag:: 0.2.1-FINAL                                                 $ *
16  * $Author::                                                          $ *
17  * Needs to be in all Files and every File needs "svn propset           *
18  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
19  * -------------------------------------------------------------------- *
20  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
21  * For more information visit: http://www.mxchange.org                  *
22  *                                                                      *
23  * This program is free software; you can redistribute it and/or modify *
24  * it under the terms of the GNU General Public License as published by *
25  * the Free Software Foundation; either version 2 of the License, or    *
26  * (at your option) any later version.                                  *
27  *                                                                      *
28  * This program is distributed in the hope that it will be useful,      *
29  * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
30  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
31  * GNU General Public License for more details.                         *
32  *                                                                      *
33  * You should have received a copy of the GNU General Public License    *
34  * along with this program; if not, write to the Free Software          *
35  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
36  * MA  02110-1301  USA                                                  *
37  ************************************************************************/
38
39 // Some security stuff...
40 if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
41         $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
42         require($INC);
43 }
44
45 // Add description as navigation point
46 ADD_DESCR('admin', __FILE__);
47
48 if (IS_FORM_SENT()) {
49         // Save data
50         ADMIN_SAVE_SETTINGS_POST();
51 } else {
52         // Prepare constants for the template
53         switch (getConfig('order_max_full'))
54         {
55         case 'ORDER':
56                 define('__ORDER_DEFAULT', ' chkecked="checked"');
57                 define('__MAX_DEFAULT'  , '');
58                 break;
59
60         case 'MAX':
61                 define('__ORDER_DEFAULT', '');
62                 define('__MAX_DEFAULT'  , ' chkecked="checked"');
63                 break;
64         }
65
66         // Minimum mails / order
67         define('__MIN_VALUE', getConfig('order_min'));
68
69         // Sorting mode (ascending / descending)
70         switch (getConfig('order_mode'))
71         {
72         case "ASC":
73                 define('__ASC_DEFAULT' , " selected=\"selected\"");
74                 define('__DESC_DEFAULT', '');
75                 break;
76
77         case "DESC":
78                 define('__ASC_DEFAULT' , '');
79                 define('__DESC_DEFAULT', " selected=\"selected\"");
80                 break;
81         }
82
83         // Transfer other config data into constants for the template
84         define('_CFG_UNCONFIRMED'   , getConfig('unconfirmed'));
85         define('_CFG_MAX_TLENGTH'   , getConfig('max_tlength'));
86
87         if (getConfig('test_text') != "Y") {
88                 define('_CFG_TEST_TEXT_N', ' chkecked="checked"');
89                 define('_CFG_TEST_TEXT_Y', '');
90         } else {
91                 define('_CFG_TEST_TEXT_N', '');
92                 define('_CFG_TEST_TEXT_Y', ' chkecked="checked"');
93         }
94
95         switch (getConfig('repay_deleted_mails')) {
96                 case "REPAY":
97                         define('_CFG_REPAY_POINTS_REPAY'  , " selected=\"selected\"");
98                         define('_CFG_REPAY_POINTS_JACKPOT', '');
99                         define('_CFG_REPAY_POINTS_SHRED'  , '');
100                         break;
101
102                 case "JACKPOT":
103                         define('_CFG_REPAY_POINTS_REPAY'  , '');
104                         define('_CFG_REPAY_POINTS_JACKPOT', " selected=\"selected\"");
105                         define('_CFG_REPAY_POINTS_SHRED'  , '');
106                         break;
107
108                 case "SHRED":
109                         define('_CFG_REPAY_POINTS_REPAY'  , '');
110                         define('_CFG_REPAY_POINTS_JACKPOT', '');
111                         define('_CFG_REPAY_POINTS_SHRED'  , " selected=\"selected\"");
112                         break;
113         }
114
115         if (getConfig('test_subj') != "Y") {
116                 define('_CFG_TEST_SUBJ_N', ' chkecked="checked"');
117                 define('_CFG_TEST_SUBJ_Y', '');
118         } else {
119                 define('_CFG_TEST_SUBJ_N', '');
120                 define('_CFG_TEST_SUBJ_Y', ' chkecked="checked"');
121         }
122
123         if (getConfig('url_blacklist') != "Y") {
124                 define('_CFG_URL_BLIST_N', ' chkecked="checked"');
125                 define('_CFG_URL_BLIST_Y', '');
126         } else {
127                 define('_CFG_URL_BLIST_N', '');
128                 define('_CFG_URL_BLIST_Y', ' chkecked="checked"');
129         }
130
131         // Selection list
132         define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST(getConfig('order_select')));
133
134         // Load template
135         LOAD_TEMPLATE("admin_config_order");
136 }
137 //
138 ?>