<?php
$admin = 2;
$file = __FILE__;
include_once ("../inc/inc_connect.php");

if ($action =="go")
{
    $query = "UPDATE $admintable SET strShowLogin = '$Showlogin', strShowTime = '$Showtime', strShowDate = '$Showdate', strKeyboardNavigation = '$Keyboardnavigation', strStatisticTracking = '$Statistictracking', strAdminNewPage = '$Adminnewpage', strErrorReport = '$Errorreport', strUseOb = '$Useob', strFixMagicQuotes = '$Fixmagicquotes', strMetaDescription = '$Metadescription', strMetaKeyWords = '$Metakeywords', strStoreProfileEmail = '$Storeprofileemail', strEmailFrom = '$Emailfrom', strShowLastPostTime = '$Showlastposttime', strShowModerators = '$Showmoderators', strShowSecondIcon = '$Showsecondicon', strPostIt = '$Postit', strUseCalendar = '$Usecalendar', strSpellCheck = '$Spellcheck'";
    mysql_query( $query, $link ) or die ( "Error! : ".mysql_error() );
}

include ("../inc/inc_common.php");
include ("../inc/inc_admincheck.php");
include ("../inc/inc_getdate.php");
include ("../inc/inc_forumname.php");
$page = "Admin - Misc. Customising";
$pagelink = $file;
include("../inc/inc_setonline.php");
$title = "$name1 Admin - $gfcookie[1] - Misc. Customising";
include ("../inc/inc_head.php");
include ("../inc/inc_body.php");
$title = "Misc. Customising";
include ("../inc/inc_title.php");

if ($usespellcheck == 1)
{
    $spellcheckch = "Checked";
}

if ($showlogin == 1)
{
    $showloginch = "Checked";
}
if ($showtime == 1)
{
    $showtimech = "Checked";
}
if ($showdate == 1)
{
    $showdatech = "Checked";
}
if ($keyboardnavigation == 1)
{
    $keyboardnavigationch = "Checked";
}
if ($adminnewpage == 1)
{
    $adminnewpagech = "Checked";
}
if ($useob == 1)
{
    $useobch = "Checked";
}
if ($fixmagicquotes == 1)
{
    $fixmagicquotesch = "Checked";
}
if ($storeprofileemail == 1)
{
    $storeprofileemailch = "Checked";
}
if ($showlastposttime == 1)
{
    $showlastposttimech = "Checked";
}
if ($showmoderators == 1)
{
    $showmoderatorsch = "Checked";
}
if ($showsecondicon == 1)
{
    $showsecondiconch = "Checked";
}
if ($postit == 1)
{
    $postitch = "Checked";
}

if ($usecalendar == 1)
{
    $usecalendarch = "Checked";
}



$result=mysql_query("SELECT * FROM $admintable LIMIT 0, 1");
$num_rows = mysql_num_rows( $result );
while ( $a_row = mysql_fetch_object( $result ) )
{
    print "<table border=1 cellpadding=5 cellspacing=0 style=\"border-collapse: collapse\" bordercolor=\"$bordercolor\" style=\"font-family: $font; font-size: $fontpoint\" bgcolor=\"$fgcolour\"><tr><td width=\"100%\" align=\"center\">

    <form method=\"post\" action=\"admin_cus_misc.php?action=go\"><br>

    <table border=0 cellpadding=3 cellspacing=0 width=100% style=\"font-family: $font; font-size: $fontpoint\">

    <tr><td align=\"center\">
    Show Forum Moderators On The Forums Page</td><td align=\"center\"><input type=\"checkbox\" $showmoderatorsch name=\"Showmoderators\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Show Last Post Time On The Forums Page</td><td align=\"center\"><input type=\"checkbox\" $showlastposttimech name=\"Showlastposttime\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Show Right-hand Icon On The Forums Page</td><td align=\"center\"><input type=\"checkbox\" $showsecondiconch name=\"Showsecondicon\" value=\"1\"></td></tr>

    <tr><td width=\"50%\" align=\"center\">
    Meta Description</td><td align=\"center\"><input type=\"text\" onfocus=\"document.onkeypress=function(){};\" name=\"Metadescription\" value=\"$a_row->strMetaDescription\" style=\"color: #FFFFFF; background-image: url('../images/textbox_background_red.gif')\"></td></tr>

    <tr><td width=\"50%\" align=\"center\">
    Meta Keywords (Seperate with commas)</td><td align=\"center\"><input type=\"text\" onfocus=\"document.onkeypress=function(){};\" name=\"Metakeywords\" value=\"$a_row->strMetaKeyWords\" style=\"color: #FFFFFF; background-image: url('../images/textbox_background_red.gif')\"></td></tr>

    <tr><td align=\"center\">
    Switch Keyboard Navigation On</td><td align=\"center\"><input type=\"checkbox\" $keyboardnavigationch name=\"Keyboardnavigation\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Open The Admin Menu In A New Page</td><td align=\"center\"><input type=\"checkbox\" $adminnewpagech name=\"Adminnewpage\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Use Spell Checking</td><td align=\"center\"><input type=\"checkbox\" $spellcheckch name=\"Spellcheck\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Use ob_gzhandler Compression (Recommended)</td><td align=\"center\"><input type=\"checkbox\" $adminnewpagech name=\"Adminnewpage\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Allow Magic Quotes (Not Recommended)</td><td align=\"center\"><input type=\"checkbox\" $fixmagicquotesch name=\"Fixmagicquotes\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Use Post It</td><td align=\"center\"><input type=\"checkbox\" $postitch name=\"Postit\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Store Profile Emails</td><td align=\"center\"><input type=\"checkbox\" $storeprofileemailch name=\"Storeprofileemail\" value=\"1\"></td></tr>

    <tr><td width=\"50%\" align=\"center\">
    Email From Address</td><td align=\"center\"><input type=\"text\" onfocus=\"document.onkeypress=function(){};\" name=\"Emailfrom\" value=\"$a_row->strEmailFrom\" style=\"color: #FFFFFF; background-image: url('../images/textbox_background_red.gif')\"></td></tr>

    <tr><td align=\"center\">
    Show Login Info Under The Title</td><td align=\"center\"><input type=\"checkbox\" $showloginch name=\"Showlogin\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Enable The Calendar</td><td align=\"center\"><input type=\"checkbox\" $usecalendarch name=\"Usecalendar\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Show Date In The Top Right Corner Of The Page</td><td align=\"center\"><input type=\"checkbox\" $showdatech name=\"Showdate\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Show Time In The Top Right Corner Of The Page</td><td align=\"center\"><input type=\"checkbox\" $showtimech name=\"Showtime\" value=\"1\"></td></tr>

    <tr><td align=\"center\">
    Statistic Tracking Level</td><td align=\"center\"><select name=\"Statistictracking\">
    <option ";

    if ($statistictracking == 1)
    {
        print "selected ";
    }

    print "value=\"1\">Detailed (slow)</option>
    <option ";

    if ($statistictracking == 2)
    {
        print "selected ";
    }

    print "value=\"2\">Light (Fast)</option></select></td></tr>

    <tr><td align=\"center\">
    Error Reporting Level</td><td align=\"center\"><select name=\"Errorreport\">
    <option ";

    if ($errorreport == 0)
    {
        print "selected ";
    }

    print "value=\"0\">None (Recommended)</option>
    <option ";

    if ($errorreport == 1)
    {
        print "selected ";
    }

    print "value=\"1\">Low (Fatal Only)</option>
    <option ";

    if ($errorreport == 2)
    {
        print "selected ";
    }

    print "value=\"2\">High (All But Notices)</option>
    <option ";

    if ($errorreport == 3)
    {
        print "selected ";
    }

    print "value=\"3\">Full (Debug only)</option></select></td></tr>

    </table><br><br><input type=\"submit\" value=\"Set This Value\"></form></td></tr></table><br><br><a href=\"admin_customise.php\"><font size=2>Back to the Main Customise Page</a>";

}

include ("../inc/inc_footer.php");