Project

General

Profile

« Previous | Next » 

Revision 1777

Added by Dietmar about 12 years ago

+ add methode StripCodeFromText in class.wb to clean injection
! rebranding the admin/settings and security fixes
! a few new styling in backend wb_theme
! beginning aa lot of account changes like correction of $_SESSION indexe, security fixes
+ add head.load.min.js and head.min.js to /include/jquery/ to style HTML5 templates

View differences:

index.php
36 36
require_once(WB_PATH.'/framework/functions.php');
37 37
require_once(WB_PATH.'/framework/functions-utf8.php');
38 38

  
39
$mLang = ModLanguage::getInstance();
40
$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE);
39
if(!class_exists('Template', false)){ include(WB_PATH.'/include/phplib/ttemplate.inc'); }
41 40

  
42 41
// Setup template object, parse vars to it, then parse it
43 42
// Create new template object
44
$template = new Template(dirname($admin->correct_theme_source('settings.htt')),'keep');
45
// $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());
43
$oTpl = new Template(dirname($admin->correct_theme_source('settings.htt')),'comment');
44
//$oTpl->debug = true;
45
//$oTpl->filename_comments = true;
46
//$oTpl->unknown_regexp = "strict";
47
//$oTpl->halt_on_error = "report" ;
49 48

  
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');
49
$oTpl->set_file('page',  'settings.htt');
50
$oTpl->set_block('page', 'main_block', 'main');
62 51

  
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');
52
$mLang = ModLanguage::getInstance();
53
$mLang->setLanguage(dirname(__FILE__).'/languages/', LANGUAGE, DEFAULT_LANGUAGE);
54

  
55
$oTpl->set_var('FTAN', $admin->getFTAN());
73 56
/*-- insert all needed vars from language files ----------------------------------------*/
74
$template->set_var($mLang->getLangArray());
57
$oTpl->set_var($mLang->getLangArray());
75 58

  
76 59
// 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);
60
$query = "SELECT * FROM `".TABLE_PREFIX."settings`";
61
if($results = $database->query($query)) {
62
    while($setting = $results->fetchRow(MYSQL_ASSOC)) {
63
    	$setting_name = $setting['name'];
64
    	$setting_value = ( $setting_name != 'wbmailer_smtp_password' ) ? htmlspecialchars($setting['value']) : htmlentities($setting['value'], ENT_COMPAT, 'UTF-8');
65
    	$oTpl->set_var(strtoupper($setting_name),($setting_value));
66
//        $oTpl->parse('main', 'main_block', true);
67
    }
84 68
}
85 69

  
86
// Do the same for settings stored in config file as with ones in db
87
$database_type = '';
88 70
$is_advanced = (isset($_GET['advanced']) && $_GET['advanced'] == 'yes');
89 71
// 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', '<< '.$TEXT['HIDE_ADVANCED']);
97
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=no');
72
    if($is_advanced)
73
    {
74
    	$oTpl->set_var('DISPLAY_ADVANCED', '');
75
    	$oTpl->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
76
    	$oTpl->set_var('BASIC_FILE_PERMS_ID', 'hide');
77
    	$oTpl->set_var('ADVANCED', 'yes');
78
    	$oTpl->set_var('ADVANCED_BUTTON', '<< '.$TEXT['HIDE_ADVANCED']);
79
    	$oTpl->set_var('ADVANCED_LINK', 'index.php?advanced=no');
98 80

  
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');
81
    } else {
82
    	$oTpl->set_var('DISPLAY_ADVANCED', ' style="display: none;"');
83
    	$oTpl->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
84
    	$oTpl->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
103 85

  
104
	$template->set_var('ADVANCED', 'no');
105
	$template->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
106
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
107
}
86
    	$oTpl->set_var('ADVANCED', 'no');
87
    	$oTpl->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
88
    	$oTpl->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
89
    }
108 90

  
109
	$query = "SELECT * FROM ".TABLE_PREFIX."search WHERE extra = ''";
110
	$results = $database->query($query);
91
	$sSelected = ' selected="selected"';
92
	$checked   = ' checked="checked"';
111 93

  
112
	// Query current settings in the db, then loop through them and print them
113
	while($setting = $results->fetchRow())
94
	$oTpl->set_var(array(
95
		'WB_URL' => WB_URL,
96
		'THEME_URL' => THEME_URL,
97
		'ADMIN_URL' => ADMIN_URL,
98
	 ));
99

  
100
	// Insert language headings
101
	$oTpl->set_var(array(
102
		'HEADING_GENERAL_SETTINGS' => $HEADING['GENERAL_SETTINGS'],
103
		'HEADING_DEFAULT_SETTINGS' => $HEADING['DEFAULT_SETTINGS'],
104
		'HEADING_SEARCH_SETTINGS' => $HEADING['SEARCH_SETTINGS'],
105
		'HEADING_SERVER_SETTINGS' => $HEADING['SERVER_SETTINGS'],
106
		'HEADING_WBMAILER_SETTINGS' => $HEADING['WBMAILER_SETTINGS'],
107
		'HEADING_ADMINISTRATION_TOOLS' => $HEADING['ADMINISTRATION_TOOLS']
108
		)
109
	);
110

  
111
	// Insert language textarea label
112
	$oTpl->set_var(array(
113
		'TEXT_WEBSITE_TITLE' => $TEXT['WEBSITE_TITLE'],
114
		'TEXT_WEBSITE_DESCRIPTION' => $TEXT['WEBSITE_DESCRIPTION'],
115
		'TEXT_WEBSITE_KEYWORDS' => $TEXT['WEBSITE_KEYWORDS'],
116
		'TEXT_WEBSITE_HEADER' => $TEXT['WEBSITE_HEADER'],
117
		'TEXT_WEBSITE_FOOTER' => $TEXT['WEBSITE_FOOTER'],
118
		'TEXT_HEADER' => $TEXT['HEADER'],
119
		'TEXT_FOOTER' => $TEXT['FOOTER'],
120
		'TEXT_TEXT' => $TEXT['TEXT'],
121
		'TEXT_RESULTS_HEADER' => $TEXT['RESULTS_HEADER'],
122
		'TEXT_RESULTS_LOOP' => $TEXT['RESULTS_LOOP'],
123
		'TEXT_RESULTS_FOOTER' => $TEXT['RESULTS_FOOTER'],
124
		));
125

  
126
	// Insert generell language
127
    $oTpl->set_var(array(
128
		'TEXT_SAVE' => $TEXT['SAVE'],
129
		'TEXT_RESET' => $TEXT['RESET'],
130
		'TEXT_ENABLED' => $TEXT['ENABLED'],
131
		'TEXT_DISABLED' => $TEXT['DISABLED'],
132
		'TEXT_DEFAULT' => $TEXT['DEFAULT'],
133
		'TEXT_NO_RESULTS' => $TEXT['NO_RESULTS'],
134
		'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
135
		));
136

  
137
// Insert language labels
138
	$oTpl->set_var(array(
139
		'TEXT_PAGE_TRASH' => $TEXT['PAGE_TRASH'],
140
		'TEXT_PAGE_LANGUAGES' => $TEXT['PAGE_LANGUAGES'],
141
		'TEXT_FRONTEND' => $TEXT['FRONTEND'],
142
		'TEXT_LOGIN' => $TEXT['LOGIN'],
143
		'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'],
144
		'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'],
145
		'TEXT_MANAGE' => $TEXT['MANAGE'],
146
		'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'],
147
		'TEXT_PHP_ERROR_LEVEL' => $TEXT['PHP_ERROR_LEVEL'],
148
		'TEXT_WYSIWYG_STYLE' => $TEXT['WYSIWYG_STYLE'],
149
		'TEXT_CHARSET' => $TEXT['CHARSET'],
