Project

General

Profile

1
<?php
2

    
3
// $Id: index.php 944 2009-02-22 09:39:58Z Ruebenwurzel $
4

    
5
/*
6

    
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2009, 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
require_once(WB_PATH.'/framework/functions-utf8.php');
37

    
38
// Create new template object
39
$template = new Template(THEME_PATH.'/templates');
40
$template->set_file('page', 'settings.htt');
41
$template->set_block('page', 'main_block', 'main');
42

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

    
52
// Query current settings in the db, then loop through them and print them
53
$query = "SELECT * FROM ".TABLE_PREFIX."search WHERE extra = ''";
54
$results = $database->query($query);
55
while($setting = $results->fetchRow()) {
56
	$setting_name = $setting['name'];
57
	$setting_value = htmlspecialchars(($setting['value']));
58
	switch($setting_name) {
59
		// Search header
60
		case 'header':
61
			$template->set_var('SEARCH_HEADER', $setting_value);
62
		break;
63
		// Search results header
64
		case 'results_header':
65
			$template->set_var('SEARCH_RESULTS_HEADER', $setting_value);
66
		break;
67
		// Search results loop
68
		case 'results_loop':
69
			$template->set_var('SEARCH_RESULTS_LOOP', $setting_value);
70
		break;
71
		// Search results footer
72
		case 'results_footer':
73
			$template->set_var('SEARCH_RESULTS_FOOTER', $setting_value);
74
		break;
75
		// Search no results
76
		case 'no_results':
77
			$template->set_var('SEARCH_NO_RESULTS', $setting_value);
78
		break;
79
		// Search footer
80
		case 'footer':
81
			$template->set_var('SEARCH_FOOTER', $setting_value);
82
		break;
83
		// Search module-order
84
		case 'module_order':
85
			$template->set_var('SEARCH_MODULE_ORDER', $setting_value);
86
		break;
87
		// Search max lines of excerpt
88
		case 'max_excerpt':
89
			$template->set_var('SEARCH_MAX_EXCERPT', $setting_value);
90
		break;
91
		// time-limit
92
		case 'time_limit':
93
			$template->set_var('SEARCH_TIME_LIMIT', $setting_value);
94
		break;
95
		// Search template
96
		case 'template':
97
			$search_template = $setting_value;
98
		break;
99
	}
100
}
101

    
102
// Do the same for settings stored in config file as with ones in db
103
$database_type = '';
104

    
105
// Tell the browser whether or not to show advanced options
106
if(isset($_GET['advanced']) AND $_GET['advanced'] == 'yes') {
107
	$template->set_var('DISPLAY_ADVANCED', '');
108
	$template->set_var('ADVANCED', 'yes');
109
	$template->set_var('ADVANCED_BUTTON', '<< '.$TEXT['HIDE_ADVANCED']);
110
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=no');
111
	$template->set_var('BASIC_FILE_PERMS_ID', 'hide');
112
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
113
} else {
114
	$template->set_var('DISPLAY_ADVANCED', 'none');
115
	$template->set_var('ADVANCED', 'no');
116
	$template->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
117
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
118
	$template->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
119
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
120
}
121

    
122
$template->set_var(array(	
123
									'PAGES_DIRECTORY' => PAGES_DIRECTORY,
124
									'MEDIA_DIRECTORY' => MEDIA_DIRECTORY,
125
									'PAGE_EXTENSION' => PAGE_EXTENSION,
126
									'PAGE_SPACER' => PAGE_SPACER,
127
									'WB_PATH' => WB_PATH,
128
									'WB_URL' => WB_URL,
129
									'THEME_URL' => THEME_URL,
130
									'ADMIN_PATH' => ADMIN_PATH,
131
									'ADMIN_URL' => ADMIN_URL,
132
									'DATABASE_TYPE' => DB_TYPE,
133
									'DATABASE_HOST' => DB_HOST,
134
									'DATABASE_USERNAME' => DB_USERNAME,
135
									'DATABASE_NAME' => DB_NAME,
136
									'TABLE_PREFIX' => TABLE_PREFIX
137
								 )
138
						 );
139

    
140
// Insert language values
141
$template->set_block('main_block', 'language_list_block', 'language_list');
142
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'language' order by name");
143
if($result->numRows() > 0) {
144
	while($addon = $result->fetchRow()) {
145
		$l_codes[$addon['name']] = $addon['directory'];
146
		$l_names[$addon['name']] = entities_to_7bit($addon['name']); // sorting-problem workaround
147
	}
148
	asort($l_names);
149
	foreach($l_names as $l_name=>$v) {
150
		// Insert code and name
151
		$template->set_var(array(
152
								'CODE' => $l_codes[$l_name],
153
								'NAME' => $l_name
154
								));
155
		// Check if it is selected
156
		if(DEFAULT_LANGUAGE == $l_codes[$l_name]) {
157
			$template->set_var('SELECTED', ' selected');
158
		} else {
159
			$template->set_var('SELECTED', '');
160
		}
161
		$template->parse('language_list', 'language_list_block', true);
162
	}
163
}
164

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

    
182
// Insert default charset values
183
require(ADMIN_PATH.'/interface/charsets.php');
184
$template->set_block('main_block', 'charset_list_block', 'charset_list');
185
foreach($CHARSETS AS $code => $title) {
186
	$template->set_var('VALUE', $code);
187
	$template->set_var('NAME', $title);
188
	if(DEFAULT_CHARSET == $code) {
189
		$template->set_var('SELECTED', 'selected');
190
	} else {
191
		$template->set_var('SELECTED', '');
192
	}
193
	$template->parse('charset_list', 'charset_list_block', true);
194
}
195

    
196
// Insert date format list
197
require(ADMIN_PATH.'/interface/date_formats.php');
198
$template->set_block('main_block', 'date_format_list_block', 'date_format_list');
199
foreach($DATE_FORMATS AS $format => $title) {
200
	$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
201
	if($format != 'system_default') {
202
		$template->set_var('VALUE', $format);
203
	} else {
204
		$template->set_var('VALUE', '');
205
	}
206
	$template->set_var('NAME', $title);
207
	if(DEFAULT_DATE_FORMAT == $format) {
208
		$template->set_var('SELECTED', 'selected');
209
	} else {
210
		$template->set_var('SELECTED', '');
211
	}
212
	$template->parse('date_format_list', 'date_format_list_block', true);
213
}
214

    
215
// Insert time format list
216
require(ADMIN_PATH.'/interface/time_formats.php');
217
$template->set_block('main_block', 'time_format_list_block', 'time_format_list');
218
foreach($TIME_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_TIME_FORMAT == $format) {
227
		$template->set_var('SELECTED', 'selected');
228
	} else {
229
		$template->set_var('SELECTED', '');
230
	}
231
	$template->parse('time_format_list', 'time_format_list_block', true);
232
}
233

    
234
// Insert templates
235
$template->set_block('main_block', 'template_list_block', 'template_list');
236
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function != 'theme' order by name");
237
if($result->numRows() > 0) {
238
	while($addon = $result->fetchRow()) {
239
		$template->set_var('FILE', $addon['directory']);
240
		$template->set_var('NAME', $addon['name']);
241
		if(($addon['directory'] == DEFAULT_TEMPLATE) ? $selected = ' selected' : $selected = '');
242
		$template->set_var('SELECTED', $selected);
243
		$template->parse('template_list', 'template_list_block', true);
244
	}
245
}
246

    
247
// Insert backend theme
248
$template->set_block('main_block', 'theme_list_block', 'theme_list');
249
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'theme' order by name");
250
if($result->numRows() > 0) {
251
	while($addon = $result->fetchRow()) {
252
		$template->set_var('FILE', $addon['directory']);
253
		$template->set_var('NAME', $addon['name']);
254
		if(($addon['directory'] == DEFAULT_THEME) ? $selected = ' selected' : $selected = '');
255
		$template->set_var('SELECTED', $selected);
256
		$template->parse('theme_list', 'theme_list_block', true);
257
	}
258
}
259

    
260
// Insert WYSIWYG modules
261
$template->set_block('main_block', 'editor_list_block', 'editor_list');
262
$file='none';  
263
$module_name=$TEXT['NONE'];  
264
$template->set_var('FILE', $file);  
265
$template->set_var('NAME', $module_name);  
266
if((!defined('WYSIWYG_EDITOR') OR $file == WYSIWYG_EDITOR) ? $selected = ' selected' : $selected = '');  
267
$template->set_var('SELECTED', $selected);  
268
$template->parse('editor_list', 'editor_list_block', true);  
269
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'wysiwyg'");
270
if($result->numRows() > 0) {
271
	while($addon = $result->fetchRow()) {
272
		$template->set_var('FILE', $addon['directory']);
273
		$template->set_var('NAME', $addon['name']);
274
		if((defined('WYSIWYG_EDITOR') AND $addon['directory'] == WYSIWYG_EDITOR) ? $selected = ' selected' : $selected = '');
275
		$template->set_var('SELECTED', $selected);
276
		$template->parse('editor_list', 'editor_list_block', true);
277
	}
278
}
279

    
280
// Insert templates for search settings
281
$template->set_block('main_block', 'search_template_list_block', 'search_template_list');
282
if($search_template == '') { $selected = ' selected'; } else { $selected = ''; }
283
$template->set_var(array('FILE' => '', 'NAME' => $TEXT['SYSTEM_DEFAULT'], 'SELECTED' => $selected));
284
$template->parse('search_template_list', 'search_template_list_block', true);
285
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' order by name");
286
if($result->numRows() > 0) {
287
	while($addon = $result->fetchRow()) {
288
		$template->set_var('FILE', $addon['directory']);
289
		$template->set_var('NAME', $addon['name']);
290
		if($addon['directory'] == $search_template ? $selected = ' selected' : $selected = '');
291
		$template->set_var('SELECTED', $selected);
292
		$template->parse('search_template_list', 'search_template_list_block', true);
293
	}
294
}
295

    
296
// Insert default error reporting values
297
require(ADMIN_PATH.'/interface/er_levels.php');
298
$template->set_block('main_block', 'error_reporting_list_block', 'error_reporting_list');
299
foreach($ER_LEVELS AS $value => $title) {
300
	$template->set_var('VALUE', $value);
301
	$template->set_var('NAME', $title);
302
	if(ER_LEVEL == $value) {
303
		$template->set_var('SELECTED', 'selected');
304
	} else {
305
		$template->set_var('SELECTED', '');
306
	}
307
	$template->parse('error_reporting_list', 'error_reporting_list_block', true);
308
}
309

    
310
// Insert permissions values
311
if($admin->get_permission('settings_advanced') != true) {
312
	$template->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
313
}
314

    
315
// Insert page level limits
316
$template->set_block('main_block', 'page_level_limit_list_block', 'page_level_limit_list');
317
for($i = 1; $i <= 10; $i++) {
318
	$template->set_var('NUMBER', $i);
319
	if(PAGE_LEVEL_LIMIT == $i) {
320
		$template->set_var('SELECTED', 'selected');
321
	} else {
322
		$template->set_var('SELECTED', '');
323
	}
324
	$template->parse('page_level_limit_list', 'page_level_limit_list_block', true);
325
}
326

    
327
// Work-out if multiple menus feature is enabled
328
if(defined('MULTIPLE_MENUS') AND MULTIPLE_MENUS == true) {
329
	$template->set_var('MULTIPLE_MENUS_ENABLED', ' checked');
330
} else {
331
	$template->set_var('MULTIPLE_MENUS_DISABLED', ' checked');
332
}
333

    
334
// Work-out if page languages feature is enabled
335
if(defined('PAGE_LANGUAGES') AND PAGE_LANGUAGES == true) {
336
        $template->set_var('PAGE_LANGUAGES_ENABLED', ' checked');
337
} else {
338
        $template->set_var('PAGE_LANGUAGES_DISABLED', ' checked');
339
}
340

    
341
// Work-out if smart login feature is enabled
342
if(defined('SMART_LOGIN') AND SMART_LOGIN == true) {
343
	$template->set_var('SMART_LOGIN_ENABLED', ' checked');
344
} else {
345
	$template->set_var('SMART_LOGIN_DISABLED', ' checked');
346
}
347

    
348
if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) { /* Make's sure GD library is installed */
349
	$template->set_var('GD_EXTENSION_ENABLED', '');
