Project

General

Profile

« Previous | Next » 

Revision 45

Added by stefan about 19 years ago

Implemented choice of WYSIWYG editor

View differences:

trunk/wb/languages/EN.php
374 374
$TEXT['HIDDEN'] = 'Hidden';
375 375
$TEXT['MAIN'] = 'Main';
376 376

  
377
//Stefans WYSIWYGmod
378
$TEXT['EDITOR'] = "WYSIWYG Editor";
379

  
377 380
// Success/error messages
378 381
$MESSAGE['FRONTEND']['SORRY_NO_VIEWING_PERMISSIONS'] = 'Sorry, you do not have permissions to view this page';
379 382

  
trunk/wb/admin/settings/save.php
201 201
	"\n".
202 202
	"define('WYSIWYG_STYLE', '".$admin->add_slashes($_POST['wysiwyg_style'])."');\n".
203 203
	"\n".
204
	"define('WYSIWYG_EDITOR', '".addslashes($_POST['editor'])."');\n".
205
	"\n".
204 206
	"define('MANAGE_SECTIONS', ".str_replace(';', '', $_POST['manage_sections']).");\n".
205 207
	"define('SECTION_BLOCKS', ".str_replace(';', '', $_POST['section_blocks']).");\n".
206 208
	"\n".
......
253 255

  
254 256
$admin->print_footer();
255 257

  
256
?>
258
?>
trunk/wb/admin/settings/index.php
1
<?php
2

  
3
/*
4

  
5
 Website Baker Project <http://www.websitebaker.org/>
6
 Copyright (C) 2004-2005, Ryan Djurovich
7

  
8
 Website Baker is free software; you can redistribute it and/or modify
9
 it under the terms of the GNU General Public License as published by
10
 the Free Software Foundation; either version 2 of the License, or
11
 (at your option) any later version.
12

  
13
 Website Baker is distributed in the hope that it will be useful,
14
 but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 GNU General Public License for more details.
17

  
18
 You should have received a copy of the GNU General Public License
19
 along with Website Baker; if not, write to the Free Software
20
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21

  
22
*/
23

  
24
require('../../config.php');
25
require_once(WB_PATH.'/framework/class.admin.php');
26
if(isset($_GET['advanced']) AND $_GET['advanced'] == 'yes') {
27
	$admin = new admin('Settings', 'settings_advanced');
28
} else {
29
	$admin = new admin('Settings', 'settings_basic');
30
}
31

  
32
// Create new database object
33
$database = new database();
34

  
35
// Include the WB functions file
36
require_once(WB_PATH.'/framework/functions.php');
37

  
38
// Create new template object
39
$template = new Template(ADMIN_PATH.'/settings');
40
$template->set_file('page', 'template.html');
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($admin->strip_slashes_dummy($setting['value']));
49
	switch($setting_name) {
50
		// Website title
51
		case 'title':
52
			$template->set_var('TITLE', $setting_value);
53
		break;
54
		// Website description
55
		case 'description':
56
			$template->set_var('DESCRIPTION', $setting_value);
57
		break;
58
		// Website keywords
59
		case 'keywords':
60
			$template->set_var('KEYWORDS', $setting_value);
61
		break;
62
		// Website header
63
		case 'header':
64
			$template->set_var('HEADER', $setting_value);
65
		break;
66
		// Website header
67
		case 'header':
68
			$template->set_var('HEADER', $setting_value);
69
		break;
70
		// Website footer
71
		case 'footer':
72
			$template->set_var('FOOTER', $setting_value);
73
		break;
74
	}
75
}
76

  
77
// Query current settings in the db, then loop through them and print them
78
$query = "SELECT * FROM ".TABLE_PREFIX."search WHERE extra = ''";
79
$results = $database->query($query);
80
while($setting = $results->fetchRow()) {
81
	$setting_name = $setting['name'];
82
	$setting_value = htmlspecialchars($admin->strip_slashes_dummy($setting['value']));
83
	switch($setting_name) {
84
		// Search header
85
		case 'header':
86
			$template->set_var('SEARCH_HEADER', $setting_value);
87
		break;
88
		// Search results header
89
		case 'results_header':
90
			$template->set_var('SEARCH_RESULTS_HEADER', $setting_value);
91
		break;
92
		// Search results loop
93
		case 'results_loop':
94
			$template->set_var('SEARCH_RESULTS_LOOP', $setting_value);
95
		break;
96
		// Search results footer
97
		case 'results_footer':
98
			$template->set_var('SEARCH_RESULTS_FOOTER', $setting_value);
99
		break;
100
		// Search no results
101
		case 'no_results':
102
			$template->set_var('SEARCH_NO_RESULTS', $setting_value);
103
		break;
104
		// Search footer
105
		case 'footer':
106
			$template->set_var('SEARCH_FOOTER', $setting_value);
107
		break;
108
		// Search template
109
		case 'template':
110
			$search_template = $setting_value;
111
		break;
112
	}
113
}
114

  
115
// Do the same for settings stored in config file as with ones in db
116
$database_type = '';
117

  
118
// Tell the browser whether or not to show advanced options
119
if(isset($_GET['advanced']) AND $_GET['advanced'] == 'yes') {
120
	$template->set_var('DISPLAY_ADVANCED', '');
121
	$template->set_var('ADVANCED', 'yes');
122
	$template->set_var('ADVANCED_BUTTON', '<< '.$TEXT['HIDE_ADVANCED']);
123
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=no');
124
	$template->set_var('BASIC_FILE_PERMS_ID', 'hide');
125
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
126
} else {
127
	$template->set_var('DISPLAY_ADVANCED', 'none');
128
	$template->set_var('ADVANCED', 'no');
129
	$template->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
130
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
131
	$template->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
132
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
133
}
134

  
135
$template->set_var(array(	
136
									'PAGE_EXTENSION' => PAGE_EXTENSION,
137
									'PAGE_SPACER' => PAGE_SPACER,
138
									'WB_PATH' => WB_PATH,
139
									'WB_URL' => WB_URL,
140
									'ADMIN_PATH' => ADMIN_PATH,
141
									'ADMIN_URL' => ADMIN_URL,
142
									'DATABASE_TYPE' => DB_TYPE,
143
									'DATABASE_HOST' => DB_HOST,
144
									'DATABASE_USERNAME' => DB_USERNAME,
145
									'DATABASE_NAME' => DB_NAME,
146
									'TABLE_PREFIX' => TABLE_PREFIX
147
								 )
148
						 );
