2 /************************************************************************
3 * MXChange v0.2.1 Start: 10/11/2003 *
4 * =============== Last change: 09/21/2004 *
6 * -------------------------------------------------------------------- *
7 * File : what-config_other.php *
8 * -------------------------------------------------------------------- *
9 * Short description : basic settings *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Grund Einstellungen *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
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 - 2009 by Roland Haeder *
21 * For more information visit: http://www.mxchange.org *
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. *
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. *
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, *
37 ************************************************************************/
39 // Some security stuff...
40 if ((!defined('__SECURITY')) || (!isAdmin())) {
44 // Add description as navigation point
45 addMenuDescription('admin', __FILE__);
47 if (!isExtensionActive('other')) {
49 loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('other'));
53 // Stop saving data if one input field is !isset
55 // Calculate stamps and set calculated stamps
56 setRequestPostElement('online_timeout' , createTimestampFromSelections('ip_timeout' , postRequestArray()));
57 setRequestPostElement('url_tlock' , createTimestampFromSelections('url_tlock' , postRequestArray()));
58 setRequestPostElement('profile_lock' , createTimestampFromSelections('profile_lock' , postRequestArray()));
59 setRequestPostElement('profile_update' , createTimestampFromSelections('profile_update' , postRequestArray()));
60 setRequestPostElement('resend_profile_update', createTimestampFromSelections('resend_profile_update', postRequestArray()));
62 // Online-Timeout shall be > 0 or your database will crow and crow and crow...
63 if (!isPostRequestElementSet('online_timeout')) { unsetPostRequestElement('ok'); }
65 // Chedck other timestamps (which can be zero!)
66 if (!isPostRequestElementSet('profile_lock')) { unsetPostRequestElement('ok'); }
67 if (!isPostRequestElementSet('url_tlock')) { unsetPostRequestElement('ok'); }
68 if (!isPostRequestElementSet('profile_update')) { unsetPostRequestElement('ok'); }
69 if (!isPostRequestElementSet('resend_profile_update')) { unsetPostRequestElement('ok'); }
71 // Check other settings
72 if (!isPostRequestElementSet('max_send')) { unsetPostRequestElement('ok'); }
73 if (!isPostRequestElementSet('code_length')) { unsetPostRequestElement('ok'); }
74 if (!isPostRequestElementSet('reject_url')) { unsetPostRequestElement('ok'); }
78 // Update stamps directly
79 adminSaveSettingsFromPostData();
81 // Time selection boxes
82 $content['online_timeout'] = createTimeSelections(getConfig('online_timeout'), 'ip_timeout' , 'ms');
83 $content['url_tlock'] = createTimeSelections(getConfig('url_tlock') , 'url_tlock' , 'WDh');
84 $content['profile_lock'] = createTimeSelections(getConfig('profile_lock') , 'profile_lock' , 'WDh');
85 $content['profile_update'] = createTimeSelections(getConfig('profile_update'), 'profile_update' , 'YM');
86 $content['profile_reupdate'] = createTimeSelections(getConfig('resend_profile_update') , 'resend_profile_update', 'MWD');
88 // Prepare more Y/N selections
89 foreach(array('show_points_unconfirmed','show_timings','youre_here','member_menu','guest_menu','order_multi_page','autosend_active','send_prof_update','admin_notify','display_debug_sqls') as $entry) {
90 $content[$entry . '_y'] = '';
91 $content[$entry . '_n'] = '';
92 $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
96 foreach (array('css_php_direct','css_php_file','css_php_inline','mailid_error_redirect_index','mailid_error_redirect_reject') as $entry) {
97 $content[$entry] = '';
101 foreach (array('css_php','mailid_error_redirect') as $entry) {
102 $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
105 for ($i = 0; $i <= 5; $i++) {
106 $content['comma_def_' . $i] = '';
110 $content['comma_def_' . getConfig('max_comma')] = ' selected="selected"';
113 loadTemplate('admin_config_other', false, $content);