350
} else {
351
	$template->set_var('GD_EXTENSION_ENABLED', 'none');
352
}
353

    
354
// Work-out if section blocks feature is enabled
355
if(defined('SECTION_BLOCKS') AND SECTION_BLOCKS == true) {
356
	$template->set_var('SECTION_BLOCKS_ENABLED', ' checked');
357
} else {
358
	$template->set_var('SECTION_BLOCKS_DISABLED', ' checked');
359
}
360

    
361
// Work-out if homepage redirection feature is enabled
362
if(defined('HOMEPAGE_REDIRECTION') AND HOMEPAGE_REDIRECTION == true) {
363
	$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', ' checked');
364
} else {
365
	$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', ' checked');
366
}
367

    
368
// Work-out which server os should be checked
369
if(OPERATING_SYSTEM == 'linux') {
370
	$template->set_var('LINUX_SELECTED', ' checked');
371
} elseif(OPERATING_SYSTEM == 'windows') {
372
	$template->set_var('WINDOWS_SELECTED', ' checked');
373
}
374

    
375
// Work-out if manage sections feature is enabled
376
if(MANAGE_SECTIONS) {
377
	$template->set_var('MANAGE_SECTIONS_ENABLED', ' checked');
378
} else {
379
	$template->set_var('MANAGE_SECTIONS_DISABLED', ' checked');
380
}
381

    
382
// Work-out which wbmailer routine should be checked
383
if(WBMAILER_ROUTINE == 'phpmail') {
384
	$template->set_var('PHPMAIL_SELECTED', ' checked');
385
	$template->set_var('SMTP_VISIBILITY', 'none');
386
	$template->set_var('SMTP_VISIBILITY_AUTH', 'none');
387
} elseif(WBMAILER_ROUTINE == 'smtp') {
388
	$template->set_var('SMTPMAIL_SELECTED', ' checked');
389
	$template->set_var('SMTP_VISIBILITY', '');
390
}
391

    
392
// Work-out if SMTP authentification should be checked
393
if(WBMAILER_SMTP_AUTH) {
394
	$template->set_var('SMTP_AUTH_SELECTED', ' checked');
395
	if(WBMAILER_ROUTINE == 'smtp') {
396
		$template->set_var('SMTP_VISIBILITY_AUTH', '');
397
	} else {
398
		$template->set_var('SMTP_VISIBILITY_AUTH', 'none');
399
	}
400
} else {
401
	$template->set_var('SMTP_VISIBILITY_AUTH', 'none');
402
}
403

    
404
// Work-out if intro feature is enabled
405
if(INTRO_PAGE) {
406
	$template->set_var('INTRO_PAGE_ENABLED', ' checked');
407
} else {
408
	$template->set_var('INTRO_PAGE_DISABLED', ' checked');
409
}
410

    
411
// Work-out if frontend login feature is enabled
412
if(FRONTEND_LOGIN) {
413
	$template->set_var('PRIVATE_ENABLED', ' checked');
414
} else {
415
	$template->set_var('PRIVATE_DISABLED', ' checked');
416
}
417

    
418
// Work-out if page trash feature is disabled, in-line, or separate
419
if(PAGE_TRASH == 'disabled') {
420
	$template->set_var('PAGE_TRASH_DISABLED', ' checked');
421
	$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', ' display: none;');
422
} elseif(PAGE_TRASH == 'inline') {
423
	$template->set_var('PAGE_TRASH_INLINE', ' checked');
424
	$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', ' display: none;');
425
} elseif(PAGE_TRASH == 'separate') {
426
	$template->set_var('PAGE_TRASH_SEPARATE', ' checked');
427
	$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', ' display: inline;');
428
}
429

    
430
// Work-out if media home folde feature is enabled
431
if(HOME_FOLDERS) {
432
	$template->set_var('HOME_FOLDERS_ENABLED', ' checked');
433
} else {
434
	$template->set_var('HOME_FOLDERS_DISABLED', ' checked');
435
}
436

    
437
// Insert search select
438
if(SEARCH == 'private') {
439
	$template->set_var('PRIVATE_SEARCH', 'selected');
440
} elseif(SEARCH == 'registered') {
441
	$template->set_var('REGISTERED_SEARCH', 'selected');
442
} elseif(SEARCH == 'none') {
443
	$template->set_var('NONE_SEARCH', 'selected');
444
}
445

    
446
// Work-out if 777 permissions are set
447
if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777') {
448
	$template->set_var('WORLD_WRITEABLE_SELECTED', ' checked');
