X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_other.php;h=6b5db674fc9e8fc851fa678a1a00163bfa91d932;hb=d016e24dd4686f613a17733b96bc28fac936a4ac;hp=d3df62edf920823a30d3c4763d9e9f11345efbc1;hpb=b885a5edd8fb28da0995a156e6df238248ce3e62;p=mailer.git
diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php
index d3df62edf9..6b5db674fc 100644
--- a/inc/modules/admin/what-config_other.php
+++ b/inc/modules/admin/what-config_other.php
@@ -35,9 +35,9 @@
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("other")) || (GET_EXT_VERSION("other") == "")) {
+} elseif (!EXT_IS_ACTIVE("other")) {
// Missing extension!
- ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "other"));
+ addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "other");
return;
}
@@ -46,14 +46,12 @@ ADD_DESCR("admin", __FILE__);
// Stop saving data if one input field is !isset
if (isset($_POST['ok'])) {
- if (function_exists('CREATE_TIME_SELECTIONS')) {
- // Calculate stamps and set calculated stamps
- $_POST['online_timeout'] = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout" , $_POST);
- $_POST['url_tlock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("url_tlock" , $_POST);
- $_POST['profile_lock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_lock" , $_POST);
- $_POST['profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_update" , $_POST);
- $_POST['resend_profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("resend_profile_update", $_POST);
- }
+ // Calculate stamps and set calculated stamps
+ $_POST['online_timeout'] = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout" , $_POST);
+ $_POST['url_tlock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("url_tlock" , $_POST);
+ $_POST['profile_lock'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_lock" , $_POST);
+ $_POST['profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_update" , $_POST);
+ $_POST['resend_profile_update'] = CREATE_TIMESTAMP_FROM_SELECTIONS("resend_profile_update", $_POST);
// Online-Timeout shall be > 0 or your database will crow and crow and crow...
if (!isset($_POST['online_timeout'])) { unset($_POST['ok']); }
@@ -75,29 +73,20 @@ if (isset($_POST['ok'])) {
ADMIN_SAVE_SETTINGS($_POST);
} else {
// Transfer config data into constants for the template (DO NOT set $_CONFIG as global in LOAD_TEMPLATE!!!)
- define('_CFG_CODE_LENGTH' , $_CONFIG['code_length']);
- define('_CFG_ACT_SYSTEM' , $_CONFIG['activate_xchange']);
- define('_CFG_MAX_SEND' , $_CONFIG['max_send']);
- define('_CFG_REJECT_URL' , $_CONFIG['reject_url']);
-
- // Is there the pro-version function avaiable to create selection boxes instead of input boxes?
- if (function_exists('CREATE_TIME_SELECTIONS')) {
- // Only pro versions: time selection boxes
- define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['online_timeout'], "ip_timeout" , "ms"));
- define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS($_CONFIG['url_tlock'] , "url_tlock" , "WDh"));
- define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS($_CONFIG['profile_lock'] , "profile_lock" , "WDh"));
- define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS($_CONFIG['profile_update'], "profile_update" , "YM"));
- define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS($_CONFIG['resend_profile_update'] , "resend_profile_update", "MWD"));
- } else {
- // Normal input boxes
- define('_CFG_ONLINE_TIMEOUT', " ("._SECONDS.")");
- define('_CFG_URL_TLOCK' , " ("._SECONDS.")");
- define('_CFG_PROFILE_LOCK' , " ("._SECONDS.")");
- define('_CFG_PROFILE_UPDATE', " ("._SECONDS.")");
- define('_CFG_PROF_REUPDATE' , " ("._SECONDS.")");
- }
-
- if ($_CONFIG['order_multi_page'] == "N") {
+ define('_CFG_CODE_LENGTH', getConfig('code_length'));
+ define('_CFG_ACT_SYSTEM' , getConfig('activate_xchange'));
+ define('_CFG_MAX_SEND' , getConfig('max_send'));
+ define('_CFG_REJECT_URL' , getConfig('reject_url'));
+ define('_CFG_MIN_AGE' , getConfig('min_age'));
+
+ // Time selection boxes
+ define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS(getConfig('online_timeout'), "ip_timeout" , "ms"));
+ define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS(getConfig('url_tlock') , "url_tlock" , "WDh"));
+ define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS(getConfig('profile_lock') , "profile_lock" , "WDh"));
+ define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS(getConfig('profile_update'), "profile_update" , "YM"));
+ define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS(getConfig('resend_profile_update') , "resend_profile_update", "MWD"));
+
+ if (getConfig('order_multi_page') != "Y") {
define('_CFG_ORDER_MULTI_N', " checked=\"checked\"");
define('_CFG_ORDER_MULTI_Y', "");
} else {
@@ -105,7 +94,7 @@ if (isset($_POST['ok'])) {
define('_CFG_ORDER_MULTI_Y', " checked=\"checked\"");
}
- if ($_CONFIG['autosend_active'] == "N") {
+ if (getConfig('autosend_active') != "Y") {
define('_CFG_AUTOSEND_ACTIVE_N', " checked=\"checked\"");
define('_CFG_AUTOSEND_ACTIVE_Y', "");
} else {
@@ -113,7 +102,7 @@ if (isset($_POST['ok'])) {
define('_CFG_AUTOSEND_ACTIVE_Y', " checked=\"checked\"");
}
- if ($_CONFIG['send_prof_update'] == "N") {
+ if (getConfig('send_prof_update') != "Y") {
define('_CFG_SEND_UPDATE_N', " checked=\"checked\"");
define('_CFG_SEND_UPDATE_Y', "");
} else {
@@ -121,7 +110,7 @@ if (isset($_POST['ok'])) {
define('_CFG_SEND_UPDATE_Y', " checked=\"checked\"");
}
- if ($_CONFIG['admin_notify'] == "N") {
+ if (getConfig('admin_notify') != "Y") {
define('_CFG_ADMIN_NOTIFY_N', " checked=\"checked\"");
define('_CFG_ADMIN_NOTIFY_Y', "");
} else {
@@ -129,7 +118,7 @@ if (isset($_POST['ok'])) {
define('_CFG_ADMIN_NOTIFY_Y', " checked=\"checked\"");
}
- if ($_CONFIG['css_php'] == "DIRECT") {
+ if (getConfig('css_php') == "DIRECT") {
define('_CFG_CSS_PHP_DIRECT', " checked=\"checked\"");
define('_CFG_CSS_PHP_FILE', "");
} else {
@@ -137,7 +126,7 @@ if (isset($_POST['ok'])) {
define('_CFG_CSS_PHP_FILE', " checked=\"checked\"");
}
- if ($_CONFIG['guest_menu'] == "Y") {
+ if (getConfig('guest_menu') == "Y") {
define('_CFG_GUEST_MENU_ACTIVE', " checked=\"checked\"");
define('_CFG_GUEST_MENU_INACTIVE', "");
} else {
@@ -145,7 +134,7 @@ if (isset($_POST['ok'])) {
define('_CFG_GUEST_MENU_INACTIVE', " checked=\"checked\"");
}
- if ($_CONFIG['member_menu'] == "Y") {
+ if (getConfig('member_menu') == "Y") {
define('_CFG_MEMBER_MENU_ACTIVE', " checked=\"checked\"");
define('_CFG_MEMBER_MENU_INACTIVE', "");
} else {
@@ -153,7 +142,7 @@ if (isset($_POST['ok'])) {
define('_CFG_MEMBER_MENU_INACTIVE', " checked=\"checked\"");
}
- if ($_CONFIG['youre_here'] == "Y") {
+ if (getConfig('youre_here') == "Y") {
define('_CFG_YOURE_HERE_ACTIVE', " checked=\"checked\"");
define('_CFG_YOURE_HERE_INACTIVE', "");
} else {
@@ -161,7 +150,7 @@ if (isset($_POST['ok'])) {
define('_CFG_YOURE_HERE_INACTIVE', " checked=\"checked\"");
}
- if ($_CONFIG['show_timings'] == "Y") {
+ if (getConfig('show_timings') == "Y") {
define('_CFG_SHOW_TIMINGS_Y', " checked=\"checked\"");
define('_CFG_SHOW_TIMINGS_N', "");
} else {
@@ -169,7 +158,7 @@ if (isset($_POST['ok'])) {
define('_CFG_SHOW_TIMINGS_N', " checked=\"checked\"");
}
- if ($_CONFIG['show_points_unconfirmed'] == "Y") {
+ if (getConfig('show_points_unconfirmed') == "Y") {
define('_CFG_SHOW_POINTS_UNCONFIRMED_Y', " checked=\"checked\"");
define('_CFG_SHOW_POINTS_UNCONFIRMED_N', "");
} else {
@@ -177,7 +166,7 @@ if (isset($_POST['ok'])) {
define('_CFG_SHOW_POINTS_UNCONFIRMED_N', " checked=\"checked\"");
}
- if ($_CONFIG['mailid_error_redirect'] == 'INDEX') {
+ if (getConfig('mailid_error_redirect') == 'INDEX') {
define('_CFG_MAILID_REDIRECT_INDEX', " checked=\"checked\"");
define('_CFG_MAILID_REDIRECT_REJECT', "");
} else {
@@ -187,7 +176,7 @@ if (isset($_POST['ok'])) {
for ($i = 0; $i <= 5; $i++) {
$eval = "define('_COMMA_DEF_".$i."', \"\");";
- if ($_CONFIG['max_comma'] == $i) $eval = "define('_COMMA_DEF_".$i."', \" selected\");";
+ if (getConfig('max_comma') == $i) $eval = "define('_COMMA_DEF_".$i."', ' selected=\"selected\"');";
eval($eval);
}