Project

General

Profile

1
<?php
2

    
3
// $Id: index.php 119 2005-09-17 10:16:15Z stefan $
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
// Include the WB functions file
35
require_once(WB_PATH.'/framework/functions.php');
36

    
37
// Create new template object
38
$template = new Template(ADMIN_PATH.'/settings');
39
$template->set_file('page', 'template.html');
40
$template->set_block('page', 'main_block', 'main');
41

    
42
// Query current settings in the db, then loop through them and print them
43
$query = "SELECT * FROM ".TABLE_PREFIX."settings";
44
$results = $database->query($query);
45
while($setting = $results->fetchRow()) {
46
	$setting_name = $setting['name'];
47
	$setting_value = htmlspecialchars($setting['value']);
48
	$template->set_var(strtoupper($setting_name),$setting_value);
49
}
50

    
51
// Query current settings in the db, then loop through them and print them
52
$query = "SELECT * FROM ".TABLE_PREFIX."search WHERE extra = ''";
53
$results = $database->query($query);
54
while($setting = $results->fetchRow()) {
55
	$setting_name = $setting['name'];
56
	$setting_value = htmlspecialchars(($setting['value']));
57
	switch($setting_name) {
58
		// Search header
59
		case 'header':
60
			$template->set_var('SEARCH_HEADER', $setting_value);
61
		break;
62
		// Search results header
63
		case 'results_header':
64
			$template->set_var('SEARCH_RESULTS_HEADER', $setting_value);
65
		break;
66
		// Search results loop
67
		case 'results_loop':
68
			$template->set_var('SEARCH_RESULTS_LOOP', $setting_value);
69
		break;
70
		// Search results footer
71
		case 'results_footer':
72
			$template->set_var('SEARCH_RESULTS_FOOTER', $setting_value);
73
		break;
74
		// Search no results
75
		case 'no_results':
76
			$template->set_var('SEARCH_NO_RESULTS', $setting_value);
77
		break;
78
		// Search footer
79
		case 'footer':
80
			$template->set_var('SEARCH_FOOTER', $setting_value);
81
		break;
82
		// Search template
83
		case 'template':
84
			$search_template = $setting_value;
85
		break;
86
	}
87
}
88

    
89
// Do the same for settings stored in config file as with ones in db
90
$database_type = '';
91

    
92
// Tell the browser whether or not to show advanced options
93
if(isset($_GET['advanced']) AND $_GET['advanced'] == 'yes') {
94
	$template->set_var('DISPLAY_ADVANCED', '');
95
	$template->set_var('ADVANCED', 'yes');
96
	$template->set_var('ADVANCED_BUTTON', '<< '.$TEXT['HIDE_ADVANCED']);
97
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=no');
98
	$template->set_var('BASIC_FILE_PERMS_ID', 'hide');
99
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
100
} else {
101
	$template->set_var('DISPLAY_ADVANCED', 'none');
102
	$template->set_var('ADVANCED', 'no');
103
	$template->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
104
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
105
	$template->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
106
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
107
}
108

    
109
$template->set_var(array(	
110
									'PAGES_DIRECTORY' => PAGES_DIRECTORY,
111
									'MEDIA_DIRECTORY' => MEDIA_DIRECTORY,
112
									'PAGE_EXTENSION' => PAGE_EXTENSION,
113
									'PAGE_SPACER' => PAGE_SPACER,
114
									'WB_PATH' => WB_PATH,
115
									'WB_URL' => WB_URL,
116
									'ADMIN_PATH' => ADMIN_PATH,
117
									'ADMIN_URL' => ADMIN_URL,
118
									'DATABASE_TYPE' => DB_TYPE,
119
									'DATABASE_HOST' => DB_HOST,
120
									'DATABASE_USERNAME' => DB_USERNAME,
121
									'DATABASE_NAME' => DB_NAME,
122
									'TABLE_PREFIX' => TABLE_PREFIX
123
								 )
124
						 );
