Project

General

Profile

1 1356 Luisehahne
<?php
2
/**
3
 *
4
 * @category        admin
5
 * @package         settings
6 1529 Luisehahne
 * @author          Ryan Djurovich, WebsiteBaker Project
7 1716 Luisehahne
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8 1356 Luisehahne
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11 1374 Luisehahne
 * @requirements    PHP 5.2.2 and higher
12 1356 Luisehahne
 * @version         $Id$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16
 */
17
18
require('../../config.php');
19
require_once(WB_PATH.'/framework/class.admin.php');
20
21
if(isset($_GET['advanced']) && $_GET['advanced'] == 'yes') {
22
	$admin = new admin('Settings', 'settings_advanced');
23
} else {
24
	$admin = new admin('Settings', 'settings_basic');
25
}
26
27 1716 Luisehahne
// add new values, later in upgrade-script
28
$cfg = array(
29
	'website_signature' => defined('WEBSITE_SIGNATURE') ? WEBSITE_SIGNATURE : '',
30
	'confirmed_registration' => (defined('CONFIRMED_REGISTRATION') ? CONFIRMED_REGISTRATION : '0'),
31 1767 Luisehahne
	'modules_upgrade_list' => (defined('MODULES_UPGRADE_LIST') ? MODULES_UPGRADE_LIST : ''),
32 1716 Luisehahne
	);
33
db_update_key_value( 'settings', $cfg );
34
35 1356 Luisehahne
// Include the WB functions file
36
require_once(WB_PATH.'/framework/functions.php');
37
require_once(WB_PATH.'/framework/functions-utf8.php');
38
39 1716 Luisehahne
$mLang = ModLanguage::getInstance();
40
$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE);
41
42 1529 Luisehahne
// Setup template object, parse vars to it, then parse it
43 1356 Luisehahne
// Create new template object
44 1767 Luisehahne
$template = new Template(dirname($admin->correct_theme_source('settings.htt')),'keep');
45 1356 Luisehahne
// $template->debug = true;
46
$template->set_file('page',        'settings.htt');
47
$template->set_block('page',       'main_block', 'main');
48
$template->set_var('FTAN', $admin->getFTAN());
49
50
$template->set_block('main_block', 'template_list_block',         'template_list');
51
$template->set_block('main_block', 'timezone_list_block',         'timezone_list');
52
$template->set_block('main_block', 'language_list_block',         'language_list');
53
$template->set_block('main_block', 'date_format_list_block',      'date_format_list');
54
$template->set_block('main_block', 'time_format_list_block',      'time_format_list');
55
$template->set_block('main_block', 'theme_list_block',            'theme_list');
56
$template->set_block('main_block', 'search_template_list_block',  'search_template_list');
57
$template->set_block('main_block', 'group_list_block',            'group_list');
58
$template->set_block('main_block', 'charset_list_block',          'charset_list');
59
$template->set_block('main_block', 'error_reporting_list_block',  'error_reporting_list');
60
$template->set_block('main_block', 'editor_list_block',           'editor_list');
61
$template->set_block('main_block', 'page_level_limit_list_block', 'page_level_limit_list');
62
63
$template->set_block('main_block', 'show_page_level_limit_block', 'show_page_level_limit');
64
$template->set_block('main_block', 'show_checkbox_1_block',       'show_checkbox_1');
65
$template->set_block('main_block', 'show_checkbox_2_block',       'show_checkbox_2');
66
$template->set_block('main_block', 'show_checkbox_3_block',       'show_checkbox_3');
67
$template->set_block('main_block', 'show_php_error_level_block',  'show_php_error_level');
68
$template->set_block('main_block', 'show_charset_block',          'show_charset');
69
$template->set_block('main_block', 'show_wysiwyg_block',          'show_wysiwyg');
70
$template->set_block('main_block', 'show_access_block',           'show_access');
71
$template->set_block('main_block', 'show_search_block',           'show_search');
72
$template->set_block('main_block', 'show_redirect_timer_block',   'show_redirect_timer');
73 1745 Luisehahne
/*-- insert all needed vars from language files ----------------------------------------*/
74 1767 Luisehahne
$template->set_var($mLang->getLangArray());
75 1356 Luisehahne
76
// Query current settings in the db, then loop through them and print them
77
$query = "SELECT * FROM ".TABLE_PREFIX."settings";
78
$results = $database->query($query);
79
while($setting = $results->fetchRow())
80
{
81
	$setting_name = $setting['name'];
82
	$setting_value = ( $setting_name != 'wbmailer_smtp_password' ) ? htmlspecialchars($setting['value']) : $setting['value'];
83
	$template->set_var(strtoupper($setting_name),$setting_value);
84
}
85
86
// Do the same for settings stored in config file as with ones in db
87
$database_type = '';
88
$is_advanced = (isset($_GET['advanced']) && $_GET['advanced'] == 'yes');
89
// Tell the browser whether or not to show advanced options
90
if($is_advanced)
91
{
92
	$template->set_var('DISPLAY_ADVANCED', '');
93
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
94
	$template->set_var('BASIC_FILE_PERMS_ID', 'hide');
95
	$template->set_var('ADVANCED', 'yes');
96
	$template->set_var('ADVANCED_BUTTON', '&lt;&lt; '.$TEXT['HIDE_ADVANCED']);
97
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=no');
98
99
} else {
100
	$template->set_var('DISPLAY_ADVANCED', ' style="display: none;"');
101
	$template->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
102
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
103
104
	$template->set_var('ADVANCED', 'no');
105
	$template->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' &gt;&gt;');
106
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
107
}
108
109
	$query = "SELECT * FROM ".TABLE_PREFIX."search WHERE extra = ''";
110
	$results = $database->query($query);
111
112
	// Query current settings in the db, then loop through them and print them
113
	while($setting = $results->fetchRow())