149

  
150
// Insert groups into signup list
151
$template->set_block('main_block', 'group_list_block', 'group_list');
152
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
153
if($results->numRows() > 0) {
154
	while($group = $results->fetchRow()) {
155
		$template->set_var('ID', $group['group_id']);
156
		$template->set_var('NAME', $group['name']);
157
		if(FRONTEND_SIGNUP == $group['group_id']) {
158
			$template->set_var('SELECTED', 'selected');
159
		} else {
160
			$template->set_var('SELECTED', '');
161
		}
162
		$template->parse('group_list', 'group_list_block', true);
163
	}
164
} else {
165
	$template->set_var('ID', 'disabled');
166
	$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
167
	$template->parse('group_list', 'group_list_block', true);
168
}
169

  
170
// Insert language values
171
$template->set_block('main_block', 'language_list_block', 'language_list');
172
if($handle = opendir(WB_PATH.'/languages/')) {
173
   while (false !== ($file = readdir($handle))) {
174
		if($file != '.' AND $file != '..' AND !is_dir($file) AND $file != 'index.php') {
175
			// Get language name
176
			require(WB_PATH.'/languages/'.$file);
177
			// Insert code and name
178
			$template->set_var(array(
179
											'CODE' => $language_code,
180
											'NAME' => $language_name
181
											)
182
									);
183
			// Check if it is selected
184
			if(DEFAULT_LANGUAGE == $language_code) {
185
				$template->set_var('SELECTED', ' selected');
186
			} else {
187
				$template->set_var('SELECTED', '');
188
			}
189
			$template->parse('language_list', 'language_list_block', true);
190
		}
191
	}
192
	// Restore language to original file
193
	require(WB_PATH.'/languages/'.LANGUAGE.'.php');
194
}
195

  
196
// Insert default timezone values
197
require(ADMIN_PATH.'/interface/timezones.php');
198
$template->set_block('main_block', 'timezone_list_block', 'timezone_list');
199
foreach($TIMEZONES AS $hour_offset => $title) {
200
	// Make sure we dont list "System Default" as we are setting this value!
201
	if($hour_offset != '-20') {
202
		$template->set_var('VALUE', $hour_offset);
203
		$template->set_var('NAME', $title);
204
		if(DEFAULT_TIMEZONE == $hour_offset*60*60) {
205
			$template->set_var('SELECTED', 'selected');
206
		} else {
207
			$template->set_var('SELECTED', '');
208
		}
209
		$template->parse('timezone_list', 'timezone_list_block', true);
210
	}
211
}
212

  
213
// Insert date format list
214
require(ADMIN_PATH.'/interface/date_formats.php');
215
$template->set_block('main_block', 'date_format_list_block', 'date_format_list');
216
foreach($DATE_FORMATS AS $format => $title) {
217
	$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
218
	if($format != 'system_default') {
219
		$template->set_var('VALUE', $format);
220
	} else {
221
		$template->set_var('VALUE', '');
222
	}
223
	$template->set_var('NAME', $title);
224
	if(DEFAULT_DATE_FORMAT == $format) {
225
		$template->set_var('SELECTED', 'selected');
226
	} else {
227
		$template->set_var('SELECTED', '');
228
	}
229
	$template->parse('date_format_list', 'date_format_list_block', true);
230
}
231

  
232
// Insert time format list
233
require(ADMIN_PATH.'/interface/time_formats.php');
234
$template->set_block('main_block', 'time_format_list_block', 'time_format_list');
235
foreach($TIME_FORMATS AS $format => $title) {
236
	$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
237
	if($format != 'system_default') {
238
		$template->set_var('VALUE', $format);
239
	} else {
240
		$template->set_var('VALUE', '');
241
	}
242
	$template->set_var('NAME', $title);
243
	if(DEFAULT_TIME_FORMAT == $format) {
244
		$template->set_var('SELECTED', 'selected');
245
	} else {
246
		$template->set_var('SELECTED', '');
247
	}
248
	$template->parse('time_format_list', 'time_format_list_block', true);
249
}
250

  
251
// Insert templates
252
$template->set_block('main_block', 'template_list_block', 'template_list');
253
if($handle = opendir(WB_PATH.'/templates/')) {
254
	while (false !== ($file = readdir($handle))) {
255
		if($file != "." AND $file != ".." AND $file != ".svn" AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) {
256
			include(WB_PATH."/templates/$file/info.php");
257
			$template->set_var('FILE', $file);
258
			$template->set_var('NAME', $template_name);
259
			if($file == DEFAULT_TEMPLATE ? $selected = ' selected' : $selected = '');
260
			$template->set_var('SELECTED', $selected);
261
			$template->parse('template_list', 'template_list_block', true);
262
		}
263
	}
264
}
265

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

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

  
298
// Insert permissions values
299
if($admin->get_permission('settings_advanced') != true) {
300
	$template->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
301
}
302

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

  
315
// Work-out if multiple menus feature is enabled
316
if(defined('MULTIPLE_MENUS') AND MULTIPLE_MENUS == true) {
317
	$template->set_var('MULTIPLE_MENUS_ENABLED', ' checked');
318
} else {
319
	$template->set_var('MULTIPLE_MENUS_DISABLED', ' checked');
320
}
321

  
322
// Work-out if page languages feature is enabled
323
if(defined('PAGE_LANGUAGES') AND PAGE_LANGUAGES == true) {
324
	$template->set_var('PAGE_LANGUAGES_ENABLED', ' checked');
325
} else {
326
	$template->set_var('PAGE_LANGUAGES_DISABLED', ' checked');
327
}
328

  
329
// Work-out if smart login feature is enabled
330
if(defined('SMART_LOGIN') AND SMART_LOGIN == true) {
331
	$template->set_var('SMART_LOGIN_ENABLED', ' checked');
332
} else {
333
	$template->set_var('SMART_LOGIN_DISABLED', ' checked');
334
}
335

  
336
// Work-out if section blocks feature is enabled
337
if(defined('SECTION_BLOCKS') AND SECTION_BLOCKS == true) {
338
	$template->set_var('SECTION_BLOCKS_ENABLED', ' checked');
339
} else {
340
	$template->set_var('SECTION_BLOCKS_DISABLED', ' checked');
341
}
342

  
343
// Work-out if homepage redirection feature is enabled
344
if(defined('HOMEPAGE_REDIRECTION') AND HOMEPAGE_REDIRECTION == true) {
345
	$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', ' checked');
346
} else {
347
	$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', ' checked');
348
}
349

  
350
// Work-out which server os should be checked
351
if(OPERATING_SYSTEM == 'linux') {
352
	$template->set_var('LINUX_SELECTED', ' checked');
353
} elseif(OPERATING_SYSTEM == 'windows') {
354
	$template->set_var('WINDOWS_SELECTED', ' checked');
355
}
356

  
357
// Work-out if manage sections feature is enabled
358
if(MANAGE_SECTIONS) {
359
	$template->set_var('MANAGE_SECTIONS_ENABLED', ' checked');
360
} else {
361
	$template->set_var('MANAGE_SECTIONS_DISABLED', ' checked');
362
}
363

  
364
// Work-out if intro feature is enabled
365
if(INTRO_PAGE) {
366
	$template->set_var('INTRO_PAGE_ENABLED', ' checked');
367
} else {
368
	$template->set_var('INTRO_PAGE_DISABLED', ' checked');
369
}
370

  
371
// Work-out if frontend login feature is enabled
372
if(FRONTEND_LOGIN) {
373
	$template->set_var('PRIVATE_ENABLED', ' checked');
374
} else {
375
	$template->set_var('PRIVATE_DISABLED', ' checked');
376
}
377

  
378
// Work-out if page trash feature is disabled, in-line, or separate
379
if(PAGE_TRASH == 'disabled') {
380
	$template->set_var('PAGE_TRASH_DISABLED', ' checked');
381
} elseif(PAGE_TRASH == 'inline') {
382
	$template->set_var('PAGE_TRASH_INLINE', ' checked');
383
} elseif(PAGE_TRASH == 'separate') {
384
	$template->set_var('PAGE_TRASH_SEPARATE', ' checked');
385
}
386

  
387
// Work-out if media home folde feature is enabled
388
if(HOME_FOLDERS) {
389
	$template->set_var('HOME_FOLDERS_ENABLED', ' checked');
390
} else {
391
	$template->set_var('HOME_FOLDERS_DISABLED', ' checked');
392
}
393

  
394
// Insert search select
395
if(SEARCH == 'private') {
396
	$template->set_var('PRIVATE_SEARCH', 'selected');
397
} elseif(SEARCH == 'registered') {
398
	$template->set_var('REGISTERED_SEARCH', 'selected');
399
} elseif(SEARCH == 'none') {
400
	$template->set_var('NONE_SEARCH', 'selected');
401
}
402

  
403
// Work-out if 777 permissions are set
404
if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777') {
405
	$template->set_var('WORLD_WRITEABLE_SELECTED', ' checked');
406
}
407

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

  
465
// Insert WYSIWYG style value into template
466
$template->set_var('WYSIWYG_STYLE', $admin->strip_slashes_dummy(WYSIWYG_STYLE));
467

  
468
// Insert Server Email value into template
469
$template->set_var('SERVER_EMAIL', SERVER_EMAIL);
470

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

  
558
// Parse template objects output
559
$template->parse('main', 'main_block', false);
560
$template->pparse('output', 'page');
561

  
562
$admin->print_footer();
563

  
564
?>
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2005, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
require('../../config.php');
27
require_once(WB_PATH.'/framework/class.admin.php');
28
if(isset($_GET['advanced']) AND $_GET['advanced'] == 'yes') {
29
	$admin = new admin('Settings', 'settings_advanced');
30
} else {
31
	$admin = new admin('Settings', 'settings_basic');
32
}
33

  
34
// Create new database object
35
$database = new database();
36

  
37
// Include the WB functions file
38
require_once(WB_PATH.'/framework/functions.php');
39

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

  
45
// Query current settings in the db, then loop through them and print them
46
$query = "SELECT * FROM ".TABLE_PREFIX."settings";
47
$results = $database->query($query);
48
while($setting = $results->fetchRow()) {
49
	$setting_name = $setting['name'];
50
	$setting_value = htmlspecialchars($admin->strip_slashes_dummy($setting['value']));
51
	switch($setting_name) {
52
		// Website title
53
		case 'title':
54
			$template->set_var('TITLE', $setting_value);
55
		break;
56
		// Website description
57
		case 'description':
58
			$template->set_var('DESCRIPTION', $setting_value);
59
		break;
60
		// Website keywords
61
		case 'keywords':
62
			$template->set_var('KEYWORDS', $setting_value);
63
		break;
64
		// Website header
65
		case 'header':
66
			$template->set_var('HEADER', $setting_value);
67
		break;
68
		// Website header
69
		case 'header':
70
			$template->set_var('HEADER', $setting_value);
71
		break;
72
		// Website footer
73
		case 'footer':
74
			$template->set_var('FOOTER', $setting_value);
75
		break;
76
	}
77
}
78

  
79
// Query current settings in the db, then loop through them and print them
80
$query = "SELECT * FROM ".TABLE_PREFIX."search WHERE extra = ''";
81
$results = $database->query($query);
82
while($setting = $results->fetchRow()) {
83
	$setting_name = $setting['name'];
84
	$setting_value = htmlspecialchars($admin->strip_slashes_dummy($setting['value']));
85
	switch($setting_name) {
86
		// Search header
87
		case 'header':
88
			$template->set_var('SEARCH_HEADER', $setting_value);
89
		break;
90
		// Search results header
91
		case 'results_header':
92
			$template->set_var('SEARCH_RESULTS_HEADER', $setting_value);
93
		break;
94
		// Search results loop
95
		case 'results_loop':
96
			$template->set_var('SEARCH_RESULTS_LOOP', $setting_value);
97
		break;
98
		// Search results footer
99
		case 'results_footer':
100
			$template->set_var('SEARCH_RESULTS_FOOTER', $setting_value);
101
		break;
102
		// Search no results
103
		case 'no_results':
104
			$template->set_var('SEARCH_NO_RESULTS', $setting_value);
105
		break;
106
		// Search footer
107
		case 'footer':
108
			$template->set_var('SEARCH_FOOTER', $setting_value);
109
		break;
110
		// Search template
111
		case 'template':
112
			$search_template = $setting_value;
113
		break;
114
	}
115
}
116

  
117
// Do the same for settings stored in config file as with ones in db
118
$database_type = '';
119

  
120
// Tell the browser whether or not to show advanced options
121
if(isset($_GET['advanced']) AND $_GET['advanced'] == 'yes') {
122
	$template->set_var('DISPLAY_ADVANCED', '');
123
	$template->set_var('ADVANCED', 'yes');
124
	$template->set_var('ADVANCED_BUTTON', '<< '.$TEXT['HIDE_ADVANCED']);
125
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=no');
126
	$template->set_var('BASIC_FILE_PERMS_ID', 'hide');
127
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'file_perms_box');
128
} else {
129
	$template->set_var('DISPLAY_ADVANCED', 'none');
130
	$template->set_var('ADVANCED', 'no');
131
	$template->set_var('ADVANCED_BUTTON', $TEXT['SHOW_ADVANCED'].' >>');
132
	$template->set_var('ADVANCED_LINK', 'index.php?advanced=yes');
133
	$template->set_var('BASIC_FILE_PERMS_ID', 'file_perms_box');
134
	$template->set_var('ADVANCED_FILE_PERMS_ID', 'hide');
135
}
136

  
137
$template->set_var(array(	
138
									'PAGE_EXTENSION' => PAGE_EXTENSION,
139
									'PAGE_SPACER' => PAGE_SPACER,
140
									'WB_PATH' => WB_PATH,
141
									'WB_URL' => WB_URL,
142
									'ADMIN_PATH' => ADMIN_PATH,
143
									'ADMIN_URL' => ADMIN_URL,
144
									'DATABASE_TYPE' => DB_TYPE,
145
									'DATABASE_HOST' => DB_HOST,
146
									'DATABASE_USERNAME' => DB_USERNAME,
147
									'DATABASE_NAME' => DB_NAME,
148
									'TABLE_PREFIX' => TABLE_PREFIX
149
								 )
150
						 );
151

  
152
// Insert groups into signup list
153
$template->set_block('main_block', 'group_list_block', 'group_list');
154
$results = $database->query("SELECT group_id, name FROM ".TABLE_PREFIX."groups WHERE group_id != '1'");
155
if($results->numRows() > 0) {
156
	while($group = $results->fetchRow()) {
157
		$template->set_var('ID', $group['group_id']);
158
		$template->set_var('NAME', $group['name']);
159
		if(FRONTEND_SIGNUP == $group['group_id']) {
160
			$template->set_var('SELECTED', 'selected');
161
		} else {
162
			$template->set_var('SELECTED', '');
163
		}
164
		$template->parse('group_list', 'group_list_block', true);
165
	}
166
} else {
167
	$template->set_var('ID', 'disabled');
168
	$template->set_var('NAME', $MESSAGE['GROUPS']['NO_GROUPS_FOUND']);
169
	$template->parse('group_list', 'group_list_block', true);
170
}
171

  
172
// Insert language values
173
$template->set_block('main_block', 'language_list_block', 'language_list');
174
if($handle = opendir(WB_PATH.'/languages/')) {
175
   while (false !== ($file = readdir($handle))) {
176
		if($file != '.' AND $file != '..' AND !is_dir($file) AND $file != 'index.php') {
177
			// Get language name
178
			require(WB_PATH.'/languages/'.$file);
179
			// Insert code and name
180
			$template->set_var(array(
181
											'CODE' => $language_code,
182
											'NAME' => $language_name
183
											)
184
									);
185
			// Check if it is selected
186
			if(DEFAULT_LANGUAGE == $language_code) {
187
				$template->set_var('SELECTED', ' selected');
188
			} else {
189
				$template->set_var('SELECTED', '');
190
			}
191
			$template->parse('language_list', 'language_list_block', true);
192
		}
193
	}
194
	// Restore language to original file
195
	require(WB_PATH.'/languages/'.LANGUAGE.'.php');
196
}
197

  
198
// Insert default timezone values
199
require(ADMIN_PATH.'/interface/timezones.php');
200
$template->set_block('main_block', 'timezone_list_block', 'timezone_list');
201
foreach($TIMEZONES AS $hour_offset => $title) {
202
	// Make sure we dont list "System Default" as we are setting this value!
203
	if($hour_offset != '-20') {
204
		$template->set_var('VALUE', $hour_offset);
205
		$template->set_var('NAME', $title);
206
		if(DEFAULT_TIMEZONE == $hour_offset*60*60) {
207
			$template->set_var('SELECTED', 'selected');
208
		} else {
209
			$template->set_var('SELECTED', '');
210
		}
211
		$template->parse('timezone_list', 'timezone_list_block', true);
212
	}
213
}
214

  
215
// Insert date format list
216
require(ADMIN_PATH.'/interface/date_formats.php');
217
$template->set_block('main_block', 'date_format_list_block', 'date_format_list');
218
foreach($DATE_FORMATS AS $format => $title) {
219
	$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
220
	if($format != 'system_default') {
221
		$template->set_var('VALUE', $format);
222
	} else {
223
		$template->set_var('VALUE', '');
224
	}
225
	$template->set_var('NAME', $title);
226
	if(DEFAULT_DATE_FORMAT == $format) {
227
		$template->set_var('SELECTED', 'selected');
228
	} else {
229
		$template->set_var('SELECTED', '');
230
	}
231
	$template->parse('date_format_list', 'date_format_list_block', true);
232
}
233

  
234
// Insert time format list
235
require(ADMIN_PATH.'/interface/time_formats.php');
236
$template->set_block('main_block', 'time_format_list_block', 'time_format_list');
237
foreach($TIME_FORMATS AS $format => $title) {
238
	$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
239
	if($format != 'system_default') {
240
		$template->set_var('VALUE', $format);
241
	} else {
242
		$template->set_var('VALUE', '');
243
	}
244
	$template->set_var('NAME', $title);
245
	if(DEFAULT_TIME_FORMAT == $format) {
246
		$template->set_var('SELECTED', 'selected');
247
	} else {
248
		$template->set_var('SELECTED', '');
249
	}
250
	$template->parse('time_format_list', 'time_format_list_block', true);
251
}
252

  
253
// Insert templates
254
$template->set_block('main_block', 'template_list_block', 'template_list');
255
if($handle = opendir(WB_PATH.'/templates/')) {
256
	while (false !== ($file = readdir($handle))) {
257
		if($file != "." AND $file != ".." AND $file != ".svn" AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) {
258
			include(WB_PATH."/templates/$file/info.php");
259
			$template->set_var('FILE', $file);
260
			$template->set_var('NAME', $template_name);
261
			if($file == DEFAULT_TEMPLATE ? $selected = ' selected' : $selected = '');
262
			$template->set_var('SELECTED', $selected);
263
			$template->parse('template_list', 'template_list_block', true);
264
		}
265
	}
266
}
267

  
268
// Insert templates
269
$template->set_block('main_block', 'editor_list_block', 'editor_list');
270
$file='htmlarea';
271
$module_name='HTMLArea';
272
$template->set_var('FILE', $file);
273
$template->set_var('NAME', $module_name);
274
if((!defined('WYSIWYG_EDITOR') OR $file == WYSIWYG_EDITOR) ? $selected = ' selected' : $selected = '');
275
$template->set_var('SELECTED', $selected);
276
$template->parse('editor_list', 'editor_list_block', true);
277
if($handle = opendir(WB_PATH.'/modules/')) {
278
	while (false !== ($file = readdir($handle))) {
279
		if($file != "." AND $file != ".." AND $file != "CVS" AND is_dir(WB_PATH."/modules/$file") AND file_exists(WB_PATH."/modules/$file/info.php")) {
280
			include(WB_PATH."/modules/$file/info.php");
281
			if ($module_type == 'WYSIWYG') {
282
				$template->set_var('FILE', $file);
283
				$template->set_var('NAME', $module_name);
284
				if((defined('WYSIWYG_EDITOR') AND $file == WYSIWYG_EDITOR) ? $selected = ' selected' : $selected = '');
285
				$template->set_var('SELECTED', $selected);
286
				$template->parse('editor_list', 'editor_list_block', true);
287
			}
288
		}
289
	}
290
}
291

  
292

  
293
// Insert templates for search settings
294
$template->set_block('main_block', 'search_template_list_block', 'search_template_list');
295
if($search_template == '') { $selected = ' selected'; } else { $selected = ''; }
296
$template->set_var(array('FILE' => '', 'NAME' => $TEXT['SYSTEM_DEFAULT'], 'SELECTED' => $selected));
297
$template->parse('search_template_list', 'search_template_list_block', true);
298
if($handle = opendir(WB_PATH.'/templates/')) {
299
	while (false !== ($file = readdir($handle))) {
300
		if($file != "." AND $file != ".." AND $file != ".svn" AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) {
301
			include(WB_PATH."/templates/$file/info.php");
302
			$template->set_var('FILE', $file);
303
			$template->set_var('NAME', $template_name);
304
			if($file == $search_template ? $selected = ' selected' : $selected = '');
305
			$template->set_var('SELECTED', $selected);
306
			$template->parse('search_template_list', 'search_template_list_block', true);
307
		}
308
	}
309
}
310

  
311
// Insert default error reporting values
312
require(ADMIN_PATH.'/interface/er_levels.php');
313
$template->set_block('main_block', 'error_reporting_list_block', 'error_reporting_list');
314
foreach($ER_LEVELS AS $value => $title) {
315
	$template->set_var('VALUE', $value);
316
	$template->set_var('NAME', $title);
317
	if(ER_LEVEL == $value) {
318
		$template->set_var('SELECTED', 'selected');
319
	} else {
320
		$template->set_var('SELECTED', '');
321
	}
322
	$template->parse('error_reporting_list', 'error_reporting_list_block', true);
323
}
324

  
325
// Insert permissions values
326
if($admin->get_permission('settings_advanced') != true) {
327
	$template->set_var('DISPLAY_ADVANCED_BUTTON', 'hide');
328
}
329

  
330
// Insert page level limits
331
$template->set_block('main_block', 'page_level_limit_list_block', 'page_level_limit_list');
332
for($i = 1; $i <= 10; $i++) {
333
	$template->set_var('NUMBER', $i);
334
	if(PAGE_LEVEL_LIMIT == $i) {
335
		$template->set_var('SELECTED', 'selected');
336
	} else {
337
		$template->set_var('SELECTED', '');
338
	}
339
	$template->parse('page_level_limit_list', 'page_level_limit_list_block', true);
340
}
341

  
342
// Work-out if multiple menus feature is enabled
343
if(defined('MULTIPLE_MENUS') AND MULTIPLE_MENUS == true) {
344
	$template->set_var('MULTIPLE_MENUS_ENABLED', ' checked');
345
} else {
346
	$template->set_var('MULTIPLE_MENUS_DISABLED', ' checked');
347
}
348

  
349
// Work-out if page languages feature is enabled
350
if(defined('PAGE_LANGUAGES') AND PAGE_LANGUAGES == true) {
351
	$template->set_var('PAGE_LANGUAGES_ENABLED', ' checked');
352
} else {
353
	$template->set_var('PAGE_LANGUAGES_DISABLED', ' checked');
354
}
355

  
356
// Work-out if smart login feature is enabled
357
if(defined('SMART_LOGIN') AND SMART_LOGIN == true) {
358
	$template->set_var('SMART_LOGIN_ENABLED', ' checked');
359
} else {
360
	$template->set_var('SMART_LOGIN_DISABLED', ' checked');
361
}
362

  
363
// Work-out if section blocks feature is enabled
364
if(defined('SECTION_BLOCKS') AND SECTION_BLOCKS == true) {
365
	$template->set_var('SECTION_BLOCKS_ENABLED', ' checked');
366
} else {
367
	$template->set_var('SECTION_BLOCKS_DISABLED', ' checked');
368
}
369

  
370
// Work-out if homepage redirection feature is enabled
371
if(defined('HOMEPAGE_REDIRECTION') AND HOMEPAGE_REDIRECTION == true) {
372
	$template->set_var('HOMEPAGE_REDIRECTION_ENABLED', ' checked');
373
} else {
374
	$template->set_var('HOMEPAGE_REDIRECTION_DISABLED', ' checked');
375
}
376

  
377
// Work-out which server os should be checked
378
if(OPERATING_SYSTEM == 'linux') {
379
	$template->set_var('LINUX_SELECTED', ' checked');
380
} elseif(OPERATING_SYSTEM == 'windows') {
381
	$template->set_var('WINDOWS_SELECTED', ' checked');
382
}
383

  
384
// Work-out if manage sections feature is enabled
385
if(MANAGE_SECTIONS) {
386
	$template->set_var('MANAGE_SECTIONS_ENABLED', ' checked');
387
} else {
388
	$template->set_var('MANAGE_SECTIONS_DISABLED', ' checked');
389
}
390

  
391
// Work-out if intro feature is enabled
392
if(INTRO_PAGE) {
393
	$template->set_var('INTRO_PAGE_ENABLED', ' checked');
394
} else {
395
	$template->set_var('INTRO_PAGE_DISABLED', ' checked');
396
}
397

  
398
// Work-out if frontend login feature is enabled
399
if(FRONTEND_LOGIN) {
400
	$template->set_var('PRIVATE_ENABLED', ' checked');
401
} else {
402
	$template->set_var('PRIVATE_DISABLED', ' checked');
403
}
404

  
405
// Work-out if page trash feature is disabled, in-line, or separate
406
if(PAGE_TRASH == 'disabled') {
407
	$template->set_var('PAGE_TRASH_DISABLED', ' checked');
408
} elseif(PAGE_TRASH == 'inline') {
409
	$template->set_var('PAGE_TRASH_INLINE', ' checked');
410
} elseif(PAGE_TRASH == 'separate') {
411
	$template->set_var('PAGE_TRASH_SEPARATE', ' checked');
412
}
413

  
414
// Work-out if media home folde feature is enabled
415
if(HOME_FOLDERS) {
416
	$template->set_var('HOME_FOLDERS_ENABLED', ' checked');
417
} else {
418
	$template->set_var('HOME_FOLDERS_DISABLED', ' checked');
419
}
420

  
421
// Insert search select
422
if(SEARCH == 'private') {
423
	$template->set_var('PRIVATE_SEARCH', 'selected');
424
} elseif(SEARCH == 'registered') {
425
	$template->set_var('REGISTERED_SEARCH', 'selected');
426
} elseif(SEARCH == 'none') {
427
	$template->set_var('NONE_SEARCH', 'selected');
428
}
429

  
430
// Work-out if 777 permissions are set
431
if(STRING_FILE_MODE == '0777' AND STRING_DIR_MODE == '0777') {
432
	$template->set_var('WORLD_WRITEABLE_SELECTED', ' checked');
433
}
434

  
435
// Work-out which file mode boxes are checked
436
if(extract_permission(STRING_FILE_MODE, 'u', 'r')) {
437
	$template->set_var('FILE_U_R_CHECKED', 'checked');
438
}
439
if(extract_permission(STRING_FILE_MODE, 'u', 'w')) {
440
	$template->set_var('FILE_U_W_CHECKED', 'checked');
441
}
442
if(extract_permission(STRING_FILE_MODE, 'u', 'e')) {
443
	$template->set_var('FILE_U_E_CHECKED', 'checked');
444
}
445
if(extract_permission(STRING_FILE_MODE, 'g', 'r')) {
446
	$template->set_var('FILE_G_R_CHECKED', 'checked');
447
}
448
if(extract_permission(STRING_FILE_MODE, 'g', 'w')) {
449
	$template->set_var('FILE_G_W_CHECKED', 'checked');
450
}
451
if(extract_permission(STRING_FILE_MODE, 'g', 'e')) {
452
	$template->set_var('FILE_G_E_CHECKED', 'checked');
453
}
454
if(extract_permission(STRING_FILE_MODE, 'o', 'r')) {
455
	$template->set_var('FILE_O_R_CHECKED', 'checked');
456
}
457
if(extract_permission(STRING_FILE_MODE, 'o', 'w')) {
458
	$template->set_var('FILE_O_W_CHECKED', 'checked');
459
}
460
if(extract_permission(STRING_FILE_MODE, 'o', 'e')) {
461
	$template->set_var('FILE_O_E_CHECKED', 'checked');
462
}
463
// Work-out which dir mode boxes are checked
464
if(extract_permission(STRING_DIR_MODE, 'u', 'r')) {
465
	$template->set_var('DIR_U_R_CHECKED', 'checked');
466
}
467
if(extract_permission(STRING_DIR_MODE, 'u', 'w')) {
468
	$template->set_var('DIR_U_W_CHECKED', 'checked');
469
}
470
if(extract_permission(STRING_DIR_MODE, 'u', 'e')) {
471
	$template->set_var('DIR_U_E_CHECKED', 'checked');
472
}
473
if(extract_permission(STRING_DIR_MODE, 'g', 'r')) {
474
	$template->set_var('DIR_G_R_CHECKED', 'checked');
475
}
476
if(extract_permission(STRING_DIR_MODE, 'g', 'w')) {
477
	$template->set_var('DIR_G_W_CHECKED', 'checked');
478
}
479
if(extract_permission(STRING_DIR_MODE, 'g', 'e')) {
480
	$template->set_var('DIR_G_E_CHECKED', 'checked');
481
}
482
if(extract_permission(STRING_DIR_MODE, 'o', 'r')) {
483
	$template->set_var('DIR_O_R_CHECKED', 'checked');
484
}
485
if(extract_permission(STRING_DIR_MODE, 'o', 'w')) {
486
	$template->set_var('DIR_O_W_CHECKED', 'checked');
487
}
488
if(extract_permission(STRING_DIR_MODE, 'o', 'e')) {
489
	$template->set_var('DIR_O_E_CHECKED', 'checked');
490
}
491

  
492
// Insert WYSIWYG style value into template
493
$template->set_var('WYSIWYG_STYLE', $admin->strip_slashes_dummy(WYSIWYG_STYLE));
494

  
495
// Insert Server Email value into template
496
$template->set_var('SERVER_EMAIL', SERVER_EMAIL);
497

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

  
586
// Parse template objects output
587
$template->parse('main', 'main_block', false);
588
$template->pparse('output', 'page');
589

  
590
$admin->print_footer();
591

  
592
?>
trunk/wb/admin/settings/template.html
1
</div><!-- BEGIN main_block -->
2

  
3
<script language="javascript" type="text/javascript">
4
function toggle_radio(group_name, set_value) {
5
	if(set_value == true) {
6
		document.getElementById(group_name + "_true").checked = true;
7
		document.getElementById(group_name + "_false").checked = false;
8
	} else {
9
		document.getElementById(group_name + "_true").checked = false;
10
		document.getElementById(group_name + "_false").checked = true;
11
	}
12
}
13
function change_os(type) {
14
	if(type == 'linux') {
15
		document.getElementById('operating_system_linux').checked = true;
16
		document.getElementById('operating_system_windows').checked = false;
17
		document.getElementById('file_perms_box1').style.display = 'block';
18
		document.getElementById('file_perms_box2').style.display = 'block';
19
		document.getElementById('file_perms_box3').style.display = 'block';
20
	} else if(type == 'windows') {
21
		document.getElementById('operating_system_linux').checked = false;
22
		document.getElementById('operating_system_windows').checked = true;
23
		document.getElementById('file_perms_box1').style.display = 'none';
24
		document.getElementById('file_perms_box2').style.display = 'none';
25
		document.getElementById('file_perms_box3').style.display = 'none';
26
	}
27
}
28
function change_page_trash(type) {
29
	if(type == 'inline') {
30
		document.getElementById("page_trash_disabled").checked = false;
31
		document.getElementById("page_trash_inline").checked = true;
32
		document.getElementById("page_trash_separate").checked = false;
33
	} else if(type == 'separate') {
34
		document.getElementById("page_trash_disabled").checked = false;
35
		document.getElementById("page_trash_inline").checked = false;
36
		document.getElementById("page_trash_separate").checked = true;
37
	} else {
38
		document.getElementById("page_trash_disabled").checked = true;
39
		document.getElementById("page_trash_inline").checked = false;
40
		document.getElementById("page_trash_separate").checked = false;
41
	}
1
</div><!-- BEGIN main_block -->
2

  
3
<script language="javascript" type="text/javascript">
4
function toggle_radio(group_name, set_value) {
5
	if(set_value == true) {
6
		document.getElementById(group_name + "_true").checked = true;
7
		document.getElementById(group_name + "_false").checked = false;
8
	} else {
9
		document.getElementById(group_name + "_true").checked = false;
10
		document.getElementById(group_name + "_false").checked = true;
11
	}
42 12
}
43
</script>
44

  
45
<style>
46
.settings_table td {
47
	vertical-align: top;
48
	text-align: left;
49
}
50
.setting_name {
51
	width: 180px;
52
}
53
.setting_value input, .setting_value select, .setting_value textarea {
54
	width: 100%;
55
}
56
.setting_value textarea {
57
	height: 65px;
58
}
59
#file_mode input {
60
	width: 12px;
61
	height: 12px;
62
}
63
#dir_mode input {
64
	width: 12px;
65
	height: 12px;
66
}
67
.advanced {
68
	display: {DISPLAY_ADVANCED};
69
}
70
.save, .reset {
71
	width: 100px;
72
}
73
#hide2 {
74
	display: none;
75
}
76
</style>
77

  
78
<form name="settings" action="save.php" method="post">
79
<input type="hidden" name="advanced" value="{ADVANCED}" />
80

  
81
<table cellpadding="3" cellspacing="0" border="0" align="center" width="100%" class="settings_table">
82
<tr>
83
	<td colspan="3">
84
		<h2>{HEADING_GENERAL_SETTINGS}</h2>
85
	</td>
86
</tr>
87
<tr>
88
	<td class="setting_name">{TEXT_WEBSITE_TITLE}:</td>
89
	<td class="setting_value" colspan="2">
90
		<input type="text" name="title" value="{TITLE}" />
91
	</td>
92
	<script language="javascript" type="text/javascript">
93
	document.settings.title.focus();
94
	</script>
95
</tr>
96
<tr>
97
	<td class="setting_name">{TEXT_WEBSITE_DESCRIPTION}:</td>
98
	<td class="setting_value" colspan="2">
99
		<textarea name="description">{DESCRIPTION}</textarea>
100
	</td>
101
</tr>
102
<tr>
103
	<td class="setting_name">{TEXT_WEBSITE_KEYWORDS}:</td>
104
	<td class="setting_value" colspan="2">
105
		<textarea name="keywords">{KEYWORDS}</textarea>
106
	</td>
107
</tr>
108
<tr class="advanced">
109
	<td class="setting_name">{TEXT_WEBSITE_HEADER}:</td>
110
	<td class="setting_value" colspan="2">
111
		<textarea name="header">{HEADER}</textarea>
112
	</td>
113
</tr>
114
<tr>
115
	<td class="setting_name">{TEXT_WEBSITE_FOOTER}:</td>
116
	<td class="setting_value" colspan="2">
117
		<textarea name="footer">{FOOTER}</textarea>
118
	</td>
119
</tr>
120
<tr>
121
	<td class="setting_name">{TEXT_PAGE_LEVEL_LIMIT}:</td>
122
	<td class="setting_value" colspan="2">
123
		<select name="page_level_limit">
124
		<!-- BEGIN page_level_limit_list_block -->
125
			<option value="{NUMBER}"{SELECTED}>{NUMBER}</option>
126
		<!-- END page_level_limit_list_block -->
127
		</select>
128
	</td>
129
</tr>
130
<tr>
131
	<td class="setting_name">{TEXT_PAGE_TRASH}:</td>
132
	<td class="setting_value" colspan="2">
133
		<input type="radio" name="page_trash" id="page_trash_disabled" style="width: 14px; height: 14px;" value="disabled"{PAGE_TRASH_DISABLED} />
134
		<font style="cursor: pointer;" onclick="javascript: change_page_trash('disabled');">{TEXT_DISABLED}</font>
135
		<input type="radio" name="page_trash" id="page_trash_inline" style="width: 14px; height: 14px;" value="inline"{PAGE_TRASH_INLINE} />
136
		<font style="cursor: pointer;" onclick="javascript: change_page_trash('inline');">{TEXT_INLINE}</font>
137
		<input type="radio" name="page_trash" id="page_trash_separate" style="width: 14px; height: 14px;" value="separate"{PAGE_TRASH_SEPARATE} />
138
		<font style="cursor: pointer;" onclick="javascript: change_page_trash('separate');">{TEXT_SEPARATE}</font>
139
	</td>
140
</tr>
141
<tr class="advanced">
142
	<td class="setting_name">{TEXT_PAGE_LANGUAGES}:</td>
143
	<td class="setting_value" colspan="2">
144
		<input type="radio" name="page_languages" id="page_languages_true" style="width: 14px; height: 14px;" value="true"{PAGE_LANGUAGES_ENABLED} />
145
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('page_languages', true);">{TEXT_ENABLED}</font>
146
		<input type="radio" name="page_languages" id="page_languages_false" style="width: 14px; height: 14px;" value="false"{PAGE_LANGUAGES_DISABLED} />
147
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('page_languages', false);">{TEXT_DISABLED}</font>
148
	</td>
149
</tr>
150
<tr class="advanced">
151
	<td class="setting_name">{TEXT_MULTIPLE_MENUS}:</td>
152
	<td class="setting_value" colspan="2">
153
		<input type="radio" name="multiple_menus" id="multiple_menus_true" style="width: 14px; height: 14px;" value="true"{MULTIPLE_MENUS_ENABLED} />
154
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('multiple_menus', true);">{TEXT_ENABLED}</font>
155
		<input type="radio" name="multiple_menus" id="multiple_menus_false" style="width: 14px; height: 14px;" value="false"{MULTIPLE_MENUS_DISABLED} />
156
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('multiple_menus', false);">{TEXT_DISABLED}</font>
157
	</td>
158
</tr>
159
<tr>
160
	<td class="setting_name">{TEXT_HOME_FOLDERS}:</td>
161
	<td class="setting_value" colspan="2">
162
		<input type="radio" name="home_folders" id="home_folders_true" style="width: 14px; height: 14px;" value="true"{HOME_FOLDERS_ENABLED} />
163
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('home_folders', true);">{TEXT_ENABLED}</font>
164
		<input type="radio" name="home_folders" id="home_folders_false" style="width: 14px; height: 14px;" value="false"{HOME_FOLDERS_DISABLED} />
165
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('home_folders', false);">{TEXT_DISABLED}</font>
166
	</td>
167
</tr>
168
<tr class="advanced">
169
	<td class="setting_name">{TEXT_MANAGE_SECTIONS}:</td>
170
	<td class="setting_value" colspan="2">
171
		<input type="radio" name="manage_sections" id="manage_sections_true" style="width: 14px; height: 14px;" value="true"{MANAGE_SECTIONS_ENABLED} />
172
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('manage_sections', true);">{TEXT_ENABLED}</font>
173
		<input type="radio" name="manage_sections" id="manage_sections_false" style="width: 14px; height: 14px;" value="false"{MANAGE_SECTIONS_DISABLED} />