125

    
126
// Insert groups into signup list
127
$template->set_block('main_block', 'tool_list_block', 'tool_list');
128
$results = $database->query("SELECT * FROM ".TABLE_PREFIX."modules WHERE type = 'tool'");
129
$tool_list_empty=true;
130
if($results->numRows() > 0) {
131
	while($tool = $results->fetchRow()) {
132
		$template->set_var('LINK', '<a href="'.ADMIN_URL.'/settings/tool.php?tool='.$tool['directory'].'">'.$tool['name'].'</a>');
133
	}
134
} else {
135
	$template->set_var('LINK', $TEXT['NONE_FOUND']);
136
}
137
$template->parse('tool_list', 'tool_list_block', true);
138

    
139

    
140
// Insert language values
141
$template->set_block('main_block', 'language_list_block', 'language_list');
142
if($handle = opendir(WB_PATH.'/languages/')) {
143
   while (false !== ($file = readdir($handle))) {
144
		if($file != '.' AND $file != '..' AND !is_dir($file) AND $file != 'index.php') {
145
			// Get language name
146
			require(WB_PATH.'/languages/'.$file);
147
			// Insert code and name
148
			$template->set_var(array(
149
											'CODE' => $language_code,
150
											'NAME' => $language_name
151
											)
152
									);
153
			// Check if it is selected
154
			if(DEFAULT_LANGUAGE == $language_code) {
155
				$template->set_var('SELECTED', ' selected');
156
			} else {
157
				$template->set_var('SELECTED', '');
158
			}
159
			$template->parse('language_list', 'language_list_block', true);
160
		}
161
	}
162
	// Restore language to original file
163
	require(WB_PATH.'/languages/'.LANGUAGE.'.php');
164
}
165

    
166
// Insert default timezone values
167
require(ADMIN_PATH.'/interface/timezones.php');
168
$template->set_block('main_block', 'timezone_list_block', 'timezone_list');
169
foreach($TIMEZONES AS $hour_offset => $title) {
170
	// Make sure we dont list "System Default" as we are setting this value!
171
	if($hour_offset != '-20') {
172
		$template->set_var('VALUE', $hour_offset);
173
		$template->set_var('NAME', $title);
174
		if(DEFAULT_TIMEZONE == $hour_offset*60*60) {
175
			$template->set_var('SELECTED', 'selected');
176
		} else {
177
			$template->set_var('SELECTED', '');
178
		}
179
		$template->parse('timezone_list', 'timezone_list_block', true);
180
	}
181
}
182

    
183
// Insert date format list
184
require(ADMIN_PATH.'/interface/date_formats.php');
185
$template->set_block('main_block', 'date_format_list_block', 'date_format_list');
186
foreach($DATE_FORMATS AS $format => $title) {
187
	$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
188
	if($format != 'system_default') {
189
		$template->set_var('VALUE', $format);
190
	} else {
191
		$template->set_var('VALUE', '');
192
	}
193
	$template->set_var('NAME', $title);
194
	if(DEFAULT_DATE_FORMAT == $format) {
195
		$template->set_var('SELECTED', 'selected');
196
	} else {
197
		$template->set_var('SELECTED', '');
198
	}
199
	$template->parse('date_format_list', 'date_format_list_block', true);
200
}
201

    
202
// Insert time format list
203
require(ADMIN_PATH.'/interface/time_formats.php');
204
$template->set_block('main_block', 'time_format_list_block', 'time_format_list');
205
foreach($TIME_FORMATS AS $format => $title) {
206
	$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
207
	if($format != 'system_default') {
208
		$template->set_var('VALUE', $format);
209
	} else {
210
		$template->set_var('VALUE', '');
211
	}
212
	$template->set_var('NAME', $title);
213
	if(DEFAULT_TIME_FORMAT == $format) {
214
		$template->set_var('SELECTED', 'selected');
215
	} else {
216
		$template->set_var('SELECTED', '');
217
	}
218
	$template->parse('time_format_list', 'time_format_list_block', true);
219
}
220

    
221
// Insert templates
222
$template->set_block('main_block', 'template_list_block', 'template_list');
223
if($handle = opendir(WB_PATH.'/templates/')) {
224
	while (false !== ($file = readdir($handle))) {
225
		if($file != "." AND $file != ".." AND $file != ".svn" AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) {
226
			include(WB_PATH."/templates/$file/info.php");
227
			$template->set_var('FILE', $file);
228
			$template->set_var('NAME', $template_name);
229
			if($file == DEFAULT_TEMPLATE ? $selected = ' selected' : $selected = '');
230
			$template->set_var('SELECTED', $selected);
231
			$template->parse('template_list', 'template_list_block', true);
232
		}
233
	}
234
}
235

    
236
// Insert templates
237
$template->set_block('main_block', 'editor_list_block', 'editor_list');
238
$file='none';
239
$module_name='None';
240
$template->set_var('FILE', $file);
241
$template->set_var('NAME', $module_name);
242
if((!defined('WYSIWYG_EDITOR') OR $file == WYSIWYG_EDITOR) ? $selected = ' selected' : $selected = '');
243
$template->set_var('SELECTED', $selected);
244
$template->parse('editor_list', 'editor_list_block', true);
245
if($handle = opendir(WB_PATH.'/modules/')) {
246
	while (false !== ($file = readdir($handle))) {
247
		if($file != "." AND $file != ".." AND $file != ".svn" AND is_dir(WB_PATH."/modules/$file") AND file_exists(WB_PATH."/modules/$file/info.php")) {
248
			include(WB_PATH."/modules/$file/info.php");
249
			if ($module_type == 'WYSIWYG') {
250
				$template->set_var('FILE', $file);
251
				$template->set_var('NAME', $module_name);
252
				if((defined('WYSIWYG_EDITOR') AND $file == WYSIWYG_EDITOR) ? $selected = ' selected' : $selected = '');
253
				$template->set_var('SELECTED', $selected);
254
				$template->parse('editor_list', 'editor_list_block', true);
255
			}
256
		}
257
	}
258
}
259

    
260

    
261
// Insert templates for search settings
262
$template->set_block('main_block', 'search_template_list_block', 'search_template_list');
263
if($search_template == '') { $selected = ' selected'; } else { $selected = ''; }
264
$template->set_var(array('FILE' => '', 'NAME' => $TEXT['SYSTEM_DEFAULT'], 'SELECTED' => $selected));
265
$template->parse('search_template_list', 'search_template_list_block', true);
266
if($handle = opendir(WB_PATH.'/templates/')) {
267
	while (false !== ($file = readdir($handle))) {
268
		if($file != "." AND $file != ".." AND $file != ".svn" AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) {
269
			include(WB_PATH."/templates/$file/info.php");
270
			$template->set_var('FILE', $file);
271
			$template->set_var('NAME', $template_name);
272
			if($file == $search_template ? $selected = ' selected' : $selected = '');
273
			$template->set_var('SELECTED', $selected);
274
			$template->parse('search_template_list', 'search_template_list_block', true);
275
		}
276
	}
277
}
278

    
279
// Insert default error reporting values
280
require(ADMIN_PATH.'/interface/er_levels.php');
281
$template->set_block('main_block', 'error_reporting_list_block', 'error_reporting_list');
282
foreach($ER_LEVELS AS $value => $title) {
283
	$template->set_var('VALUE', $value);
284
	$template->set_var('NAME', $title);
285
	if(ER_LEVEL == $value) {
286
		$template->set_var('SELECTED', 'selected');
287
	} else {
288
		$template->set_var('SELECTED', '');
289
	}
290
	$template->parse('error_reporting_list', 'error_reporting_list_block', true);
291
}
292

    
293
// Insert permissions values
294
if($admin->get_permission('settings_advanced') != true) {
295
	$template->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
296
}
297

    
298
// Insert page level limits
299
$template->set_block('main_block', 'page_level_limit_list_block', 'page_level_limit_list');
300
for($i = 1; $i <= 10; $i++) {
301
	$template->set_var('NUMBER', $i);
302
	if(PAGE_LEVEL_LIMIT == $i) {
303
		$template->set_var('SELECTED', 'selected');
304
	} else {
305
		$template->set_var('SELECTED', '');
306
	}
307
	$template->parse('page_level_limit_list', 'page_level_limit_list_block', true);
308
}
309

    
310
// Work-out if multiple menus feature is enabled
311
if(defined('MULTIPLE_MENUS') AND MULTIPLE_MENUS == true) {
312
	$template->set_var('MULTIPLE_MENUS_ENABLED', ' checked');
313
} else {
314
	$template->set_var('MULTIPLE_MENUS_DISABLED', ' checked');
315
}
316

    
317
// Work-out if page languages feature is enabled
318
if(defined('PAGE_LANGUAGES') AND PAGE_LANGUAGES == true) {
319
	$template->set_var('PAGE_LANGUAGES_ENABLED', ' checked');
320
} else {
321
	$template->set_var('PAGE_LANGUAGES_DISABLED', ' checked');
322
}
323

    
324
// Work-out if smart login feature is enabled
325
if(defined('SMART_LOGIN') AND SMART_LOGIN == true) {
326
	$template->set_var('SMART_LOGIN_ENABLED', ' checked');
327
} else {
328
	$template->set_var('SMART_LOGIN_DISABLED', ' checked');
329
}
330

    
331
// Work-out if section blocks feature is enabled
332
if(defined('SECTION_BLOCKS') AND SECTION_BLOCKS == true) {
333
	$template->set_var('SECTION_BLOCKS_ENABLED', ' checked');
334
} else {
335
	$template->set_var('SECTION_BLOCKS_DISABLED', ' checked');
336
}
337

    
338
// Work-out if homepage redirection feature is enabled
339
if(defined('HOMEPAGE_REDIRECTION') AND HOMEPAGE_REDIRECTION == true) {
340
	$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', ' checked');
341
} else {
342
	$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', ' checked');
343
}
344

    
345
// Work-out which server os should be checked
346
if(OPERATING_SYSTEM == 'linux') {
347
	$template->set_var('LINUX_SELECTED', ' checked');
348
} elseif(OPERATING_SYSTEM == 'windows') {
349
	$template->set_var('WINDOWS_SELECTED', ' checked');
350
}
351

    
352
// Work-out if manage sections feature is enabled
353
if(MANAGE_SECTIONS) {
354
	$template->set_var('MANAGE_SECTIONS_ENABLED', ' checked');
355
} else {
356
	$template->set_var('MANAGE_SECTIONS_DISABLED', ' checked');
357
}
358

    
359
// Work-out if intro feature is enabled
360
if(INTRO_PAGE) {
361
	$template->set_var('INTRO_PAGE_ENABLED', ' checked');
362
} else {
363
	$template->set_var('INTRO_PAGE_DISABLED', ' checked');
364
}
365

    
366
// Work-out if frontend login feature is enabled
367
if(FRONTEND_LOGIN) {
368
	$template->set_var('PRIVATE_ENABLED', ' checked');
369
} else {
370
	$template->set_var('PRIVATE_DISABLED', ' checked');
371
}
372

    
373
// Work-out if page trash feature is disabled, in-line, or separate
374
if(PAGE_TRASH == 'disabled') {
375
	$template->set_var('PAGE_TRASH_DISABLED', ' checked');
376
} elseif(PAGE_TRASH == 'inline') {
377
	$template->set_var('PAGE_TRASH_INLINE', ' checked');
378
} elseif(PAGE_TRASH == 'separate') {
379
	$template->set_var('PAGE_TRASH_SEPARATE', ' checked');
380
}
381

    
382
// Work-out if media home folde feature is enabled
383
if(HOME_FOLDERS) {
384
	$template->set_var('HOME_FOLDERS_ENABLED', ' checked');
385
} else {
386
	$template->set_var('HOME_FOLDERS_DISABLED', ' checked');
387
}
388

    
389
// Insert search select
390
if(SEARCH == 'private') {
391
	$template->set_var('PRIVATE_SEARCH', 'selected');
392
} elseif(SEARCH == 'registered') {
393
	$template->set_var('REGISTERED_SEARCH', 'selected');
394
} elseif(SEARCH == 'none') {
395
	$template->set_var('NONE_SEARCH', 'selected');
396
}
397

    
398
// Work-out if 777 permissions are set
399
if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777') {
400
	$template->set_var('WORLD_WRITEABLE_SELECTED', ' checked');