114
	{
115
		$setting_name = $setting['name'];
116
		$setting_value = htmlspecialchars(($setting['value']));
117
		switch($setting_name) {
118
			// Search header
119
			case 'header':
120
				$template->set_var('SEARCH_HEADER', $setting_value);
121
			break;
122
			// Search results header
123
			case 'results_header':
124
				$template->set_var('SEARCH_RESULTS_HEADER', $setting_value);
125
			break;
126
			// Search results loop
127
			case 'results_loop':
128
				$template->set_var('SEARCH_RESULTS_LOOP', $setting_value);
129
			break;
130
			// Search results footer
131
			case 'results_footer':
132
				$template->set_var('SEARCH_RESULTS_FOOTER', $setting_value);
133
			break;
134
			// Search no results
135
			case 'no_results':
136
				$template->set_var('SEARCH_NO_RESULTS', $setting_value);
137
			break;
138
			// Search footer
139
			case 'footer':
140
				$template->set_var('SEARCH_FOOTER', $setting_value);
141
			break;
142
			// Search module-order
143
			case 'module_order':
144
				$template->set_var('SEARCH_MODULE_ORDER', $setting_value);
145
			break;
146
			// Search max lines of excerpt
147
			case 'max_excerpt':
148
				$template->set_var('SEARCH_MAX_EXCERPT', $setting_value);
149
			break;
150
			// time-limit
151
			case 'time_limit':
152
				$template->set_var('SEARCH_TIME_LIMIT', $setting_value);
153
			break;
154
			// Search template
155
			case 'template':
156
				$search_template = $setting_value;
157
			break;
158
		}
159
	}
160
161 1716 Luisehahne
	$sSelected = ' selected="selected"';
162
	$checked   = ' checked="checked"';
163
164 1356 Luisehahne
	$template->set_var(array(
165
						'WB_URL' => WB_URL,
166
						'THEME_URL' => THEME_URL,
167
						'ADMIN_URL' => ADMIN_URL,
168
					 ));
169
170
	// Insert language values
171 1716 Luisehahne
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
172
	$sql .= 'WHERE `type` = \'language\' ';
173
	$sql .= 'AND `function` != \'theme\' ';
174
	$sql .= 'ORDER BY `directory`';
175
176
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
177
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' ORDER BY directory");
178
//	if($result->numRows() > 0)
179 1356 Luisehahne
	{
180
		while($addon = $result->fetchRow()) {
181 1457 Luisehahne
	        $langIcons = (empty($addon['directory'])) ? 'none' : strtolower($addon['directory']);
182
183 1435 Luisehahne
			$template->set_var('CODE',        $addon['directory']);
184
			$template->set_var('NAME',        $addon['name']);
185 1457 Luisehahne
			$template->set_var('FLAG',        THEME_URL.'/images/flags/'.$langIcons);
186 1716 Luisehahne
			$template->set_var('SELECTED',    (DEFAULT_LANGUAGE == $addon['directory'] ? $sSelected : '') );
187 1356 Luisehahne
			$template->parse('language_list', 'language_list_block', true);
188
		}
189
	}
190
191
	// Insert default timezone values
192
	require(ADMIN_PATH.'/interface/timezones.php');
193
	foreach($TIMEZONES AS $hour_offset => $title)
194
	{
195
		// Make sure we dont list "System Default" as we are setting this value!
196
		if($hour_offset != '-20') {
197
			$template->set_var('VALUE', $hour_offset);
198
			$template->set_var('NAME', $title);
199
			if(DEFAULT_TIMEZONE == $hour_offset*60*60) {
200 1716 Luisehahne
				$template->set_var('SELECTED', $sSelected);
201 1356 Luisehahne
			} else {
202
				$template->set_var('SELECTED', '');
203
			}
204
			$template->parse('timezone_list', 'timezone_list_block', true);
205
		}
206
	}
207
208
	// Insert default charset values
209
	require(ADMIN_PATH.'/interface/charsets.php');
210
	foreach($CHARSETS AS $code => $title) {
211
		$template->set_var('VALUE', $code);
212
		$template->set_var('NAME', $title);
213
		if(DEFAULT_CHARSET == $code) {
214 1716 Luisehahne
			$template->set_var('SELECTED', $sSelected);
215 1356 Luisehahne
		} else {
216
			$template->set_var('SELECTED', '');
217
		}
218
		$template->parse('charset_list', 'charset_list_block', true);
219
	}
220
221
222
	// Insert date format list
223
	require(ADMIN_PATH.'/interface/date_formats.php');
224
	foreach($DATE_FORMATS AS $format => $title) {
225
		$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
226
		if($format != 'system_default') {
227
			$template->set_var('VALUE', $format);
228
		} else {
229
			$template->set_var('VALUE', '');
230
		}
231
		$template->set_var('NAME', $title);
232
		if(DEFAULT_DATE_FORMAT == $format) {
233 1716 Luisehahne
			$template->set_var('SELECTED', $sSelected);
234 1356 Luisehahne
		} else {
235
			$template->set_var('SELECTED', '');
236
		}
237
		$template->parse('date_format_list', 'date_format_list_block', true);
238
	}
239
240
	// Insert time format list
241
	require(ADMIN_PATH.'/interface/time_formats.php');
242
	foreach($TIME_FORMATS AS $format => $title) {
243
		$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
244
		if($format != 'system_default') {
245
			$template->set_var('VALUE', $format);
246
		} else {
247
			$template->set_var('VALUE', '');
248
		}
249
		$template->set_var('NAME', $title);
250
		if(DEFAULT_TIME_FORMAT == $format) {
251 1716 Luisehahne
			$template->set_var('SELECTED', $sSelected);
252 1356 Luisehahne
		} else {
253
			$template->set_var('SELECTED', '');
254
		}
255
		$template->parse('time_format_list', 'time_format_list_block', true);
256
	}
257
258 1716 Luisehahne
// Insert templates
259
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
260
	$sql .= 'WHERE `type` = \'template\' ';
261
	$sql .= 'AND `function` != \'theme\' ';
262
	$sql .= 'ORDER BY `name`';
263
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
264
	{
265
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function != 'theme' ORDER BY name");
266
//	if($result->numRows() > 0) {
267
		while($addon = $result->fetchRow())
268
		{
269
			if( $admin->get_permission($addon['directory'],'template' ) )
270
			{
271
				$template->set_var('FILE', $addon['directory']);
272
				$template->set_var('NAME', $addon['name']);
273
				$selected = (($addon['directory'] == DEFAULT_TEMPLATE) ? $sSelected : '');
274
				$template->set_var('SELECTED', $selected);
275
				$template->parse('template_list', 'template_list_block', true);
276
			}
277 1356 Luisehahne
		}
278
	}
279
280 1716 Luisehahne
// Insert backend theme
281
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
282
	$sql .= 'WHERE `type` = \'template\' ';
283
	$sql .= 'AND `function` = \'theme\' ';