449
}
450

    
451
// Work-out which file mode boxes are checked
452
if(extract_permission(STRING_FILE_MODE, 'u', 'r')) {
453
	$template->set_var('FILE_U_R_CHECKED', 'checked');
454
}
455
if(extract_permission(STRING_FILE_MODE, 'u', 'w')) {
456
	$template->set_var('FILE_U_W_CHECKED', 'checked');
457
}
458
if(extract_permission(STRING_FILE_MODE, 'u', 'e')) {
459
	$template->set_var('FILE_U_E_CHECKED', 'checked');
460
}
461
if(extract_permission(STRING_FILE_MODE, 'g', 'r')) {
462
	$template->set_var('FILE_G_R_CHECKED', 'checked');
463
}
464
if(extract_permission(STRING_FILE_MODE, 'g', 'w')) {
465
	$template->set_var('FILE_G_W_CHECKED', 'checked');
466
}
467
if(extract_permission(STRING_FILE_MODE, 'g', 'e')) {
468
	$template->set_var('FILE_G_E_CHECKED', 'checked');
469
}
470
if(extract_permission(STRING_FILE_MODE, 'o', 'r')) {
471
	$template->set_var('FILE_O_R_CHECKED', 'checked');
472
}
473
if(extract_permission(STRING_FILE_MODE, 'o', 'w')) {
474
	$template->set_var('FILE_O_W_CHECKED', 'checked');
475
}
476
if(extract_permission(STRING_FILE_MODE, 'o', 'e')) {
477
	$template->set_var('FILE_O_E_CHECKED', 'checked');
478
}
479
// Work-out which dir mode boxes are checked
480
if(extract_permission(STRING_DIR_MODE, 'u', 'r')) {
481
	$template->set_var('DIR_U_R_CHECKED', 'checked');
482
}
483
if(extract_permission(STRING_DIR_MODE, 'u', 'w')) {
484
	$template->set_var('DIR_U_W_CHECKED', 'checked');
485
}
486
if(extract_permission(STRING_DIR_MODE, 'u', 'e')) {
487
	$template->set_var('DIR_U_E_CHECKED', 'checked');
488
}
489
if(extract_permission(STRING_DIR_MODE, 'g', 'r')) {
490
	$template->set_var('DIR_G_R_CHECKED', 'checked');
491
}
492
if(extract_permission(STRING_DIR_MODE, 'g', 'w')) {
493
	$template->set_var('DIR_G_W_CHECKED', 'checked');
494
}
495
if(extract_permission(STRING_DIR_MODE, 'g', 'e')) {
496
	$template->set_var('DIR_G_E_CHECKED', 'checked');
497
}
498
if(extract_permission(STRING_DIR_MODE, 'o', 'r')) {
499
	$template->set_var('DIR_O_R_CHECKED', 'checked');
500
}
501
if(extract_permission(STRING_DIR_MODE, 'o', 'w')) {
502
	$template->set_var('DIR_O_W_CHECKED', 'checked');
503
}
504
if(extract_permission(STRING_DIR_MODE, 'o', 'e')) {
505
	$template->set_var('DIR_O_E_CHECKED', 'checked');
506
}
507

    
508
// Insert Server Email value into template
509
$template->set_var('SERVER_EMAIL', SERVER_EMAIL);
510

    
511
// Insert groups into signup list
512
$template->set_block('main_block', 'group_list_block', 'group_list');
513
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
514
if($results->numRows() > 0) {
515
	while($group = $results->fetchRow()) {
516
		$template->set_var('ID', $group['group_id']);
517
		$template->set_var('NAME', $group['name']);
518
		if(FRONTEND_SIGNUP == $group['group_id']) {
519
			$template->set_var('SELECTED', 'selected');
520
		} else {
521
			$template->set_var('SELECTED', '');
522
		}
523
		$template->parse('group_list', 'group_list_block', true);
524
	}
525
} else {
526
	$template->set_var('ID', 'disabled');
527
	$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
528
	$template->parse('group_list', 'group_list_block', true);
529
}
530

    
531
// Insert language headings
532
$template->set_var(array(
533
								'HEADING_GENERAL_SETTINGS' => $HEADING['GENERAL_SETTINGS'],
534
								'HEADING_DEFAULT_SETTINGS' => $HEADING['DEFAULT_SETTINGS'],
535
								'HEADING_SEARCH_SETTINGS' => $HEADING['SEARCH_SETTINGS'],
536
								'HEADING_SERVER_SETTINGS' => $HEADING['SERVER_SETTINGS'],
537
								'HEADING_WBMAILER_SETTINGS' => $HEADING['WBMAILER_SETTINGS'],
538
								'HEADING_ADMINISTRATION_TOOLS' => $HEADING['ADMINISTRATION_TOOLS']
539
								)
540
						);