401
}
402

    
403
// Work-out which file mode boxes are checked
404
if(extract_permission(STRING_FILE_MODE, 'u', 'r')) {
405
	$template->set_var('FILE_U_R_CHECKED', 'checked');
406
}
407
if(extract_permission(STRING_FILE_MODE, 'u', 'w')) {
408
	$template->set_var('FILE_U_W_CHECKED', 'checked');
409
}
410
if(extract_permission(STRING_FILE_MODE, 'u', 'e')) {
411
	$template->set_var('FILE_U_E_CHECKED', 'checked');
412
}
413
if(extract_permission(STRING_FILE_MODE, 'g', 'r')) {
414
	$template->set_var('FILE_G_R_CHECKED', 'checked');
415
}
416
if(extract_permission(STRING_FILE_MODE, 'g', 'w')) {
417
	$template->set_var('FILE_G_W_CHECKED', 'checked');
418
}
419
if(extract_permission(STRING_FILE_MODE, 'g', 'e')) {
420
	$template->set_var('FILE_G_E_CHECKED', 'checked');
421
}
422
if(extract_permission(STRING_FILE_MODE, 'o', 'r')) {
423
	$template->set_var('FILE_O_R_CHECKED', 'checked');
424
}
425
if(extract_permission(STRING_FILE_MODE, 'o', 'w')) {
426
	$template->set_var('FILE_O_W_CHECKED', 'checked');
427
}
428
if(extract_permission(STRING_FILE_MODE, 'o', 'e')) {
429
	$template->set_var('FILE_O_E_CHECKED', 'checked');
430
}
431
// Work-out which dir mode boxes are checked
432
if(extract_permission(STRING_DIR_MODE, 'u', 'r')) {
433
	$template->set_var('DIR_U_R_CHECKED', 'checked');
434
}
435
if(extract_permission(STRING_DIR_MODE, 'u', 'w')) {
436
	$template->set_var('DIR_U_W_CHECKED', 'checked');
437
}
438
if(extract_permission(STRING_DIR_MODE, 'u', 'e')) {
439
	$template->set_var('DIR_U_E_CHECKED', 'checked');
440
}
441
if(extract_permission(STRING_DIR_MODE, 'g', 'r')) {
442
	$template->set_var('DIR_G_R_CHECKED', 'checked');
443
}
444
if(extract_permission(STRING_DIR_MODE, 'g', 'w')) {
445
	$template->set_var('DIR_G_W_CHECKED', 'checked');
446
}
447
if(extract_permission(STRING_DIR_MODE, 'g', 'e')) {
448
	$template->set_var('DIR_G_E_CHECKED', 'checked');
449
}
450
if(extract_permission(STRING_DIR_MODE, 'o', 'r')) {
451
	$template->set_var('DIR_O_R_CHECKED', 'checked');
452
}
453
if(extract_permission(STRING_DIR_MODE, 'o', 'w')) {
454
	$template->set_var('DIR_O_W_CHECKED', 'checked');
455
}
456
if(extract_permission(STRING_DIR_MODE, 'o', 'e')) {
457
	$template->set_var('DIR_O_E_CHECKED', 'checked');
458
}
459

    
460
// Insert Server Email value into template
461
$template->set_var('SERVER_EMAIL', SERVER_EMAIL);
462

    
463
// Insert groups into signup list
464
$template->set_block('main_block', 'tool_list_block', 'tool_list');
465
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
466
if($results->numRows() > 0) {
467
	while($group = $results->fetchRow()) {
468
		$template->set_var('ID', $group['group_id']);
469
		$template->set_var('NAME', $group['name']);
470
		if(FRONTEND_SIGNUP == $group['group_id']) {
471
			$template->set_var('SELECTED', 'selected');
472
		} else {
473
			$template->set_var('SELECTED', '');
474
		}
475
		$template->parse('group_list', 'group_list_block', true);
476
	}
477
} else {
478
	$template->set_var('ID', 'disabled');
479
	$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
480
	$template->parse('group_list', 'group_list_block', true);
481
}
482

    
483
// Insert language headings
484
$template->set_var(array(
485
								'HEADING_GENERAL_SETTINGS' => $HEADING['GENERAL_SETTINGS'],
486
								'HEADING_DEFAULT_SETTINGS' => $HEADING['DEFAULT_SETTINGS'],
487
								'HEADING_SEARCH_SETTINGS' => $HEADING['SEARCH_SETTINGS'],
488
								'HEADING_SERVER_SETTINGS' => $HEADING['SERVER_SETTINGS'],
489
								'HEADING_ADMINISTRATION_TOOLS' => $HEADING['ADMINISTRATION_TOOLS']
490
								)
491
						);
