[ PHPXref.com ] [ Generated: Sat Aug 9 15:45:03 2008 ] [ FluxBB 1.3 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/admin/ -> settings.php (source)

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


[ Powered by PHPXref - Served by Debian GNU/Linux ]