284
	$sql .= 'ORDER BY `name`';
285
286
287
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
288
	{
289
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'theme' ORDER BY name");
290
//	if($result->numRows() > 0) {
291
		while($addon = $result->fetchRow())
292
		{
293
			if( $admin->get_permission($addon['directory'],'template' ) )
294
			{
295
				$template->set_var('FILE', $addon['directory']);
296
				$template->set_var('NAME', $addon['name']);
297
				$selected = (($addon['directory'] == DEFAULT_THEME) ? $sSelected : '');
298
				$template->set_var('SELECTED', $selected);
299
				$template->parse('theme_list', 'theme_list_block', true);
300
			}
301 1356 Luisehahne
		}
302
	}
303
304
	// Insert WYSIWYG modules
305
	$file='none';
306
	$module_name=$TEXT['NONE'];
307
	$template->set_var('FILE', $file);
308
	$template->set_var('NAME', $module_name);
309 1716 Luisehahne
	$selected = (!defined('WYSIWYG_EDITOR') || $file == WYSIWYG_EDITOR) ? $sSelected : '';
310 1356 Luisehahne
	$template->set_var('SELECTED', $selected);
311
	$template->parse('editor_list', 'editor_list_block', true);
312 1716 Luisehahne
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
313
	$sql .= 'WHERE `type` = \'module\' ';
314
	$sql .= 'AND `function` = \'wysiwyg\' ';
315
	$sql .= 'ORDER BY `name`';
316
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
317 1356 Luisehahne
	{
318 1716 Luisehahne
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'wysiwyg' ORDER BY name");
319
//	if($result->numRows() > 0)
320
//	{
321 1356 Luisehahne
		while($addon = $result->fetchRow())
322
	    {
323 1716 Luisehahne
			if( $admin->get_permission($addon['directory'],'module' ) )
324
			{
325
				$template->set_var('FILE', $addon['directory']);
326
				$template->set_var('NAME', $addon['name']);
327
				$selected = (!defined('WYSIWYG_EDITOR') || $addon['directory'] == WYSIWYG_EDITOR) ? $sSelected : '';
328
				$template->set_var('SELECTED', $selected);
329
				$template->parse('editor_list', 'editor_list_block', true);
330
			}
331 1356 Luisehahne
		}
332
	}
333
334
// Insert templates for search settings
335 1366 Luisehahne
	$search_template = ( ($search_template == DEFAULT_TEMPLATE) || ($search_template == '') ) ? '' : $search_template;
336 1716 Luisehahne
	$selected = ( ($search_template != DEFAULT_TEMPLATE) ) ?  $sSelected : '';
337 1356 Luisehahne
338
	$template->set_var(array(
339
	        'FILE' => '',
340
	        'NAME' => $TEXT['SYSTEM_DEFAULT'],
341
	        'SELECTED' => $selected
342
	    ));
343 1366 Luisehahne
	$template->parse('search_template_list', 'search_template_list_block', true);
344 1356 Luisehahne
345 1716 Luisehahne
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
346
	$sql .= 'WHERE `type` = \'template\' ';
347
	$sql .= 'AND `function` = \'template\' ';
348
	$sql .= 'ORDER BY `name`';
349
    if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
350 1356 Luisehahne
	{
351 1716 Luisehahne
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'template' ORDER BY name");
352
//	if($result->numRows() > 0)
353
//	{
354 1356 Luisehahne
		while($addon = $result->fetchRow())
355
	    {
356 1716 Luisehahne
			if( $admin->get_permission($addon['directory'],'template' ) )
357
			{
358
				$template->set_var('FILE', $addon['directory']);
359
				$template->set_var('NAME', $addon['name']);
360
		        $selected = ($addon['directory'] == $search_template) ? $sSelected :  '';
361
				$template->set_var('SELECTED', $selected);
362
				$template->parse('search_template_list', 'search_template_list_block', true);
363
			}
364 1356 Luisehahne
		}
365
	}
366
367
	// Insert default error reporting values
368
	require(ADMIN_PATH.'/interface/er_levels.php');
369
	foreach($ER_LEVELS AS $value => $title)
370
	{
371
		$template->set_var('VALUE', $value);
372
		$template->set_var('NAME', $title);
373 1716 Luisehahne
	    $selected = (ER_LEVEL == $value) ? $sSelected : '';
374 1356 Luisehahne
	    $template->set_var('SELECTED', $selected);
375
		$template->parse('error_reporting_list', 'error_reporting_list_block', true);
376
	}
377
378 1716 Luisehahne
379 1356 Luisehahne
	// Insert permissions values
380
	if($admin->get_permission('settings_advanced') != true)
381
	{
382
		$template->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
383
	}
384
385
	// Insert page level limits
386
	for($i = 1; $i <= 10; $i++)
387
	{
388
		$template->set_var('NUMBER', $i);
389
		if(PAGE_LEVEL_LIMIT == $i)
390
	    {
391 1716 Luisehahne
			$template->set_var('SELECTED', $sSelected);
392 1356 Luisehahne
		} else {
393
			$template->set_var('SELECTED', '');
394
		}
395
		$template->parse('page_level_limit_list', 'page_level_limit_list_block', true);
396
	}
397
398
	// Work-out if multiple menus feature is enabled
399
	if(defined('MULTIPLE_MENUS') && MULTIPLE_MENUS == true)
400
	{
401 1721 Luisehahne
    	$template->set_var(array(
402
				'MULTIPLE_MENUS_ENABLED' => $checked,
403
				'MULTIPLE_MENUS_DISABLED' => '',
404
				));
405 1356 Luisehahne
	} else {
406 1721 Luisehahne
    	$template->set_var(array(
407
				'MULTIPLE_MENUS_DISABLED' => $checked,
408
				'MULTIPLE_MENUS_ENABLED' => '',
409
				));
410 1356 Luisehahne
	}
411
412
	// Work-out if page languages feature is enabled
413
	if(defined('PAGE_LANGUAGES') && PAGE_LANGUAGES == true)
414
	{
415 1721 Luisehahne
    	$template->set_var(array(
416
				'PAGE_LANGUAGES_ENABLED' => $checked,
417
				'PAGE_LANGUAGES_DISABLED' => '',
418
				));
419 1356 Luisehahne
	} else {
420 1721 Luisehahne
    	$template->set_var(array(
421
				'PAGE_LANGUAGES_DISABLED' => $checked,
422
				'PAGE_LANGUAGES_ENABLED' => '',
423
				));
424 1356 Luisehahne
	}