492
// Insert language text and messages
493
$template->set_var(array(
494
								'TEXT_WEBSITE_TITLE' => $TEXT['WEBSITE_TITLE'],
495
								'TEXT_WEBSITE_DESCRIPTION' => $TEXT['WEBSITE_DESCRIPTION'],
496
								'TEXT_WEBSITE_KEYWORDS' => $TEXT['WEBSITE_KEYWORDS'],
497
								'TEXT_WEBSITE_HEADER' => $TEXT['WEBSITE_HEADER'],
498
								'TEXT_WEBSITE_FOOTER' => $TEXT['WEBSITE_FOOTER'],
499
								'TEXT_HEADER' => $TEXT['HEADER'],
500
								'TEXT_FOOTER' => $TEXT['FOOTER'],
501
								'TEXT_VISIBILITY' => $TEXT['VISIBILITY'],
502
								'TEXT_RESULTS_HEADER' => $TEXT['RESULTS_HEADER'],
503
								'TEXT_RESULTS_LOOP' => $TEXT['RESULTS_LOOP'],
504
								'TEXT_RESULTS_FOOTER' => $TEXT['RESULTS_FOOTER'],
505
								'TEXT_NO_RESULTS' => $TEXT['NO_RESULTS'],
506
								'TEXT_TEXT' => $TEXT['TEXT'],
507
								'TEXT_DEFAULT' => $TEXT['DEFAULT'],
508
								'TEXT_LANGUAGE' => $TEXT['LANGUAGE'],
509
								'TEXT_TIMEZONE' => $TEXT['TIMEZONE'],
510
								'TEXT_DATE_FORMAT' => $TEXT['DATE_FORMAT'],
511
								'TEXT_TIME_FORMAT' => $TEXT['TIME_FORMAT'],
512
								'TEXT_TEMPLATE' => $TEXT['TEMPLATE'],
513
								'TEXT_EDITOR' => $TEXT['WYSIWYG_EDITOR'],
514
								'TEXT_PAGE_LEVEL_LIMIT' => $TEXT['PAGE_LEVEL_LIMIT'],
515
								'TEXT_INTRO_PAGE' => $TEXT['INTRO_PAGE'],
516
								'TEXT_FRONTEND' => $TEXT['FRONTEND'],
517
								'TEXT_LOGIN' => $TEXT['LOGIN'],
518
								'TEXT_SIGNUP' => $TEXT['SIGNUP'],
519
								'TEXT_PHP_ERROR_LEVEL' => $TEXT['PHP_ERROR_LEVEL'],
520
								'TEXT_PAGES_DIRECTORY' => $TEXT['PAGES_DIRECTORY'],
521
								'TEXT_MEDIA_DIRECTORY' => $TEXT['MEDIA_DIRECTORY'],
522
								'TEXT_PAGE_EXTENSION' => $TEXT['PAGE_EXTENSION'],
523
								'TEXT_PAGE_SPACER' => $TEXT['PAGE_SPACER'],
524
								'TEXT_RENAME_FILES_ON_UPLOAD' => $TEXT['RENAME_FILES_ON_UPLOAD'],
525
								'TEXT_APP_NAME' => $TEXT['APP_NAME'],
526
								'TEXT_SERVER_OPERATING_SYSTEM' => $TEXT['SERVER_OPERATING_SYSTEM'],
527
								'TEXT_LINUX_UNIX_BASED' => $TEXT['LINUX_UNIX_BASED'],
528
								'TEXT_WINDOWS' => $TEXT['WINDOWS'],
529
								'TEXT_ADMIN' => $TEXT['ADMIN'],
530
								'TEXT_TYPE' => $TEXT['TYPE'],
531
								'TEXT_DATABASE' => $TEXT['DATABASE'],
532
								'TEXT_HOST' => $TEXT['HOST'],
533
								'TEXT_USERNAME' => $TEXT['USERNAME'],
534
								'TEXT_PASSWORD' => $TEXT['PASSWORD'],
535
								'TEXT_NAME' => $TEXT['NAME'],
536
								'TEXT_TABLE_PREFIX' => $TEXT['TABLE_PREFIX'],
537
								'TEXT_SAVE' => $TEXT['SAVE'],
538
								'TEXT_RESET' => $TEXT['RESET'],
539
								'TEXT_CHANGES' => $TEXT['CHANGES'],
540
								'TEXT_ENABLED' => $TEXT['ENABLED'],
541
								'TEXT_DISABLED' => $TEXT['DISABLED'],
542
								'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'],
543
								'TEXT_MANAGE' => $TEXT['MANAGE'],
544
								'TEXT_SEARCH' => $TEXT['SEARCH'],
545
								'TEXT_PUBLIC' => $TEXT['PUBLIC'],
546
								'TEXT_PRIVATE' => $TEXT['PRIVATE'],
547
								'TEXT_REGISTERED' => $TEXT['REGISTERED'],
548
								'TEXT_NONE' => $TEXT['NONE'],
549
								'TEXT_FILES' => strtoupper(substr($TEXT['FILES'], 0, 1)).substr($TEXT['FILES'], 1),
550
								'TEXT_DIRECTORIES' => $TEXT['DIRECTORIES'],
551
								'TEXT_FILESYSTEM_PERMISSIONS' => $TEXT['FILESYSTEM_PERMISSIONS'],
552
								'TEXT_USER' => $TEXT['USER'],
553
								'TEXT_GROUP' => $TEXT['GROUP'],
554
								'TEXT_OTHERS' => $TEXT['OTHERS'],
555
								'TEXT_READ' => $TEXT['READ'],
556
								'TEXT_WRITE' => $TEXT['WRITE'],
557
								'TEXT_EXECUTE' => $TEXT['EXECUTE'],
558
								'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'],