174
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('manage_sections', false);">{TEXT_DISABLED}</font>
175
	</td>
176
</tr>
177
<tr class="advanced">
178
	<td class="setting_name">{TEXT_SECTION_BLOCKS}:</td>
179
	<td class="setting_value" colspan="2">
180
		<input type="radio" name="section_blocks" id="section_blocks_true" style="width: 14px; height: 14px;" value="true"{SECTION_BLOCKS_ENABLED} />
181
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('section_blocks', true);">{TEXT_ENABLED}</font>
182
		<input type="radio" name="section_blocks" id="section_blocks_false" style="width: 14px; height: 14px;" value="false"{SECTION_BLOCKS_DISABLED} />
183
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('section_blocks', false);">{TEXT_DISABLED}</font>
184
	</td>
185
</tr>
186
<tr>
187
	<td class="setting_name">{TEXT_INTRO_PAGE}:</td>
188
	<td class="setting_value" colspan="2">
189
		<input type="radio" name="intro_page" id="intro_page_true" style="width: 14px; height: 14px;" value="true"{INTRO_PAGE_ENABLED} />
190
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('intro_page', true);">{TEXT_ENABLED}</font>
191
		<input type="radio" name="intro_page" id="intro_page_false" style="width: 14px; height: 14px;" value="false"{INTRO_PAGE_DISABLED} />
192
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('intro_page', false);">{TEXT_DISABLED}</font>
193
	</td>
194
</tr>
195
<tr class="advanced">
196
	<td class="setting_name">{TEXT_HOMEPAGE_REDIRECTION}:</td>
197
	<td class="setting_value" colspan="2">
198
		<input type="radio" name="homepage_redirection" id="homepage_redirection_true" style="width: 14px; height: 14px;" value="true"{HOMEPAGE_REDIRECTION_ENABLED} />
199
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('homepage_redirection', true);">{TEXT_ENABLED}</font>
200
		<input type="radio" name="homepage_redirection" id="homepage_redirection_false" style="width: 14px; height: 14px;" value="false"{HOMEPAGE_REDIRECTION_DISABLED} />
201
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('homepage_redirection', false);">{TEXT_DISABLED}</font>
202
	</td>
203
</tr>
204
<tr class="advanced">
205
	<td class="setting_name">{TEXT_SMART_LOGIN}:</td>
206
	<td class="setting_value" colspan="2">
207
		<input type="radio" name="smart_login" id="smart_login_true" style="width: 14px; height: 14px;" value="true"{SMART_LOGIN_ENABLED} />
208
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('smart_login', true);">{TEXT_ENABLED}</font>
209
		<input type="radio" name="smart_login" id="smart_login_false" style="width: 14px; height: 14px;" value="false"{SMART_LOGIN_DISABLED} />
210
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('smart_login', false);">{TEXT_DISABLED}</font>
211
	</td>
212
</tr>
213
<tr>
214
	<td class="setting_name">{TEXT_LOGIN}:</td>
215
	<td class="setting_value" colspan="2">
216
		<input type="radio" name="frontend_login" id="frontend_login_true" style="width: 14px; height: 14px;" value="true"{PRIVATE_ENABLED} />
217
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('frontend_login', true);">{TEXT_ENABLED}</font>
218
		<input type="radio" name="frontend_login" id="frontend_login_false" style="width: 14px; height: 14px;" value="false"{PRIVATE_DISABLED} />
219
		<font style="cursor: pointer;" onclick="javascript: toggle_radio('frontend_login', false);">{TEXT_DISABLED}</font>
220
	</td>
221
</tr>
222
<tr>
223
	<td class="setting_name">{TEXT_SIGNUP}:</td>
224
	<td class="setting_value" colspan="2">
225
		<select name="frontend_signup">
226
			<option value="false">{TEXT_DISABLED}</option>
227
			<!-- BEGIN group_list_block -->
228
				<option value="{ID}" {SELECTED}>{NAME}</option>
229
			<!-- END group_list_block -->
230
		</select>
231
	</td>
232
</tr>
233
<tr class="advanced">
234
	<td class="setting_name">{TEXT_PHP_ERROR_LEVEL}:</td>
235
	<td class="setting_value" colspan="2">
236
		<select name="er_level">
237
			<option value="">{TEXT_PLEASE_SELECT}...</option>
238
			<!-- BEGIN error_reporting_list_block -->
239
				<option value="{VALUE}"{SELECTED}>{NAME}</option>
240
			<!-- END error_reporting_list_block -->
241
		</select>
242
	</td>
243
</tr>
244
<tr class="advanced">
245
	<td class="setting_name">{TEXT_WYSIWYG_STYLE}:</td>
246
	<td class="setting_value" colspan="2">
247
		<input type="text" name="wysiwyg_style" value="{WYSIWYG_STYLE}" />
248
	</td>
249
</tr>
250
<tr class="advanced">
251
	<td class="setting_name">{TEXT_SERVER_EMAIL}:</td>
252
	<td class="setting_value" colspan="2">
253
		<input type="text" name="server_email" value="{SERVER_EMAIL}" />
254
	</td>
255
</tr>
256
<tr>
257
	<td>&nbsp;</td>
258
	<td>
259
		<input type="submit" name="submit" value="{TEXT_SAVE}" class="save" />
260
		<input type="reset" name="reset" value="{TEXT_RESET}" class="reset" />
261
	</td>
262
	<td style="text-align: right;">
263
		<button onclick="window.location = '{ADVANCED_LINK}'; return false;" class="{DISPLAY_ADVANCED_BUTTON}">{ADVANCED_BUTTON}</button>
264
	</td>
265
</tr>
266
<tr>
267
	<td colspan="3" style="padding-top: 10px;">
268
		<h2>{HEADING_DEFAULT_SETTINGS}</h2>
269
	</td>
270
</tr>
271
<tr>
272
	<td class="setting_name">{TEXT_LANGUAGE}:</td>
273
	<td class="setting_value" colspan="2">
274
		<select name="language">
275
			<!-- BEGIN language_list_block -->
276
			<option value="{CODE}"{SELECTED}>{NAME} ({CODE})</option>
277
			<!-- END language_list_block -->
278
		</select>
279
	</td>
280
</tr>
281
<tr>
282
	<td class="setting_name">{TEXT_TIMEZONE}:</td>
283
	<td class="setting_value" colspan="2">
284
		<select name="timezone">
285
			<option value="0">{TEXT_PLEASE_SELECT}...</option>
286
			<!-- BEGIN timezone_list_block -->
287
				<option value="{VALUE}" {SELECTED}>{NAME}</option>
288
			<!-- END timezone_list_block -->
289
		</select>
290
	</td>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff