Project

General

Profile

1 4 ryan
<?php
2
3
// $Id: index.php,v 1.14 2005/06/21 09:15:39 rdjurovich Exp $
4
5
/*
6
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
24
*/
25
26
require('../../config.php');
27
require_once(WB_PATH.'/framework/class.admin.php');
28
if(isset($_GET['advanced']) AND $_GET['advanced'] == 'yes') {
29
	$admin = new admin('Settings', 'settings_advanced');
30
} else {
31
	$admin = new admin('Settings', 'settings_basic');
32
}
33
34
// Create new database object
35
$database = new database();
36
37
// Include the WB functions file
38
require_once(WB_PATH.'/framework/functions.php');
39
40
// Create new template object
41
$template = new Template(ADMIN_PATH.'/settings');
42
$template->set_file('page', 'template.html');
43
$template->set_block('page', 'main_block', 'main');
44
45
// Query current settings in the db, then loop through them and print them
46
$query = "SELECT * FROM ".TABLE_PREFIX."settings";
47
$results = $database->query($query);
48
while($setting = $results->fetchRow()) {
49
	$setting_name = $setting['name'];
50
	$setting_value = htmlspecialchars(stripslashes($setting['value']));
51
	switch($setting_name) {
52
		// Website title
53
		case 'title':
54
			$template->set_var('TITLE', $setting_value);
55
		break;
56
		// Website description
57
		case 'description':
58
			$template->set_var('DESCRIPTION', $setting_value);
59
		break;
60
		// Website keywords
61
		case 'keywords':
62
			$template->set_var('KEYWORDS', $setting_value);
63
		break;
64
		// Website header
65
		case 'header':
66
			$template->set_var('HEADER', $setting_value);
67
		break;
68
		// Website header
69
		case 'header':
70
			$template->set_var('HEADER', $setting_value);
71
		break;
72
		// Website footer
73
		case 'footer':
74
			$template->set_var('FOOTER', $setting_value);
75
		break;
76
	}
77
}
78
79
// Query current settings in the db, then loop through them and print them
80
$query = "SELECT * FROM ".TABLE_PREFIX."search WHERE extra = ''";
81
$results = $database->query($query);
82
while($setting = $results->fetchRow()) {
83
	$setting_name = $setting['name'];
84
	$setting_value = htmlspecialchars(stripslashes($setting['value']));
85
	switch($setting_name) {
86
		// Search header
87
		case 'header':
88
			$template->set_var('SEARCH_HEADER', $setting_value);
89
		break;
90
		// Search results header
91
		case 'results_header':
92
			$template->set_var('SEARCH_RESULTS_HEADER', $setting_value);
93
		break;
94
		// Search results loop
95
		case 'results_loop':
96
			$template->set_var('SEARCH_RESULTS_LOOP', $setting_value);
97
		break;
98
		// Search results footer
99
		case 'results_footer':
100
			$template->set_var('SEARCH_RESULTS_FOOTER', $setting_value);
101
		break;
102
		// Search no results
103
		case 'no_results':
104
			$template->set_var('SEARCH_NO_RESULTS', $setting_value);
105
		break;
106
		// Search footer
107
		case 'footer':
108
			$template->set_var('SEARCH_FOOTER', $setting_value);
109
		break;
110
		// Search template
111
		case 'template':
112
			$search_template = $setting_value;
113
		break;
114
	}
115
}
116
117
// Do the same for settings stored in config file as with ones in db
118
$database_type = '';
119
120
// Tell the browser whether or not to show advanced options
121
if(isset($_GET['advanced']) AND $_GET['advanced'] == 'yes') {
122
	$template->set_var('DISPLAY_ADVANCED', '');
123
	$template->set_var('ADVANCED', 'yes');
124
	$template->set_var('ADVANCED_BUTTON', '<< '.$TEXT['HIDE_ADVANCED']);
125
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=no');
126
	$template->set_var('BASIC_FILE_PERMS_ID', 'hide');
127
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
128
} else {
129
	$template->set_var('DISPLAY_ADVANCED', 'none');
130
	$template->set_var('ADVANCED', 'no');
131
	$template->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
132
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
133
	$template->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
134
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
135
}
136
137
$template->set_var(array(
138
									'PAGE_EXTENSION' => PAGE_EXTENSION,
139
									'PAGE_SPACER' => PAGE_SPACER,
140
									'WB_PATH' => WB_PATH,
141
									'WB_URL' => WB_URL,
142
									'ADMIN_PATH' => ADMIN_PATH,
143
									'ADMIN_URL' => ADMIN_URL,
144
									'DATABASE_TYPE' => DB_TYPE,
145
									'DATABASE_HOST' => DB_HOST,
146
									'DATABASE_USERNAME' => DB_USERNAME,
147
									'DATABASE_NAME' => DB_NAME,
148
									'TABLE_PREFIX' => TABLE_PREFIX
149
								 )
150
						 );
