************************************************************************/
// 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');
+ define('__ORDER_DEFAULT', " checked");
define('__MAX_DEFAULT' , "");
break;
case "MAX":
define('__ORDER_DEFAULT', "");
- define('__MAX_DEFAULT' , ' checked');
+ define('__MAX_DEFAULT' , " checked");
break;
}
define('_CFG_UNCONFIRMED' , $_CONFIG['unconfirmed']);
define('_CFG_MAX_TLENGTH' , $_CONFIG['max_tlength']);
- if ($_CONFIG['test_text'] == 'N') {
- define('_CFG_TEST_TEXT_N', ' checked');
+ 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');
+ 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');
+ 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');
+ define('_CFG_TEST_SUBJ_Y', " checked");
}
- if ($_CONFIG['url_blacklist'] == 'N') {
- define('_CFG_URL_BLIST_N', ' 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');
+ define('_CFG_URL_BLIST_Y', " checked");
}
// Selection list