425
426 1409 FrankH
	// Work-out if warn_page_leave feature is enabled
427
	if (defined('WARN_PAGE_LEAVE') && WARN_PAGE_LEAVE == true)
428
	{
429 1716 Luisehahne
		$template->set_var('WARN_PAGE_LEAVE_ENABLED', $checked);
430 1721 Luisehahne
    	$template->set_var(array(
431
				'WARN_PAGE_LEAVE_ENABLED' => $checked,
432
				'WARN_PAGE_LEAVE_DISABLED' => '',
433
				));
434 1409 FrankH
	} else {
435 1716 Luisehahne
		$template->set_var('WARN_PAGE_LEAVE_DISABLED', $checked);
436 1721 Luisehahne
    	$template->set_var(array(
437
				'MANAGE_SECTIONS_DISABLED' => $checked,
438
				'WARN_PAGE_LEAVE_DISABLED' => '',
439
				));
440 1409 FrankH
	}
441
442 1356 Luisehahne
	// Work-out if smart login feature is enabled
443
	if(defined('SMART_LOGIN') && SMART_LOGIN == true)
444
	{
445 1716 Luisehahne
		$template->set_var('SMART_LOGIN_ENABLED', $checked);
446 1721 Luisehahne
    	$template->set_var(array(
447
				'SMART_LOGIN_ENABLED' => $checked,
448
				'SMART_LOGIN_DISABLED' => '',
449
				));
450 1356 Luisehahne
	} else {
451 1716 Luisehahne
		$template->set_var('SMART_LOGIN_DISABLED', $checked);
452 1721 Luisehahne
    	$template->set_var(array(
453
				'SMART_LOGIN_DISABLED' => $checked,
454
				'SMART_LOGIN_ENABLED' => '',
455
				));
456 1356 Luisehahne
	}
457
458
	/* Make's sure GD library is installed */
459
	if(extension_loaded('gd') && function_exists('imageCreateFromJpeg'))
460
	{
461
		$template->set_var('GD_EXTENSION_ENABLED', '');
462
	} else {
463
		$template->set_var('GD_EXTENSION_ENABLED', ' style="display: none;"');
464
	}
465
466
	// Work-out if section blocks feature is enabled
467
	if(defined('SECTION_BLOCKS') && SECTION_BLOCKS == true)
468
	{
469 1721 Luisehahne
    	$template->set_var(array(
470
				'SECTION_BLOCKS_ENABLED' => $checked,
471
				'SECTION_BLOCKS_DISABLED' => '',
472
				));
473 1356 Luisehahne
	} else {
474 1721 Luisehahne
    	$template->set_var(array(
475
				'SECTION_BLOCKS_DISABLED' => $checked,
476
				'SECTION_BLOCKS_ENABLED' => '',
477
				));
478 1356 Luisehahne
	}
479
480
	// Work-out if homepage redirection feature is enabled
481
	if(defined('HOMEPAGE_REDIRECTION') && HOMEPAGE_REDIRECTION == true)
482
	{
483 1721 Luisehahne
//		$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', $checked);
484
    	$template->set_var(array(
485
				'HOMEPAGE_REDIRECTION_ENABLED' => $checked,
486
				'HOMEPAGE_REDIRECTION_DISABLED' => '',
487
				));
488 1356 Luisehahne
	} else {
489 1721 Luisehahne
//		$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', $checked);
490
    	$template->set_var(array(
491
				'HOMEPAGE_REDIRECTION_DISABLED' => $checked,
492
				'HOMEPAGE_REDIRECTION_ENABLED' => '',
493
				));
494 1356 Luisehahne
	}
495
496
	// Work-out which server os should be checked
497
	if(OPERATING_SYSTEM == 'linux')
498
	{
499 1716 Luisehahne
		$template->set_var('LINUX_SELECTED', $checked);
500 1356 Luisehahne
	} elseif(OPERATING_SYSTEM == 'windows') {
501 1716 Luisehahne
		$template->set_var('WINDOWS_SELECTED', $checked);
502 1356 Luisehahne
	}
503
504 1668 Luisehahne
	// Work-out if developer infos feature is enabled
505
	if(defined('DEV_INFOS') && DEV_INFOS == true)
506
	{
507 1731 Luisehahne
		//$template->set_var('DEV_INFOS_ENABLED', $checked);
508 1721 Luisehahne
    	$template->set_var(array(
509
				'DEV_INFOS_ENABLED' => $checked,
510
				'DEV_INFOS_DISABLED' => '',
511
				));
512 1668 Luisehahne
	} else {
513 1731 Luisehahne
		//$template->set_var('DEV_INFOS_DISABLED', $checked);
514 1721 Luisehahne
    	$template->set_var(array(
515
				'DEV_INFOS_DISABLED' => $checked,
516
				'DEV_INFOS_ENABLED' => '',
517
				));
518 1668 Luisehahne
	}
519
520 1731 Luisehahne
	// Work-out if developer infos feature is enabled
521
	if(defined('PAGE_EXTENDED') && PAGE_EXTENDED == true)
522
	{
523
		//$template->set_var('DEV_INFOS_ENABLED', $checked);
524
    	$template->set_var(array(
525
				'PAGE_EXTENDED_ENABLED' => $checked,
526
				'PAGE_EXTENDED_DISABLED' => '',
527
				));
528
	} else {
529
		//$template->set_var('PAGE_EXTENDED_DISABLED', $checked);
530
    	$template->set_var(array(
531
				'PAGE_EXTENDED_DISABLED' => $checked,
532
				'PAGE_EXTENDED_ENABLED' => '',
533
				));
534
	}
535
536 1356 Luisehahne
	// Work-out if manage sections feature is enabled
537
	if(MANAGE_SECTIONS)
538
	{
539 1721 Luisehahne
    	$template->set_var(array(
540
				'MANAGE_SECTIONS_ENABLED' => $checked,
541
				'MANAGE_SECTIONS_DISABLED' => '',
542
				));
543 1356 Luisehahne
	} else {
544 1721 Luisehahne
    	$template->set_var(array(
545
				'MANAGE_SECTIONS_DISABLED' => $checked,
546
				'MANAGE_SECTIONS_ENABLED' => '',
547
				));
548 1356 Luisehahne
	}