151
152
// Insert groups into signup list
153
$template->set_block('main_block', 'group_list_block', 'group_list');
154
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
155
if($results->numRows() > 0) {
156
	while($group = $results->fetchRow()) {
157
		$template->set_var('ID', $group['group_id']);
158
		$template->set_var('NAME', $group['name']);
159
		if(FRONTEND_SIGNUP == $group['group_id']) {
160
			$template->set_var('SELECTED', 'selected');
161
		} else {
162
			$template->set_var('SELECTED', '');
163
		}
164
		$template->parse('group_list', 'group_list_block', true);
165
	}
166
} else {
167
	$template->set_var('ID', 'disabled');
168
	$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
169
	$template->parse('group_list', 'group_list_block', true);
170
}
171
172
// Insert language values
173
$template->set_block('main_block', 'language_list_block', 'language_list');
174
if($handle = opendir(WB_PATH.'/languages/')) {
175
   while (false !== ($file = readdir($handle))) {
176
		if($file != '.' AND $file != '..' AND $file != 'CVS' AND $file != 'index.php') {
177
			// Get language name
178
			require(WB_PATH.'/languages/'.$file);
179
			// Insert code and name
180
			$template->set_var(array(
181
											'CODE' => $language_code,
182
											'NAME' => $language_name
183
											)
184
									);
185
			// Check if it is selected
186
			if(DEFAULT_LANGUAGE == $language_code) {
187
				$template->set_var('SELECTED', ' selected');
188
			} else {
189
				$template->set_var('SELECTED', '');
190
			}
191
			$template->parse('language_list', 'language_list_block', true);
192
		}
193
	}
194
	// Restore language to original file
195
	require(WB_PATH.'/languages/'.LANGUAGE.'.php');
196
}
197
198
// Insert default timezone values
199
require(ADMIN_PATH.'/interface/timezones.php');
200
$template->set_block('main_block', 'timezone_list_block', 'timezone_list');
201
foreach($TIMEZONES AS $hour_offset => $title) {
202
	// Make sure we dont list "System Default" as we are setting this value!
203
	if($hour_offset != '-20') {
204
		$template->set_var('VALUE', $hour_offset);
205
		$template->set_var('NAME', $title);
206
		if(DEFAULT_TIMEZONE == $hour_offset*60*60) {
207
			$template->set_var('SELECTED', 'selected');
208
		} else {
209
			$template->set_var('SELECTED', '');
210
		}
211
		$template->parse('timezone_list', 'timezone_list_block', true);
212
	}
213
}
214
215
// Insert date format list
216
require(ADMIN_PATH.'/interface/date_formats.php');
217
$template->set_block('main_block', 'date_format_list_block', 'date_format_list');
218
foreach($DATE_FORMATS AS $format => $title) {
219
	$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
220
	if($format != 'system_default') {
221
		$template->set_var('VALUE', $format);
222
	} else {
223
		$template->set_var('VALUE', '');
224
	}
225
	$template->set_var('NAME', $title);
226
	if(DEFAULT_DATE_FORMAT == $format) {
227
		$template->set_var('SELECTED', 'selected');
228
	} else {
229
		$template->set_var('SELECTED', '');
230
	}
231
	$template->parse('date_format_list', 'date_format_list_block', true);
232
}
233
234
// Insert time format list
235
require(ADMIN_PATH.'/interface/time_formats.php');
236
$template->set_block('main_block', 'time_format_list_block', 'time_format_list');
237
foreach($TIME_FORMATS AS $format => $title) {
238
	$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
239
	if($format != 'system_default') {
240
		$template->set_var('VALUE', $format);
241
	} else {
242
		$template->set_var('VALUE', '');
243
	}
244
	$template->set_var('NAME', $title);
245
	if(DEFAULT_TIME_FORMAT == $format) {
246
		$template->set_var('SELECTED', 'selected');
247
	} else {
248
		$template->set_var('SELECTED', '');
249
	}
250
	$template->parse('time_format_list', 'time_format_list_block', true);
251
}
252
253
// Insert templates
254
$template->set_block('main_block', 'template_list_block', 'template_list');
255
if($handle = opendir(WB_PATH.'/templates/')) {
256
	while (false !== ($file = readdir($handle))) {
257
		if($file != "." AND $file != ".." AND $file != "CVS" AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) {
258
			include(WB_PATH."/templates/$file/info.php");
259
			$template->set_var('FILE', $file);
260
			$template->set_var('NAME', $template_name);
261
			if($file == DEFAULT_TEMPLATE ? $selected = ' selected' : $selected = '');
262
			$template->set_var('SELECTED', $selected);
263
			$template->parse('template_list', 'template_list_block', true);
264
		}
265
	}
266
}
267
268
// Insert templates for search settings
269
$template->set_block('main_block', 'search_template_list_block', 'search_template_list');
270
if($search_template == '') { $selected = ' selected'; } else { $selected = ''; }
271
$template->set_var(array('FILE' => '', 'NAME' => $TEXT['SYSTEM_DEFAULT'], 'SELECTED' => $selected));
272
$template->parse('search_template_list', 'search_template_list_block', true);
273
if($handle = opendir(WB_PATH.'/templates/')) {
274
	while (false !== ($file = readdir($handle))) {
275
		if($file != "." AND $file != ".." AND $file != "CVS" AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) {
276
			include(WB_PATH."/templates/$file/info.php");
277
			$template->set_var('FILE', $file);
278
			$template->set_var('NAME', $template_name);
279
			if($file == $search_template ? $selected = ' selected' : $selected = '');
280
			$template->set_var('SELECTED', $selected);
281
			$template->parse('search_template_list', 'search_template_list_block', true);
282
		}
283
	}
284
}
285
286
// Insert default error reporting values
287
require(ADMIN_PATH.'/interface/er_levels.php');
288
$template->set_block('main_block', 'error_reporting_list_block', 'error_reporting_list');
289
foreach($ER_LEVELS AS $value => $title) {
290
	$template->set_var('VALUE', $value);
291
	$template->set_var('NAME', $title);
292
	if(ER_LEVEL == $value) {
293
		$template->set_var('SELECTED', 'selected');
294
	} else {
295
		$template->set_var('SELECTED', '');
296
	}
297
	$template->parse('error_reporting_list', 'error_reporting_list_block', true);
298
}
299
300
// Insert permissions values
301
if($admin->get_permission('settings_advanced') != true) {
302
	$template->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
303
}
304
305
// Insert page level limits
306
$template->set_block('main_block', 'page_level_limit_list_block', 'page_level_limit_list');
307
for($i = 1; $i <= 10; $i++) {
308
	$template->set_var('NUMBER', $i);
309
	if(PAGE_LEVEL_LIMIT == $i) {
310
		$template->set_var('SELECTED', 'selected');
311
	} else {
312
		$template->set_var('SELECTED', '');
313
	}
314
	$template->parse('page_level_limit_list', 'page_level_limit_list_block', true);
315
}
316
317
// Work-out if multiple menus feature is enabled
318
if(defined('MULTIPLE_MENUS') AND MULTIPLE_MENUS == true) {
319
	$template->set_var('MULTIPLE_MENUS_ENABLED', ' checked');
320
} else {
321
	$template->set_var('MULTIPLE_MENUS_DISABLED', ' checked');
322
}
323
324
// Work-out if page languages feature is enabled
325
if(defined('PAGE_LANGUAGES') AND PAGE_LANGUAGES == true) {
326
	$template->set_var('PAGE_LANGUAGES_ENABLED', ' checked');
327
} else {
328
	$template->set_var('PAGE_LANGUAGES_DISABLED', ' checked');
329
}
330
331
// Work-out if smart login feature is enabled
332
if(defined('SMART_LOGIN') AND SMART_LOGIN == true) {
333
	$template->set_var('SMART_LOGIN_ENABLED', ' checked');
334
} else {
335
	$template->set_var('SMART_LOGIN_DISABLED', ' checked');
336
}
337
338
// Work-out if section blocks feature is enabled
339
if(defined('SECTION_BLOCKS') AND SECTION_BLOCKS == true) {
340
	$template->set_var('SECTION_BLOCKS_ENABLED', ' checked');
341
} else {
342
	$template->set_var('SECTION_BLOCKS_DISABLED', ' checked');
343
}
344
345
// Work-out if homepage redirection feature is enabled
346
if(defined('HOMEPAGE_REDIRECTION') AND HOMEPAGE_REDIRECTION == true) {
347
	$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', ' checked');
348
} else {
349
	$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', ' checked');
350
}
351
352
// Work-out which server os should be checked
353
if(OPERATING_SYSTEM == 'linux') {
354
	$template->set_var('LINUX_SELECTED', ' checked');
355
} elseif(OPERATING_SYSTEM == 'windows') {
356
	$template->set_var('WINDOWS_SELECTED', ' checked');
357
}
358
359
// Work-out if manage sections feature is enabled
360
if(MANAGE_SECTIONS) {
361
	$template->set_var('MANAGE_SECTIONS_ENABLED', ' checked');
362
} else {
363
	$template->set_var('MANAGE_SECTIONS_DISABLED', ' checked');
364
}
365
366
// Work-out if intro feature is enabled
367
if(INTRO_PAGE) {
368
	$template->set_var('INTRO_PAGE_ENABLED', ' checked');
369
} else {
370
	$template->set_var('INTRO_PAGE_DISABLED', ' checked');
371
}
372
373
// Work-out if frontend login feature is enabled
374
if(FRONTEND_LOGIN) {
375
	$template->set_var('PRIVATE_ENABLED', ' checked');
376
} else {
377
	$template->set_var('PRIVATE_DISABLED', ' checked');
378
}
379
380
// Work-out if page trash feature is disabled, in-line, or separate
381
if(PAGE_TRASH == 'disabled') {
382
	$template->set_var('PAGE_TRASH_DISABLED', ' checked');
383
} elseif(PAGE_TRASH == 'inline') {
384
	$template->set_var('PAGE_TRASH_INLINE', ' checked');
385
} elseif(PAGE_TRASH == 'separate') {
386
	$template->set_var('PAGE_TRASH_SEPARATE', ' checked');
387
}
388
389
// Work-out if media home folde feature is enabled
390
if(HOME_FOLDERS) {
391
	$template->set_var('HOME_FOLDERS_ENABLED', ' checked');
392
} else {
393
	$template->set_var('HOME_FOLDERS_DISABLED', ' checked');
394
}
395
396
// Insert search select
397
if(SEARCH == 'private') {
398
	$template->set_var('PRIVATE_SEARCH', 'selected');
399
} elseif(SEARCH == 'registered') {
400
	$template->set_var('REGISTERED_SEARCH', 'selected');
401
} elseif(SEARCH == 'none') {
402
	$template->set_var('NONE_SEARCH', 'selected');
403
}
404
405
// Work-out if 777 permissions are set
406
if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777') {
407
	$template->set_var('WORLD_WRITEABLE_SELECTED', ' checked');