541
// Insert language text and messages
542
$template->set_var(array(
543
								'TEXT_WEBSITE_TITLE' => $TEXT['WEBSITE_TITLE'],
544
								'TEXT_WEBSITE_DESCRIPTION' => $TEXT['WEBSITE_DESCRIPTION'],
545
								'TEXT_WEBSITE_KEYWORDS' => $TEXT['WEBSITE_KEYWORDS'],
546
								'TEXT_WEBSITE_HEADER' => $TEXT['WEBSITE_HEADER'],
547
								'TEXT_WEBSITE_FOOTER' => $TEXT['WEBSITE_FOOTER'],
548
								'TEXT_HEADER' => $TEXT['HEADER'],
549
								'TEXT_FOOTER' => $TEXT['FOOTER'],
550
								'TEXT_VISIBILITY' => $TEXT['VISIBILITY'],
551
								'TEXT_RESULTS_HEADER' => $TEXT['RESULTS_HEADER'],
552
								'TEXT_RESULTS_LOOP' => $TEXT['RESULTS_LOOP'],
553
								'TEXT_RESULTS_FOOTER' => $TEXT['RESULTS_FOOTER'],
554
								'TEXT_NO_RESULTS' => $TEXT['NO_RESULTS'],
555
								'TEXT_TEXT' => $TEXT['TEXT'],
556
								'TEXT_DEFAULT' => $TEXT['DEFAULT'],
557
								'TEXT_LANGUAGE' => $TEXT['LANGUAGE'],
558
								'TEXT_TIMEZONE' => $TEXT['TIMEZONE'],
559
								'TEXT_CHARSET' => $TEXT['CHARSET'],
560
								'TEXT_DATE_FORMAT' => $TEXT['DATE_FORMAT'],
561
								'TEXT_TIME_FORMAT' => $TEXT['TIME_FORMAT'],
562
								'TEXT_TEMPLATE' => $TEXT['TEMPLATE'],
563
								'TEXT_THEME' => $TEXT['THEME'],
564
								'TEXT_WYSIWYG_EDITOR' => $TEXT['WYSIWYG_EDITOR'],
565
								'TEXT_PAGE_LEVEL_LIMIT' => $TEXT['PAGE_LEVEL_LIMIT'],
566
								'TEXT_INTRO_PAGE' => $TEXT['INTRO_PAGE'],
567
								'TEXT_FRONTEND' => $TEXT['FRONTEND'],
568
								'TEXT_LOGIN' => $TEXT['LOGIN'],
569
								'TEXT_REDIRECT_AFTER' => $TEXT['REDIRECT_AFTER'],
570
								'TEXT_SIGNUP' => $TEXT['SIGNUP'],
571
								'TEXT_PHP_ERROR_LEVEL' => $TEXT['PHP_ERROR_LEVEL'],
572
								'TEXT_PAGES_DIRECTORY' => $TEXT['PAGES_DIRECTORY'],
573
								'TEXT_MEDIA_DIRECTORY' => $TEXT['MEDIA_DIRECTORY'],
574
								'TEXT_PAGE_EXTENSION' => $TEXT['PAGE_EXTENSION'],
575
								'TEXT_PAGE_SPACER' => $TEXT['PAGE_SPACER'],
576
								'TEXT_RENAME_FILES_ON_UPLOAD' => $TEXT['RENAME_FILES_ON_UPLOAD'],
577
								'TEXT_APP_NAME' => $TEXT['APP_NAME'],
578
								'TEXT_SESSION_IDENTIFIER' => $TEXT['SESSION_IDENTIFIER'],
579
								'TEXT_SEC_ANCHOR' => $TEXT['SEC_ANCHOR'],
580
								'TEXT_SERVER_OPERATING_SYSTEM' => $TEXT['SERVER_OPERATING_SYSTEM'],
581
								'TEXT_LINUX_UNIX_BASED' => $TEXT['LINUX_UNIX_BASED'],
582
								'TEXT_WINDOWS' => $TEXT['WINDOWS'],
583
								'TEXT_ADMIN' => $TEXT['ADMIN'],
584
								'TEXT_TYPE' => $TEXT['TYPE'],
585
								'TEXT_DATABASE' => $TEXT['DATABASE'],
586
								'TEXT_HOST' => $TEXT['HOST'],
587
								'TEXT_USERNAME' => $TEXT['USERNAME'],
588
								'TEXT_PASSWORD' => $TEXT['PASSWORD'],
589
								'TEXT_NAME' => $TEXT['NAME'],
590
								'TEXT_TABLE_PREFIX' => $TEXT['TABLE_PREFIX'],
591
								'TEXT_SAVE' => $TEXT['SAVE'],
592
								'TEXT_RESET' => $TEXT['RESET'],
593
								'TEXT_CHANGES' => $TEXT['CHANGES'],
594
								'TEXT_ENABLED' => $TEXT['ENABLED'],
595
								'TEXT_DISABLED' => $TEXT['DISABLED'],
596
								'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'],
597
								'TEXT_MANAGE' => $TEXT['MANAGE'],
598
								'TEXT_SEARCH' => $TEXT['SEARCH'],
599
								'TEXT_PUBLIC' => $TEXT['PUBLIC'],
600
								'TEXT_PRIVATE' => $TEXT['PRIVATE'],
601
								'TEXT_REGISTERED' => $TEXT['REGISTERED'],
602
								'TEXT_NONE' => $TEXT['NONE'],
603
								'TEXT_FILES' => strtoupper(substr($TEXT['FILES'], 0, 1)).substr($TEXT['FILES'], 1),
604
								'TEXT_DIRECTORIES' => $TEXT['DIRECTORIES'],
605
								'TEXT_FILESYSTEM_PERMISSIONS' => $TEXT['FILESYSTEM_PERMISSIONS'],
606
								'TEXT_USER' => $TEXT['USER'],
607
								'TEXT_GROUP' => $TEXT['GROUP'],
608
								'TEXT_OTHERS' => $TEXT['OTHERS'],
609
								'TEXT_READ' => $TEXT['READ'],
610
								'TEXT_WRITE' => $TEXT['WRITE'],
611
								'TEXT_EXECUTE' => $TEXT['EXECUTE'],
612
								'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'],
613
								'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'],
614
								'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'],
615
								'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'],
616
								'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
617
								'TEXT_PAGE_TRASH' => $TEXT['PAGE_TRASH'],
618
								'TEXT_PAGE_LANGUAGES' => $TEXT['PAGE_LANGUAGES'],
619
								'TEXT_INLINE' => $TEXT['INLINE'],
620
								'TEXT_SEPARATE' => $TEXT['SEPARATE'],
621
								'TEXT_HOME_FOLDERS' => $TEXT['HOME_FOLDERS'],
622
								'TEXT_WYSIWYG_STYLE' => $TEXT['WYSIWYG_STYLE'],
623
								'TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS' => $TEXT['WORLD_WRITEABLE_FILE_PERMISSIONS'],
624
								'TEXT_WBMAILER_DEFAULT_SETTINGS_NOTICE' => $TEXT['WBMAILER_DEFAULT_SETTINGS_NOTICE'],
625
								'TEXT_WBMAILER_DEFAULT_SENDER_MAIL' => $TEXT['WBMAILER_DEFAULT_SENDER_MAIL'],
626
								'TEXT_WBMAILER_DEFAULT_SENDER_NAME' => $TEXT['WBMAILER_DEFAULT_SENDER_NAME'],
627
								'TEXT_WBMAILER_NOTICE' => $TEXT['WBMAILER_NOTICE'],
628
								'TEXT_WBMAILER_FUNCTION' => $TEXT['WBMAILER_FUNCTION'],
629
								'TEXT_WBMAILER_SMTP_HOST' => $TEXT['WBMAILER_SMTP_HOST'],
630
								'TEXT_WBMAILER_PHP' => $TEXT['WBMAILER_PHP'],
631
								'TEXT_WBMAILER_SMTP' => $TEXT['WBMAILER_SMTP'],
632
								'TEXT_WBMAILER_SMTP_AUTH' => $TEXT['WBMAILER_SMTP_AUTH'],
633
								'TEXT_WBMAILER_SMTP_AUTH_NOTICE' => $TEXT['WBMAILER_SMTP_AUTH_NOTICE'],
634
								'TEXT_WBMAILER_SMTP_USERNAME' => $TEXT['WBMAILER_SMTP_USERNAME'],
635
								'TEXT_WBMAILER_SMTP_PASSWORD' => $TEXT['WBMAILER_SMTP_PASSWORD'],
636
								'MODE_SWITCH_WARNING' => $MESSAGE['SETTINGS']['MODE_SWITCH_WARNING'],
637
								'WORLD_WRITEABLE_WARNING' => $MESSAGE['SETTINGS']['WORLD_WRITEABLE_WARNING'],
638
								'TEXT_MODULE_ORDER' => $TEXT['MODULE_ORDER'],
639
								'TEXT_MAX_EXCERPT' => $TEXT['MAX_EXCERPT'],
640
								'TEXT_TIME_LIMIT' => $TEXT['TIME_LIMIT']
641
								)
642
						);
643

    
644
// Parse template objects output
645
$template->parse('main', 'main_block', false);
646
$template->pparse('output', 'page');
647

    
648
$admin->print_footer();
649

    
650
?>
(1-1/2)