549
550
	// Work-out which wbmailer routine should be checked
551 1572 Luisehahne
	$template->set_var(array(
552
				'TEXT_WBMAILER_DEFAULT_SETTINGS_NOTICE' => $TEXT['WBMAILER_DEFAULT_SETTINGS_NOTICE'],
553
				'TEXT_WBMAILER_DEFAULT_SENDER_MAIL' => $TEXT['WBMAILER_DEFAULT_SENDER_MAIL'],
554
				'TEXT_WBMAILER_DEFAULT_SENDER_NAME' => $TEXT['WBMAILER_DEFAULT_SENDER_NAME'],
555
				'TEXT_WBMAILER_NOTICE' => $TEXT['WBMAILER_NOTICE'],
556
				'TEXT_WBMAILER_FUNCTION' => $TEXT['WBMAILER_FUNCTION'],
557
				'TEXT_WBMAILER_SMTP_HOST' => $TEXT['WBMAILER_SMTP_HOST'],
558
				'TEXT_WBMAILER_PHP' => $TEXT['WBMAILER_PHP'],
559
				'TEXT_WBMAILER_SMTP' => $TEXT['WBMAILER_SMTP'],
560
				'TEXT_WBMAILER_SMTP_AUTH' => $TEXT['WBMAILER_SMTP_AUTH'],
561
				'TEXT_WBMAILER_SMTP_AUTH_NOTICE' => $TEXT['REQUIRED'].' '.$TEXT['WBMAILER_SMTP_AUTH'],
562
				'TEXT_WBMAILER_SMTP_USERNAME' => $TEXT['WBMAILER_SMTP_USERNAME'],
563
				'TEXT_WBMAILER_SMTP_PASSWORD' => $TEXT['WBMAILER_SMTP_PASSWORD'],
564 1716 Luisehahne
				'SMTP_AUTH_SELECTED' => $checked
565 1572 Luisehahne
				));
566 1356 Luisehahne
	if(WBMAILER_ROUTINE == 'phpmail')
567
	{
568 1716 Luisehahne
		$template->set_var('PHPMAIL_SELECTED', $checked);
569 1356 Luisehahne
		$template->set_var('SMTP_VISIBILITY', ' style="display: none;"');
570 1572 Luisehahne
		$template->set_var('SMTP_VISIBILITY_AUTH', '');
571
		// $template->set_var('SMTP_AUTH_SELECTED', '');
572 1356 Luisehahne
	} elseif(WBMAILER_ROUTINE == 'smtp')
573
	{
574 1716 Luisehahne
		$template->set_var('SMTPMAIL_SELECTED', $checked);
575 1356 Luisehahne
		$template->set_var('SMTP_VISIBILITY', '');
576 1572 Luisehahne
		$template->set_var('SMTP_VISIBILITY_AUTH', '');
577 1356 Luisehahne
	}
578 1572 Luisehahne
/* deprecated
579 1356 Luisehahne
	// Work-out if SMTP authentification should be checked
580
	if(WBMAILER_SMTP_AUTH)
581
	{
582 1716 Luisehahne
		$template->set_var('SMTP_AUTH_SELECTED', $checked);
583 1356 Luisehahne
		if(WBMAILER_ROUTINE == 'smtp')
584
	    {
585
			$template->set_var('SMTP_VISIBILITY_AUTH', '');
586
587
		} else {
588
			$template->set_var('SMTP_VISIBILITY_AUTH', ' style="display: none;"');
589
		}
590
	} else {
591
		$template->set_var('SMTP_VISIBILITY_AUTH', ' style="display: none;"');
592
	}
593 1572 Luisehahne
*/
594 1356 Luisehahne
	// Work-out if intro feature is enabled
595
	if(INTRO_PAGE)
596
	{
597 1721 Luisehahne
    	$template->set_var(array(
598
				'INTRO_PAGE_ENABLED' => $checked,
599
				'INTRO_PAGE_DISABLED' => '',
600
				));
601 1356 Luisehahne
	} else {
602 1721 Luisehahne
    	$template->set_var(array(
603
				'INTRO_PAGE_DISABLED' => $checked,
604
				'INTRO_PAGE_ENABLED' => '',
605
				));
606 1356 Luisehahne
	}
607
608
	// Work-out if frontend login feature is enabled
609
	if(FRONTEND_LOGIN)
610
	{
611 1721 Luisehahne
    	$template->set_var(array(
612
				'PRIVATE_ENABLED' => $checked,
613
				'PRIVATE_DISABLED' => '',
614
				));
615 1356 Luisehahne
	} else {
616 1721 Luisehahne
    	$template->set_var(array(
617
				'PRIVATE_DISABLED' => $checked,
618
				'INTRO_PAGE_ENABLED' => '',
619
				));
620 1356 Luisehahne
	}
621 1716 Luisehahne
	// Work-out if frontend login feature is enabled
622 1356 Luisehahne
623 1716 Luisehahne
	if(CONFIRMED_REGISTRATION)
624
	{
625 1721 Luisehahne
    	$template->set_var(array(
626
				'CONFIRMED_REGISTRATION_ENABLED' => $checked,
627
				'CONFIRMED_REGISTRATION_DISABLED' => '',
628
				));
629 1716 Luisehahne
	} else {
630 1721 Luisehahne
    	$template->set_var(array(
631
				'CONFIRMED_REGISTRATION_DISABLED' => $checked,
632
				'CONFIRMED_REGISTRATION_ENABLED' => '',
633
				));
634 1716 Luisehahne
	}
635
636 1356 Luisehahne
	// Work-out if page trash feature is disabled, in-line, or separate
637
	if(PAGE_TRASH == 'disabled')
638
	{
639 1721 Luisehahne
//		$template->set_var('PAGE_TRASH_DISABLED', $checked);
640
//		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: none;');
641
    	$template->set_var(array(
642
				'PAGE_TRASH_DISABLED' => $checked,
643
				'PAGE_TRASH_INLINE' => '',
644
				'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;',
645
				));
646 1356 Luisehahne
	} elseif(PAGE_TRASH == 'inline')
647
	{
648 1721 Luisehahne
//		$template->set_var('PAGE_TRASH_INLINE', $checked);
649
//		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: none;');
650
    	$template->set_var(array(
651
				'PAGE_TRASH_INLINE' => $checked,
652
				'PAGE_TRASH_DISABLED' => '',
653
				'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;',
654
				));
655 1356 Luisehahne
	} elseif(PAGE_TRASH == 'separate')