408
}
409
410
// Work-out which file mode boxes are checked
411
if(extract_permission(STRING_FILE_MODE, 'u', 'r')) {
412
	$template->set_var('FILE_U_R_CHECKED', 'checked');
413
}
414
if(extract_permission(STRING_FILE_MODE, 'u', 'w')) {
415
	$template->set_var('FILE_U_W_CHECKED', 'checked');
416
}
417
if(extract_permission(STRING_FILE_MODE, 'u', 'e')) {
418
	$template->set_var('FILE_U_E_CHECKED', 'checked');
419
}
420
if(extract_permission(STRING_FILE_MODE, 'g', 'r')) {
421
	$template->set_var('FILE_G_R_CHECKED', 'checked');
422
}
423
if(extract_permission(STRING_FILE_MODE, 'g', 'w')) {
424
	$template->set_var('FILE_G_W_CHECKED', 'checked');
425
}
426
if(extract_permission(STRING_FILE_MODE, 'g', 'e')) {
427
	$template->set_var('FILE_G_E_CHECKED', 'checked');
428
}
429
if(extract_permission(STRING_FILE_MODE, 'o', 'r')) {
430
	$template->set_var('FILE_O_R_CHECKED', 'checked');
431
}
432
if(extract_permission(STRING_FILE_MODE, 'o', 'w')) {
433
	$template->set_var('FILE_O_W_CHECKED', 'checked');
434
}
435
if(extract_permission(STRING_FILE_MODE, 'o', 'e')) {
436
	$template->set_var('FILE_O_E_CHECKED', 'checked');
437
}
438
// Work-out which dir mode boxes are checked
439
if(extract_permission(STRING_DIR_MODE, 'u', 'r')) {
440
	$template->set_var('DIR_U_R_CHECKED', 'checked');
441
}
442
if(extract_permission(STRING_DIR_MODE, 'u', 'w')) {
443
	$template->set_var('DIR_U_W_CHECKED', 'checked');
444
}
445
if(extract_permission(STRING_DIR_MODE, 'u', 'e')) {
446
	$template->set_var('DIR_U_E_CHECKED', 'checked');
447
}
448
if(extract_permission(STRING_DIR_MODE, 'g', 'r')) {
449
	$template->set_var('DIR_G_R_CHECKED', 'checked');
450
}
451
if(extract_permission(STRING_DIR_MODE, 'g', 'w')) {
452
	$template->set_var('DIR_G_W_CHECKED', 'checked');
453
}
454
if(extract_permission(STRING_DIR_MODE, 'g', 'e')) {
455
	$template->set_var('DIR_G_E_CHECKED', 'checked');
456
}
457
if(extract_permission(STRING_DIR_MODE, 'o', 'r')) {
458
	$template->set_var('DIR_O_R_CHECKED', 'checked');
459
}
460
if(extract_permission(STRING_DIR_MODE, 'o', 'w')) {
461
	$template->set_var('DIR_O_W_CHECKED', 'checked');
462
}
463
if(extract_permission(STRING_DIR_MODE, 'o', 'e')) {
464
	$template->set_var('DIR_O_E_CHECKED', 'checked');
465
}
466
467
// Insert WYSIWYG style value into template
468
$template->set_var('WYSIWYG_STYLE', stripslashes(WYSIWYG_STYLE));
469
470
// Insert Server Email value into template
471
$template->set_var('SERVER_EMAIL', SERVER_EMAIL);
472
473
// Insert language headings
474
$template->set_var(array(
475
								'HEADING_GENERAL_SETTINGS' => $HEADING['GENERAL_SETTINGS'],
476
								'HEADING_DEFAULT_SETTINGS' => $HEADING['DEFAULT_SETTINGS'],
477
								'HEADING_SEARCH_SETTINGS' => $HEADING['SEARCH_SETTINGS'],
478
								'HEADING_FILESYSTEM_SETTINGS' => $HEADING['FILESYSTEM_SETTINGS']
479
								)
480
						);