150
		'TEXT_REDIRECT_AFTER' => $TEXT['REDIRECT_AFTER'],
151
		'TEXT_SIGNUP' => $TEXT['SIGNUP'].' '.$TEXT['GROUP'],
152
		'TEXT_MULTILINGUAL' => $TEXT['MULTILINGUAL'],
153
		'TEXT_HOME_FOLDERS' => $TEXT['HOME_FOLDERS'],
154
		'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'],
155
		'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'],
156
		'TEXT_INLINE' => $TEXT['INLINE'],
157
		'TEXT_SEPARATE' => $TEXT['SEPARATE'],
158
		'TEXT_LANGUAGE' => $TEXT['LANGUAGE'],
159
		'TEXT_TIMEZONE' => $TEXT['TIMEZONE'],
160
		'TEXT_DATE_FORMAT' => $TEXT['DATE_FORMAT'],
161
		'TEXT_TIME_FORMAT' => $TEXT['TIME_FORMAT'],
162
		'TEXT_TEMPLATE' => $TEXT['TEMPLATE'],
163
		'TEXT_THEME' => $TEXT['THEME'],
164
		'TEXT_WYSIWYG_EDITOR' => $TEXT['WYSIWYG_EDITOR'],
165
		'TEXT_PAGE_LEVEL_LIMIT' => $TEXT['PAGE_LEVEL_LIMIT'],
166
		'TEXT_INTRO_PAGE' => $TEXT['INTRO_PAGE'],
167
		));
168

  
169
//  Insert permissions values
170
	if($admin->get_permission('settings_advanced') != true)
114 171
	{
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;
172
		$oTpl->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
173
	}
174

  
175
    /**
176
     * <!-- BEGIN show_page_level_limit_block -->
177
     * Insert page level limits
178
     */
179
    $oTpl->set_block('main_block', 'show_page_level_limit_block', 'show_page_level_limit');
180
    /**
181
     * <!-- BEGIN page_level_limit_list_block -->
182
     */
183
    $oTpl->set_block('show_page_level_limit_block', 'page_level_limit_list_block', 'page_level_limit_list');
184
	for($i = 1; $i <= 10; $i++)
185
	{
186
		$oTpl->set_var('NUMBER', $i);
187
		if(PAGE_LEVEL_LIMIT == $i)
188
	    {
189
			$oTpl->set_var('SELECTED', $sSelected);
190
		} else {
191
			$oTpl->set_var('SELECTED', '');
158 192
		}
193
		$oTpl->parse('page_level_limit_list', 'page_level_limit_list_block', true);
159 194
	}
160 195

  
161
	$sSelected = ' selected="selected"';
162
	$checked   = ' checked="checked"';
196
    /**
197
     * <!-- END page_level_limit_list_block -->
198
     * <!-- END show_page_level_limit_block -->
199
     */
200
    if($is_advanced)
201
    {
202
    	$oTpl->parse('show_page_level_limit', 'show_page_level_limit_block', false);
203
    } else {
204
    	$oTpl->parse('show_page_level_limit', '');
205
    }
163 206

  
164
	$template->set_var(array(
165
						'WB_URL' => WB_URL,
166
						'THEME_URL' => THEME_URL,
167
						'ADMIN_URL' => ADMIN_URL,
168
					 ));
207
    /**
208
     * Work-out if page trash feature is disabled, in-line, or separate
209
     */
210
	if(PAGE_TRASH == 'disabled')
211
	{
212
    	$oTpl->set_var(array(
213
				'PAGE_TRASH_DISABLED' => $checked,
214
				'PAGE_TRASH_INLINE' => '',
215
				'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;',
216
				));
217
	} elseif(PAGE_TRASH == 'inline')
218
	{
219
    	$oTpl->set_var(array(
220
				'PAGE_TRASH_INLINE' => $checked,
221
				'PAGE_TRASH_DISABLED' => '',
222
				'DISPLAY_PAGE_TRASH_SEPARATE' => 'display: none;',
223
				));
224
	} elseif(PAGE_TRASH == 'separate')
225
	{
226
		$oTpl->set_var('PAGE_TRASH_SEPARATE', $checked);
227
		$oTpl->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: inline;');
228
	}
169 229

  
170
	// Insert language values
230
    /**
231
     * <!-- BEGIN show_checkbox_1_block -->
232
     * advanced yes
233
     */
234
    $oTpl->set_block('main_block', 'show_checkbox_1_block', 'show_checkbox_1');
235
//  Work-out if page languages feature is enabled
236
	if(defined('PAGE_LANGUAGES') && PAGE_LANGUAGES == true)
237
	{
238
    	$oTpl->set_var(array(
239
				'PAGE_LANGUAGES_ENABLED' => $checked,
240
				'PAGE_LANGUAGES_DISABLED' => '',
241
				));
242
	} else {
243
    	$oTpl->set_var(array(
244
				'PAGE_LANGUAGES_DISABLED' => $checked,
245
				'PAGE_LANGUAGES_ENABLED' => '',
246
				));
247
	}
248

  
249
//  Work-out if page extended feature is enabled
250
	if(defined('PAGE_EXTENDED') && PAGE_EXTENDED == true)
251
	{
252
    	$oTpl->set_var(array(
253
				'PAGE_EXTENDED_ENABLED' => $checked,
254
				'PAGE_EXTENDED_DISABLED' => '',
255
				));
256
	} else {
257
    	$oTpl->set_var(array(
258
				'PAGE_EXTENDED_DISABLED' => $checked,
259
				'PAGE_EXTENDED_ENABLED' => '',
260
				));
261
	}
262

  
263
//  Work-out if multiple menus feature is enabled
264
	if(defined('MULTIPLE_MENUS') && MULTIPLE_MENUS == true)
265
	{
266
    	$oTpl->set_var(array(
267
				'MULTIPLE_MENUS_ENABLED' => $checked,
268
				'MULTIPLE_MENUS_DISABLED' => '',
269
				));
270
	} else {
271
    	$oTpl->set_var(array(
272
				'MULTIPLE_MENUS_DISABLED' => $checked,
273
				'MULTIPLE_MENUS_ENABLED' => '',
274
				));
275
	}
276

  
277
    /**
278
     * <!-- END show_checkbox_1_block -->
279
     * advanced yes
280
     */
281
    if($is_advanced)
282
    {
283
    	$oTpl->parse('show_checkbox_1', 'show_checkbox_1_block');
284
    } else {
285
    	$oTpl->parse('show_checkbox_1', '');
286
    }
287

  
288
//  Work-out if media home folder feature is enabled
289
    $oTpl->set_var('TEXT_HOME_FOLDERS', $TEXT['HOME_FOLDERS']);
290
	if(HOME_FOLDERS)
291
	{
292
    	$oTpl->set_var(array(
293
				'HOME_FOLDERS_ENABLED' => $checked,
294
				'HOME_FOLDERS_DISABLED' => '',
295
				));
296
	} else {
297
    	$oTpl->set_var(array(
298
				'HOME_FOLDERS_DISABLED' => $checked,
299
				'HOME_FOLDERS_ENABLED' => '',
300
				));
301
	}
302

  
303
    $oTpl->set_block('main_block', 'show_checkbox_2_block', 'show_checkbox_2');
304
//  Work-out if manage sections feature is enabled
305
	if(MANAGE_SECTIONS)
306
	{
307
    	$oTpl->set_var(array(
308
				'MANAGE_SECTIONS_ENABLED' => $checked,
309
				'MANAGE_SECTIONS_DISABLED' => '',
310
				));
311
	} else {
312
    	$oTpl->set_var(array(
313
				'MANAGE_SECTIONS_DISABLED' => $checked,
314
				'MANAGE_SECTIONS_ENABLED' => '',
315
				));
316
	}