559
								'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'],
560
								'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'],
561
								'TEXT_PAGE_LANGUAGES' => $TEXT['PAGE_LANGUAGES'],
562
								'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'],
563
								'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
564
								'TEXT_PAGE_TRASH' => $TEXT['PAGE_TRASH'],
565
								'TEXT_INLINE' => $TEXT['INLINE'],
566
								'TEXT_SEPARATE' => $TEXT['SEPARATE'],
567
								'TEXT_HOME_FOLDERS' => $TEXT['HOME_FOLDERS'],
568
								'TEXT_WYSIWYG_STYLE' => $TEXT['WYSIWYG_STYLE'],
569
								'TEXT_SERVER_EMAIL' => $TEXT['SERVER_EMAIL'],
570
								'TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS' => $TEXT['WORLD_WRITEABLE_FILE_PERMISSIONS'],
571
								'MODE_SWITCH_WARNING' => $MESSAGE['SETTINGS']['MODE_SWITCH_WARNING'],
572
								'WORLD_WRITEABLE_WARNING' => $MESSAGE['SETTINGS']['WORLD_WRITEABLE_WARNING']
573
								)
574
						);
575

    
576
// Parse template objects output
577
$template->parse('main', 'main_block', false);
578
$template->pparse('output', 'page');
579

    
580
$admin->print_footer();
581

    
582
?>
(1-1/3)