481
// Insert language text and messages
482
$template->set_var(array(
483
								'TEXT_WEBSITE_TITLE' => $TEXT['WEBSITE_TITLE'],
484
								'TEXT_WEBSITE_DESCRIPTION' => $TEXT['WEBSITE_DESCRIPTION'],
485
								'TEXT_WEBSITE_KEYWORDS' => $TEXT['WEBSITE_KEYWORDS'],
486
								'TEXT_WEBSITE_HEADER' => $TEXT['WEBSITE_HEADER'],
487
								'TEXT_WEBSITE_FOOTER' => $TEXT['WEBSITE_FOOTER'],
488
								'TEXT_HEADER' => $TEXT['HEADER'],
489
								'TEXT_FOOTER' => $TEXT['FOOTER'],
490
								'TEXT_VISIBILITY' => $TEXT['VISIBILITY'],
491
								'TEXT_RESULTS_HEADER' => $TEXT['RESULTS_HEADER'],
492
								'TEXT_RESULTS_LOOP' => $TEXT['RESULTS_LOOP'],
493
								'TEXT_RESULTS_FOOTER' => $TEXT['RESULTS_FOOTER'],
494
								'TEXT_NO_RESULTS' => $TEXT['NO_RESULTS'],
495
								'TEXT_TEXT' => $TEXT['TEXT'],
496
								'TEXT_DEFAULT' => $TEXT['DEFAULT'],
497
								'TEXT_LANGUAGE' => $TEXT['LANGUAGE'],
498
								'TEXT_TIMEZONE' => $TEXT['TIMEZONE'],
499
								'TEXT_DATE_FORMAT' => $TEXT['DATE_FORMAT'],
500
								'TEXT_TIME_FORMAT' => $TEXT['TIME_FORMAT'],
501
								'TEXT_TEMPLATE' => $TEXT['TEMPLATE'],
502
								'TEXT_PAGE_LEVEL_LIMIT' => $TEXT['PAGE_LEVEL_LIMIT'],
503
								'TEXT_INTRO_PAGE' => $TEXT['INTRO_PAGE'],
504
								'TEXT_FRONTEND' => $TEXT['FRONTEND'],
505
								'TEXT_LOGIN' => $TEXT['LOGIN'],
506
								'TEXT_SIGNUP' => $TEXT['SIGNUP'],
507
								'TEXT_PHP_ERROR_LEVEL' => $TEXT['PHP_ERROR_LEVEL'],
508
								'TEXT_PAGE_EXTENSION' => $TEXT['PAGE_EXTENSION'],
509
								'TEXT_PAGE_SPACER' => $TEXT['PAGE_SPACER'],
510
								'TEXT_SERVER_OPERATING_SYSTEM' => $TEXT['SERVER_OPERATING_SYSTEM'],
511
								'TEXT_LINUX_UNIX_BASED' => $TEXT['LINUX_UNIX_BASED'],
512
								'TEXT_WINDOWS' => $TEXT['WINDOWS'],
513
								'TEXT_ADMIN' => $TEXT['ADMIN'],
514
								'TEXT_TYPE' => $TEXT['TYPE'],
515
								'TEXT_DATABASE' => $TEXT['DATABASE'],
516
								'TEXT_HOST' => $TEXT['HOST'],
517
								'TEXT_USERNAME' => $TEXT['USERNAME'],
518
								'TEXT_PASSWORD' => $TEXT['PASSWORD'],
519
								'TEXT_NAME' => $TEXT['NAME'],
520
								'TEXT_TABLE_PREFIX' => $TEXT['TABLE_PREFIX'],
521
								'TEXT_SAVE' => $TEXT['SAVE'],
522
								'TEXT_RESET' => $TEXT['RESET'],
523
								'TEXT_CHANGES' => $TEXT['CHANGES'],
524
								'TEXT_ENABLED' => $TEXT['ENABLED'],
525
								'TEXT_DISABLED' => $TEXT['DISABLED'],
526
								'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'],
527
								'TEXT_MANAGE' => $TEXT['MANAGE'],
528
								'TEXT_SEARCH' => $TEXT['SEARCH'],
529
								'TEXT_PUBLIC' => $TEXT['PUBLIC'],
530
								'TEXT_PRIVATE' => $TEXT['PRIVATE'],
531
								'TEXT_REGISTERED' => $TEXT['REGISTERED'],
532
								'TEXT_NONE' => $TEXT['NONE'],
533
								'TEXT_FILES' => strtoupper(substr($TEXT['FILES'], 0, 1)).substr($TEXT['FILES'], 1),
534
								'TEXT_DIRECTORIES' => $TEXT['DIRECTORIES'],
535
								'TEXT_FILESYSTEM_PERMISSIONS' => $TEXT['FILESYSTEM_PERMISSIONS'],
536
								'TEXT_USER' => $TEXT['USER'],
537
								'TEXT_GROUP' => $TEXT['GROUP'],
538
								'TEXT_OTHERS' => $TEXT['OTHERS'],
539
								'TEXT_READ' => $TEXT['READ'],
540
								'TEXT_WRITE' => $TEXT['WRITE'],
541
								'TEXT_EXECUTE' => $TEXT['EXECUTE'],
542
								'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'],
