Location: PHPKode > projects > XennoBB > xennobb/admin/options.php
<?php
/*

  Copyright (C) 2005-2011 UserDot
  Visit XennoBB at www.userdot.net/projects/xennobb
  Originally based on PunBB www.punbb.org

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

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

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  MA 02110-1301 USA

 */
define('IN_FORUM_ADMIN', 1);
require dirname(__FILE__) . '/../include/init.php';
if ($forum_user['g_id'] > USER_ADMIN)
    BB_Functions::Message($lang['No permission'], true, 1);
$page = isset($_GET['Page']) ? BB_Input::Htmlspecialchars($_GET['Page']) : null;
$basic_options = array($lang['General'] => 'options.php?Page=General', $lang['SEO'] => 'options.php?Page=SEO', $lang['Display'] => 'options.php?Page=Display', $lang['Features'] => 'options.php?Page=Features', $lang['Time'] => 'options.php?Page=Time', $lang['Posting'] => 'options.php?Page=Posting');
$advanced_options = array($lang['Reports'] => 'options.php?Page=Reports', $lang['Avatars'] => 'options.php?Page=Avatars', $lang['E-Mail'] => 'options.php?Page=EMail', $lang['Registration'] => 'options.php?Page=Registration', $lang['Others'] => 'options.php?Page=Others');
$extra_options = array($lang['Signature'] => 'options.php?Page=Signatures', $lang['Image upload'] => 'options.php?Page=image_upload', $lang['Private messaging'] => 'options.php?Page=private_messaging', $lang['Moderators'] => 'options.php?Page=Moderators', $lang['automatic_messages'] => 'options.php?Page=automatic_messages');
if (isset($_POST['save']))
{
    if (!isset($_SERVER['HTTP_REFERER']) || !preg_match('#/options\.php#i', $_SERVER['HTTP_REFERER']))
        BB_Functions::Message($lang['Bad referrer']);
    if (isset($_POST['form_sent1']))
    {
        $form = array_map('trim', $_POST['form1']);
        if ($form['board_title'] == '')
            BB_Functions::Message($lang['You must enter a board title.']);
        if ($form['board_title'] == '')
            $form['board_title'] = bb_board_title;
        $form['default_lang'] = preg_replace('#[\.\\\/]#', '', $form['default_lang']);
        if ($form['default_lang'] == '')
            $form['default_lang'] = bb_default_lang;
        if (substr($form['website_url'], -1) == '/')
            $form['website_url'] = substr($form['website_url'], 0, -1);
        if (substr($form['forum_url'], -1) != '/')
            $form['forum_url'] = $form['forum_url'] . '/';
    }
    else if (isset($_POST['form_sent2']))
    {
        $form = array_map('trim', $_POST['form2']);
    }
    else if (isset($_POST['form_sent3']))
    {
        $form = array_map('trim', $_POST['form3']);
        $form['timeout_flood'] = intval($form['timeout_flood']);
        if ($form['timeout_online'] >= $form['timeout_visit'])
            BB_Functions::Message($lang['timeout_online_greater']);
    }
    elseif (isset($_POST['form_sent4']))
    {
        $form = array_map('trim', $_POST['form4']);
    }
    else if (isset($_POST['form_sent5']))
    {
        $form = array_map('trim', $_POST['form5']);
        if ($form['additional_navlinks'] != '')
            $form['additional_navlinks'] = trim(BB_Input::Linebreaks($form['additional_navlinks']));
    }
    else if (isset($_POST['form_sent6']))
    {
        $form = array_map('trim', $_POST['form6']);
        if ($form['mailing_list'] != '')
            $form['mailing_list'] = strtolower(preg_replace('/[\s]/', '', $form['mailing_list']));
    }
    else if (isset($_POST['form_sent7']))
    {
        $form = array_map('trim', $_POST['form7']);
        $form['avatars_size'] = $form['avatars_size'] * 1024;
        if (substr($form['avatars_dir'], -1) == '/')
            $form['avatars_dir'] = substr($form['avatars_dir'], 0, -1);
        $form['avatars_dir'] = str_replace("\0", '', $form['avatars_dir']);
    }
    else if (isset($_POST['form_sent8']))
    {
        $form = array_map('trim', $_POST['form8']);
        $form['admin_email'] = strtolower($form['admin_email']);
        if (!BB_Email::Is_Valid_Email($form['admin_email']))
            BB_Functions::Message($lang['admin_email_invalid']);
        $form['webmaster_email'] = strtolower($form['webmaster_email']);
        if (!BB_Email::Is_Valid_Email($form['webmaster_email']))
            BB_Functions::Message($lang['webmaster_email_invalid']);
    }
    elseif (isset($_POST['form_sent9']))
    {
        $form = array_map('trim', $_POST['form9']);
        if ($form['rules_message'] != '')
            $form['rules_message'] = BB_Input::Linebreaks($form['rules_message']);
        else
        {
            $form['rules_message'] = $lang['Enter your rules here.'];
            if ($form['rules'] == '1')
                $form['rules'] = '0';
        }
    }
    else if (isset($_POST['form_sent10']))
    {
        $form = array_map('trim', $_POST['form10']);
        if ($form['announcement_message'] != '')
            $form['announcement_message'] = BB_Input::Linebreaks($form['announcement_message']);
        else
        {
            $form['announcement_message'] = $lang['Enter your announcement here.'];
            if ($form['announcement'] == '1')
                $form['announcement'] = '0';
        }
        if ($form['advertisement_message'] != '')
            $form['advertisement_message'] = BB_Input::Linebreaks($form['advertisement_message']);
        else
        {
            $form['advertisement_message'] = $lang['Enter your advertisement here.'];
            if ($form['advertisement'] == '1')
                $form['advertisement'] = '0';
        }
        if ($form['information_message'] != '')
            $form['information_message'] = BB_Input::Linebreaks($form['information_message']);
        else
        {
            $form['information_message'] = $lang['Enter your information here.'];
            if ($form['information'] == '1')
                $form['information'] = '0';
        }
        if ($form['guest_information_message'] != '')
            $form['guest_information_message'] = BB_Input::Linebreaks($form['guest_information_message']);
        else
        {
            $form['guest_information_message'] = $lang['Enter your information here.'];
            if ($form['guest_information'] == '1')
                $form['guest_information'] = '0';
        }
        if ($form['maintenance_message'] != '')
            $form['maintenance_message'] = BB_Input::Linebreaks($form['maintenance_message']);
        else
        {
            $form['maintenance_message'] = $lang['forum_in_maintenance'];
            if ($form['maintenance'] == '1')
                $form['maintenance'] = '0';
        }
    }
    else if (isset($_POST['form_sent12']))
    {
        $form = array_map('trim', $_POST['form12']);
        if ($form[upload_path] == '')
            BB_Functions::Message($lang['You must enter an upload path.'], true);
        if (realpath($form[upload_path]) === false)
            BB_Functions::Message($lang['upload_path_invalid'], true);
        $form['upload_path'] = realpath($form['upload_path']) . '/';
        if (!is_dir($form[upload_path]))
            BB_Functions::Message($lang['upload_path_invalid'], true);
        if (!is_writable($form[upload_path]))
            BB_Functions::Message($lang['Upload path isn`t writable.'], true);
        $form['max_width'] = intval($form['max_width']);
        if ($form['max_width'] <= 0)
            BB_Functions::Message($lang['Invalid maximum image width.'], true);
        $form['max_height'] = intval($form['max_height']);
        if ($form['max_height'] <= 0)
            BB_Functions::Message($lang['Invalid maximum image height.'], true);
        $form['max_size'] = intval($form['max_size']);
        if ($form['max_size'] <= 0)
            BB_Functions::Message($lang['Invalid maximum image size.'], true);
        $form['thumb_width'] = intval($form['thumb_width']);
        if ($form['thumb_width'] <= 0)
            BB_Functions::Message($lang['Invalid thumbnail width.'], true);
        $form['thumb_height'] = intval($form['thumb_height']);
        if ($form['thumb_height'] <= 0)
            BB_Functions::Message($lang['Invalid thumbnail height.'], true);
        $form['table_cols'] = intval($form['table_cols']);
        if ($form['table_cols'] <= 0)
            BB_Functions::Message($lang['Invalid column number.'], true);
        $form['max_post_images'] = intval($form['max_post_images']);
        if ($form['max_post_images'] <= 0)
            BB_Functions::Message($lang['Invalid maximum images per post.'], true);
        $form['allowed_ext'] = strtolower($form['allowed_ext']);
    }
    else if (isset($_POST['form_sent13']))
    {
        $form = array_map('trim', $_POST['form13']);
        $allow = array_map('trim', $_POST['allow']);
        $limit = array_map('trim', $_POST['limit']);
        while (list($id, $set) = @each($allow))
            $db->query('UPDATE ' . $db->prefix . 'usergroups SET g_pm=' . $set . ' WHERE g_id=\'' . $id . '\'') or BB_Functions::Error('Unable to change permissions.', __FILE__, __LINE__, $db->error());
        while (list($id, $set) = @each($limit))
            $db->query('UPDATE ' . $db->prefix . 'usergroups SET g_pm_limit=' . intval($set) . ' WHERE g_id=\'' . $id . '\'') or BB_Functions::Error('Unable to change permissions.', __FILE__, __LINE__, $db->error());
    }
    else if (isset($_POST['form_sent14']))
    {
        $form = array_map('trim', $_POST['form14']);
    }
    else if (isset($_POST['form_sent15']))
    {
        $form = array_map('trim', $_POST['form15']);
    }
    else if (isset($_POST['form_sent16']))
    {
        $form = array_map('trim', $_POST['form16']);
    }
    else if (isset($_POST['form_sent17']))
    {
        $form = array_map('trim', $_POST['form17']);
    }
    $cms_settings->Set_Namespace('xennobb');
    $res = true;
    while (list($key, $input) = @each($form))
    {
        $key = 'bb_' . $key;
        if ($input != '' || is_int($input))
            $value = $input;
        else
            $value = 'NULL';
        $res &= $cms_settings->Save($key, $value);
        if ($res)
            BB_Admin_Functions::Log_Action('Change XennoBB configuration', 2);
    }
    $cms_settings->Set_Namespace('');
    BB_Functions::Redirect('options.php?Page=' . BB_Input::Htmlspecialchars($_POST['Page']), $lang['redir_options_updated']);
}
$page_title = BB_Input::Htmlspecialchars($lang['Admin'] . $lang['Basic options']);
$form_name = 'update_options';
require FORUM_ROOT . 'admin/header.php';
if ($page == 'General')
{
    echo BB_Template::Generate_Menu($basic_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent1" value="1" />
                <input type="hidden" name="Page" value="General" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Board title'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_84']) ?></td>
                            <td><input type="text" class="textbox" name="form1[board_title]" size="35" maxlength="255" value="<?php echo BB_Input::Htmlspecialchars(bb_board_title) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Base URL'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_86']) ?></td>
                            <td><input type="text" class="textbox" name="form1[website_url]" size="50" maxlength="100" value="<?php echo bb_website_url ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Forum URL'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_195']) ?></td>
                            <td><input type="text" class="textbox" name="form1[forum_url]" size="50" maxlength="100" value="<?php echo bb_forum_url ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Server Time Zone'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_87']) ?></td>
                            <td><select name="form1[server_timezone]">
                                    <option value="-12"<?php if (bb_server_timezone == -12)
        echo ' selected="selected"' ?>>(GMT-12:00) International Date West</option>
                                    <option value="-11"<?php if (bb_server_timezone == -11)
                                echo ' selected="selected"' ?>>(GMT-11:00) Midway Island, Samoa</option>
                                    <option value="-10"<?php if (bb_server_timezone == -10)
                                echo ' selected="selected"' ?>>(GMT-10:00) Hawaii</option>
                                    <option value="-9"<?php if (bb_server_timezone == -9)
                                echo ' selected="selected"' ?>>(GMT-09:00) Alaska</option>
                                    <option value="-8"<?php if (bb_server_timezone == -8)
                                echo ' selected="selected"' ?>>(GMT-08:00) Pacific</option>
                                    <option value="-7"<?php if (bb_server_timezone == -7)
                                echo ' selected="selected"' ?>>(GMT-07:00) Mountain</option>
                                    <option value="-6"<?php if (bb_server_timezone == -6)
                                echo ' selected="selected"' ?>>(GMT-06:00) Central</option>
                                    <option value="-5"<?php if (bb_server_timezone == -5)
                                echo ' selected="selected"' ?>>(GMT-05:00) Eastern</option>
                                    <option value="-4"<?php if (bb_server_timezone == -4)
                                echo ' selected="selected"' ?>>(GMT-04:00) Atlantic</option>
                                    <option value="-3.5"<?php if (bb_server_timezone == -3.5)
                                echo ' selected="selected"' ?>>(GMT-03:30) Newfoundland</option>
                                    <option value="-3"<?php if (bb_server_timezone == -3)
                                echo ' selected="selected"' ?>>(GMT-03:00) Brazil, Buenos Aires</option>
                                    <option value="-2"<?php if (bb_server_timezone == -2)
                                echo ' selected="selected"' ?>>(GMT-02:00) Mid-Atlantic</option>
                                    <option value="-1"<?php if (bb_server_timezone == -1)
                                echo ' selected="selected"' ?>>(GMT-01:00) Azores</option>
                                    <option value="0"<?php if (bb_server_timezone == 0)
                                echo ' selected="selected"' ?>>(GMT-00:00) Greenwich, West. Europe</option>
                                    <option value="1"<?php if (bb_server_timezone == 1)
        echo ' selected="selected"' ?>>(GMT+01:00) Central European</option>
                                    <option value="2"<?php if (bb_server_timezone == 2)
        echo ' selected="selected"' ?>>(GMT+02:00) Eastern European</option>
                                    <option value="3"<?php if (bb_server_timezone == 3)
        echo ' selected="selected"' ?>>(GMT+03:00) Moscow, Baghdad</option>
                                    <option value="3.5"<?php if (bb_server_timezone == 3.5)
        echo ' selected="selected"' ?>>(GMT+03:30) Iran</option>
                                    <option value="4"<?php if (bb_server_timezone == 4)
        echo ' selected="selected"' ?>>(GMT+04:00) Abu Dhabi, Dubai</option>
                                    <option value="4.5"<?php if (bb_server_timezone == 4.5)
        echo ' selected="selected"' ?>>(GMT+04:30) Kabul</option>
                                    <option value="5"<?php if (bb_server_timezone == 5)
        echo ' selected="selected"' ?>>(GMT+05:00) Islamabad, Karachi</option>
                                    <option value="5.5"<?php if (bb_server_timezone == 5.5)
        echo ' selected="selected"' ?>>(GMT+05:30) India</option>
                                    <option value="5.75"<?php if (bb_server_timezone == 5.75)
        echo ' selected="selected"' ?>>(GMT+05:45) Kathmandu</option>
                                    <option value="6"<?php if (bb_server_timezone == 6)
        echo ' selected="selected"' ?>>(GMT+06:00) Astana, Dhaka</option>
                                    <option value="6.5"<?php if (bb_server_timezone == 6.5)
        echo ' selected="selected"' ?>>(GMT+06:30) Rangoon</option>
                                    <option value="7"<?php if (bb_server_timezone == 7)
        echo ' selected="selected"' ?>>(GMT+07:00) Bangkok, Jakarta</option>
                                    <option value="8"<?php if (bb_server_timezone == 8)
        echo ' selected="selected"' ?>>(GMT+08:00) Western Australia</option>
                                    <option value="9"<?php if (bb_server_timezone == 9)
        echo ' selected="selected"' ?>>(GMT+09:00) Japan, Korea</option>
                                    <option value="9.5"<?php if (bb_server_timezone == 9.5)
        echo ' selected="selected"' ?>>(GMT+09:30) Central Austrailia</option>
                                    <option value="10"<?php if (bb_server_timezone == 10)
        echo ' selected="selected"' ?>>(GMT+10:00) Eastern Austrailia</option>
                                    <option value="11"<?php if (bb_server_timezone == 11)
        echo ' selected="selected"' ?>>(GMT+11:00) Magadan, Solomon Is.</option>
                                    <option value="12"<?php if (bb_server_timezone == 12)
        echo ' selected="selected"' ?>>(GMT+12:00) New Zealand, Fiji</option>
                                    <option value="12.75"<?php if (bb_server_timezone == 12.75)
        echo ' selected="selected"' ?>>(GMT+12:45) Chatam Island, NZ</option>
                                    <option value="13"<?php if (bb_server_timezone == 13)
        echo ' selected="selected"' ?>>(GMT+13:00) Tonga, Phoenix Islands</option>
                                    <option value="14"<?php if (bb_server_timezone == 14)
        echo ' selected="selected"' ?>>(GMT+14:00) Christmas Islands</option>
                                </select></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['default_module']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['default_module_info']) ?></td>
                            <td><select name="form1[default_module]">
    <?php
    $modules_list = $cms_modules->Installed_Elements();
    natsort($modules_list);
    foreach ($modules_list as $m)
    {
        $lang_var = 'lang_cms_main_module_' . $m;
        $lang_array = $$lang_var;
        $selected = (bb_default_module == $m) ? ' selected="selected"' : '';
        echo '<option value="' . $m . '"' . $selected . '>' . $lang_array[$m] . '</option>';
        unset($lang_var, $lang_array);
    }
    ?>
                                </select></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['forum_announcement']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['forum_announcement_info']) ?></td>
                            <td><input type="radio" name="form1[show_announcement]" value="1"<?php if (bb_show_announcement == '1')
        echo ' checked="checked"'; ?> />&#160;<?php echo $lang['Yes']; ?>&#160;&#160;&#160;<input type="radio" name="form1[show_announcement]" value="0"<?php if (bb_show_announcement == '0')
        echo ' checked="checked"'; ?> />&#160;<?php echo $lang['No']; ?></td>
                        </tr>

                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'SEO')
{
    echo BB_Template::Generate_Menu($basic_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent2" value="1" />
                <input type="hidden" name="Page" value="SEO" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['URL Rewriting'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_89']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form2[rewrite_urls]" value="1"<?php if (bb_rewrite_urls == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form2[rewrite_urls]" value="0"<?php if (bb_rewrite_urls == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Global meta description'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_90']) ?></td>
                            <td><input type="text" class="textbox" name="form2[board_meta]" size="45" maxlength="255" value="<?php echo BB_Input::Htmlspecialchars(bb_board_meta) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Global meta keywords'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_91']) ?></td>
                            <td><input type="text" class="textbox" name="form2[board_meta_keywords]" size="45" maxlength="255" value="<?php echo BB_Input::Htmlspecialchars(bb_board_meta_keywords) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Show author meta tag'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_92']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form2[board_meta_author]" value="1"<?php if (bb_board_meta_author == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form2[board_meta_author]" value="0"<?php if (bb_board_meta_author == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Time')
{
    echo BB_Template::Generate_Menu($basic_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent3" value="1" />
                <input type="hidden" name="Page" value="Time" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Time format'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip('[Current format: ' . date(bb_time_format) . ']&nbsp;See the PHP manual for formatting options.') ?></td>
                            <td><input type="text" class="textbox" name="form3[time_format]" size="15" maxlength="25" value="<?php echo BB_Input::Htmlspecialchars(bb_time_format) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Date format'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip('[Current format: ' . date(bb_date_format) . ']&nbsp;See the PHP manual for formatting options.') ?></td>
                            <td><input type="text" class="textbox" name="form3[date_format]" size="15" maxlength="25" value="<?php echo BB_Input::Htmlspecialchars(bb_date_format) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Visit timeout'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_93']) ?></td>
                            <td><input type="text" class="textbox" name="form3[timeout_visit]" size="5" maxlength="5" value="<?php echo bb_timeout_visit ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Online timeout'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_94']) ?></td>
                            <td><input type="text" class="textbox" name="form3[timeout_online]" size="5" maxlength="5" value="<?php echo bb_timeout_online ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Anti-flood timout'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_95']) ?></td>
                            <td><input class="textbox" name="form3[timeout_flood]" type="text" value="<?php echo bb_timeout_flood ?>" size="5" maxlength="5" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Redirect time'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_96']) ?></td>
                            <td><input type="text" class="textbox" name="form3[redirect_delay]" size="5" maxlength="3" value="<?php echo bb_redirect_delay ?>" /></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Display')
{
    echo BB_Template::Generate_Menu($basic_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent4" value="1" />
                <input type="hidden" name="Page" value="Display" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Show user country'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_98']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form4[enable_country]" value="1"<?php if (bb_enable_country == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form4[enable_country]" value="0"<?php if (bb_enable_country == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Show online list'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_99']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form4[onlist_enable]" value="1"<?php if (bb_onlist_enable == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form4[onlist_enable]" value="0"<?php if (bb_onlist_enable == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Board Legend'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_186']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form4[show_legend]" value="1"<?php if (bb_show_legend == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form4[show_legend]" value="0"<?php if (bb_show_legend == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Board Statistics'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_100']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form4[boardstats_enable]" value="1"<?php if (bb_boardstats_enable == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form4[boardstats_enable]" value="0"<?php if (bb_boardstats_enable == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['User info in posts'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_101']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form4[show_user_info]" value="1"<?php if (bb_show_user_info == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form4[show_user_info]" value="0"<?php if (bb_show_user_info == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['User post count'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_102']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form4[show_post_count]" value="1"<?php if (bb_show_post_count == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form4[show_post_count]" value="0"<?php if (bb_show_post_count == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Smilies'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_103']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form4[smilies]" value="1"<?php if (bb_smilies == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form4[smilies]" value="0"<?php if (bb_smilies == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Smilies in signatures'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_104']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form4[smilies_sig]" value="1"<?php if (bb_smilies_sig == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form4[smilies_sig]" value="0"<?php if (bb_smilies_sig == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Make clickable links'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_105']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form4[make_links]" value="1"<?php if (bb_make_links == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form4[make_links]" value="0"<?php if (bb_make_links == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Most active users'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_106']) ?></td>
                            <td><input type="text" class="textbox" name="form4[most_active]" size="3" maxlength="2" value="<?php echo bb_most_active ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Topic review'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_107']) ?></td>
                            <td><input type="text" class="textbox" name="form4[topic_review]" size="3" maxlength="3" value="<?php echo bb_topic_review ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Topics per page'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_108']) ?></td>
                            <td><input type="text" class="textbox" name="form4[disp_topics_default]" size="3" maxlength="3" value="<?php echo bb_disp_topics_default ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Posts per page'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_109']) ?></td>
                            <td><input type="text" class="textbox" name="form4[disp_posts_default]" size="3" maxlength="3" value="<?php echo bb_disp_posts_default ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Indent size'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_110']) ?></td>
                            <td><input type="text" class="textbox" name="form4[indent_num_spaces]" size="3" maxlength="3" value="<?php echo bb_indent_num_spaces ?>" /></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Features')
{
    echo BB_Template::Generate_Menu($basic_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent5" value="1" />
                <input type="hidden" name="Page" value="Features" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['quicklinks'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['quicklinks_info']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form5[quicklinks]" value="1"<?php if (bb_quicklinks == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[quicklinks]" value="0"<?php if (bb_quicklinks == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Quick post'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_111']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form5[quickpost]" value="1"<?php if (bb_quickpost == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[quickpost]" value="0"<?php if (bb_quickpost == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Custom profile fields'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_191']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form5[profile_fields_enable]" value="1"<?php if (bb_profile_fields_enable == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[profile_fields_enable]" value="0"<?php if (bb_profile_fields_enable == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['User ranks'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_189']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form5[ranks_enable]" value="1"<?php if (bb_ranks_enable == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[ranks_enable]" value="0"<?php if (bb_ranks_enable == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['RSS Feeds'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_113']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form5[rss_type]" value="1"<?php if (bb_rss_type == '1')
        echo ' checked="checked"' ?> />&nbsp;RSS 1.0&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[rss_type]" value="2"<?php if (bb_rss_type == '2')
        echo ' checked="checked"' ?> />&nbsp;RSS 2.0&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[rss_type]" value="0"<?php if (bb_rss_type == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?> RSS</td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Users online'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_116']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form5[users_online]" value="1"<?php if (bb_users_online == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[users_online]" value="0"<?php if (bb_users_online == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Show todays visitors'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_117']) ?></td>
                            <td><input type="text" class="textbox" name="form5[online_users_today]" size="3" maxlength="2" value="<?php echo bb_online_users_today ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['User has posted earlier'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_118']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form5[show_dot]" value="1"<?php if (bb_show_dot == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[show_dot]" value="0"<?php if (bb_show_dot == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['GZip output'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_120']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form5[gzip]" value="1"<?php if (bb_gzip == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[gzip]" value="0"<?php if (bb_gzip == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Search all forums'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_121']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form5[search_all_forums]" value="1"<?php if (bb_search_all_forums == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form5[search_all_forums]" value="0"<?php if (bb_search_all_forums == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Number of poll fields'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_123']) ?></td>
                            <td><input type="text" class="textbox" name="form5[poll_max_fields]" size="4" value="<?php echo bb_poll_max_fields ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Additional menu items'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_122']) ?></td>
                            <td><textarea name="form5[additional_navlinks]" rows="6" cols="40"><?php echo BB_Input::Htmlspecialchars(bb_additional_navlinks) ?></textarea></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Reports')
{
    echo BB_Template::Generate_Menu($advanced_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent6" value="1" />
                <input type="hidden" name="Page" value="Reports" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Report method'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_124']) ?></td>
                            <td><input type="radio" name="form6[report_method]" value="0"<?php if (bb_report_method == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Internal'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form6[report_method]" value="1"<?php if (bb_report_method == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['E-Mail'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form6[report_method]" value="2"<?php if (bb_report_method == '2')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Both'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Report new registrations'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_125']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form6[regs_report]" value="1"<?php if (bb_regs_report == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form6[regs_report]" value="0"<?php if (bb_regs_report == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Mailing list'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_126']) ?></td>
                            <td><textarea name="form6[mailing_list]" rows="5" cols="40"><?php echo BB_Input::Htmlspecialchars(bb_mailing_list) ?></textarea></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Avatars')
{
    echo BB_Template::Generate_Menu($advanced_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent7" value="1" />
                <input type="hidden" name="Page" value="Avatars" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Use avatars'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_127']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form7[avatars]" value="1"<?php if (bb_avatars == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form7[avatars]" value="0"<?php if (bb_avatars == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Upload directory'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_128']) ?></td>
                            <td><input type="text" class="textbox" name="form7[avatars_dir]" size="30" maxlength="50" value="<?php echo BB_Input::Htmlspecialchars(bb_avatars_dir) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Max width'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_129']) ?></td>
                            <td><input type="text" class="textbox" name="form7[avatars_width]" size="5" maxlength="5" value="<?php echo bb_avatars_width ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Max height'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_130']) ?></td>
                            <td><input type="text" class="textbox" name="form7[avatars_height]" size="5" maxlength="5" value="<?php echo bb_avatars_height ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Max size'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_131']) ?></td>
                            <td><input type="text" class="textbox" name="form7[avatars_size]" size="5" maxlength="6" value="<?php echo bb_avatars_size / 1024 ?>" /></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'EMail')
{
    echo BB_Template::Generate_Menu($advanced_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent8" value="1" />
                <input type="hidden" name="Page" value="EMail" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Admin e-mail'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_132']) ?></td>
                            <td><input type="text" class="textbox" name="form8[admin_email]" size="30" maxlength="50" value="<?php echo BB_Input::Htmlspecialchars(bb_admin_email) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Webmaster e-mail'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_133']) ?></td>
                            <td><input type="text" class="textbox" name="form8[webmaster_email]" size="30" maxlength="50" value="<?php echo BB_Input::Htmlspecialchars(bb_webmaster_email) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Subscriptions'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_134']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form8[subscriptions]" value="1"<?php if (bb_subscriptions == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form8[subscriptions]" value="0"<?php if (bb_subscriptions == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['SMTP server address'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_135']) ?></td>
                            <td><input type="text" class="textbox" name="form8[smtp_host]" size="30" maxlength="100" value="<?php echo BB_Input::Htmlspecialchars(bb_smtp_host) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['SMTP username'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_136']) ?></td>
                            <td><input type="text" class="textbox" name="form8[smtp_user]" size="30" maxlength="50" value="<?php echo BB_Input::Htmlspecialchars(bb_smtp_user) ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['SMTP password'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_137']) ?></td>
                            <td><input type="text" class="textbox" name="form8[smtp_pass]" size="30" maxlength="50" value="<?php echo BB_Input::Htmlspecialchars(bb_smtp_pass) ?>" /></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Registration')
{
    echo BB_Template::Generate_Menu($advanced_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent9" value="1" />
                <input type="hidden" name="Page" value="Registration" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Allow new registrations'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_138']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form9[regs_allow]" value="1"<?php if (bb_regs_allow == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form9[regs_allow]" value="0"<?php if (bb_regs_allow == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['E-Mail verify registrations'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_139']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form9[regs_verify]" value="1"<?php if (bb_regs_verify == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form9[regs_verify]" value="0"<?php if (bb_regs_verify == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Image verify registrations'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_140']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form9[regs_verify_image]" value="1"<?php if (bb_regs_verify_image == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form9[regs_verify_image]" value="0"<?php if (bb_regs_verify_image == '0')
        echo 'checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Use forum rules'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_141']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form9[rules]" value="1"<?php if (bb_rules == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form9[rules]" value="0"<?php if (bb_rules == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Rules'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_142']) ?></td>
                            <td><textarea name="form9[rules_message]" rows="10" cols="40"><?php echo BB_Input::Htmlspecialchars(bb_rules_message) ?></textarea></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Allow_ban_email']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_14']) ?></td>
                            <td><input type="radio" name="form9[allow_banned_email]" value="1"<?php if (bb_allow_banned_email == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form9[allow_banned_email]" value="0"<?php if (bb_allow_banned_email == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Duplicate_emails']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_15']) ?></td>
                            <td><input type="radio" name="form9[allow_dupe_email]" value="1"<?php if (bb_allow_dupe_email == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form9[allow_dupe_email]" value="0"<?php if (bb_allow_dupe_email == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Others')
{
    echo BB_Template::Generate_Menu($advanced_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent10" value="1" />
                <input type="hidden" name="Page" value="Others" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Display advertisement'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_144']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form10[advertisement]" value="1"<?php if (bb_advertisement == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form10[advertisement]" value="0"<?php if (bb_advertisement == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Advertisement message'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_145']) ?></td>
                            <td><textarea name="form10[advertisement_message]" rows="5" cols="40"><?php echo BB_Input::Htmlspecialchars(bb_advertisement_message) ?></textarea></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Display information'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_146']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form10[information]" value="1"<?php if (bb_information == '1')
                        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form10[information]" value="0"<?php if (bb_information == '0')
                        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Information message'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_147']) ?></td>
                            <td><textarea name="form10[information_message]" rows="5" cols="40"><?php echo BB_Input::Htmlspecialchars(bb_information_message) ?></textarea></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Display guest information'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_148']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form10[guest_information]" value="1"<?php if (bb_guest_information == '1')
                        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form10[guest_information]" value="0"<?php if (bb_guest_information == '0')
                        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Guest information message'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_149']) ?></td>
                            <td><textarea name="form10[guest_information_message]" rows="5" cols="40"><?php echo BB_Input::Htmlspecialchars(bb_guest_information_message) ?></textarea></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Display announcement'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_150']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form10[announcement]" value="1"<?php if (bb_announcement == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form10[announcement]" value="0"<?php if (bb_announcement == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Announcement message'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_151']) ?></td>
                            <td><textarea name="form10[announcement_message]" rows="5" cols="40"><?php echo BB_Input::Htmlspecialchars(bb_announcement_message) ?></textarea></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Maintenance mode'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_152']) ?></td>
                            <td><input type="radio" class="radio_yes" name="form10[maintenance]" value="1"<?php if (bb_maintenance == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" class="radio_no" name="form10[maintenance]" value="0"<?php if (bb_maintenance == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Maintenance message'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_153']) ?></td>
                            <td><textarea name="form10[maintenance_message]" rows="5" cols="40"><?php echo BB_Input::Htmlspecialchars(bb_maintenance_message) ?></textarea></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" class="b1" name="save" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'image_upload')
{
    echo BB_Template::Generate_Menu($extra_options);
    ?>
    <div class="blockform">
        <form method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>">
            <div class="inform">
                <input type="hidden" name="form_sent12" value="1" />
                <input type="hidden" name="Page" value="image_upload" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Upload directory'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_156']) ?></td>
                            <td><input type="text" class="textbox" name="form12[upload_path]" size="40" maxlength="255" value="<?php echo bb_upload_path; ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Allowed extensions'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_157']) ?></td>
                            <td><input type="text" class="textbox" name="form12[allowed_ext]" size="40" maxlength="255" value="<?php echo bb_allowed_ext; ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Max width'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_158']) ?></td>
                            <td><input type="text" class="textbox" name="form12[max_width]" size="5" maxlength="5" value="<?php echo bb_max_width; ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Max height'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_159']) ?></td>
                            <td><input type="text" class="textbox" name="form12[max_height]" size="5" maxlength="5" value="<?php echo bb_max_height; ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Max size'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_160']) ?></td>
                            <td><input type="text" class="textbox" name="form12[max_size]" size="5" maxlength="7" value="<?php echo bb_max_size; ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Thumbnail width'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_161']) ?></td>
                            <td><input type="text" class="textbox" name="form12[thumb_width]" size="5" maxlength="6" value="<?php echo bb_thumb_width; ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Thumbnail height'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_162']) ?></td>
                            <td><input type="text" class="textbox" name="form12[thumb_height]" size="5" maxlength="6" value="<?php echo bb_thumb_height; ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Table columns'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_163']) ?></td>
                            <td><input type="text" class="textbox" name="form12[table_cols]" size="5" maxlength="6" value="<?php echo bb_table_cols; ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Maximum images per post'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_164']) ?></td>
                            <td><input type="text" class="textbox" name="form12[max_post_images]" size="5" maxlength="6" value="<?php echo bb_max_post_images; ?>" /></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" name="save" class="b1" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'private_messaging')
{
    echo BB_Template::Generate_Menu($extra_options);
    ?>
    <div class="blockform">
        <form method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>">
            <div class="inform">
                <input type="hidden" name="form_sent13" value="1" />
                <input type="hidden" name="Page" value="private_messaging" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Enable private messaging'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_178']) ?></td>
                            <td><input type="radio" name="form13[pms_enabled]" value="1"<?php if (bb_pms_enabled == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form13[pms_enabled]" value="0"<?php if (bb_pms_enabled == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Messages per page'] ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_179']) ?></td>
                            <td><input type="text" class="textbox" name="form13[pms_mess_per_page]" size="7" maxlength="255" value="<?php echo bb_pms_mess_per_page ?>" /></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="inform">
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
    <?php
    $result = $db->query('SELECT g_id, g_title, g_pm, g_pm_limit FROM ' . $db->prefix . 'usergroups WHERE g_id>' . USER_ADMIN . ' AND g_id != 3 ORDER BY g_id') or BB_Functions::Error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());
    while ($cur_group = $db->fetch_assoc($result))
    {
        ?>
                            <tr> 
                                <th class="header"><?php echo $cur_group['g_title'] ?></th>
                                <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_183']) ?></td>
                                <td><input type="radio" name="allow[<?php echo $cur_group['g_id'] ?>]" value="1"<?php if ($cur_group['g_pm'] == '1')
            echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="allow[<?php echo $cur_group['g_id'] ?>]" value="0"<?php if ($cur_group['g_pm'] == '0')
            echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                            </tr>
                            <tr>
                                <th class="header">&nbsp;</th>
                                <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_184']) ?></td>
                                <td>Messages limit: <input type="text" class="textbox" name="limit[<?php echo $cur_group['g_id'] ?>]" size="10" maxlength="10" value="<?php echo $cur_group['g_pm_limit'] ?>" /></td>
                            </tr>
        <?php
    }
    ?>
                    </table>
                </div>
            </div>
            <div><input type="submit" name="save" class="b1" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Posting')
{
    echo BB_Template::Generate_Menu($basic_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent14" value="1" />
                <input type="hidden" name="Page" value="Posting" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Bbcode']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_7']) ?></td>
                            <td><input type="radio" name="form14[message_bbcode]" value="1"<?php if (bb_message_bbcode == '1')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form14[message_bbcode]" value="0"<?php if (bb_message_bbcode == '0')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Bbcode Media']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['bbcode_media']) ?></td>
                            <td><input type="radio" name="form14[message_bbcode_media]" value="1"<?php if (bb_message_bbcode_media == '1')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form14[message_bbcode_media]" value="0"<?php if (bb_message_bbcode_media == '0')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Image_tag']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_8']) ?></td>
                            <td><input type="radio" name="form14[message_img_tag]" value="1"<?php if (bb_message_img_tag == '1')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form14[message_img_tag]" value="0"<?php if (bb_message_img_tag == '0')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Caps_message']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_9']) ?></td>
                            <td><input type="radio" name="form14[message_all_caps]" value="1"<?php if (bb_message_all_caps == '1')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form14[message_all_caps]" value="0"<?php if (bb_message_all_caps == '0')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Caps_subject']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_10']) ?></td>
                            <td><input type="radio" name="form14[subject_all_caps]" value="1"<?php if (bb_subject_all_caps == '1')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form14[subject_all_caps]" value="0"<?php if (bb_subject_all_caps == '0')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Require_guest_mail']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_11']) ?></td>
                            <td><input type="radio" name="form14[force_guest_email]" value="1"<?php if (bb_force_guest_email == '1')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form14[force_guest_email]" value="0"<?php if (bb_force_guest_email == '0')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Allow_IS']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_13']) ?></td>
                            <td><input type="radio" name="form14[is_upload]" value="1"<?php if (bb_is_upload == '1')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form14[is_upload]" value="0"<?php if (bb_is_upload == '0')
                                    echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" name="save" class="b1" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Signatures')
{
    echo BB_Template::Generate_Menu($extra_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent15" value="1" />
                <input type="hidden" name="Page" value="Signatures" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Bbcode_in_sig']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_20']) ?></td>
                            <td><input type="radio" name="form15[sig_bbcode]" value="1"<?php if (bb_sig_bbcode == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form15[sig_bbcode]" value="0"<?php if (bb_sig_bbcode == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Image_in_sig']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_21']) ?></td>
                            <td><input type="radio" name="form15[sig_img_tag]" value="1"<?php if (bb_sig_img_tag == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form15[sig_img_tag]" value="0"<?php if (bb_sig_img_tag == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Caps_sig']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_22']) ?></td>
                            <td><input type="radio" name="form15[sig_all_caps]" value="1"<?php if (bb_sig_all_caps == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form15[sig_all_caps]" value="0"<?php if (bb_sig_all_caps == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Max_sig_length']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_23']) ?></td>
                            <td><input type="text" class="textbox" name="form15[sig_length]" size="5" maxlength="4" value="<?php echo bb_sig_length ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Max_sig_lines']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_24']) ?></td>
                            <td><input type="text" class="textbox" name="form15[sig_lines]" size="5" maxlength="2" value="<?php echo bb_sig_lines ?>" /></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" name="save" class="b1" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'Moderators')
{
    echo BB_Template::Generate_Menu($extra_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent16" value="1" />
                <input type="hidden" name="Page" value="Moderators" />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['Edit_user_profile']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_16']) ?></td>
                            <td><input type="radio" name="form16[mod_edit_users]" value="1"<?php if (bb_mod_edit_users == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form16[mod_edit_users]" value="0"<?php if (bb_mod_edit_users == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Rename_user']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_17']) ?></td>
                            <td><input type="radio" name="form16[mod_rename_users]" value="1"<?php if (bb_mod_rename_users == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form16[mod_rename_users]" value="0"<?php if (bb_mod_rename_users == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Change_user_password']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_18']) ?></td>
                            <td><input type="radio" name="form16[mod_change_passwords]" value="1"<?php if (bb_mod_change_passwords == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form16[mod_change_passwords]" value="0"<?php if (bb_mod_change_passwords == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['Ban_users']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['tip_19']) ?></td>
                            <td><input type="radio" name="form16[mod_ban_users]" value="1"<?php if (bb_mod_ban_users == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form16[mod_ban_users]" value="0"<?php if (bb_mod_ban_users == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" name="save" class="b1" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else if ($page == 'automatic_messages')
{
    echo BB_Template::Generate_Menu($extra_options);
    ?>
    <div class="blockform">
        <form method="post" action="options.php">
            <div class="inform">
                <input type="hidden" name="form_sent17" value="1" />
                <input type="hidden" name="Page" value="automatic_messages" />
                <div class="infldset file" style="padding:10px">
                    <p><?php echo $lang['welcoming_messages_info'] ?></p>
                </div>
                <br />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['welcoming_post']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['welcoming_post_help']) ?></td>
                            <td><input type="radio" name="form17[welcoming_post]" value="1"<?php if (bb_welcoming_post == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form15[welcoming_post]" value="0"<?php if (bb_welcoming_post == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['welcoming_post_forum']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['welcoming_post_forum_help']) ?></td>
                            <td><select name="form17[welcoming_post_fid]">
    <?php
    $result = $db->query('SELECT id, forum_name FROM ' . $db->prefix . 'forums ORDER BY disp_position') or BB_Functions::Error('Unable to fetch category list', __FILE__, __LINE__, $db->error());
    while ($cur_forum = $db->fetch_assoc($result))
    {
        $selected = ($cur_forum['id'] == bb_welcoming_post_fid) ? ' selected="selected"' : '';
        echo "\t\t\t\t\t\t\t\t\t\t\t" . '<option value="' . $cur_forum['id'] . '"' . $selected . '>' . BB_Input::Htmlspecialchars($cur_forum['forum_name']) . '</option>' . "\n";
    }
    ?>
                                </select></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['welcoming_post_poster']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['welcoming_post_poster_help']) ?></td>
                            <td><input type="text" class="textbox" name="form17[welcoming_post_poster]" size="40" maxlength="50" value="<?php echo bb_welcoming_post_poster ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['welcoming_post_title']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['welcoming_post_title_help']) ?></td>
                            <td><input type="text" class="textbox" name="form17[welcoming_post_title]" size="40" maxlength="50" value="<?php echo bb_welcoming_post_title ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['welcoming_post_msg']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['welcoming_post_msg_help']) ?></td>
                            <td><textarea class="textbox" name="form17[welcoming_post_msg]" rows="15" cols="40"><?php echo bb_welcoming_post_msg ?></textarea></td>
                        </tr>
                    </table>
                </div>
                <br />
                <div class="infldset file" style="padding:10px">
                    <table class="aligntop" cellspacing="0">
                        <tr>
                            <th class="header"><?php echo $lang['welcoming_pm']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['welcoming_pm_help']) ?></td>
                            <td><input type="radio" name="form17[welcoming_pm]" value="1"<?php if (bb_welcoming_pm == '1')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['Yes'] ?>&nbsp;&nbsp;&nbsp;<input type="radio" name="form17[welcoming_pm]" value="0"<?php if (bb_welcoming_pm == '0')
        echo ' checked="checked"' ?> />&nbsp;<?php echo $lang['No'] ?></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['welcoming_pm_sender']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['welcoming_pm_sender_help']) ?></td>
                            <td><input type="text" class="textbox" name="form17[welcoming_pm_sender]" size="40" maxlength="50" value="<?php echo bb_welcoming_pm_sender ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['welcoming_pm_title']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['welcoming_pm_title_help']) ?></td>
                            <td><input type="text" class="textbox" name="form17[welcoming_pm_title]" size="40" maxlength="50" value="<?php echo bb_welcoming_pm_title ?>" /></td>
                        </tr>
                        <tr>
                            <th class="header"><?php echo $lang['welcoming_pm_msg']; ?></th>
                            <td class="tips"><?php BB_Template::Print_Tooltip($lang['welcoming_pm_msg_help']) ?></td>
                            <td><textarea class="textbox" name="form17[welcoming_pm_msg]" rows="15" cols="40"><?php echo bb_welcoming_pm_msg ?></textarea></td>
                        </tr>
                    </table>
                </div>
            </div>
            <div><input type="submit" name="save" class="b1" value="<?php echo $lang['Save'] ?>" /></div>
        </form>
    </div>
    <?php
}
else
    BB_Functions::Message($lang['Bad request']);
require FORUM_ROOT . 'admin/footer.php';
?>
Return current item: XennoBB