317

  
318
	// Work-out if section blocks feature is enabled
319
	if(defined('SECTION_BLOCKS') && SECTION_BLOCKS == true)
320
	{
321
    	$oTpl->set_var(array(
322
				'SECTION_BLOCKS_ENABLED' => $checked,
323
				'SECTION_BLOCKS_DISABLED' => '',
324
				));
325
	} else {
326
    	$oTpl->set_var(array(
327
				'SECTION_BLOCKS_DISABLED' => $checked,
328
				'SECTION_BLOCKS_ENABLED' => '',
329
				));
330
	}
331

  
332
    /**
333
     *
334
     */
335
    if($is_advanced)
336
    {
337
     	$oTpl->parse('show_checkbox_2', 'show_checkbox_2_block');
338
    } else {
339
    	$oTpl->parse('show_checkbox_2', '');
340
    }
341

  
342
	// Work-out if intro feature is enabled
343
	if(INTRO_PAGE)
344
	{
345
    	$oTpl->set_var(array(
346
				'INTRO_PAGE_ENABLED' => $checked,
347
				'INTRO_PAGE_DISABLED' => '',
348
				));
349
	} else {
350
    	$oTpl->set_var(array(
351
				'INTRO_PAGE_DISABLED' => $checked,
352
				'INTRO_PAGE_ENABLED' => '',
353
				));
354
	}
355
/**
356
 * <!-- BEGIN show_checkbox_3_block -->
357
 */
358
    $oTpl->set_block('main_block', 'show_checkbox_3_block', 'show_checkbox_3');
359
//  Work-out if homepage redirection feature is enabled
360
	if(defined('HOMEPAGE_REDIRECTION') && HOMEPAGE_REDIRECTION == true)
361
	{
362
    	$oTpl->set_var(array(
363
				'HOMEPAGE_REDIRECTION_ENABLED' => $checked,
364
				'HOMEPAGE_REDIRECTION_DISABLED' => '',
365
				));
366
	} else {
367
//		$oTpl->set_var('HOMEPAGE_REDIRECTION_DISABLED', $checked);
368
    	$oTpl->set_var(array(
369
				'HOMEPAGE_REDIRECTION_DISABLED' => $checked,
370
				'HOMEPAGE_REDIRECTION_ENABLED' => '',
371
				));
372
	}
373
//  Work-out if smart login feature is enabled
374
	if(defined('SMART_LOGIN') && SMART_LOGIN == true)
375
	{
376
		$oTpl->set_var('SMART_LOGIN_ENABLED', $checked);
377
    	$oTpl->set_var(array(
378
				'SMART_LOGIN_ENABLED' => $checked,
379
				'SMART_LOGIN_DISABLED' => '',
380
				));
381
	} else {
382
		$oTpl->set_var('SMART_LOGIN_DISABLED', $checked);
383
    	$oTpl->set_var(array(
384
				'SMART_LOGIN_DISABLED' => $checked,
385
				'SMART_LOGIN_ENABLED' => '',
386
				));
387
	}
388

  
389
    /**
390
     * <!-- END show_checkbox_3_block -->
391
     */
392
    if($is_advanced)
393
    {
394
    	$oTpl->parse('show_checkbox_3', 'show_checkbox_3_block');
395
    } else {
396
    	$oTpl->parse('show_checkbox_3', 'show_checkbox_3_block', '');
397
    }
398

  
399
//  Work-out if frontend login feature is enabled
400
	if(FRONTEND_LOGIN)
401
	{
402
    	$oTpl->set_var(array(
403
				'PRIVATE_ENABLED' => $checked,
404
				'PRIVATE_DISABLED' => '',
405
				));
406
	} else {
407
    	$oTpl->set_var(array(
408
				'PRIVATE_DISABLED' => $checked,
409
				'INTRO_PAGE_ENABLED' => '',
410
				));
411
	}
412

  
413
	if(CONFIRMED_REGISTRATION)
414
	{
415
    	$oTpl->set_var(array(
416
				'CONFIRMED_REGISTRATION_ENABLED' => $checked,
417
				'CONFIRMED_REGISTRATION_DISABLED' => '',
418
				));
419
	} else {
420
    	$oTpl->set_var(array(
421
				'CONFIRMED_REGISTRATION_DISABLED' => $checked,
422
				'CONFIRMED_REGISTRATION_ENABLED' => '',
423
				));
424
	}
425

  
426
//  Insert groups into signup list
427
    $oTpl->set_block('main_block', 'group_list_block', 'group_list');
428
    $sql = "SELECT `group_id`, `name` FROM `".TABLE_PREFIX."groups` WHERE `group_id` != '1'";
429
	if($results = $database->query($sql)) {
430
    	if($results->numRows() > 0)
431
    	{
432
    		while($group = $results->fetchRow(MYSQL_ASSOC))
433
    	    {
434
    			$oTpl->set_var('ID', $group['group_id']);
435
    			$oTpl->set_var('NAME', $group['name']);
436
    			if(FRONTEND_SIGNUP == $group['group_id'])
437
    	        {
438
    				$oTpl->set_var('SELECTED', $sSelected);
439
    			} else {
440
    				$oTpl->set_var('SELECTED', '');
441
    			}
442
    			$oTpl->parse('group_list', 'group_list_block', true);
443
    		}
444
    	} else {
445
    		$oTpl->set_var('ID', 'disabled');
446
    		$oTpl->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
447
    		$oTpl->parse('group_list', 'group_list_block', true);
448
    	}
449
	}
450

  
451
    /**
452
     * <!-- BEGIN show_redirect_timer_block -->
453
     */
454
    $oTpl->set_block('main_block', 'show_redirect_timer_block', 'show_redirect_timer');
455

  
456
    /**
457
     * <!-- END show_redirect_timer_block -->
458
     */
459
    if($is_advanced)
460
    {
461
    	$oTpl->parse('show_redirect_timer', 'show_redirect_timer_block');
462
    } else {
463
    	$oTpl->parse('show_redirect_timer', '');
464
    }
465

  
466
    /**
467
     * <!-- BEGIN show_php_error_level_block -->
468
     */
469
	// Insert default error reporting values
470
	require(ADMIN_PATH.'/interface/er_levels.php');
471
    $oTpl->set_block('main_block', 'show_php_error_level_block',  'show_php_error_level');
472
    $oTpl->set_block('show_php_error_level_block', 'php_error_list_block',  'php_error_list');
473
	foreach($ER_LEVELS AS $value => $title)
474
	{
475
		$oTpl->set_var('VALUE', $value);
476
		$oTpl->set_var('NAME', $title);
477
	    $selected = (ER_LEVEL == $value) ? $sSelected : '';
478
	    $oTpl->set_var('SELECTED', $selected);
479
		$oTpl->parse('php_error_list', 'php_error_list_block', true);
480
	}
481

  
482
    /**
483
     * <!-- END show_php_error_level_block -->
484
     */
485
    if($is_advanced)
486
    {
487
    	$oTpl->parse('show_php_error_level',  'show_php_error_level_block');
488
    } else {
489
    	$oTpl->parse('show_php_error_level', '');
490
    }
491

  
492
    /**
493
     * <!-- BEGIN show_wysiwyg_block -->
494
     */
495
//  Insert WYSIWYG modules
496
    $oTpl->set_block('main_block', 'show_wysiwyg_block',        'show_wysiwyg');
497
    $oTpl->set_block('show_wysiwyg_block', 'editor_list_block', 'editor_list');
498
	$file='none';
499
	$module_name=$TEXT['NONE'];
500
	$oTpl->set_var('FILE', $file);
501
	$oTpl->set_var('NAME', $module_name);
502
	$selected = (!defined('WYSIWYG_EDITOR') || $file == WYSIWYG_EDITOR) ? $sSelected : '';
