************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
+
// 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'])
+ switch ($_CONFIG['order_max_full'])
{
case "ORDER":
define('__ORDER_DEFAULT', " checked");
}
// Minimum mails / order
- define('__MIN_VALUE', $CONFIG['order_min']);
+ define('__MIN_VALUE', $_CONFIG['order_min']);
// Sorting mode (ascending / descending)
- switch ($CONFIG['order_mode'])
+ switch ($_CONFIG['order_mode'])
{
case "ASC":
define('__ASC_DEFAULT' , " selected=\"selected\"");
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_SHRED' , "");
+ break;
+
+ case "JACKPOT":
+ define('_CFG_REPAY_POINTS_REPAY' , "");
+ define('_CFG_REPAY_POINTS_JACKPOT', " selected=\"selected\"");
+ define('_CFG_REPAY_POINTS_SHRED' , "");
+ break;
+
+ case "SHRED":
+ define('_CFG_REPAY_POINTS_REPAY' , "");
+ define('_CFG_REPAY_POINTS_JACKPOT', "");
+ define('_CFG_REPAY_POINTS_SHRED' , " 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']));
+ define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST($_CONFIG['order_select']));
// Load template
LOAD_TEMPLATE("admin_config_order");