1<?php
2/**
3 * Forum settings management page.
4 *
5 * Allows administrators to control many of the settings used in the site.
6 *
7 * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
8 * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
9 * @package PunBB
10 */
11
12
13if (!defined('FORUM_ROOT'))
14	define('FORUM_ROOT', '../');
15require FORUM_ROOT.'include/common.php';
16require FORUM_ROOT.'include/common_admin.php';
17
18($hook = get_hook('aop_start')) ? eval($hook) : null;
19
20if ($forum_user['g_id'] != FORUM_ADMIN)
21	message($lang_common['No permission']);
22
23// Load the admin.php language file
24require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_common.php';
25require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_settings.php';
26
27$section = isset($_GET['section']) ? $_GET['section'] : null;
28
29
30if (isset($_POST['form_sent']))
31{
32	$form = array_map('trim', $_POST['form']);
33
34	($hook = get_hook('aop_form_submitted')) ? eval($hook) : null;
35
36	// Validate input depending on section
37	switch ($section)
38	{
39		case 'setup':
40		{
41			($hook = get_hook('aop_setup_validation')) ? eval($hook) : null;
42
43			if ($form['board_title'] == '')
44				message($lang_admin_settings['Error no board title']);
45
46			// Clean default_lang, default_style, and sef
47			$form['default_style'] = preg_replace('#[\.\\\/]#', '', $form['default_style']);
48			$form['default_lang'] = preg_replace('#[\.\\\/]#', '', $form['default_lang']);
49			$form['sef'] = preg_replace('#[\.\\\/]#', '', $form['sef']);
50
51			// Make sure default_lang, default_style, and sef exist
52			if (!file_exists(FORUM_ROOT.'style/'.$form['default_style'].'/'.$form['default_style'].'.php'))
53				message($lang_common['Bad request']);
54			if (!file_exists(FORUM_ROOT.'lang/'.$form['default_lang'].'/common.php'))
55				message($lang_common['Bad request']);
56			if (!file_exists(FORUM_ROOT.'include/url/'.$form['sef'].'/forum_urls.php'))
57				message($lang_common['Bad request']);
58			if (!isset($form['default_dst']) || $form['default_dst'] != '1')
59				$form['default_dst'] = '0';
60
61			$form['timeout_visit'] = intval($form['timeout_visit']);
62			$form['timeout_online'] = intval($form['timeout_online']);
63			$form['redirect_delay'] = intval($form['redirect_delay']);
64
65			if ($form['timeout_online'] >= $form['timeout_visit'])
66				message($lang_admin_settings['Error timeout value']);
67
68			$form['disp_topics_default'] = (intval($form['disp_topics_default']) > 0) ? intval($form['disp_topics_default']) : 1;
69			$form['disp_posts_default'] = (intval($form['disp_posts_default']) > 0) ? intval($form['disp_posts_default']) : 1;
70
71			if ($form['additional_navlinks'] != '')
72				$form['additional_navlinks'] = forum_trim(forum_linebreaks($form['additional_navlinks']));
73
74			break;
75		}
76
77		case 'features':
78		{
79			($hook = get_hook('aop_features_validation')) ? eval($hook) : null;
80
81			if (!isset($form['search_all_forums']) || $form['search_all_forums'] != '1') $form['search_all_forums'] = '0';
82			if (!isset($form['ranks']) || $form['ranks'] != '1') $form['ranks'] = '0';
83			if (!isset($form['censoring']) || $form['censoring'] != '1') $form['censoring'] = '0';
84			if (!isset($form['quickjump']) || $form['quickjump'] != '1') $form['quickjump'] = '0';
85			if (!isset($form['show_version']) || $form['show_version'] != '1') $form['show_version'] = '0';
86			if (!isset($form['show_moderators']) || $form['show_moderators'] != '1') $form['show_moderators'] = '0';
87			if (!isset($form['users_online']) || $form['users_online'] != '1') $form['users_online'] = '0';
88
89			if (!isset($form['quickpost']) || $form['quickpost'] != '1') $form['quickpost'] = '0';
90			if (!isset($form['subscriptions']) || $form['subscriptions'] != '1') $form['subscriptions'] = '0';
91			if (!isset($form['force_guest_email']) || $form['force_guest_email'] != '1') $form['force_guest_email'] = '0';
92			if (!isset($form['show_dot']) || $form['show_dot'] != '1') $form['show_dot'] = '0';
93			if (!isset($form['topic_views']) || $form['topic_views'] != '1') $form['topic_views'] = '0';
94			if (!isset($form['show_post_count']) || $form['show_post_count'] != '1') $form['show_post_count'] = '0';
95			if (!isset($form['show_user_info']) || $form['show_user_info'] != '1') $form['show_user_info'] = '0';
96
97			if (!isset($form['message_bbcode']) || $form['message_bbcode'] != '1') $form['message_bbcode'] = '0';
98			if (!isset($form['message_img_tag']) || $form['message_img_tag'] != '1') $form['message_img_tag'] = '0';
99			if (!isset($form['smilies']) || $form['smilies'] != '1') $form['smilies'] = '0';
100			if (!isset($form['make_links']) || $form['make_links'] != '1') $form['make_links'] = '0';
101			if (!isset($form['message_all_caps']) || $form['message_all_caps'] != '1') $form['message_all_caps'] = '0';
102			if (!isset($form['subject_all_caps']) || $form['subject_all_caps'] != '1') $form['subject_all_caps'] = '0';
103
104			$form['indent_num_spaces'] = intval($form['indent_num_spaces']);
105			$form['quote_depth'] = intval($form['quote_depth']);
106
107			if (!isset($form['signatures']) || $form['signatures'] != '1') $form['signatures'] = '0';
108			if (!isset($form['sig_bbcode']) || $form['sig_bbcode'] != '1') $form['sig_bbcode'] = '0';
109			if (!isset($form['sig_img_tag']) || $form['sig_img_tag'] != '1') $form['sig_img_tag'] = '0';
110			if (!isset($form['smilies_sig']) || $form['smilies_sig'] != '1') $form['smilies_sig'] = '0';
111			if (!isset($form['sig_all_caps']) || $form['sig_all_caps'] != '1') $form['sig_all_caps'] = '0';
112
113			$form['sig_length'] = intval($form['sig_length']);
114			$form['sig_lines'] = intval($form['sig_lines']);
115
116			if (!isset($form['avatars']) || $form['avatars'] != '1') $form['avatars'] = '0';
117
118			// Make sure avatars_dir doesn't end with a slash
119			if (substr($form['avatars_dir'], -1) == '/')
120				$form['avatars_dir'] = substr($form['avatars_dir'], 0, -1);
121
122			$form['avatars_width'] = intval($form['avatars_width']);
123			$form['avatars_height'] = intval($form['avatars_height']);
124			$form['avatars_size'] = intval($form['avatars_size']);
125
126			if (!isset($form['check_for_updates']) || $form['check_for_updates'] != '1') $form['check_for_updates'] = '0';
127			if (!isset($form['check_for_versions']) || $form['check_for_versions'] != '1') $form['check_for_versions'] = '0';
128
129			if (!isset($form['mask_passwords']) || $form['mask_passwords'] != '1') $form['mask_passwords'] = '0';
130			if (!isset($form['gzip']) || $form['gzip'] != '1') $form['gzip'] = '0';
131
132			break;
133		}
134
135		case 'email':
136		{
137			($hook = get_hook('aop_email_validation')) ? eval($hook) : null;
138
139			if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED'))
140				require FORUM_ROOT.'include/email.php';
141
142			$form['admin_email'] = strtolower($form['admin_email']);
143			if (!is_valid_email($form['admin_email']))
144				message($lang_admin_settings['Error invalid admin e-mail']);
145
146			$form['webmaster_email'] = strtolower($form['webmaster_email']);
147			if (!is_valid_email($form['webmaster_email']))
148				message($lang_admin_settings['Error invalid web e-mail']);
149
150			if (!isset($form['smtp_ssl']) || $form['smtp_ssl'] != '1') $form['smtp_ssl'] = '0';
151
152			break;
153		}
154
155		case 'announcements':
156		{
157			($hook = get_hook('aop_announcements_validation')) ? eval($hook) : null;
158
159			if (!isset($form['announcement']) || $form['announcement'] != '1') $form['announcement'] = '0';
160
161			if ($form['announcement_message'] != '')
162				$form['announcement_message'] = forum_linebreaks($form['announcement_message']);
163			else
164				$form['announcement_message'] = $lang_admin_settings['Announcement message default'];
165
166			break;
167		}
168
169		case 'registration':
170		{
171			($hook = get_hook('aop_registration_validation')) ? eval($hook) : null;
172
173			if (!isset($form['regs_allow']) || $form['regs_allow'] != '1') $form['regs_allow'] = '0';
174			if (!isset($form['regs_verify']) || $form['regs_verify'] != '1') $form['regs_verify'] = '0';
175			if (!isset($form['allow_banned_email']) || $form['allow_banned_email'] != '1') $form['allow_banned_email'] = '0';
176			if (!isset($form['allow_dupe_email']) || $form['allow_dupe_email'] != '1') $form['allow_dupe_email'] = '0';
177			if (!isset($form['regs_report']) || $form['regs_report'] != '1') $form['regs_report'] = '0';
178
179			if (!isset($form['rules']) || $form['rules'] != '1') $form['rules'] = '0';
180
181			if ($form['rules_message'] != '')
182				$form['rules_message'] = forum_linebreaks($form['rules_message']);
183			else
184				$form['rules_message'] = $lang_admin_settings['Rules default'];
185
186			break;
187		}
188
189		case 'maintenance':
190		{
191			($hook = get_hook('aop_maintenance_validation')) ? eval($hook) : null;
192
193			if (!isset($form['maintenance']) || $form['maintenance'] != '1') $form['maintenance'] = '0';
194
195			if ($form['maintenance_message'] != '')
196				$form['maintenance_message'] = forum_linebreaks($form['maintenance_message']);
197			else
198				$form['maintenance_message'] = $lang_admin_settings['Maintenance message default'];
199
200			break;
201		}
202
203		default:
204		{
205			($hook = get_hook('aop_new_section_validation')) ? eval($hook) : null;
206			break;
207		}
208	}
209
210	($hook = get_hook('aop_pre_update_configuration')) ? eval($hook) : null;
211
212	foreach ($form as $key => $input)
213	{
214		// Only update permission values that have changed
215		if (array_key_exists('p_'.$key, $forum_config) && $forum_config['p_'.$key] != $input)
216		{
217			$query = array(
218				'UPDATE'	=> 'config',
219				'SET'		=> 'conf_value='.intval($input),
220				'WHERE'		=> 'conf_name=\'p_'.$forum_db->escape($key).'\''
221			);
222
223			($hook = get_hook('aop_qr_update_permission_conf')) ? eval($hook) : null;
224			$forum_db->query_build($query) or error(__FILE__, __LINE__);
225		}
226
227		// Only update option values that have changed
228		if (array_key_exists('o_'.$key, $forum_config) && $forum_config['o_'.$key] != $input)
229		{
230			if ($input != '' || is_int($input))
231				$value = '\''.$forum_db->escape($input).'\'';
232			else
233				$value = 'NULL';
234
235			$query = array(
236				'UPDATE'	=> 'config',
237				'SET'		=> 'conf_value='.$value,
238				'WHERE'		=> 'conf_name=\'o_'.$forum_db->escape($key).'\''
239			);
240
241			($hook = get_hook('aop_qr_update_permission_option')) ? eval($hook) : null;
242			$forum_db->query_build($query) or error(__FILE__, __LINE__);
243		}
244	}
245
246	// Regenerate the config cache
247	if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
248		require FORUM_ROOT.'include/cache.php';
249
250	generate_config_cache();
251
252
253	// If changed sef - remove quick-jump cache
254	if (!empty($forum_config['o_sef']) && !empty($form['sef']))
255	{
256		if ($forum_config['o_sef'] != $form['sef'])
257		{
258			clean_quickjump_cache();
259		}
260	}
261
262	// Add flash message
263	$forum_flash->add_info($lang_admin_settings['Settings updated']);
264
265	($hook = get_hook('aop_pre_redirect')) ? eval($hook) : null;
266
267	redirect(forum_link($forum_url['admin_settings_'.$section]), $lang_admin_settings['Settings updated']);
268}
269
270
271if (!$section || $section == 'setup')
272{
273	// Setup the form
274	$forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
275
276	// Setup breadcrumbs
277	$forum_page['crumbs'] = array(
278		array($forum_config['o_board_title'], forum_link($forum_url['index'])),
279		array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])),
280		array($lang_admin_common['Settings'], forum_link($forum_url['admin_settings_setup'])),
281		array($lang_admin_common['Setup'], forum_link($forum_url['admin_settings_setup']))
282	);
283
284	($hook = get_hook('aop_setup_pre_header_load')) ? eval($hook) : null;
285
286	define('FORUM_PAGE_SECTION', 'settings');
287	define('FORUM_PAGE', 'admin-settings-setup');
288	require FORUM_ROOT.'header.php';
289
290	// START SUBST - <!-- forum_main -->
291	ob_start();
292
293	($hook = get_hook('aop_setup_output_start')) ? eval($hook) : null;
294
295?>
296	<div class="main-content main-frm">
297		<form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_setup']) ?>">
298			<div class="hidden">
299				<input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_settings_setup'])) ?>" />
300				<input type="hidden" name="form_sent" value="1" />
301			</div>
302				<div class="content-head">
303					<h2 class="hn"><span><?php echo $lang_admin_settings['Setup personal'] ?></span></h2>
304				</div>
305<?php ($hook = get_hook('aop_setup_pre_personal_fieldset')) ? eval($hook) : null; ?>
306				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
307					<legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup personal legend'] ?></strong></legend>
308<?php ($hook = get_hook('aop_setup_pre_board_title')) ? eval($hook) : null; ?>
309					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
310						<div class="sf-box text">
311							<label for="fld<?php echo ++$forum_page['fld_count'] ?>">
312								<span><?php echo $lang_admin_settings['Board title label'] ?></span>
313							</label><br />
314							<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[board_title]" size="50" maxlength="255" value="<?php echo forum_htmlencode($forum_config['o_board_title']) ?>" /></span>
315						</div>
316					</div>
317<?php ($hook = get_hook('aop_setup_pre_board_descrip')) ? eval($hook) : null; ?>
318					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
319						<div class="sf-box text">
320							<label for="fld<?php echo ++$forum_page['fld_count'] ?>">
321								<span><?php echo $lang_admin_settings['Board description label'] ?></span>
322							</label><br />
323							<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[board_desc]" size="50" maxlength="255" value="<?php echo forum_htmlencode($forum_config['o_board_desc']) ?>" /></span>
324						</div>
325					</div>
326<?php ($hook = get_hook('aop_setup_pre_default_style')) ? eval($hook) : null; ?>
327					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
328						<div class="sf-box select">
329							<label for="fld<?php echo ++$forum_page['fld_count'] ?>">
330								<span><?php echo $lang_admin_settings['Default style label'] ?></span>
331							</label><br />
332							<span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[default_style]">
333<?php
334
335	$styles = get_style_packs();
336	foreach ($styles as $style)
337	{
338		if ($forum_config['o_default_style'] == $style)
339			echo "\t\t\t\t\t\t\t\t".'<option value="'.$style.'" selected="selected">'.str_replace('_', ' ', $style).'</option>'."\n";
340		else
341			echo "\t\t\t\t\t\t\t\t".'<option value="'.$style.'">'.str_replace('_', ' ', $style).'</option>'."\n";
342	}
343
344?>
345							</select></span>
346						</div>
347					</div>
348<?php ($hook = get_hook('aop_setup_pre_personal_fieldset_end')) ? eval($hook) : null; ?>
349				</fieldset>
350<?php
351
352	($hook = get_hook('aop_setup_personal_fieldset_end')) ? eval($hook) : null;
353
354	// Reset counter
355	$forum_page['group_count'] = $forum_page['item_count'] = 0;
356
357?>
358				<div class="content-head">
359					<h2 class="hn"><span><?php echo $lang_admin_settings['Setup local'] ?></span></h2>
360				</div>
361<?php ($hook = get_hook('aop_setup_pre_local_fieldset')) ? eval($hook) : null; ?>
362				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
363					<legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup local legend'] ?></strong></legend>
364<?php ($hook = get_hook('aop_setup_pre_default_language')) ? eval($hook) : null; ?>
365					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
366						<div class="sf-box select">
367							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Default language label'] ?></span><small><?php echo $lang_admin_settings['Default language help'] ?></small></label><br />
368							<span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[default_lang]">
369<?php
370
371	$languages = get_language_packs();
372	foreach ($languages as $lang)
373	{
374		if ($forum_config['o_default_lang'] == $lang)
375			echo "\t\t\t\t\t\t\t\t".'<option value="'.$lang.'" selected="selected">'.$lang.'</option>'."\n";
376		else
377			echo "\t\t\t\t\t\t\t\t".'<option value="'.$lang.'">'.$lang.'</option>'."\n";
378	}
379
380	// Load the profile.php language file
381	require FORUM_ROOT.'lang/'.$forum_user['language'].'/profile.php';
382
383?>
384							</select></span>
385						</div>
386					</div>
387<?php ($hook = get_hook('aop_setup_pre_default_timezone')) ? eval($hook) : null; ?>
388					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
389						<div class="sf-box select">
390							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Default timezone label'] ?></span></label><br />
391							<span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[default_timezone]">
392								<option value="-12"<?php if ($forum_config['o_default_timezone'] == -12) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-12:00'] ?></option>
393								<option value="-11"<?php if ($forum_config['o_default_timezone'] == -11) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-11:00'] ?></option>
394								<option value="-10"<?php if ($forum_config['o_default_timezone'] == -10) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-10:00'] ?></option>
395								<option value="-9.5"<?php if ($forum_config['o_default_timezone'] == -9.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-09:30'] ?></option>
396								<option value="-9"<?php if ($forum_config['o_default_timezone'] == -9) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-09:00'] ?></option>
397								<option value="-8"<?php if ($forum_config['o_default_timezone'] == -8) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-08:00'] ?></option>
398								<option value="-7"<?php if ($forum_config['o_default_timezone'] == -7) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-07:00'] ?></option>
399								<option value="-6"<?php if ($forum_config['o_default_timezone'] == -6) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-06:00'] ?></option>
400								<option value="-5"<?php if ($forum_config['o_default_timezone'] == -5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-05:00'] ?></option>
401								<option value="-4"<?php if ($forum_config['o_default_timezone'] == -4) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-04:00'] ?></option>
402								<option value="-3.5"<?php if ($forum_config['o_default_timezone'] == -3.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-03:30'] ?></option>
403								<option value="-3"<?php if ($forum_config['o_default_timezone'] == -3) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-03:00'] ?></option>
404								<option value="-2"<?php if ($forum_config['o_default_timezone'] == -2) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-02:00'] ?></option>
405								<option value="-1"<?php if ($forum_config['o_default_timezone'] == -1) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-01:00'] ?></option>
406								<option value="0"<?php if ($forum_config['o_default_timezone'] == 0) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC'] ?></option>
407								<option value="1"<?php if ($forum_config['o_default_timezone'] == 1) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+01:00'] ?></option>
408								<option value="2"<?php if ($forum_config['o_default_timezone'] == 2) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+02:00'] ?></option>
409								<option value="3"<?php if ($forum_config['o_default_timezone'] == 3) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+03:00'] ?></option>
410								<option value="3.5"<?php if ($forum_config['o_default_timezone'] == 3.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+03:30'] ?></option>
411								<option value="4"<?php if ($forum_config['o_default_timezone'] == 4) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+04:00'] ?></option>
412								<option value="4.5"<?php if ($forum_config['o_default_timezone'] == 4.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+04:30'] ?></option>
413								<option value="5"<?php if ($forum_config['o_default_timezone'] == 5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+05:00'] ?></option>
414								<option value="5.5"<?php if ($forum_config['o_default_timezone'] == 5.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+05:30'] ?></option>
415								<option value="5.75"<?php if ($forum_config['o_default_timezone'] == 5.75) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+05:45'] ?></option>
416								<option value="6"<?php if ($forum_config['o_default_timezone'] == 6) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+06:00'] ?></option>
417								<option value="6.5"<?php if ($forum_config['o_default_timezone'] == 6.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+06:30'] ?></option>
418								<option value="7"<?php if ($forum_config['o_default_timezone'] == 7) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+07:00'] ?></option>
419								<option value="8"<?php if ($forum_config['o_default_timezone'] == 8) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+08:00'] ?></option>
420								<option value="8.75"<?php if ($forum_config['o_default_timezone'] == 8.75) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+08:45'] ?></option>
421								<option value="9"<?php if ($forum_config['o_default_timezone'] == 9) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+09:00'] ?></option>
422								<option value="9.5"<?php if ($forum_config['o_default_timezone'] == 9.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+09:30'] ?></option>
423								<option value="10"<?php if ($forum_config['o_default_timezone'] == 10) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+10:00'] ?></option>
424								<option value="10.5"<?php if ($forum_config['o_default_timezone'] == 10.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+10:30'] ?></option>
425								<option value="11"<?php if ($forum_config['o_default_timezone'] == 11) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+11:00'] ?></option>
426								<option value="11.5"<?php if ($forum_config['o_default_timezone'] == 11.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+11:30'] ?></option>
427								<option value="12"<?php if ($forum_config['o_default_timezone'] == 12) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+12:00'] ?></option>
428								<option value="12.75"<?php if ($forum_config['o_default_timezone'] == 12.75) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+12:45'] ?></option>
429								<option value="13"<?php if ($forum_config['o_default_timezone'] == 13) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+13:00'] ?></option>
430								<option value="14"<?php if ($forum_config['o_default_timezone'] == 14) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+14:00'] ?></option>
431							</select></span>
432						</div>
433					</div>
434<?php ($hook = get_hook('aop_setup_pre_default_dst')) ? eval($hook) : null; ?>
435					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
436						<div class="sf-box checkbox">
437							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[default_dst]" value="1"<?php if ($forum_config['o_default_dst'] == 1) echo ' checked="checked"' ?> /></span>
438							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['DST label'] ?></label>
439						</div>
440					</div>
441<?php ($hook = get_hook('aop_setup_pre_time_format')) ? eval($hook) : null; ?>
442					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
443						<div class="sf-box text">
444							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Time format label'] ?></span><small><?php printf($lang_admin_settings['Current format'], format_time(time(), 2, null, $forum_config['o_time_format']), $lang_admin_settings['External format help']) ?></small></label><br />
445							<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[time_format]" size="25" maxlength="25" value="<?php echo forum_htmlencode($forum_config['o_time_format']) ?>" /></span>
446						</div>
447					</div>
448<?php ($hook = get_hook('aop_setup_pre_date_format')) ? eval($hook) : null; ?>
449					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
450						<div class="sf-box text">
451							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Date format label'] ?></span><small><?php printf($lang_admin_settings['Current format'], format_time(time(), 1, $forum_config['o_date_format'], null, true), $lang_admin_settings['External format help']) ?></small></label><br />
452							<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[date_format]" size="25" maxlength="25" value="<?php echo forum_htmlencode($forum_config['o_date_format']) ?>" /></span>
453						</div>
454					</div>
455<?php ($hook = get_hook('aop_setup_pre_local_fieldset_end')) ? eval($hook) : null; ?>
456				</fieldset>
457<?php
458
459	($hook = get_hook('aop_setup_local_fieldset_end')) ? eval($hook) : null;
460
461	// Reset counter
462	$forum_page['group_count'] = $forum_page['item_count'] = 0;
463
464?>
465				<div class="content-head">
466					<h2 class="hn"><span><?php echo $lang_admin_settings['Setup timeouts'] ?></span></h2>
467				</div>
468<?php ($hook = get_hook('aop_setup_pre_timeouts_fieldset')) ? eval($hook) : null; ?>
469				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
470					<legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup timeouts legend'] ?></strong></legend>
471<?php ($hook = get_hook('aop_setup_pre_visit_timeout')) ? eval($hook) : null; ?>
472					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
473						<div class="sf-box text">
474							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Visit timeout label'] ?></span><small><?php echo $lang_admin_settings['Visit timeout help'] ?></small></label><br />
475							<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[timeout_visit]" size="5" maxlength="5" value="<?php echo $forum_config['o_timeout_visit'] ?>" /></span>
476						</div>
477					</div>
478<?php ($hook = get_hook('aop_setup_pre_online_timeout')) ? eval($hook) : null; ?>
479					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
480						<div class="sf-box text">
481							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Online timeout label'] ?></span><small><?php echo $lang_admin_settings['Online timeout help'] ?></small></label><br />
482							<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[timeout_online]" size="5" maxlength="5" value="<?php echo $forum_config['o_timeout_online'] ?>" /></span>
483						</div>
484					</div>
485<?php ($hook = get_hook('aop_setup_pre_redirect_time')) ? eval($hook) : null; ?>
486					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
487						<div class="sf-box text">
488							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Redirect time label'] ?></span><small><?php echo $lang_admin_settings['Redirect time help'] ?></small></label><br />
489							<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[redirect_delay]" size="5" maxlength="5" value="<?php echo $forum_config['o_redirect_delay'] ?>" /></span>
490						</div>
491					</div>
492<?php ($hook = get_hook('aop_setup_pre_timeouts_fieldset_end')) ? eval($hook) : null; ?>
493				</fieldset>
494<?php
495
496	($hook = get_hook('aop_setup_timeouts_fieldset_end')) ? eval($hook) : null;
497
498	// Reset counter
499	$forum_page['group_count'] = $forum_page['item_count'] = 0;
500
501?>
502				<div class="content-head">
503					<h2 class="hn"><span><?php echo $lang_admin_settings['Setup pagination'] ?></span></h2>
504				</div>
505<?php ($hook = get_hook('aop_setup_pre_pagination_fieldset')) ? eval($hook) : null; ?>
506				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
507					<legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup pagination legend'] ?></strong></legend>
508<?php ($hook = get_hook('aop_setup_pre_topics_per_page')) ? eval($hook) : null; ?>
509					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
510						<div class="sf-box text">
511							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Topics per page label'] ?></span></label><br />
512							<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[disp_topics_default]" size="5" maxlength="3" value="<?php echo $forum_config['o_disp_topics_default'] ?>" /></span>
513						</div>
514					</div>
515<?php ($hook = get_hook('aop_setup_pre_posts_per_page')) ? eval($hook) : null; ?>
516					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
517						<div class="sf-box text">
518							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Posts per page label'] ?></span></label><br />
519							<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[disp_posts_default]" size="5" maxlength="3" value="<?php echo $forum_config['o_disp_posts_default'] ?>" /></span>
520						</div>
521					</div>
522<?php ($hook = get_hook('aop_setup_pre_topic_review')) ? eval($hook) : null; ?>
523					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
524						<div class="sf-box frm-short text">
525							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Topic review label'] ?></span><small><?php echo $lang_admin_settings['Topic review help'] ?></small></label><br />
526							<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[topic_review]" size="5" maxlength="3" value="<?php echo $forum_config['o_topic_review'] ?>" /></span>
527						</div>
528					</div>
529<?php ($hook = get_hook('aop_setup_pre_pagination_fieldset_end')) ? eval($hook) : null; ?>
530				</fieldset>
531<?php
532
533	($hook = get_hook('aop_setup_pagination_fieldset_end')) ? eval($hook) : null;
534
535	// Reset counter
536	$forum_page['group_count'] = $forum_page['item_count'] = 0;
537
538?>
539				<div class="content-head">
540					<h2 class="hn"><span><?php echo $lang_admin_settings['Setup reports'] ?></span></h2>
541				</div>
542<?php ($hook = get_hook('aop_setup_pre_reports_fieldset')) ? eval($hook) : null; ?>
543				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
544					<legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup reports legend'] ?></strong></legend>
545					<fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>">
546						<legend><span><?php echo $lang_admin_settings['Reporting method'] ?></span></legend>
547						<div class="mf-box">
548							<div class="mf-item">
549								<span class="fld-input"><input type="radio" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[report_method]" value="0"<?php if ($forum_config['o_report_method'] == '0') echo ' checked="checked"' ?> /></span>
550								<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Report internal label'] ?></label>
551							</div>
552							<div class="mf-item">
553								<span class="fld-input"><input type="radio" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[report_method]" value="1"<?php if ($forum_config['o_report_method'] == '1') echo ' checked="checked"' ?> /></span>
554								<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Report email label'] ?></label>
555							</div>
556							<div class="mf-item">
557								<span class="fld-input"><input type="radio" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[report_method]" value="2"<?php if ($forum_config['o_report_method'] == '2') echo ' checked="checked"' ?> /></span>
558								<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Report both label'] ?></label>
559							</div>
560<?php ($hook = get_hook('aop_setup_new_reporting_method')) ? eval($hook) : null; ?>
561						</div>
562					</fieldset>
563<?php ($hook = get_hook('aop_setup_pre_reports_fieldset_end')) ? eval($hook) : null; ?>
564				</fieldset>
565<?php
566
567	($hook = get_hook('aop_setup_reports_fieldset_end')) ? eval($hook) : null;
568
569	// Reset counter
570	$forum_page['group_count'] = $forum_page['item_count'] = 0;
571
572?>
573				<div class="content-head">
574					<h2 class="hn"><span><?php echo $lang_admin_settings['Setup URL'] ?></span></h2>
575				</div>
576				<div class="ct-box">
577					<p class="warn"><?php echo $lang_admin_settings['URL scheme info'] ?></p>
578				</div>
579<?php ($hook = get_hook('aop_setup_pre_url_scheme_fieldset')) ? eval($hook) : null; ?>
580				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
581					<legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup URL legend'] ?></strong></legend>
582<?php ($hook = get_hook('aop_setup_pre_url_scheme')) ? eval($hook) : null; ?>
583					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
584						<div class="sf-box select">
585							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['URL scheme label'] ?></span><small><?php echo $lang_admin_settings['URL scheme help'] ?></small></label><br />
586							<span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[sef]">
587<?php
588
589	$url_schemes = get_scheme_packs();
590	foreach ($url_schemes as $schema)
591	{
592		if ($forum_config['o_sef'] == $schema)
593			echo "\t\t\t\t\t\t\t\t".'<option value="'.$schema.'" selected="selected">'.str_replace('_', ' ', $schema).'</option>'."\n";
594		else
595			echo "\t\t\t\t\t\t\t\t".'<option value="'.$schema.'">'.str_replace('_', ' ', $schema).'</option>'."\n";
596	}
597
598?>
599							</select></span>
600						</div>
601					</div>
602<?php ($hook = get_hook('aop_setup_pre_url_scheme_fieldset_end')) ? eval($hook) : null; ?>
603				</fieldset>
604<?php
605
606	($hook = get_hook('aop_setup_url_scheme_fieldset_end')) ? eval($hook) : null;
607
608	// Reset counter
609	$forum_page['group_count'] = $forum_page['item_count'] = 0;
610
611?>
612				<div class="content-head">
613					<h2 class="hn"><span><?php echo $lang_admin_settings['Setup links'] ?></span></h2>
614				</div>
615				<div class="ct-box">
616					<p class="warn"><?php echo $lang_admin_settings['Setup links info'] ?></p>
617				</div>
618<?php ($hook = get_hook('aop_setup_pre_links_fieldset')) ? eval($hook) : null; ?>
619				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
620					<legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup links legend'] ?></strong></legend>
621<?php ($hook = get_hook('aop_setup_pre_additional_navlinks')) ? eval($hook) : null; ?>
622					<div class="txt-set set<?php echo ++$forum_page['item_count'] ?>">
623						<div class="txt-box textarea">
624							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Enter links label'] ?></span></label>
625							<div class="txt-input"><span class="fld-input"><textarea id="fld<?php echo $forum_page['fld_count'] ?>" name="form[additional_navlinks]" rows="3" cols="55"><?php echo forum_htmlencode($forum_config['o_additional_navlinks']) ?></textarea></span></div>
626						</div>
627					</div>
628<?php ($hook = get_hook('aop_setup_pre_links_fieldset_end')) ? eval($hook) : null; ?>
629				</fieldset>
630<?php ($hook = get_hook('aop_setup_links_fieldset_end')) ? eval($hook) : null; ?>
631			<div class="frm-buttons">
632				<span class="submit primary"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></span>
633			</div>
634		</form>
635	</div>
636
637<?php
638
639}
640
641else if ($section == 'features')
642{
643	// Setup the form
644	$forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
645
646	// Setup breadcrumbs
647	$forum_page['crumbs'] = array(
648		array($forum_config['o_board_title'], forum_link($forum_url['index'])),
649		array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])),
650		array($lang_admin_common['Settings'], forum_link($forum_url['admin_settings_setup'])),
651		array($lang_admin_common['Features'], forum_link($forum_url['admin_settings_features']))
652	);
653
654	($hook = get_hook('aop_features_pre_header_load')) ? eval($hook) : null;
655
656	define('FORUM_PAGE_SECTION', 'settings');
657	define('FORUM_PAGE', 'admin-settings-features');
658	require FORUM_ROOT.'header.php';
659
660	// START SUBST - <!-- forum_main -->
661	ob_start();
662
663	($hook = get_hook('aop_features_output_start')) ? eval($hook) : null;
664
665?>
666	<div class="main-content main-frm">
667		<form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_features']) ?>">
668			<div class="hidden">
669				<input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_settings_features'])) ?>" />
670				<input type="hidden" name="form_sent" value="1" />
671			</div>
672			<div class="content-head">
673				<h2 class="hn"><span><?php echo $lang_admin_settings['Features general'] ?></span></h2>
674			</div>
675<?php ($hook = get_hook('aop_features_pre_general_fieldset')) ? eval($hook) : null; ?>
676			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
677				<legend class="group-legend"><strong><?php echo $lang_admin_settings['Features general legend'] ?></strong></legend>
678<?php ($hook = get_hook('aop_features_pre_search_all_checkbox')) ? eval($hook) : null; ?>
679				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
680					<div class="sf-box checkbox">
681						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[search_all_forums]" value="1"<?php if ($forum_config['o_search_all_forums'] == '1') echo ' checked="checked"' ?> /></span>
682						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Searching'] ?></span> <?php echo $lang_admin_settings['Search all label'] ?></label>
683					</div>
684				</div>
685<?php ($hook = get_hook('aop_features_pre_ranks_checkbox')) ? eval($hook) : null; ?>
686				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
687					<div class="sf-box checkbox">
688						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[ranks]" value="1"<?php if ($forum_config['o_ranks'] == '1') echo ' checked="checked"' ?> /></span>
689						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['User ranks'] ?></span> <?php echo $lang_admin_settings['User ranks label'] ?></label>
690					</div>
691				</div>
692<?php ($hook = get_hook('aop_features_pre_censoring_checkbox')) ? eval($hook) : null; ?>
693				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
694					<div class="sf-box checkbox">
695						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[censoring]" value="1"<?php if ($forum_config['o_censoring'] == '1') echo ' checked="checked"' ?> /></span>
696						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Censor words'] ?></span> <?php echo $lang_admin_settings['Censor words label'] ?></label>
697					</div>
698				</div>
699<?php ($hook = get_hook('aop_features_pre_quickjump_checkbox')) ? eval($hook) : null; ?>
700				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
701					<div class="sf-box checkbox">
702						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[quickjump]" value="1"<?php if ($forum_config['o_quickjump'] == '1') echo ' checked="checked"' ?> /></span>
703						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Quick jump'] ?></span> <?php echo $lang_admin_settings['Quick jump label'] ?></label>
704					</div>
705				</div>
706<?php ($hook = get_hook('aop_features_pre_show_version_checkbox')) ? eval($hook) : null; ?>
707				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
708					<div class="sf-box checkbox">
709						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_version]" value="1"<?php if ($forum_config['o_show_version'] == '1') echo ' checked="checked"' ?> /></span>
710						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Show version'] ?></span> <?php echo $lang_admin_settings['Show version label'] ?></label>
711					</div>
712				</div>
713<?php ($hook = get_hook('aop_features_pre_show_moderators_checkbox')) ? eval($hook) : null; ?>
714				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
715					<div class="sf-box checkbox">
716						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_moderators]" value="1"<?php if ($forum_config['o_show_moderators'] == '1') echo ' checked="checked"' ?> /></span>
717						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Show moderators'] ?></span> <?php echo $lang_admin_settings['Show moderators label'] ?></label>
718					</div>
719				</div>
720<?php ($hook = get_hook('aop_features_pre_users_online_checkbox')) ? eval($hook) : null; ?>
721				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
722					<div class="sf-box checkbox">
723						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[users_online]" value="1"<?php if ($forum_config['o_users_online'] == '1') echo ' checked="checked"' ?> /></span>
724						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Online list'] ?></span> <?php echo $lang_admin_settings['Users online label'] ?></label>
725					</div>
726				</div>
727<?php ($hook = get_hook('aop_features_pre_general_fieldset_end')) ? eval($hook) : null; ?>
728			</fieldset>
729<?php
730
731	($hook = get_hook('aop_features_general_fieldset_end')) ? eval($hook) : null;
732
733	// Reset counter
734	$forum_page['group_count'] = $forum_page['item_count'] = 0;
735
736?>
737			<div class="content-head">
738				<h2 class="hn"><span><?php echo $lang_admin_settings['Features posting'] ?></span></h2>
739			</div>
740<?php ($hook = get_hook('aop_features_pre_posting_fieldset')) ? eval($hook) : null; ?>
741			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
742				<legend class="group-legend"><span><?php echo $lang_admin_settings['Features posting legend'] ?></span></legend>
743<?php ($hook = get_hook('aop_features_pre_quickpost_checkbox')) ? eval($hook) : null; ?>
744				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
745					<div class="sf-box checkbox">
746						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[quickpost]" value="1"<?php if ($forum_config['o_quickpost'] == '1') echo ' checked="checked"' ?> /></span>
747						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Quick post'] ?></span> <?php echo $lang_admin_settings['Quick post label'] ?></label>
748					</div>
749				</div>
750<?php ($hook = get_hook('aop_features_pre_subscriptions_checkbox')) ? eval($hook) : null; ?>
751				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
752					<div class="sf-box checkbox">
753						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[subscriptions]" value="1"<?php if ($forum_config['o_subscriptions'] == '1') echo ' checked="checked"' ?> /></span>
754						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Subscriptions'] ?></span> <?php echo $lang_admin_settings['Subscriptions label'] ?></label>
755					</div>
756				</div>
757<?php ($hook = get_hook('aop_features_pre_force_guest_email_checkbox')) ? eval($hook) : null; ?>
758				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
759					<div class="sf-box checkbox">
760						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[force_guest_email]" value="1"<?php if ($forum_config['p_force_guest_email'] == '1') echo ' checked="checked"' ?> /></span>
761						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Guest posting'] ?></span> <?php echo $lang_admin_settings['Guest posting label'] ?></label>
762					</div>
763				</div>
764<?php ($hook = get_hook('aop_features_pre_show_dot_checkbox')) ? eval($hook) : null; ?>
765				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
766					<div class="sf-box checkbox">
767						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_dot]" value="1"<?php if ($forum_config['o_show_dot'] == '1') echo ' checked="checked"' ?> /></span>
768						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['User has posted'] ?></span> <?php echo $lang_admin_settings['User has posted label'] ?></label>
769					</div>
770				</div>
771<?php ($hook = get_hook('aop_features_pre_topic_views_checkbox')) ? eval($hook) : null; ?>
772				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
773					<div class="sf-box checkbox">
774						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[topic_views]" value="1"<?php if ($forum_config['o_topic_views'] == '1') echo ' checked="checked"' ?> /></span>
775						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Topic views'] ?></span> <?php echo $lang_admin_settings['Topic views label'] ?></label>
776					</div>
777				</div>
778<?php ($hook = get_hook('aop_features_pre_show_post_count_checkbox')) ? eval($hook) : null; ?>
779				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
780					<div class="sf-box checkbox">
781						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_post_count]" value="1"<?php if ($forum_config['o_show_post_count'] == '1') echo ' checked="checked"' ?> /></span>
782						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['User post count'] ?></span> <?php echo $lang_admin_settings['User post count label'] ?></label>
783					</div>
784				</div>
785<?php ($hook = get_hook('aop_features_pre_show_user_info_checkbox')) ? eval($hook) : null; ?>
786				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
787					<div class="sf-box checkbox">
788						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_user_info]" value="1"<?php if ($forum_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /></span>
789						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['User info'] ?></span> <?php echo $lang_admin_settings['User info label'] ?></label>
790					</div>
791				</div>
792<?php ($hook = get_hook('aop_features_pre_posting_fieldset_end')) ? eval($hook) : null; ?>
793			</fieldset>
794<?php
795
796	($hook = get_hook('aop_features_posting_fieldset_end')) ? eval($hook) : null;
797
798	// Reset counter
799	$forum_page['group_count'] = $forum_page['item_count'] = 0;
800
801?>
802			<div class="content-head">
803				<h2 class="hn"><span><?php echo $lang_admin_settings['Features posts'] ?></span></h2>
804			</div>
805<?php ($hook = get_hook('aop_features_pre_message_fieldset')) ? eval($hook) : null; ?>
806			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
807				<legend class="group-legend"><span><?php echo $lang_admin_settings['Features posts legend'] ?></span></legend>
808<?php ($hook = get_hook('aop_features_pre_message_content_fieldset')) ? eval($hook) : null; ?>
809				<fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>">
810					<legend><span><?php echo $lang_admin_settings['Post content group'] ?></span></legend>
811					<div class="mf-box">
812						<div class="mf-item">
813							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[message_bbcode]" value="1"<?php if ($forum_config['p_message_bbcode'] == '1') echo ' checked="checked"' ?> /></span>
814							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Allow BBCode label'] ?></label>
815						</div>
816						<div class="mf-item">
817							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[message_img_tag]" value="1"<?php if ($forum_config['p_message_img_tag'] == '1') echo ' checked="checked"' ?> /></span>
818							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Allow img label'] ?></label>
819						</div>
820						<div class="mf-item">
821							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[smilies]" value="1"<?php if ($forum_config['o_smilies'] == '1') echo ' checked="checked"' ?> /></span>
822							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Smilies in posts label'] ?></label>
823						</div>
824						<div class="mf-item">
825							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[make_links]" value="1"<?php if ($forum_config['o_make_links'] == '1') echo ' checked="checked"' ?> /></span>
826							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Make clickable links label'] ?></label>
827						</div>
828<?php ($hook = get_hook('aop_features_new_message_content_option')) ? eval($hook) : null; ?>
829					</div>
830<?php ($hook = get_hook('aop_features_pre_message_content_fieldset_end')) ? eval($hook) : null; ?>
831				</fieldset>
832<?php ($hook = get_hook('aop_features_message_content_fieldset_end')) ? eval($hook) : null; ?>
833				<fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>">
834					<legend><span><?php echo $lang_admin_settings['Allow capitals group'] ?></span></legend>
835					<div class="mf-box">
836						<div class="mf-item">
837							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[message_all_caps]" value="1"<?php if ($forum_config['p_message_all_caps'] == '1') echo ' checked="checked"' ?> /></span>
838							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['All caps message label'] ?></label>
839						</div>
840						<div class="mf-item">
841							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[subject_all_caps]" value="1"<?php if ($forum_config['p_subject_all_caps'] == '1') echo ' checked="checked"' ?> /></span>
842							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['All caps subject label'] ?></label>
843						</div>
844<?php ($hook = get_hook('aop_features_new_message_caps_option')) ? eval($hook) : null; ?>
845					</div>
846<?php ($hook = get_hook('aop_features_pre_message_caps_fieldset_end')) ? eval($hook) : null; ?>
847				</fieldset>
848<?php ($hook = get_hook('aop_features_message_caps_fieldset_end')) ? eval($hook) : null; ?>
849				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
850					<div class="sf-box text">
851						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Indent size label'] ?></span><small><?php echo $lang_admin_settings['Indent size help'] ?></small></label><br />
852						<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[indent_num_spaces]" size="5" maxlength="3" value="<?php echo $forum_config['o_indent_num_spaces'] ?>" /></span>
853					</div>
854				</div>
855<?php ($hook = get_hook('aop_features_pre_quote_depth')) ? eval($hook) : null; ?>
856				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
857					<div class="sf-box text">
858						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Quote depth label'] ?></span><small><?php echo $lang_admin_settings['Quote depth help'] ?></small></label><br />
859						<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[quote_depth]" size="5" maxlength="3" value="<?php echo $forum_config['o_quote_depth'] ?>" /></span>
860					</div>
861				</div>
862<?php ($hook = get_hook('aop_features_pre_message_fieldset_end')) ? eval($hook) : null; ?>
863			</fieldset>
864<?php
865
866	($hook = get_hook('aop_features_message_fieldset_end')) ? eval($hook) : null;
867
868	// Reset counter
869	$forum_page['group_count'] = $forum_page['item_count'] = 0;
870
871?>
872			<div class="content-head">
873				<h2 class="hn"><span><?php echo $lang_admin_settings['Features sigs'] ?></span></h2>
874			</div>
875<?php ($hook = get_hook('aop_features_pre_sig_fieldset')) ? eval($hook) : null; ?>
876			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
877				<legend class="group-legend"><span><?php echo $lang_admin_settings['Features sigs legend'] ?></span></legend>
878<?php ($hook = get_hook('aop_features_pre_signature_checkbox')) ? eval($hook) : null; ?>
879				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
880					<div class="sf-box checkbox">
881						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[signatures]" value="1"<?php if ($forum_config['o_signatures'] == '1') echo ' checked="checked"' ?> /></span>
882						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Allow signatures'] ?></span> <?php echo $lang_admin_settings['Allow signatures label'] ?></label>
883					</div>
884				</div>
885<?php ($hook = get_hook('aop_features_pre_sig_content_fieldset')) ? eval($hook) : null; ?>
886				<fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>">
887					<legend><span><?php echo $lang_admin_settings['Signature content group'] ?></span></legend>
888					<div class="mf-box">
889						<div class="mf-item">
890							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[sig_bbcode]" value="1"<?php if ($forum_config['p_sig_bbcode'] == '1') echo ' checked="checked"' ?> /></span>
891							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['BBCode in sigs label'] ?></label>
892						</div>
893						<div class="mf-item">
894							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[sig_img_tag]" value="1"<?php if ($forum_config['p_sig_img_tag'] == '1') echo ' checked="checked"' ?> /></span>
895							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Img in sigs label'] ?></label>
896						</div>
897						<div class="mf-item">
898							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[smilies_sig]" value="1"<?php if ($forum_config['o_smilies_sig'] == '1') echo ' checked="checked"' ?> /></span>
899							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Smilies in sigs label'] ?></label>
900						</div>
901<?php ($hook = get_hook('aop_features_new_sig_content_option')) ? eval($hook) : null; ?>
902					</div>
903<?php ($hook = get_hook('aop_features_pre_sig_content_fieldset_end')) ? eval($hook) : null; ?>
904				</fieldset>
905<?php ($hook = get_hook('aop_features_sig_content_fieldset_end')) ? eval($hook) : null; ?>
906				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
907					<div class="sf-box checkbox">
908						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[sig_all_caps]" value="1"<?php if ($forum_config['p_sig_all_caps'] == '1') echo ' checked="checked"' ?> /></span>
909						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Allow capitals group'] ?></span> <?php echo $lang_admin_settings['All caps sigs label'] ?></label>
910					</div>
911				</div>
912				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
913					<div class="sf-box text">
914						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Max sig length label'] ?></span></label><br />
915						<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[sig_length]" size="5" maxlength="5" value="<?php echo $forum_config['p_sig_length'] ?>" /></span>
916					</div>
917				</div>
918<?php ($hook = get_hook('aop_features_pre_max_sig_lines')) ? eval($hook) : null; ?>
919				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
920					<div class="sf-box text">
921						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Max sig lines label'] ?></span></label><br />
922						<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[sig_lines]" size="5" maxlength="3" value="<?php echo $forum_config['p_sig_lines'] ?>" /></span>
923					</div>
924				</div>
925<?php ($hook = get_hook('aop_features_pre_sig_fieldset_end')) ? eval($hook) : null; ?>
926			</fieldset>
927<?php
928
929	($hook = get_hook('aop_features_sig_fieldset_end')) ? eval($hook) : null;
930
931	// Reset counter
932	$forum_page['group_count'] = $forum_page['item_count'] = 0;
933
934?>
935			<div class="content-head">
936				<h2 class="hn"><span><?php echo $lang_admin_settings['Features Avatars'] ?></span></h2>
937			</div>
938<?php ($hook = get_hook('aop_features_pre_avatars_fieldset')) ? eval($hook) : null; ?>
939			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
940				<legend class="group-legend"><span><?php echo $lang_admin_settings['Features Avatars legend'] ?></span></legend>
941<?php ($hook = get_hook('aop_features_pre_avatar_checkbox')) ? eval($hook) : null; ?>
942				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
943					<div class="sf-box checkbox">
944						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[avatars]" value="1"<?php if ($forum_config['o_avatars'] == '1') echo ' checked="checked"' ?> /></span>
945						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Allow avatars'] ?></span> <?php echo $lang_admin_settings['Allow avatars label'] ?></label>
946					</div>
947				</div>
948<?php ($hook = get_hook('aop_features_pre_avatar_directory')) ? eval($hook) : null; ?>
949				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
950					<div class="sf-box text">
951						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Avatar directory label'] ?></span><small><?php echo $lang_admin_settings['Avatar directory help'] ?></small></label><br />
952						<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[avatars_dir]" size="35" maxlength="50" value="<?php echo forum_htmlencode($forum_config['o_avatars_dir']) ?>" /></span>
953					</div>
954				</div>
955<?php ($hook = get_hook('aop_features_pre_avatar_max_width')) ? eval($hook) : null; ?>
956				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
957					<div class="sf-box text">
958						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Avatar Max width label'] ?></span><small><?php echo $lang_admin_settings['Avatar Max width help'] ?></small></label><br />
959						<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[avatars_width]" size="6" maxlength="5" value="<?php echo $forum_config['o_avatars_width'] ?>" /></span>
960					</div>
961				</div>
962<?php ($hook = get_hook('aop_features_pre_avatar_max_height')) ? eval($hook) : null; ?>
963				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
964					<div class="sf-box text">
965						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Avatar Max height label'] ?></span><small><?php echo $lang_admin_settings['Avatar Max height help'] ?></small></label><br />
966						<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[avatars_height]" size="6" maxlength="5" value="<?php echo $forum_config['o_avatars_height'] ?>" /></span>
967					</div>
968				</div>
969<?php ($hook = get_hook('aop_features_pre_avatar_max_size')) ? eval($hook) : null; ?>
970				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
971					<div class="sf-box text">
972						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Avatar Max size label'] ?></span><small><?php echo $lang_admin_settings['Avatar Max size help'] ?></small></label><br />
973						<span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[avatars_size]" size="6" maxlength="6" value="<?php echo $forum_config['o_avatars_size'] ?>" /></span>
974					</div>
975				</div>
976<?php ($hook = get_hook('aop_features_pre_avatars_fieldset_end')) ? eval($hook) : null; ?>
977			</fieldset>
978<?php
979
980	($hook = get_hook('aop_features_avatars_fieldset_end')) ? eval($hook) : null;
981
982	// Reset counter
983	$forum_page['group_count'] = $forum_page['item_count'] = 0;
984
985?>
986			<div class="content-head">
987				<h2 class="hn"><span><?php echo $lang_admin_settings['Features update'] ?></span></h2>
988			</div>
989<?php if (function_exists('curl_init') || function_exists('fsockopen') || in_array(strtolower(@ini_get('allow_url_fopen')), array('on', 'true', '1'))): ?>
990			<div class="ct-box">
991				<p><?php echo $lang_admin_settings['Features update info'] ?></p>
992			</div>
993<?php ($hook = get_hook('aop_features_pre_updates_fieldset')) ? eval($hook) : null; ?>
994			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
995				<legend class="group-legend"><strong><?php echo $lang_admin_settings['Features update legend'] ?></strong></legend>
996<?php ($hook = get_hook('aop_features_pre_updates_checkbox')) ? eval($hook) : null; ?>
997				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
998					<div class="sf-box checkbox">
999						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[check_for_updates]" value="1"<?php if ($forum_config['o_check_for_updates'] == '1') echo ' checked="checked"' ?> /></span>
1000						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Update check'] ?></span> <?php echo $lang_admin_settings['Update check label'] ?></label>
1001					</div>
1002				</div>
1003<?php ($hook = get_hook('aop_features_pre_version_updates_checkbox')) ? eval($hook) : null; ?>
1004				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1005					<div class="sf-box checkbox">
1006						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[check_for_versions]" value="1"<?php if ($forum_config['o_check_for_versions'] == '1') echo ' checked="checked"' ?> /></span>
1007						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Check for versions'] ?></span> <?php echo $lang_admin_settings['Auto check for versions'] ?></label>
1008					</div>
1009				</div>
1010<?php ($hook = get_hook('aop_features_pre_updates_fieldset_end')) ? eval($hook) : null; ?>
1011			</fieldset>
1012<?php ($hook = get_hook('aop_features_updates_fieldset_end')) ? eval($hook) : null; ?>
1013<?php else: ?>
1014			<div class="ct-box">
1015				<p><?php echo $lang_admin_settings['Features update disabled info'] ?></p>
1016			</div>
1017<?php ($hook = get_hook('aop_features_post_updates_disabled_box')) ? eval($hook) : null; ?>
1018<?php endif; ?>
1019<?php
1020	// Reset counter
1021	$forum_page['group_count'] = $forum_page['item_count'] = 0;
1022
1023?>
1024			<div class="content-head">
1025				<h2 class="hn"><span><?php echo $lang_admin_settings['Features mask passwords'] ?></span></h2>
1026			</div>
1027			<div class="ct-box">
1028				<p><?php echo $lang_admin_settings['Features mask passwords info'] ?></p>
1029			</div>
1030<?php ($hook = get_hook('aop_features_pre_mask_passwords_fieldset')) ? eval($hook) : null; ?>
1031			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
1032				<legend class="group-legend"><strong><?php echo $lang_admin_settings['Features mask passwords legend'] ?></strong></legend>
1033<?php ($hook = get_hook('aop_features_pre_mask_passwords_checkbox')) ? eval($hook) : null; ?>
1034				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1035					<div class="sf-box checkbox">
1036						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[mask_passwords]" value="1"<?php if ($forum_config['o_mask_passwords'] == '1') echo ' checked="checked"' ?> /></span>
1037						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Enable mask passwords'] ?></span> <?php echo $lang_admin_settings['Enable mask passwords label'] ?></label>
1038					</div>
1039				</div>
1040<?php ($hook = get_hook('aop_features_pre_mask_passwords_fieldset_end')) ? eval($hook) : null; ?>
1041			</fieldset>
1042<?php ($hook = get_hook('aop_features_mask_passwords_fieldset_end')) ? eval($hook) : null; ?>
1043<?php
1044	// Reset counter
1045	$forum_page['group_count'] = $forum_page['item_count'] = 0;
1046
1047?>
1048			<div class="content-head">
1049				<h2 class="hn"><span><?php echo $lang_admin_settings['Features gzip'] ?></span></h2>
1050			</div>
1051			<div class="ct-box">
1052				<p><?php echo $lang_admin_settings['Features gzip info'] ?></p>
1053			</div>
1054<?php ($hook = get_hook('aop_features_pre_gzip_fieldset')) ? eval($hook) : null; ?>
1055			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
1056				<legend class="group-legend"><strong><?php echo $lang_admin_settings['Features gzip legend'] ?></strong></legend>
1057<?php ($hook = get_hook('aop_features_pre_gzip_checkbox')) ? eval($hook) : null; ?>
1058				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1059					<div class="sf-box checkbox">
1060						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[gzip]" value="1"<?php if ($forum_config['o_gzip'] == '1') echo ' checked="checked"' ?> /></span>
1061						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Enable gzip'] ?></span> <?php echo $lang_admin_settings['Enable gzip label'] ?></label>
1062					</div>
1063				</div>
1064<?php ($hook = get_hook('aop_features_pre_gzip_fieldset_end')) ? eval($hook) : null; ?>
1065			</fieldset>
1066<?php ($hook = get_hook('aop_features_gzip_fieldset_end')) ? eval($hook) : null; ?>
1067			<div class="frm-buttons">
1068				<span class="submit primary"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></span>
1069			</div>
1070		</form>
1071	</div>
1072<?php
1073
1074}
1075else if ($section == 'announcements')
1076{
1077	// Setup the form
1078	$forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
1079
1080	// Setup breadcrumbs
1081	$forum_page['crumbs'] = array(
1082		array($forum_config['o_board_title'], forum_link($forum_url['index'])),
1083		array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])),
1084		array($lang_admin_common['Settings'], forum_link($forum_url['admin_settings_setup'])),
1085		array($lang_admin_common['Announcements'], forum_link($forum_url['admin_settings_announcements']))
1086	);
1087
1088	($hook = get_hook('aop_announcements_pre_header_load')) ? eval($hook) : null;
1089
1090	define('FORUM_PAGE_SECTION', 'settings');
1091	define('FORUM_PAGE', 'admin-settings-announcements');
1092	require FORUM_ROOT.'header.php';
1093
1094	// START SUBST - <!-- forum_main -->
1095	ob_start();
1096
1097	($hook = get_hook('aop_announcements_output_start')) ? eval($hook) : null;
1098
1099?>
1100	<div class="main-content main-frm">
1101		<div class="content-head">
1102			<h2 class="hn"><span><?php echo $lang_admin_settings['Announcements head'] ?></span></h2>
1103		</div>
1104		<form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_announcements']) ?>">
1105			<div class="hidden">
1106				<input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_settings_announcements'])) ?>" />
1107				<input type="hidden" name="form_sent" value="1" />
1108			</div>
1109<?php ($hook = get_hook('aop_announcements_pre_announcement_fieldset')) ? eval($hook) : null; ?>
1110			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
1111				<legend class="group-legend"><strong><?php echo $lang_admin_settings['Announcements legend'] ?></strong></legend>
1112<?php ($hook = get_hook('aop_announcements_pre_enable_announcement_checkbox')) ? eval($hook) : null; ?>
1113				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1114					<div class="sf-box checkbox">
1115						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[announcement]" value="1"<?php if ($forum_config['o_announcement'] == '1') echo ' checked="checked"' ?> /></span>
1116						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Enable announcement'] ?></span> <?php echo $lang_admin_settings['Enable announcement label'] ?></label>
1117					</div>
1118				</div>
1119<?php ($hook = get_hook('aop_announcements_pre_announcement_heading')) ? eval($hook) : null; ?>
1120				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1121					<div class="sf-box text">
1122						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Announcement heading label'] ?></span></label><br />
1123						<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[announcement_heading]" size="50" maxlength="255" value="<?php echo forum_htmlencode($forum_config['o_announcement_heading']) ?>" /></span>
1124					</div>
1125				</div>
1126<?php ($hook = get_hook('aop_announcements_pre_announcement_message')) ? eval($hook) : null; ?>
1127				<div class="txt-set set<?php echo ++$forum_page['item_count'] ?>">
1128					<div class="txt-box textarea">
1129						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Announcement message label'] ?></span><small><?php echo $lang_admin_settings['Announcement message help'] ?></small></label>
1130						<div class="txt-input"><span class="fld-input"><textarea id="fld<?php echo $forum_page['fld_count'] ?>" name="form[announcement_message]" rows="5" cols="55"><?php echo forum_htmlencode($forum_config['o_announcement_message']) ?></textarea></span></div>
1131					</div>
1132				</div>
1133<?php ($hook = get_hook('aop_announcements_pre_announcement_fieldset_end')) ? eval($hook) : null; ?>
1134			</fieldset>
1135<?php ($hook = get_hook('aop_announcements_announcement_fieldset_end')) ? eval($hook) : null; ?>
1136			<div class="frm-buttons">
1137				<span class="submit primary"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></span>
1138			</div>
1139		</form>
1140	</div>
1141<?php
1142}
1143else if ($section == 'registration')
1144{
1145	// Setup the form
1146	$forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
1147
1148	// Setup breadcrumbs
1149	$forum_page['crumbs'] = array(
1150		array($forum_config['o_board_title'], forum_link($forum_url['index'])),
1151		array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])),
1152		array($lang_admin_common['Settings'], forum_link($forum_url['admin_settings_setup'])),
1153		array($lang_admin_common['Registration'], forum_link($forum_url['admin_settings_registration']))
1154	);
1155
1156	($hook = get_hook('aop_registration_pre_header_load')) ? eval($hook) : null;
1157
1158	define('FORUM_PAGE_SECTION', 'settings');
1159	define('FORUM_PAGE', 'admin-settings-registration');
1160	require FORUM_ROOT.'header.php';
1161
1162	// START SUBST - <!-- forum_main -->
1163	ob_start();
1164
1165	($hook = get_hook('aop_registration_output_start')) ? eval($hook) : null;
1166
1167?>
1168	<div class="main-content main-frm">
1169		<form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_registration']) ?>">
1170			<div class="hidden">
1171				<input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_settings_registration'])) ?>" />
1172				<input type="hidden" name="form_sent" value="1" />
1173			</div>
1174			<div class="content-head">
1175				<h2 class="hn"><span><?php echo $lang_admin_settings['Registration new'] ?></span></h2>
1176			</div>
1177			<div class="ct-box">
1178				<p><?php echo $lang_admin_settings['New reg info'] ?></p>
1179			</div>
1180<?php ($hook = get_hook('aop_registration_pre_new_regs_fieldset')) ? eval($hook) : null; ?>
1181			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
1182				<legend class="group-legend"><span><?php echo $lang_admin_settings['Registration new legend'] ?></span></legend>
1183<?php ($hook = get_hook('aop_registration_pre_allow_new_regs_checkbox')) ? eval($hook) : null; ?>
1184				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1185					<div class="sf-box checkbox">
1186						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[regs_allow]" value="1"<?php if ($forum_config['o_regs_allow'] == '1') echo ' checked="checked"' ?> /></span>
1187						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Allow new reg'] ?></span> <?php echo $lang_admin_settings['Allow new reg label'] ?></label>
1188					</div>
1189				</div>
1190<?php ($hook = get_hook('aop_registration_pre_verify_regs_checkbox')) ? eval($hook) : null; ?>
1191				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1192					<div class="sf-box checkbox">
1193						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[regs_verify]" value="1"<?php if ($forum_config['o_regs_verify'] == '1') echo ' checked="checked"' ?> /></span>
1194						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Verify reg'] ?></span> <?php echo $lang_admin_settings['Verify reg label'] ?></label>
1195					</div>
1196				</div>
1197<?php ($hook = get_hook('aop_registration_pre_email_fieldset')) ? eval($hook) : null; ?>
1198				<fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>">
1199					<legend><span><?php echo $lang_admin_settings['Reg e-mail group'] ?></span></legend>
1200					<div class="mf-box">
1201						<div class="mf-item">
1202							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[allow_banned_email]" value="1"<?php if ($forum_config['p_allow_banned_email'] == '1') echo ' checked="checked"' ?> /></span>
1203							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Allow banned label'] ?></label>
1204						</div>
1205						<div class="mf-item">
1206							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[allow_dupe_email]" value="1"<?php if ($forum_config['p_allow_dupe_email'] == '1') echo ' checked="checked"' ?> /></span>
1207							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Allow dupe label'] ?></label>
1208						</div>
1209<?php ($hook = get_hook('aop_registration_new_email_option')) ? eval($hook) : null; ?>
1210					</div>
1211<?php ($hook = get_hook('aop_registration_pre_email_fieldset_end')) ? eval($hook) : null; ?>
1212				</fieldset>
1213<?php ($hook = get_hook('aop_registration_email_fieldset_end')) ? eval($hook) : null; ?>
1214				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1215					<div class="sf-box checkbox">
1216						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[regs_report]" value="1"<?php if ($forum_config['o_regs_report'] == '1') echo ' checked="checked"' ?> /></span>
1217						<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Report new reg'] ?></span> <?php echo $lang_admin_settings['Report new reg label'] ?></label>
1218					</div>
1219				</div>
1220<?php ($hook = get_hook('aop_registration_pre_email_setting_fieldset')) ? eval($hook) : null; ?>
1221				<fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>">
1222					<legend><span><?php echo $lang_admin_settings['E-mail setting group'] ?></span></legend>
1223					<div class="mf-box">
1224						<div class="mf-item">
1225							<span class="fld-input"><input type="radio" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[default_email_setting]" value="0"<?php if ($forum_config['o_default_email_setting'] == '0') echo ' checked="checked"' ?> /></span>
1226							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Display e-mail label'] ?></label>
1227						</div>
1228						<div class="mf-item">
1229							<span class="fld-input"><input type="radio" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[default_email_setting]" value="1"<?php if ($forum_config['o_default_email_setting'] == '1') echo ' checked="checked"' ?> /></span>
1230							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Allow form e-mail label'] ?></label>
1231						</div>
1232						<div class="mf-item">
1233							<span class="fld-input"><input type="radio" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[default_email_setting]" value="2"<?php if ($forum_config['o_default_email_setting'] == '2') echo ' checked="checked"' ?> /></span>
1234							<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Disallow form e-mail label'] ?></label>
1235						</div>
1236<?php ($hook = get_hook('aop_registration_new_email_setting_option')) ? eval($hook) : null; ?>
1237					</div>
1238<?php ($hook = get_hook('aop_registration_pre_email_setting_fieldset_end')) ? eval($hook) : null; ?>
1239				</fieldset>
1240<?php ($hook = get_hook('aop_registration_email_setting_fieldset_end')) ? eval($hook) : null; ?>
1241				</fieldset>
1242<?php
1243
1244	($hook = get_hook('aop_registration_new_regs_fieldset_end')) ? eval($hook) : null;
1245
1246	// Reset counter
1247	$forum_page['group_count'] = $forum_page['item_count'] = 0;
1248
1249?>
1250			<div class="content-head">
1251				<h2 class="hn"><span><?php echo $lang_admin_settings['Registration rules'] ?></span></h2>
1252			</div>
1253				<div class="ct-box">
1254					<p><?php echo $lang_admin_settings['Registration rules info'] ?></p>
1255				</div>
1256<?php ($hook = get_hook('aop_registration_pre_rules_fieldset')) ? eval($hook) : null; ?>
1257				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
1258					<legend class="group-legend"><span><?php echo $lang_admin_settings['Registration rules legend'] ?></span></legend>
1259<?php ($hook = get_hook('aop_registration_pre_rules_checkbox')) ? eval($hook) : null; ?>
1260					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1261						<div class="sf-box checkbox">
1262							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[rules]" value="1"<?php if ($forum_config['o_rules'] == '1') echo ' checked="checked"' ?> /></span>
1263							<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Require rules'] ?></span><?php echo $lang_admin_settings['Require rules label'] ?></label>
1264						</div>
1265					</div>
1266<?php ($hook = get_hook('aop_registration_pre_rules_text')) ? eval($hook) : null; ?>
1267					<div class="txt-set set<?php echo ++$forum_page['item_count'] ?>">
1268						<div class="txt-box textarea">
1269							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Compose rules label'] ?></span><small><?php echo $lang_admin_settings['Compose rules help'] ?></small></label>
1270							<div class="txt-input"><span class="fld-input"><textarea id="fld<?php echo $forum_page['fld_count'] ?>" name="form[rules_message]" rows="10" cols="55"><?php echo forum_htmlencode($forum_config['o_rules_message']) ?></textarea></span></div>
1271						</div>
1272					</div>
1273<?php ($hook = get_hook('aop_registration_pre_rules_fieldset_end')) ? eval($hook) : null; ?>
1274				</fieldset>
1275<?php ($hook = get_hook('aop_registration_rules_fieldset_end')) ? eval($hook) : null; ?>
1276				<div class="frm-buttons">
1277					<span class="submit primary"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></span>
1278				</div>
1279		</form>
1280	</div>
1281<?php
1282
1283}
1284
1285else if ($section == 'maintenance')
1286{
1287	// Setup the form
1288	$forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
1289
1290	// Setup breadcrumbs
1291	$forum_page['crumbs'] = array(
1292		array($forum_config['o_board_title'], forum_link($forum_url['index'])),
1293		array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])),
1294		array($lang_admin_common['Management'], forum_link($forum_url['admin_reports'])),
1295		array($lang_admin_common['Maintenance mode'], forum_link($forum_url['admin_settings_maintenance']))
1296	);
1297
1298	($hook = get_hook('aop_maintenance_pre_header_load')) ? eval($hook) : null;
1299
1300	define('FORUM_PAGE_SECTION', 'management');
1301	define('FORUM_PAGE', 'admin-settings-maintenance');
1302	require FORUM_ROOT.'header.php';
1303
1304	// START SUBST - <!-- forum_main -->
1305	ob_start();
1306
1307	($hook = get_hook('aop_maintenance_output_start')) ? eval($hook) : null;
1308
1309?>
1310	<div class="main-subhead">
1311		<h2 class="hn"><span><?php echo $lang_admin_settings['Maintenance head'] ?></span></h2>
1312	</div>
1313	<div class="main-content main-frm">
1314		<form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_maintenance']) ?>">
1315			<div class="hidden">
1316				<input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_settings_maintenance'])) ?>" />
1317				<input type="hidden" name="form_sent" value="1" />
1318			</div>
1319			<div class="ct-box warn-box">
1320				<p class="important"><?php echo $lang_admin_settings['Maintenance mode info'] ?></p>
1321				<p class="warn"><?php echo $lang_admin_settings['Maintenance mode warn'] ?></p>
1322			</div>
1323<?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset')) ? eval($hook) : null; ?>
1324			<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
1325				<legend class="group-legend"><strong><?php echo $lang_admin_settings['Maintenance legend'] ?></strong></legend>
1326<?php ($hook = get_hook('aop_maintenance_pre_maintenance_checkbox')) ? eval($hook) : null; ?>
1327				<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1328					<div class="sf-box checkbox">
1329						<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[maintenance]" value="1"<?php if ($forum_config['o_maintenance'] == '1') echo ' checked="checked"' ?> /></span>
1330						<label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Maintenance mode label'] ?></label>
1331					</div>
1332				</div>
1333<?php ($hook = get_hook('aop_maintenance_pre_maintenance_message')) ? eval($hook) : null; ?>
1334				<div class="txt-set set<?php echo ++$forum_page['item_count'] ?>">
1335					<div class="txt-box textarea">
1336						<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Maintenance message label'] ?></span><small><?php echo $lang_admin_settings['Maintenance message help'] ?></small></label>
1337						<div class="txt-input"><span class="fld-input"><textarea id="fld<?php echo $forum_page['fld_count'] ?>" name="form[maintenance_message]" rows="5" cols="55"><?php echo forum_htmlencode($forum_config['o_maintenance_message']) ?></textarea></span></div>
1338					</div>
1339				</div>
1340<?php ($hook = get_hook('aop_maintenance_pre_maintenance_fieldset_end')) ? eval($hook) : null; ?>
1341			</fieldset>
1342<?php ($hook = get_hook('aop_maintenance_maintenance_fieldset_end')) ? eval($hook) : null; ?>
1343			<div class="frm-buttons">
1344				<span class="submit primary"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></span>
1345			</div>
1346		</form>
1347	</div>
1348<?php
1349
1350}
1351
1352else if ($section == 'email')
1353{
1354	// Setup the form
1355	$forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
1356
1357	// Setup breadcrumbs
1358	$forum_page['crumbs'] = array(
1359		array($forum_config['o_board_title'], forum_link($forum_url['index'])),
1360		array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])),
1361		array($lang_admin_common['Settings'], forum_link($forum_url['admin_settings_setup'])),
1362		array($lang_admin_common['E-mail'], forum_link($forum_url['admin_settings_email']))
1363	);
1364
1365	($hook = get_hook('aop_email_pre_header_load')) ? eval($hook) : null;
1366
1367	define('FORUM_PAGE_SECTION', 'settings');
1368	define('FORUM_PAGE', 'admin-settings-email');
1369	require FORUM_ROOT.'header.php';
1370
1371	// START SUBST - <!-- forum_main -->
1372	ob_start();
1373
1374	($hook = get_hook('aop_email_output_start')) ? eval($hook) : null;
1375
1376?>
1377	<div class="main-content frm parted">
1378		<form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_email']) ?>">
1379			<div class="hidden">
1380				<input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_settings_email'])) ?>" />
1381				<input type="hidden" name="form_sent" value="1" />
1382			</div>
1383			<div class="content-head">
1384				<h2 class="hn"><span><?php echo $lang_admin_settings['E-mail addresses'] ?></span></h2>
1385			</div>
1386<?php ($hook = get_hook('aop_email_pre_addresses_fieldset')) ? eval($hook) : null; ?>
1387				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
1388					<legend class="group-legend"><strong><?php echo $lang_admin_settings['E-mail addresses legend'] ?></strong></legend>
1389<?php ($hook = get_hook('aop_email_pre_admin_email')) ? eval($hook) : null; ?>
1390					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1391						<div class="sf-box text">
1392							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Admin e-mail'] ?></span></label><br />
1393							<span class="fld-input"><input type="email" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[admin_email]" size="50" maxlength="80" value="<?php echo forum_htmlencode($forum_config['o_admin_email']) ?>" /></span>
1394						</div>
1395					</div>
1396<?php ($hook = get_hook('aop_email_pre_webmaster_email')) ? eval($hook) : null; ?>
1397					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1398						<div class="sf-box text">
1399							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Webmaster e-mail label'] ?></span><small><?php echo $lang_admin_settings['Webmaster e-mail help'] ?></small></label><br />
1400							<span class="fld-input"><input type="email" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[webmaster_email]" size="50" maxlength="80" value="<?php echo forum_htmlencode($forum_config['o_webmaster_email']) ?>" /></span>
1401						</div>
1402					</div>
1403<?php ($hook = get_hook('aop_email_pre_mailing_list')) ? eval($hook) : null; ?>
1404					<div class="txt-set set<?php echo ++$forum_page['item_count'] ?>">
1405						<div class="txt-box textarea">
1406							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Mailing list label'] ?></span><small><?php echo $lang_admin_settings['Mailing list help'] ?></small></label>
1407							<div class="txt-input"><span class="fld-input"><textarea id="fld<?php echo $forum_page['fld_count'] ?>" name="form[mailing_list]" rows="5" cols="55"><?php echo forum_htmlencode($forum_config['o_mailing_list']) ?></textarea></span></div>
1408						</div>
1409					</div>
1410<?php ($hook = get_hook('aop_email_pre_addresses_fieldset_end')) ? eval($hook) : null; ?>
1411				</fieldset>
1412<?php
1413
1414($hook = get_hook('aop_email_addresses_fieldset_end')) ? eval($hook) : null;
1415
1416// Reset counter
1417$forum_page['group_count'] = $forum_page['item_count'] = 0;
1418
1419?>
1420			<div class="content-head">
1421				<h2 class="hn"><span><?php echo $lang_admin_settings['E-mail server'] ?></span></h2>
1422			</div>
1423				<div class="ct-box">
1424					<p><?php echo $lang_admin_settings['E-mail server info'] ?></p>
1425				</div>
1426<?php ($hook = get_hook('aop_email_pre_smtp_fieldset')) ? eval($hook) : null; ?>
1427				<fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
1428					<legend class="group-legend"><strong><?php echo $lang_admin_settings['E-mail server legend'] ?></strong></legend>
1429<?php ($hook = get_hook('aop_email_pre_smtp_host')) ? eval($hook) : null; ?>
1430					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1431						<div class="sf-box text">
1432							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['SMTP address label'] ?></span><small><?php echo $lang_admin_settings['SMTP address help'] ?></small></label><br />
1433							<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[smtp_host]" size="35" maxlength="100" value="<?php echo forum_htmlencode($forum_config['o_smtp_host']) ?>" /></span>
1434						</div>
1435					</div>
1436<?php ($hook = get_hook('aop_email_pre_smtp_user')) ? eval($hook) : null; ?>
1437					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1438						<div class="sf-box text">
1439							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['SMTP username label'] ?></span><small><?php echo $lang_admin_settings['SMTP username help'] ?></small></label><br />
1440							<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[smtp_user]" size="35" maxlength="50" value="<?php echo forum_htmlencode($forum_config['o_smtp_user']) ?>" /></span>
1441						</div>
1442					</div>
1443<?php ($hook = get_hook('aop_email_pre_smtp_pass')) ? eval($hook) : null; ?>
1444					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1445						<div class="sf-box text">
1446							<label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['SMTP password label'] ?></span><small><?php echo $lang_admin_settings['SMTP password help'] ?></small></label><br />
1447							<span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[smtp_pass]" size="35" maxlength="50" value="<?php echo forum_htmlencode($forum_config['o_smtp_pass']) ?>" /></span>
1448						</div>
1449					</div>
1450<?php ($hook = get_hook('aop_email_pre_smtp_ssl')) ? eval($hook) : null; ?>
1451					<div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1452						<div class="sf-box checkbox">
1453							<span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[smtp_ssl]" value="1"<?php if ($forum_config['o_smtp_ssl'] == '1') echo ' checked="checked"' ?> /></span>
1454							<label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['SMTP SSL'] ?></span> <?php echo $lang_admin_settings['SMTP SSL label'] ?></label>
1455						</div>
1456					</div>
1457<?php ($hook = get_hook('aop_email_pre_smtp_fieldset_end')) ? eval($hook) : null; ?>
1458				</fieldset>
1459<?php ($hook = get_hook('aop_email_smtp_fieldset_end')) ? eval($hook) : null; ?>
1460			<div class="frm-buttons">
1461				<span class="submit primary"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></span>
1462			</div>
1463		</form>
1464	</div>
1465<?php
1466
1467}
1468else
1469{
1470	($hook = get_hook('aop_new_section')) ? eval($hook) : null;
1471}
1472
1473($hook = get_hook('aop_end')) ? eval($hook) : null;
1474
1475$tpl_temp = forum_trim(ob_get_contents());
1476$tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
1477ob_end_clean();
1478// END SUBST - <!-- forum_main -->
1479
1480require FORUM_ROOT.'footer.php';
1481