503
	$oTpl->set_var('SELECTED', $selected);
504
	$oTpl->parse('editor_list', 'editor_list_block', true);
171 505
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
506
	$sql .= 'WHERE `type` = \'module\' ';
507
	$sql .= 'AND `function` = \'wysiwyg\' ';
508
	$sql .= 'ORDER BY `name`';
509
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
510
	{
511
		while($addon = $result->fetchRow(MYSQL_ASSOC))
512
	    {
513
			if( $admin->get_permission($addon['directory'],'module' ) )
514
			{
515
				$oTpl->set_var('FILE', $addon['directory']);
516
				$oTpl->set_var('NAME', $addon['name']);
517
				$selected = (!defined('WYSIWYG_EDITOR') || $addon['directory'] == WYSIWYG_EDITOR) ? $sSelected : '';
518
				$oTpl->set_var('SELECTED', $selected);
519
				$oTpl->parse('editor_list', 'editor_list_block', true);
520
			}
521
		}
522
	}
523

  
524
    /**
525
     * <!-- END show_wysiwyg_block -->
526
     */
527
    if($is_advanced)
528
    {
529
    	$oTpl->parse('show_wysiwyg','show_wysiwyg_block');
530
    } else {
531
    	$oTpl->parse('show_wysiwyg', '');
532
    }
533

  
534
//  Insert language values
535
    $oTpl->set_block('main_block', 'language_list_block', 'language_list');
536
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
172 537
	$sql .= 'WHERE `type` = \'language\' ';
173 538
	$sql .= 'AND `function` != \'theme\' ';
174 539
	$sql .= 'ORDER BY `directory`';
175

  
176 540
	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 541
	{
180
		while($addon = $result->fetchRow()) {
542
		while($addon = $result->fetchRow(MYSQL_ASSOC)) {
181 543
	        $langIcons = (empty($addon['directory'])) ? 'none' : strtolower($addon['directory']);
182 544

  
183
			$template->set_var('CODE',        $addon['directory']);
184
			$template->set_var('NAME',        $addon['name']);
185
			$template->set_var('FLAG',        THEME_URL.'/images/flags/'.$langIcons);
186
			$template->set_var('SELECTED',    (DEFAULT_LANGUAGE == $addon['directory'] ? $sSelected : '') );
187
			$template->parse('language_list', 'language_list_block', true);
545
			$oTpl->set_var('CODE',        $addon['directory']);
546
			$oTpl->set_var('NAME',        $addon['name']);
547
			$oTpl->set_var('FLAG',        THEME_URL.'/images/flags/'.$langIcons);
548
			$oTpl->set_var('SELECTED',    (DEFAULT_LANGUAGE == $addon['directory'] ? $sSelected : '') );
549
			$oTpl->parse('language_list', 'language_list_block', true);
188 550
		}
189 551
	}
552
    /**
553
     * <!-- BEGIN show_charset_block -->
554
     */
555
//  Insert default charset values
556
    $oTpl->set_block('main_block', 'show_charset_block', 'show_charset');
557
	require(ADMIN_PATH.'/interface/charsets.php');
558
    $oTpl->set_block('show_charset_block', 'charset_list_block', 'charset_list');
559
	foreach($CHARSETS AS $code => $title) {
560
		$oTpl->set_var('VALUE', $code);
561
		$oTpl->set_var('NAME', $title);
562
		if(DEFAULT_CHARSET == $code) {
563
			$oTpl->set_var('SELECTED', $sSelected);
564
		} else {
565
			$oTpl->set_var('SELECTED', '');
566
		}
567
		$oTpl->parse('charset_list', 'charset_list_block', true);
568
	}
569
    /**
570
     * <!-- END show_charset_block -->
571
     */
572
    if($is_advanced)
573
    {
574
    	$oTpl->parse('show_charset', 'show_charset_block');
575
    } else {
576
    	$oTpl->parse('show_charset', '');
577
    }
190 578

  
191
	// Insert default timezone values
579
//  nsert default timezone values
192 580
	require(ADMIN_PATH.'/interface/timezones.php');
581
    $oTpl->set_block('main_block', 'timezone_list_block','timezone_list');
193 582
	foreach($TIMEZONES AS $hour_offset => $title)
194 583
	{
195
		// Make sure we dont list "System Default" as we are setting this value!
584
//  Make sure we dont list "System Default" as we are setting this value!
196 585
		if($hour_offset != '-20') {
197
			$template->set_var('VALUE', $hour_offset);
198
			$template->set_var('NAME', $title);
586
			$oTpl->set_var('VALUE', $hour_offset);
587
			$oTpl->set_var('NAME', $title);
199 588
			if(DEFAULT_TIMEZONE == $hour_offset*60*60) {
200
				$template->set_var('SELECTED', $sSelected);
589
				$oTpl->set_var('SELECTED', $sSelected);
201 590
			} else {
202
				$template->set_var('SELECTED', '');
591
				$oTpl->set_var('SELECTED', '');
203 592
			}
204
			$template->parse('timezone_list', 'timezone_list_block', true);
593
			$oTpl->parse('timezone_list', 'timezone_list_block', true);
205 594
		}
206 595
	}
207 596

  
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
			$template->set_var('SELECTED', $sSelected);
215
		} else {
216
			$template->set_var('SELECTED', '');
217
		}
218
		$template->parse('charset_list', 'charset_list_block', true);
219
	}
220

  
221

  
222
	// Insert date format list
597
//  Insert date format list
223 598
	require(ADMIN_PATH.'/interface/date_formats.php');
599
    $oTpl->set_block('main_block', 'date_format_list_block', 'date_format_list');
224 600
	foreach($DATE_FORMATS AS $format => $title) {
225 601
		$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
226 602
		if($format != 'system_default') {
227
			$template->set_var('VALUE', $format);
603
			$oTpl->set_var('VALUE', $format);
228 604
		} else {
229
			$template->set_var('VALUE', '');
605
			$oTpl->set_var('VALUE', '');
230 606
		}
231
		$template->set_var('NAME', $title);
607
		$oTpl->set_var('NAME', $title);
232 608
		if(DEFAULT_DATE_FORMAT == $format) {
233
			$template->set_var('SELECTED', $sSelected);
609
			$oTpl->set_var('SELECTED', $sSelected);
234 610
		} else {
235
			$template->set_var('SELECTED', '');
611
			$oTpl->set_var('SELECTED', '');
236 612
		}
237
		$template->parse('date_format_list', 'date_format_list_block', true);
613
		$oTpl->parse('date_format_list', 'date_format_list_block', true);
238 614
	}
239 615

  
240
	// Insert time format list
616
//  Insert time format list
241 617
	require(ADMIN_PATH.'/interface/time_formats.php');
618
    $oTpl->set_block('main_block', 'time_format_list_block', 'time_format_list');
242 619
	foreach($TIME_FORMATS AS $format => $title) {
243 620
		$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
244 621
		if($format != 'system_default') {
245
			$template->set_var('VALUE', $format);
622
			$oTpl->set_var('VALUE', $format);
246 623
		} else {
247
			$template->set_var('VALUE', '');
624
			$oTpl->set_var('VALUE', '');
248 625
		}
249
		$template->set_var('NAME', $title);
626
		$oTpl->set_var('NAME', $title);
250 627
		if(DEFAULT_TIME_FORMAT == $format) {
251
			$template->set_var('SELECTED', $sSelected);
628
			$oTpl->set_var('SELECTED', $sSelected);
252 629
		} else {
253
			$template->set_var('SELECTED', '');
630
			$oTpl->set_var('SELECTED', '');
254 631
		}
255
		$template->parse('time_format_list', 'time_format_list_block', true);
632
		$oTpl->parse('time_format_list', 'time_format_list_block', true);
256 633
	}
