Project

General

Profile

« Previous | Next » 

Revision 8

Added by stefan about 19 years ago

All occurrences of "CVS" in the code are replace by ".svn"

View differences:

index.php
1
<?php
2

  
3
// $Id: index.php,v 1.14 2005/06/21 09:15:39 rdjurovich Exp $
4

  
5
/*
6

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

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

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

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

  
24
*/
25

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  
253
// Insert templates
254
$template->set_block('main_block', 'template_list_block', 'template_list');
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');

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

  
268
// Insert templates for search settings
269
$template->set_block('main_block', 'search_template_list_block', 'search_template_list');
270
if($search_template == '') { $selected = ' selected'; } else { $selected = ''; }
271
$template->set_var(array('FILE' => '', 'NAME' => $TEXT['SYSTEM_DEFAULT'], 'SELECTED' => $selected));
272
$template->parse('search_template_list', 'search_template_list_block', true);
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);

273 271
if($handle = opendir(WB_PATH.'/templates/')) {
274 272
	while (false !== ($file = readdir($handle))) {
275
		if($file != "." AND $file != ".." AND $file != "CVS" AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) {
276
			include(WB_PATH."/templates/$file/info.php");
277
			$template->set_var('FILE', $file);
278
			$template->set_var('NAME', $template_name);
279
			if($file == $search_template ? $selected = ' selected' : $selected = '');
280
			$template->set_var('SELECTED', $selected);
281
			$template->parse('search_template_list', 'search_template_list_block', true);
282
		}
283
	}
284
}
285

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  
467
// Insert WYSIWYG style value into template
468
$template->set_var('WYSIWYG_STYLE', stripslashes(WYSIWYG_STYLE));
469

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

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

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

  
564
$admin->print_footer();
565

  
566
?>
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', stripslashes(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
?>

Also available in: Unified diff