PageRenderTime 68ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 1ms

/admin/settings.php

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