257 634

  
258 635
// Insert templates
636
    $oTpl->set_block('main_block', 'template_list_block',         'template_list');
259 637
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
260 638
	$sql .= 'WHERE `type` = \'template\' ';
261 639
	$sql .= 'AND `function` != \'theme\' ';
262 640
	$sql .= 'ORDER BY `name`';
263 641
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
264 642
	{
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())
643
		while($addon = $result->fetchRow(MYSQL_ASSOC))
268 644
		{
269 645
			if( $admin->get_permission($addon['directory'],'template' ) )
270 646
			{
271
				$template->set_var('FILE', $addon['directory']);
272
				$template->set_var('NAME', $addon['name']);
647
				$oTpl->set_var('FILE', $addon['directory']);
648
				$oTpl->set_var('NAME', $addon['name']);
273 649
				$selected = (($addon['directory'] == DEFAULT_TEMPLATE) ? $sSelected : '');
274
				$template->set_var('SELECTED', $selected);
275
				$template->parse('template_list', 'template_list_block', true);
650
				$oTpl->set_var('SELECTED', $selected);
651
				$oTpl->parse('template_list', 'template_list_block', true);
276 652
			}
277 653
		}
278 654
	}
279 655

  
280 656
// Insert backend theme
657
    $oTpl->set_block('main_block', 'theme_list_block',            'theme_list');
281 658
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
282 659
	$sql .= 'WHERE `type` = \'template\' ';
283 660
	$sql .= 'AND `function` = \'theme\' ';
284 661
	$sql .= 'ORDER BY `name`';
285 662

  
286

  
287 663
	if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
288 664
	{
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())
665
		while($addon = $result->fetchRow(MYSQL_ASSOC))
292 666
		{
293 667
			if( $admin->get_permission($addon['directory'],'template' ) )
294 668
			{
295
				$template->set_var('FILE', $addon['directory']);
296
				$template->set_var('NAME', $addon['name']);
669
				$oTpl->set_var('FILE', $addon['directory']);
670
				$oTpl->set_var('NAME', $addon['name']);
297 671
				$selected = (($addon['directory'] == DEFAULT_THEME) ? $sSelected : '');
298
				$template->set_var('SELECTED', $selected);
299
				$template->parse('theme_list', 'theme_list_block', true);
672
				$oTpl->set_var('SELECTED', $selected);
673
				$oTpl->parse('theme_list', 'theme_list_block', true);
300 674
			}
301 675
		}
302 676
	}
303 677

  
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
	$selected = (!defined('WYSIWYG_EDITOR') || $file == WYSIWYG_EDITOR) ? $sSelected : '';
310
	$template->set_var('SELECTED', $selected);
311
	$template->parse('editor_list', 'editor_list_block', true);