543
								'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'],
544
								'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'],
545
								'TEXT_PAGE_LANGUAGES' => $TEXT['PAGE_LANGUAGES'],
546
								'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'],
547
								'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
548
								'TEXT_PAGE_TRASH' => $TEXT['PAGE_TRASH'],
549
								'TEXT_INLINE' => $TEXT['INLINE'],
550
								'TEXT_SEPARATE' => $TEXT['SEPARATE'],
551
								'TEXT_HOME_FOLDERS' => $TEXT['HOME_FOLDERS'],
552
								'TEXT_WYSIWYG_STYLE' => $TEXT['WYSIWYG_STYLE'],
553
								'TEXT_SERVER_EMAIL' => $TEXT['SERVER_EMAIL'],
554
								'TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS' => $TEXT['WORLD_WRITEABLE_FILE_PERMISSIONS'],
555
								'MODE_SWITCH_WARNING' => $MESSAGE['SETTINGS']['MODE_SWITCH_WARNING'],
556
								'WORLD_WRITEABLE_WARNING' => $MESSAGE['SETTINGS']['WORLD_WRITEABLE_WARNING']
557
								)
558
						);
559
560
// Parse template objects output
561
$template->parse('main', 'main_block', false);
562
$template->pparse('output', 'page');
563
564
$admin->print_footer();
565
566
?>