656
	{
657 1716 Luisehahne
		$template->set_var('PAGE_TRASH_SEPARATE', $checked);
658 1356 Luisehahne
		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: inline;');
659
	}
660
661
	// Work-out if media home folde feature is enabled
662
	if(HOME_FOLDERS)
663
	{
664 1721 Luisehahne
    	$template->set_var(array(
665
				'HOME_FOLDERS_ENABLED' => $checked,
666
				'HOME_FOLDERS_DISABLED' => '',
667
				));
668 1356 Luisehahne
	} else {
669 1721 Luisehahne
    	$template->set_var(array(
670
				'HOME_FOLDERS_DISABLED' => $checked,
671
				'HOME_FOLDERS_ENABLED' => '',
672
				));
673 1356 Luisehahne
	}
674
675
	// Insert search select
676
	if(SEARCH == 'private')
677
	{
678 1721 Luisehahne
    	$template->set_var(array(
679
				'PRIVATE_SEARCH' => $sSelected,
680
				'REGISTERED_SEARCH' => '',
681
				'NONE_SEARCH' => '',
682
				));
683
	} elseif(SEARCH == 'public') {
684
    	$template->set_var(array(
685
				'PRIVATE_SEARCH' => '',
686
				'REGISTERED_SEARCH' => '',
687
				'NONE_SEARCH' => '',
688
				));
689 1356 Luisehahne
	} elseif(SEARCH == 'registered') {
690 1721 Luisehahne
    	$template->set_var(array(
691
				'PRIVATE_SEARCH' => '',
692
				'REGISTERED_SEARCH' => $sSelected,
693
				'NONE_SEARCH' => '',
694
				));
695 1356 Luisehahne
	} elseif(SEARCH == 'none') {
696 1721 Luisehahne
    	$template->set_var(array(
697
				'PRIVATE_SEARCH' => '',
698
				'REGISTERED_SEARCH' => '',
699
				'NONE_SEARCH' => $sSelected,
700
				));
701 1356 Luisehahne
	}
702
703
	// Work-out if 777 permissions are set
704 1721 Luisehahne
	$template->set_var('WORLD_WRITEABLE_SELECTED', '');
705 1356 Luisehahne
	if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777')
706
	{
707 1716 Luisehahne
		$template->set_var('WORLD_WRITEABLE_SELECTED', $checked);
708 1356 Luisehahne
	}
709
710
	// Work-out which file mode boxes are checked
711
	if(extract_permission(STRING_FILE_MODE, 'u', 'r'))
712
	{
713 1716 Luisehahne
		$template->set_var('FILE_U_R_CHECKED', $checked);
714 1356 Luisehahne
	}
715
	if(extract_permission(STRING_FILE_MODE, 'u', 'w'))
716
	{
717 1716 Luisehahne
		$template->set_var('FILE_U_W_CHECKED', $checked);
718 1356 Luisehahne
	}
719
	if(extract_permission(STRING_FILE_MODE, 'u', 'e'))
720
	{
721 1716 Luisehahne
		$template->set_var('FILE_U_E_CHECKED', $checked);
722 1356 Luisehahne
	}
723
	if(extract_permission(STRING_FILE_MODE, 'g', 'r'))
724
	{
725 1716 Luisehahne
		$template->set_var('FILE_G_R_CHECKED', $checked);
726 1356 Luisehahne
	}
727
	if(extract_permission(STRING_FILE_MODE, 'g', 'w'))
728
	{
729 1716 Luisehahne
		$template->set_var('FILE_G_W_CHECKED', $checked);
730 1356 Luisehahne
	}
731
	if(extract_permission(STRING_FILE_MODE, 'g', 'e'))
732
	{
733 1716 Luisehahne
		$template->set_var('FILE_G_E_CHECKED', $checked);
734 1356 Luisehahne
	}
735
	if(extract_permission(STRING_FILE_MODE, 'o', 'r'))
736
	{
737 1716 Luisehahne
		$template->set_var('FILE_O_R_CHECKED', $checked);
738 1356 Luisehahne
	}
739
	if(extract_permission(STRING_FILE_MODE, 'o', 'w'))
740
	{
741 1716 Luisehahne
		$template->set_var('FILE_O_W_CHECKED', $checked);
742 1356 Luisehahne
	}
743
	if(extract_permission(STRING_FILE_MODE, 'o', 'e'))
744
	{
745 1716 Luisehahne
		$template->set_var('FILE_O_E_CHECKED', $checked);
746 1356 Luisehahne
	}
747
	// Work-out which dir mode boxes are checked
748
	if(extract_permission(STRING_DIR_MODE, 'u', 'r'))
749
	{
750 1716 Luisehahne
		$template->set_var('DIR_U_R_CHECKED', $checked);
751 1356 Luisehahne
	}
752
	if(extract_permission(STRING_DIR_MODE, 'u', 'w'))
753
	{
754 1716 Luisehahne
		$template->set_var('DIR_U_W_CHECKED', $checked);
755 1356 Luisehahne
	}
756
	if(extract_permission(STRING_DIR_MODE, 'u', 'e'))
757
	{
758 1716 Luisehahne
		$template->set_var('DIR_U_E_CHECKED', $checked);
759 1356 Luisehahne
	}
760
	if(extract_permission(STRING_DIR_MODE, 'g', 'r'))
761
	{
762 1716 Luisehahne
		$template->set_var('DIR_G_R_CHECKED', $checked);
763 1356 Luisehahne
	}
764
	if(extract_permission(STRING_DIR_MODE, 'g', 'w'))
765
	{
766 1716 Luisehahne
		$template->set_var('DIR_G_W_CHECKED', $checked);
767 1356 Luisehahne
	}
768
	if(extract_permission(STRING_DIR_MODE, 'g', 'e'))
769
	{
770 1716 Luisehahne
		$template->set_var('DIR_G_E_CHECKED', $checked);
771 1356 Luisehahne
	}
772
	if(extract_permission(STRING_DIR_MODE, 'o', 'r'))
773
	{
774 1716 Luisehahne
		$template->set_var('DIR_O_R_CHECKED', $checked);
775 1356 Luisehahne
	}
776
	if(extract_permission(STRING_DIR_MODE, 'o', 'w'))
777
	{
778 1716 Luisehahne
		$template->set_var('DIR_O_W_CHECKED', $checked);
779 1356 Luisehahne
	}
780
	if(extract_permission(STRING_DIR_MODE, 'o', 'e'))
781
	{
782 1716 Luisehahne
		$template->set_var('DIR_O_E_CHECKED', $checked);
783 1356 Luisehahne
	}
784
785
	$template->set_var(array(
786
						'PAGES_DIRECTORY' => PAGES_DIRECTORY,
787 1767 Luisehahne
						'MODULES_DIRECTORY' => MODULES_UPGRADE_LIST,
788 1668 Luisehahne
						'PAGE_ICON_DIR'   => PAGE_ICON_DIR,
789 1356 Luisehahne
						'MEDIA_DIRECTORY' => MEDIA_DIRECTORY,
790
						'PAGE_EXTENSION' => PAGE_EXTENSION,
791
						'PAGE_SPACER' => PAGE_SPACER,
792
						'TABLE_PREFIX' => TABLE_PREFIX
793
					 ));
794
795
	// Insert Server Email value into template
796
	$template->set_var('SERVER_EMAIL', SERVER_EMAIL);
797
798
	// Insert groups into signup list
799
	$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
800
	if($results->numRows() > 0)
801
	{
802
		while($group = $results->fetchRow())
803
	    {
804
			$template->set_var('ID', $group['group_id']);
805
			$template->set_var('NAME', $group['name']);
806
			if(FRONTEND_SIGNUP == $group['group_id'])
807
	        {
808 1716 Luisehahne
				$template->set_var('SELECTED', $sSelected);
809 1356 Luisehahne
			} else {
810
				$template->set_var('SELECTED', '');
811
			}
812
			$template->parse('group_list', 'group_list_block', true);
813
		}
814
	} else {
815
		$template->set_var('ID', 'disabled');
816
		$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
817
		$template->parse('group_list', 'group_list_block', true);
818
	}
819
820
	// Insert language headings
821
	$template->set_var(array(
822 1572 Luisehahne
					'HEADING_GENERAL_SETTINGS' => $HEADING['GENERAL_SETTINGS'],
823
					'HEADING_DEFAULT_SETTINGS' => $HEADING['DEFAULT_SETTINGS'],
824
					'HEADING_SEARCH_SETTINGS' => $HEADING['SEARCH_SETTINGS'],
825
					'HEADING_SERVER_SETTINGS' => $HEADING['SERVER_SETTINGS'],
826
					'HEADING_WBMAILER_SETTINGS' => $HEADING['WBMAILER_SETTINGS'],
827
					'HEADING_ADMINISTRATION_TOOLS' => $HEADING['ADMINISTRATION_TOOLS']
828
					)
829
			);
830 1356 Luisehahne
	// Insert language text and messages
831
	$template->set_var(array(
832 1572 Luisehahne
					'TEXT_WEBSITE_TITLE' => $TEXT['WEBSITE_TITLE'],
833
					'TEXT_WEBSITE_DESCRIPTION' => $TEXT['WEBSITE_DESCRIPTION'],
834
					'TEXT_WEBSITE_KEYWORDS' => $TEXT['WEBSITE_KEYWORDS'],
835
					'TEXT_WEBSITE_HEADER' => $TEXT['WEBSITE_HEADER'],
836
					'TEXT_WEBSITE_FOOTER' => $TEXT['WEBSITE_FOOTER'],
837
					'TEXT_HEADER' => $TEXT['HEADER'],
838
					'TEXT_FOOTER' => $TEXT['FOOTER'],
839
					'TEXT_VISIBILITY' => $TEXT['VISIBILITY'],
840
					'TEXT_RESULTS_HEADER' => $TEXT['RESULTS_HEADER'],
841
					'TEXT_RESULTS_LOOP' => $TEXT['RESULTS_LOOP'],
842
					'TEXT_RESULTS_FOOTER' => $TEXT['RESULTS_FOOTER'],
843
					'TEXT_NO_RESULTS' => $TEXT['NO_RESULTS'],
844
					'TEXT_TEXT' => $TEXT['TEXT'],
845
					'TEXT_DEFAULT' => $TEXT['DEFAULT'],
846
					'TEXT_LANGUAGE' => $TEXT['LANGUAGE'],
847
					'TEXT_TIMEZONE' => $TEXT['TIMEZONE'],
848
					'TEXT_CHARSET' => $TEXT['CHARSET'],
849
					'TEXT_DATE_FORMAT' => $TEXT['DATE_FORMAT'],
850
					'TEXT_TIME_FORMAT' => $TEXT['TIME_FORMAT'],
851
					'TEXT_TEMPLATE' => $TEXT['TEMPLATE'],
852
					'TEXT_THEME' => $TEXT['THEME'],
853
					'TEXT_WYSIWYG_EDITOR' => $TEXT['WYSIWYG_EDITOR'],
854
					'TEXT_PAGE_LEVEL_LIMIT' => $TEXT['PAGE_LEVEL_LIMIT'],
855
					'TEXT_INTRO_PAGE' => $TEXT['INTRO_PAGE'],
856
					'TEXT_FRONTEND' => $TEXT['FRONTEND'],
857
					'TEXT_LOGIN' => $TEXT['LOGIN'],
858
					'TEXT_REDIRECT_AFTER' => $TEXT['REDIRECT_AFTER'],
859 1716 Luisehahne
					'TEXT_SIGNUP' => $TEXT['SIGNUP'].' '.$TEXT['GROUP'],
860 1572 Luisehahne
					'TEXT_PHP_ERROR_LEVEL' => $TEXT['PHP_ERROR_LEVEL'],
861 1668 Luisehahne
					'TEXT_MULTILINGUAL' => $TEXT['MULTILINGUAL'],
862
					'TEXT_DEV_INFOS' => $TEXT['DEV_INFOS'],
863 1572 Luisehahne
					'TEXT_PAGES_DIRECTORY' => $TEXT['PAGES_DIRECTORY'],
864 1668 Luisehahne
					'TEXT_PAGE_ICON_DIR' => $TEXT['PAGE_ICON_DIR'],
865 1572 Luisehahne
					'TEXT_MEDIA_DIRECTORY' => $TEXT['MEDIA_DIRECTORY'],
866
					'TEXT_PAGE_EXTENSION' => $TEXT['PAGE_EXTENSION'],
867
					'TEXT_PAGE_SPACER' => $TEXT['PAGE_SPACER'],
868
					'TEXT_RENAME_FILES_ON_UPLOAD' => $TEXT['RENAME_FILES_ON_UPLOAD'],
869
					'TEXT_APP_NAME' => $TEXT['APP_NAME'],
870
					'TEXT_SESSION_IDENTIFIER' => $TEXT['SESSION_IDENTIFIER'],
871
					'TEXT_SEC_ANCHOR' => $TEXT['SEC_ANCHOR'],
872
					'TEXT_SERVER_OPERATING_SYSTEM' => $TEXT['SERVER_OPERATING_SYSTEM'],
873
					'TEXT_LINUX_UNIX_BASED' => $TEXT['LINUX_UNIX_BASED'],
874
					'TEXT_WINDOWS' => $TEXT['WINDOWS'],
875
					'TEXT_ADMIN' => $TEXT['ADMIN'],
876
					'TEXT_TYPE' => $TEXT['TYPE'],
877
					'TEXT_DATABASE' => $TEXT['DATABASE'],
878
					'TEXT_HOST' => $TEXT['HOST'],
879
					'TEXT_USERNAME' => $TEXT['USERNAME'],
880
					'TEXT_PASSWORD' => $TEXT['PASSWORD'],
881
					'TEXT_NAME' => $TEXT['NAME'],
882
					'TEXT_TABLE_PREFIX' => $TEXT['TABLE_PREFIX'],
883
					'TEXT_SAVE' => $TEXT['SAVE'],
884
					'TEXT_RESET' => $TEXT['RESET'],
885
					'TEXT_CHANGES' => $TEXT['CHANGES'],
886
					'TEXT_ENABLED' => $TEXT['ENABLED'],
887
					'TEXT_DISABLED' => $TEXT['DISABLED'],
888
					'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'],
889
					'TEXT_MANAGE' => $TEXT['MANAGE'],
890
					'TEXT_SEARCH' => $TEXT['SEARCH'],
891
					'TEXT_PUBLIC' => $TEXT['PUBLIC'],
892
					'TEXT_PRIVATE' => $TEXT['PRIVATE'],
893
					'TEXT_REGISTERED' => $TEXT['REGISTERED'],
894
					'TEXT_NONE' => $TEXT['NONE'],
895
					'TEXT_FILES' => strtoupper(substr($TEXT['FILES'], 0, 1)).substr($TEXT['FILES'], 1),
896
					'TEXT_DIRECTORIES' => $TEXT['DIRECTORIES'],
897
					'TEXT_FILESYSTEM_PERMISSIONS' => $TEXT['FILESYSTEM_PERMISSIONS'],
898
					'TEXT_USER' => $TEXT['USER'],
899
					'TEXT_GROUP' => $TEXT['GROUP'],
900
					'TEXT_OTHERS' => $TEXT['OTHERS'],
901
					'TEXT_READ' => $TEXT['READ'],
902
					'TEXT_WRITE' => $TEXT['WRITE'],
903
					'TEXT_EXECUTE' => $TEXT['EXECUTE'],
904
					'TEXT_WARN_PAGE_LEAVE' => '',
905
					'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'],
906
					'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'],
907
					'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'],
908
					'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'],
909
					'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
910
					'TEXT_PAGE_TRASH' => $TEXT['PAGE_TRASH'],
911
					'TEXT_PAGE_LANGUAGES' => $TEXT['PAGE_LANGUAGES'],
912
					'TEXT_INLINE' => $TEXT['INLINE'],
913
					'TEXT_SEPARATE' => $TEXT['SEPARATE'],
914
					'TEXT_HOME_FOLDERS' => $TEXT['HOME_FOLDERS'],
915
					'TEXT_WYSIWYG_STYLE' => $TEXT['WYSIWYG_STYLE'],
916
					'TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS' => $TEXT['WORLD_WRITEABLE_FILE_PERMISSIONS'],
917 1745 Luisehahne
					'MODE_SWITCH_WARNING' => $MESSAGE['SETTINGS_MODE_SWITCH_WARNING'],
918
					'WORLD_WRITEABLE_WARNING' => $MESSAGE['SETTINGS_WORLD_WRITEABLE_WARNING'],
919 1572 Luisehahne
					'TEXT_MODULE_ORDER' => $TEXT['MODULE_ORDER'],
920
					'TEXT_MAX_EXCERPT' => $TEXT['MAX_EXCERPT'],
921
					'TEXT_TIME_LIMIT' => $TEXT['TIME_LIMIT']
922
					));
923 1356 Luisehahne
924
if($is_advanced)
925
{
926
	$template->parse('show_page_level_limit', 'show_page_level_limit_block', true);
927
	$template->parse('show_checkbox_1',       'show_checkbox_1_block', true);
928
 	$template->parse('show_checkbox_2',       'show_checkbox_2_block', true);
929
	$template->parse('show_checkbox_3',       'show_checkbox_3_block', true);
930
	$template->parse('show_php_error_level',  'show_php_error_level_block', true);
931
	$template->parse('show_charset',          'show_charset_block', true);
932
	$template->parse('show_wysiwyg',          'show_wysiwyg_block', true);
933
	$template->parse('show_search',           'show_search_block', false);
934
	$template->parse('show_redirect_timer',   'show_redirect_timer_block', true);
935
}else {
936
	$template->set_block('show_page_level_limit', '');
937
	$template->set_block('show_checkbox_1', '');
938
	$template->set_block('show_checkbox_2', '');
939
	$template->set_block('show_checkbox_3', '');
940
	$template->set_block('show_php_error_level', '');
941
	$template->set_block('show_charset', '');
942
	$template->set_block('show_wysiwyg', '');
943
	$template->set_block('show_search', '');
944
	$template->set_block('show_redirect_timer', '');
945
}
946 1572 Luisehahne
if($is_advanced && $admin->get_user_id()=='1')
947
{
948
	$template->parse('show_access', 'show_access_block', true);
949
}else {
950
	$template->set_block('show_access', '');
951
}
952 1356 Luisehahne
953
// Parse template objects output
954
$template->parse('main', 'main_block', false);
955
$template->pparse('output', 'page');
956 1767 Luisehahne
unset($template);
957 1356 Luisehahne
$admin->print_footer();