312
	$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
	{
318
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'wysiwyg' ORDER BY name");
319
//	if($result->numRows() > 0)
678
//  Work-out if warn_page_leave feature is enabled
679
//	if (defined('WARN_PAGE_LEAVE') && WARN_PAGE_LEAVE == true)
320 680
//	{
321
		while($addon = $result->fetchRow())
322
	    {
323
			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
		}
681
//    	$oTpl->set_var(array(
682
//				'WARN_PAGE_LEAVE_ENABLED' => $checked,
683
//				'WARN_PAGE_LEAVE_DISABLED' => '',
684
//				));
685
//	} else {
686
//    	$oTpl->set_var(array(
687
//				'MANAGE_SECTIONS_DISABLED' => $checked,
688
//				'WARN_PAGE_LEAVE_DISABLED' => '',
689
//				));
690
//	}
691

  
692
/*  Make's sure GD library is installed */
693
//	if(extension_loaded('gd') && function_exists('imageCreateFromJpeg'))
694
//	{
695
//		$oTpl->set_var('GD_EXTENSION_ENABLED', '');
696
//	} else {
697
//		$oTpl->set_var('GD_EXTENSION_ENABLED', ' style="display: none;"');
698
//	}
699

  
700
//  Insert permissions values
701
//	if($admin->get_permission('settings_advanced') != true)
702
//	{
703
//		$oTpl->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
704
//	}
705

  
706
/**
707
 *
708
 *
709
 */
710
    $oTpl->set_block('main_block', 'show_search_block','show_search');
711
	$query = "SELECT * FROM `".TABLE_PREFIX."search` WHERE `extra` = '' ";
712
	if($results = $database->query($query))
713
    {
714
    	// Query current settings in the db, then loop through them and print them
715
    	while($setting = $results->fetchRow(MYSQL_ASSOC))
716
    	{
717
    		$setting_name = $setting['name'];
718
    		$setting_value = htmlspecialchars(($setting['value']));
719
    		switch($setting_name) {
720
    			// Search header
721
    			case 'header':
722
    				$oTpl->set_var('SEARCH_HEADER', $setting_value);
723
    			break;
724
    			// Search results header
725
    			case 'results_header':
726
    				$oTpl->set_var('SEARCH_RESULTS_HEADER', $setting_value);
727
    			break;
728
    			// Search results loop
729
    			case 'results_loop':
730
    				$oTpl->set_var('SEARCH_RESULTS_LOOP', $setting_value);
731
    			break;
732
    			// Search results footer
733
    			case 'results_footer':
734
    				$oTpl->set_var('SEARCH_RESULTS_FOOTER', $setting_value);
735
    			break;
736
    			// Search no results
737
    			case 'no_results':
738
    				$oTpl->set_var('SEARCH_NO_RESULTS', $setting_value);
739
    			break;
740
    			// Search footer
741
    			case 'footer':
742
    				$oTpl->set_var('SEARCH_FOOTER', $setting_value);
743
    			break;
744
    			// Search module-order
745
    			case 'module_order':
746
    				$oTpl->set_var('SEARCH_MODULE_ORDER', $setting_value);
747
    			break;
748
    			// Search max lines of excerpt
749
    			case 'max_excerpt':
750
    				$oTpl->set_var('SEARCH_MAX_EXCERPT', $setting_value);
751
    			break;
752
    			// time-limit
753
    			case 'time_limit':
754
    				$oTpl->set_var('SEARCH_TIME_LIMIT', $setting_value);
755
    			break;
756
    			// Search template
757
    			case 'template':
758
    				$search_template = $setting_value;
759
    			break;
760
    		}
761
    	}
332 762
	}
333 763

  
334 764
// Insert templates for search settings
765
    $oTpl->set_block('main_block', 'search_template_list_block',  'search_template_list');
335 766
	$search_template = ( ($search_template == DEFAULT_TEMPLATE) || ($search_template == '') ) ? '' : $search_template;
336 767
	$selected = ( ($search_template != DEFAULT_TEMPLATE) ) ?  $sSelected : '';
337 768

  
338
	$template->set_var(array(
769
	$oTpl->set_var(array(
339 770
	        'FILE' => '',
771
			'TEXT_MODULE_ORDER' => $TEXT['MODULE_ORDER'],
340 772
	        'NAME' => $TEXT['SYSTEM_DEFAULT'],
341 773
	        'SELECTED' => $selected
342 774
	    ));
343
	$template->parse('search_template_list', 'search_template_list_block', true);
344

  
775
	$oTpl->parse('search_template_list', 'search_template_list_block', true);
345 776
	$sql  = 'SELECT `name`, `directory` FROM `'.TABLE_PREFIX.'addons` ';
346 777
	$sql .= 'WHERE `type` = \'template\' ';
347 778
	$sql .= 'AND `function` = \'template\' ';
348 779
	$sql .= 'ORDER BY `name`';
349 780
    if( ($result = $database->query($sql)) && ($result->numRows() > 0) )
350 781
	{
351
//	$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND function = 'template' ORDER BY name");
352
//	if($result->numRows() > 0)
353
//	{
354
		while($addon = $result->fetchRow())
782
		while($addon = $result->fetchRow(MYSQL_ASSOC))
355 783
	    {
356 784
			if( $admin->get_permission($addon['directory'],'template' ) )
357 785
			{
358
				$template->set_var('FILE', $addon['directory']);
359
				$template->set_var('NAME', $addon['name']);
786
				$oTpl->set_var('FILE', $addon['directory']);
787
				$oTpl->set_var('NAME', $addon['name']);
360 788
		        $selected = ($addon['directory'] == $search_template) ? $sSelected :  '';
361
				$template->set_var('SELECTED', $selected);
362
				$template->parse('search_template_list', 'search_template_list_block', true);
789
				$oTpl->set_var('SELECTED', $selected);
790
				$oTpl->parse('search_template_list', 'search_template_list_block', true);
363 791
			}
364 792
		}
365 793
	}
366 794

  
367
	// Insert default error reporting values
368
	require(ADMIN_PATH.'/interface/er_levels.php');
369
	foreach($ER_LEVELS AS $value => $title)
795
	// Insert search select
796
    $oTpl->set_var(array(
797
		'TEXT_REGISTERED' => $TEXT['REGISTERED'],
798
		'TEXT_PUBLIC' => $TEXT['PUBLIC'],
799
		'TEXT_PRIVATE' => $TEXT['PRIVATE'],
800
		'TEXT_NONE' => $TEXT['NONE'],
801
		'TEXT_MAX_EXCERPT' => $TEXT['MAX_EXCERPT'],
802
		'TEXT_TIME_LIMIT' => $TEXT['TIME_LIMIT'],
803
		'TEXT_VISIBILITY' => $TEXT['VISIBILITY'],
804
		'TEXT_SEARCH' => $TEXT['SEARCH'],
805
		));
806
	if(SEARCH == 'private')
370 807
	{
371
		$template->set_var('VALUE', $value);
372
		$template->set_var('NAME', $title);
373
	    $selected = (ER_LEVEL == $value) ? $sSelected : '';
374
	    $template->set_var('SELECTED', $selected);
375
		$template->parse('error_reporting_list', 'error_reporting_list_block', true);
376
	}
377

  
378

  
379
	// 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
			$template->set_var('SELECTED', $sSelected);
392
		} 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
    	$template->set_var(array(
402
				'MULTIPLE_MENUS_ENABLED' => $checked,
403
				'MULTIPLE_MENUS_DISABLED' => '',
808
    	$oTpl->set_var(array(
809
				'PRIVATE_SEARCH' => $sSelected,
810
				'REGISTERED_SEARCH' => '',
811
				'NONE_SEARCH' => '',
404 812
				));
405
	} else {
406
    	$template->set_var(array(
407
				'MULTIPLE_MENUS_DISABLED' => $checked,
408
				'MULTIPLE_MENUS_ENABLED' => '',
813
	} elseif(SEARCH == 'public') {
814
    	$oTpl->set_var(array(
815
				'PRIVATE_SEARCH' => '',
816
				'REGISTERED_SEARCH' => '',
817
				'NONE_SEARCH' => '',
409 818
				));
410
	}
411

  
412
	// Work-out if page languages feature is enabled
413
	if(defined('PAGE_LANGUAGES') && PAGE_LANGUAGES == true)
414
	{
415
    	$template->set_var(array(
416
				'PAGE_LANGUAGES_ENABLED' => $checked,
417
				'PAGE_LANGUAGES_DISABLED' => '',
819
	} elseif(SEARCH == 'registered') {
820
    	$oTpl->set_var(array(
821
				'PRIVATE_SEARCH' => '',
822
				'REGISTERED_SEARCH' => $sSelected,
823
				'NONE_SEARCH' => '',
418 824
				));
419
	} else {
420
    	$template->set_var(array(
421
				'PAGE_LANGUAGES_DISABLED' => $checked,
422
				'PAGE_LANGUAGES_ENABLED' => '',
825
	} elseif(SEARCH == 'none') {
826
    	$oTpl->set_var(array(
827
				'PRIVATE_SEARCH' => '',
828
				'REGISTERED_SEARCH' => '',
829
				'NONE_SEARCH' => $sSelected,
423 830
				));
424 831
	}
425 832

  
426
	// Work-out if warn_page_leave feature is enabled
427
	if (defined('WARN_PAGE_LEAVE') && WARN_PAGE_LEAVE == true)
428
	{
429
		$template->set_var('WARN_PAGE_LEAVE_ENABLED', $checked);
430
    	$template->set_var(array(
431
				'WARN_PAGE_LEAVE_ENABLED' => $checked,
432
				'WARN_PAGE_LEAVE_DISABLED' => '',
433
				));
434
	} else {
435
		$template->set_var('WARN_PAGE_LEAVE_DISABLED', $checked);
436
    	$template->set_var(array(
437
				'MANAGE_SECTIONS_DISABLED' => $checked,
438
				'WARN_PAGE_LEAVE_DISABLED' => '',
439
				));
440
	}
833
if($is_advanced)
834
{
835
	$oTpl->parse('show_search', 'show_search_block');
836
} else {
837
	$oTpl->parse('show_search', '');
838
}
441 839

  
442
	// Work-out if smart login feature is enabled
443
	if(defined('SMART_LOGIN') && SMART_LOGIN == true)
444
	{
445
		$template->set_var('SMART_LOGIN_ENABLED', $checked);
446
    	$template->set_var(array(
447
				'SMART_LOGIN_ENABLED' => $checked,
448
				'SMART_LOGIN_DISABLED' => '',
449
				));
450
	} else {
451
		$template->set_var('SMART_LOGIN_DISABLED', $checked);
452
    	$template->set_var(array(
453
				'SMART_LOGIN_DISABLED' => $checked,
454
				'SMART_LOGIN_ENABLED' => '',
455
				));
456
	}
840
    $oTpl->set_block('main_block', 'show_access_block','show_access');
841
//  Work-out which wbmailer routine should be checked
842
	$oTpl->set_var(array(
843
		'TEXT_WBMAILER_DEFAULT_SETTINGS_NOTICE' => $TEXT['WBMAILER_DEFAULT_SETTINGS_NOTICE'],
844
		'TEXT_WBMAILER_DEFAULT_SENDER_MAIL' => $TEXT['WBMAILER_DEFAULT_SENDER_MAIL'],
845
		'TEXT_WBMAILER_DEFAULT_SENDER_NAME' => $TEXT['WBMAILER_DEFAULT_SENDER_NAME'],
846
		'TEXT_WBMAILER_NOTICE' => $TEXT['WBMAILER_NOTICE'],
847
		'TEXT_WBMAILER_FUNCTION' => $TEXT['WBMAILER_FUNCTION'],
848
		'TEXT_WBMAILER_SMTP_HOST' => $TEXT['WBMAILER_SMTP_HOST'],
849
		'TEXT_WBMAILER_PHP' => $TEXT['WBMAILER_PHP'],
850
		'TEXT_WBMAILER_SMTP' => $TEXT['WBMAILER_SMTP'],
851
		'TEXT_WBMAILER_SMTP_AUTH' => $TEXT['WBMAILER_SMTP_AUTH'],
852
		'TEXT_WBMAILER_SMTP_AUTH_NOTICE' => $TEXT['REQUIRED'].' '.$TEXT['WBMAILER_SMTP_AUTH'],
853
		'TEXT_WBMAILER_SMTP_USERNAME' => $TEXT['WBMAILER_SMTP_USERNAME'],
854
		'TEXT_WBMAILER_SMTP_PASSWORD' => $TEXT['WBMAILER_SMTP_PASSWORD'],
855
		'SMTP_AUTH_SELECTED' => $checked
856
		));
457 857

  
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
    	$template->set_var(array(
470
				'SECTION_BLOCKS_ENABLED' => $checked,
471
				'SECTION_BLOCKS_DISABLED' => '',
472
				));
473
	} else {
474
    	$template->set_var(array(
475
				'SECTION_BLOCKS_DISABLED' => $checked,
476
				'SECTION_BLOCKS_ENABLED' => '',
477
				));
478
	}
479

  
480
	// Work-out if homepage redirection feature is enabled
481
	if(defined('HOMEPAGE_REDIRECTION') && HOMEPAGE_REDIRECTION == true)
482
	{
483
//		$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', $checked);
484
    	$template->set_var(array(
485
				'HOMEPAGE_REDIRECTION_ENABLED' => $checked,
486
				'HOMEPAGE_REDIRECTION_DISABLED' => '',
487
				));
488
	} else {
489
//		$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', $checked);
490
    	$template->set_var(array(
491
				'HOMEPAGE_REDIRECTION_DISABLED' => $checked,
492
				'HOMEPAGE_REDIRECTION_ENABLED' => '',
493
				));
494
	}
495

  
496
	// Work-out which server os should be checked
497
	if(OPERATING_SYSTEM == 'linux')
498
	{
499
		$template->set_var('LINUX_SELECTED', $checked);
500
	} elseif(OPERATING_SYSTEM == 'windows') {
501
		$template->set_var('WINDOWS_SELECTED', $checked);
502
	}
503

  
504 858
	// Work-out if developer infos feature is enabled
505 859
	if(defined('DEV_INFOS') && DEV_INFOS == true)
506 860
	{
507
		//$template->set_var('DEV_INFOS_ENABLED', $checked);
508
    	$template->set_var(array(
861
    	$oTpl->set_var(array(
509 862
				'DEV_INFOS_ENABLED' => $checked,
510 863
				'DEV_INFOS_DISABLED' => '',
511 864
				));
512 865
	} else {
513
		//$template->set_var('DEV_INFOS_DISABLED', $checked);
514
    	$template->set_var(array(
866
    	$oTpl->set_var(array(
515 867
				'DEV_INFOS_DISABLED' => $checked,
516 868
				'DEV_INFOS_ENABLED' => '',
517 869
				));
518 870
	}
519 871

  
520
	// Work-out if developer infos feature is enabled
521
	if(defined('PAGE_EXTENDED') && PAGE_EXTENDED == true)
872
//  Work-out which server os should be checked
873
	if(OPERATING_SYSTEM == 'linux')
522 874
	{
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
				));
875
		$oTpl->set_var('LINUX_SELECTED', $checked);
876
		$oTpl->set_var('WINDOWS_SELECTED', '');
877
	} elseif(OPERATING_SYSTEM == 'windows') {
878
		$oTpl->set_var('WINDOWS_SELECTED', $checked);
879
		$oTpl->set_var('LINUX_SELECTED', '');
534 880
	}
535 881

  
536
	// Work-out if manage sections feature is enabled
537
	if(MANAGE_SECTIONS)
538
	{
539
    	$template->set_var(array(
540
				'MANAGE_SECTIONS_ENABLED' => $checked,
541
				'MANAGE_SECTIONS_DISABLED' => '',
542
				));
543
	} else {
544
    	$template->set_var(array(
545
				'MANAGE_SECTIONS_DISABLED' => $checked,
546
				'MANAGE_SECTIONS_ENABLED' => '',
547
				));
548
	}
549

  
550
	// Work-out which wbmailer routine should be checked
551
	$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
				'SMTP_AUTH_SELECTED' => $checked
565
				));
566 882
	if(WBMAILER_ROUTINE == 'phpmail')
567 883
	{
568
		$template->set_var('PHPMAIL_SELECTED', $checked);
569
		$template->set_var('SMTP_VISIBILITY', ' style="display: none;"');
570
		$template->set_var('SMTP_VISIBILITY_AUTH', '');
571
		// $template->set_var('SMTP_AUTH_SELECTED', '');
884
		$oTpl->set_var('PHPMAIL_SELECTED', $checked);
885
		$oTpl->set_var('SMTP_VISIBILITY', ' style="display: none;"');
886
//		$oTpl->set_var('SMTP_VISIBILITY_AUTH', '');
887
		$oTpl->set_var('SMTP_AUTH_SELECTED', '');
888
		$oTpl->set_var('SMTPMAIL_SELECTED',  '');
572 889
	} elseif(WBMAILER_ROUTINE == 'smtp')
573 890
	{
574
		$template->set_var('SMTPMAIL_SELECTED', $checked);
575
		$template->set_var('SMTP_VISIBILITY', '');
576
		$template->set_var('SMTP_VISIBILITY_AUTH', '');
891
		$oTpl->set_var('SMTPMAIL_SELECTED', $checked);
892
		$oTpl->set_var('PHPMAIL_SELECTED', '');
893
		$oTpl->set_var('SMTP_VISIBILITY', '');
894
//		$oTpl->set_var('SMTP_VISIBILITY_AUTH', '');
577 895
	}
578 896
/* deprecated
579 897
	// Work-out if SMTP authentification should be checked
580 898
	if(WBMAILER_SMTP_AUTH)
581 899
	{
582
		$template->set_var('SMTP_AUTH_SELECTED', $checked);
900
		$oTpl->set_var('SMTP_AUTH_SELECTED', $checked);
583 901
		if(WBMAILER_ROUTINE == 'smtp')
584 902
	    {
585
			$template->set_var('SMTP_VISIBILITY_AUTH', '');
903
			$oTpl->set_var('SMTP_VISIBILITY_AUTH', '');
586 904

  
587 905
		} else {
588
			$template->set_var('SMTP_VISIBILITY_AUTH', ' style="display: none;"');
906
			$oTpl->set_var('SMTP_VISIBILITY_AUTH', ' style="display: none;"');
589 907
		}
590 908
	} else {
591
		$template->set_var('SMTP_VISIBILITY_AUTH', ' style="display: none;"');
909
		$oTpl->set_var('SMTP_VISIBILITY_AUTH', ' style="display: none;"');
592 910
	}
593 911
*/
594
	// Work-out if intro feature is enabled
595
	if(INTRO_PAGE)
596
	{
597
    	$template->set_var(array(
598
				'INTRO_PAGE_ENABLED' => $checked,
599
				'INTRO_PAGE_DISABLED' => '',
600
				));
601
	} else {
602
    	$template->set_var(array(
603
				'INTRO_PAGE_DISABLED' => $checked,
604
				'INTRO_PAGE_ENABLED' => '',
605
				));
606
	}
607 912

  
608
	// Work-out if frontend login feature is enabled
609
	if(FRONTEND_LOGIN)
913
	// Work-out if 777 permissions are set
914
	$oTpl->set_var('WORLD_WRITEABLE_SELECTED', '');
915
	if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777')
610 916
	{
611
    	$template->set_var(array(
612
				'PRIVATE_ENABLED' => $checked,
613
				'PRIVATE_DISABLED' => '',
614
				));
615
	} else {
616
    	$template->set_var(array(
617
				'PRIVATE_DISABLED' => $checked,
618
				'INTRO_PAGE_ENABLED' => '',
619
				));
917
		$oTpl->set_var('WORLD_WRITEABLE_SELECTED', $checked);
620 918
	}
621
	// Work-out if frontend login feature is enabled
622 919

  
623
	if(CONFIRMED_REGISTRATION)
624
	{
625
    	$template->set_var(array(
626
				'CONFIRMED_REGISTRATION_ENABLED' => $checked,
627
				'CONFIRMED_REGISTRATION_DISABLED' => '',
628
				));
629
	} else {
630
    	$template->set_var(array(
631
				'CONFIRMED_REGISTRATION_DISABLED' => $checked,
632
				'CONFIRMED_REGISTRATION_ENABLED' => '',
633
				));
634
	}
635 920

  
636
	// Work-out if page trash feature is disabled, in-line, or separate
637
	if(PAGE_TRASH == 'disabled')
638
	{
639
//		$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
	} elseif(PAGE_TRASH == 'inline')
647
	{
648
//		$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
	} elseif(PAGE_TRASH == 'separate')
656
	{
657
		$template->set_var('PAGE_TRASH_SEPARATE', $checked);
658
		$template->set_var('DISPLAY_PAGE_TRASH_SEPARATE', 'display: inline;');
659
	}
921
	$oTpl->set_var(array(
922
		'FILE_U_R_CHECKED' => '',
923
		'FILE_U_W_CHECKED' => '',
924
		'FILE_U_E_CHECKED' => '',
925
		'FILE_G_R_CHECKED' => '',
926
		'FILE_G_W_CHECKED' => '',
927
		'FILE_G_E_CHECKED' => '',
928
		'FILE_O_R_CHECKED' => '',
929
		'FILE_O_W_CHECKED' => '',
930
		'FILE_O_E_CHECKED' => '',
931
		'DIR_U_R_CHECKED' => '',
932
		'DIR_U_W_CHECKED' => '',
933
		'DIR_U_E_CHECKED' => '',
934
		'DIR_G_R_CHECKED' => '',
935
		'DIR_G_W_CHECKED' => '',
936
		'DIR_G_E_CHECKED' => '',
937
		'DIR_O_R_CHECKED' => '',
938
		'DIR_O_W_CHECKED' => '',
939
		'DIR_O_E_CHECKED' => '',
940
		));
660 941

  
661
	// Work-out if media home folde feature is enabled
662
	if(HOME_FOLDERS)
663
	{
664
    	$template->set_var(array(
665
				'HOME_FOLDERS_ENABLED' => $checked,
666
				'HOME_FOLDERS_DISABLED' => '',
667
				));
668
	} else {
669
    	$template->set_var(array(
670
				'HOME_FOLDERS_DISABLED' => $checked,
671
				'HOME_FOLDERS_ENABLED' => '',
672
				));
673
	}
674

  
675
	// Insert search select
676
	if(SEARCH == 'private')
677
	{
678
    	$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
	} elseif(SEARCH == 'registered') {
690
    	$template->set_var(array(
691
				'PRIVATE_SEARCH' => '',
692
				'REGISTERED_SEARCH' => $sSelected,
693
				'NONE_SEARCH' => '',
694
				));
695
	} elseif(SEARCH == 'none') {
696
    	$template->set_var(array(
697
				'PRIVATE_SEARCH' => '',
698
				'REGISTERED_SEARCH' => '',
699
				'NONE_SEARCH' => $sSelected,
700
				));
701
	}
702

  
703
	// Work-out if 777 permissions are set
704
	$template->set_var('WORLD_WRITEABLE_SELECTED', '');
705
	if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777')
706
	{
707
		$template->set_var('WORLD_WRITEABLE_SELECTED', $checked);
708
	}
709

  
710
	// Work-out which file mode boxes are checked
942
//  Work-out which file mode boxes are checked
711 943
	if(extract_permission(STRING_FILE_MODE, 'u', 'r'))
712 944
	{
713
		$template->set_var('FILE_U_R_CHECKED', $checked);
945
		$oTpl->set_var('FILE_U_R_CHECKED', $checked);
714 946
	}
715 947
	if(extract_permission(STRING_FILE_MODE, 'u', 'w'))
716 948
	{
717
		$template->set_var('FILE_U_W_CHECKED', $checked);
949
		$oTpl->set_var('FILE_U_W_CHECKED', $checked);
718 950
	}
719 951
	if(extract_permission(STRING_FILE_MODE, 'u', 'e'))
720 952
	{
721
		$template->set_var('FILE_U_E_CHECKED', $checked);
953
		$oTpl->set_var('FILE_U_E_CHECKED', $checked);
722 954
	}
723 955
	if(extract_permission(STRING_FILE_MODE, 'g', 'r'))
724 956
	{
725
		$template->set_var('FILE_G_R_CHECKED', $checked);
957
		$oTpl->set_var('FILE_G_R_CHECKED', $checked);
726 958
	}
727 959
	if(extract_permission(STRING_FILE_MODE, 'g', 'w'))
728 960
	{
729
		$template->set_var('FILE_G_W_CHECKED', $checked);
961
		$oTpl->set_var('FILE_G_W_CHECKED', $checked);
730 962
	}
731 963
	if(extract_permission(STRING_FILE_MODE, 'g', 'e'))
732 964
	{
733
		$template->set_var('FILE_G_E_CHECKED', $checked);
965
		$oTpl->set_var('FILE_G_E_CHECKED', $checked);
734 966
	}
735 967
	if(extract_permission(STRING_FILE_MODE, 'o', 'r'))
736 968
	{
737
		$template->set_var('FILE_O_R_CHECKED', $checked);
969
		$oTpl->set_var('FILE_O_R_CHECKED', $checked);
738 970
	}
739 971
	if(extract_permission(STRING_FILE_MODE, 'o', 'w'))
740 972
	{
741
		$template->set_var('FILE_O_W_CHECKED', $checked);
973
		$oTpl->set_var('FILE_O_W_CHECKED', $checked);
742 974
	}
743 975
	if(extract_permission(STRING_FILE_MODE, 'o', 'e'))
744 976
	{
745
		$template->set_var('FILE_O_E_CHECKED', $checked);
977
		$oTpl->set_var('FILE_O_E_CHECKED', $checked);
746 978
	}
747 979
	// Work-out which dir mode boxes are checked
748 980
	if(extract_permission(STRING_DIR_MODE, 'u', 'r'))
749 981
	{
750
		$template->set_var('DIR_U_R_CHECKED', $checked);
982
		$oTpl->set_var('DIR_U_R_CHECKED', $checked);
751 983
	}
752 984
	if(extract_permission(STRING_DIR_MODE, 'u', 'w'))
753 985
	{
754
		$template->set_var('DIR_U_W_CHECKED', $checked);
986
		$oTpl->set_var('DIR_U_W_CHECKED', $checked);
755 987
	}
756 988
	if(extract_permission(STRING_DIR_MODE, 'u', 'e'))
757 989
	{
758
		$template->set_var('DIR_U_E_CHECKED', $checked);
990
		$oTpl->set_var('DIR_U_E_CHECKED', $checked);
759 991
	}
760 992
	if(extract_permission(STRING_DIR_MODE, 'g', 'r'))
761 993
	{
762
		$template->set_var('DIR_G_R_CHECKED', $checked);
994
		$oTpl->set_var('DIR_G_R_CHECKED', $checked);
763 995
	}
764 996
	if(extract_permission(STRING_DIR_MODE, 'g', 'w'))
765 997
	{
766
		$template->set_var('DIR_G_W_CHECKED', $checked);
998
		$oTpl->set_var('DIR_G_W_CHECKED', $checked);
767 999
	}
768 1000
	if(extract_permission(STRING_DIR_MODE, 'g', 'e'))
769 1001
	{
770
		$template->set_var('DIR_G_E_CHECKED', $checked);
1002
		$oTpl->set_var('DIR_G_E_CHECKED', $checked);
771 1003
	}
772 1004
	if(extract_permission(STRING_DIR_MODE, 'o', 'r'))
773 1005
	{
774
		$template->set_var('DIR_O_R_CHECKED', $checked);
1006
		$oTpl->set_var('DIR_O_R_CHECKED', $checked);
775 1007
	}
776 1008
	if(extract_permission(STRING_DIR_MODE, 'o', 'w'))
777 1009
	{
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff