<?php
include "functions.inc.php";
db_login();
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Template based website management system</TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<STYLE type=text/css>.body {
    COLOR: #000000; FONT-FAMILY: Verdana,sans-serif; FONT-SIZE: 8pt; LINE-HEIGHT: 18px
}
.subbody {
    COLOR: #6666cc; FONT-FAMILY: Arial; FONT-SIZE: 8pt; LINE-HEIGHT: 18px
}
.stats {
    COLOR: #8b008b; FONT-FAMILY: Verdana,sans-serif; FONT-SIZE: 8pt; FONT-WEIGHT: bold; LINE-HEIGHT: 18px
}
.footer {
    COLOR: #000000; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 8pt
}
.input {
    COLOR: #000000; FONT-FAMILY: Courier,monospace,serif; FONT-SIZE: 8pt
}
.submit {
    COLOR: #000000; FONT-FAMILY: Verdana; FONT-SIZE: 8pt; FONT-WEIGHT: bold
}
.forum_title {
    FONT-FAMILY: Arial, Helvetica; FONT-SIZE: 8pt
}
.forum {
    FONT-FAMILY: Verdana, Helvetica; FONT-SIZE: 8pt
}
TD {
    FONT-FAMILY: Verdana, Helvetica; FONT-SIZE: 8pt
}
INPUT {
    FONT-FAMILY: Arial, Helvetica; FONT-SIZE: 10pt
}
TEXTAREA {
    FONT-FAMILY: Arial, Helvetica; FONT-SIZE: 10pt; WIDTH: 500px
}
A:link {
    COLOR: #039
}
A:visited {
    COLOR: #909
}
A:active {
    COLOR: #c03
}
A:hover {
    COLOR: #999
}
A.footer-email:link {
    COLOR: #000000; TEXT-DECORATION: none
}
A.footer-email:visited {
    COLOR: #000000; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A.footer-email:active {
    COLOR: #3333cc; TEXT-DECORATION: none
}
A.footer-email:hover {
    COLOR: #3333cc; TEXT-DECORATION: none
}
A.launch-site {
    FONT-FAMILY: Arial,sans-serif; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A.link-head:link {
    COLOR: #000080; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A.link-head:visited {
    COLOR: #000080; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A.link-head:active {
    COLOR: #c03; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A.link-head:hover {
    COLOR: #3333cc; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 10pt; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A.link-sub:link {
    COLOR: #000; FONT-FAMILY: Verdana,sans-serif; FONT-SIZE: 8pt; TEXT-DECORATION: none
}
A.link-sub:visited {
    COLOR: #000; FONT-FAMILY: Verdana,sans-serif; FONT-SIZE: 8pt; TEXT-DECORATION: none
}
A.link-sub:active {
    COLOR: #c03; FONT-FAMILY: Verdana,sans-serif; FONT-SIZE: 8pt; TEXT-DECORATION: none
}
A.link-sub:hover {
    COLOR: #999; FONT-FAMILY: Verdana,sans-serif; FONT-SIZE: 8pt; TEXT-DECORATION: none
}
A.link-logo:link {
    COLOR: #000080; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 20pt; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A.link-logo:visited {
    COLOR: #000080; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 20pt; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A.link-logo:active {
    COLOR: #c03; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 20pt; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
A.link-logo:hover {
    COLOR: #3333cc; FONT-FAMILY: Arial,sans-serif; FONT-SIZE: 20pt; FONT-WEIGHT: bold; TEXT-DECORATION: none
}
</STYLE>

<META content="MSHTML 5.00.2919.6307" name=GENERATOR></HEAD>

<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><A name=top></A>
<!-- begin Masthead-->
<!-- Start: ToolBar V2.0-->
<CENTER>
<!-- begin table that encompasses entire page//-->
    <table width="753" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td><!-- end table that encompasses site//-->
                    <!-- begin table that encompasses header//-->
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>
                                <!-- begin header content//-->
                                <?php include_temp("header")?>
                                <!-- end header content//-->
                            </td>
                        </tr>
                    </table>
                    <!-- end table that encompasses header//-->

                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                        <tr>
                            <td bgcolor="#003399" align=left vAlign=top nowrap width="100%"></td>
                        </tr>
                    </tbody>
                    </table>
                    
                    <!-- begin table that encompasses body//-->
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td><!-- begin table that encompasses content//-->
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td width=25% bgcolor="#ffffff" valign=top>
                                                <!-- begin left area content//-->
                                                <table border=0 width="100%">
                                                <TBODY>
                                                    <TR>
                                                        <TD align=left colSpan=2 valign=top>
                                                            <?php
                                                            include_temp("navigation");
                                                            ?>
                                                        </TD>
                                                    </TR>
                                                </TBODY>
                                                </table>
                                                <!-- end left area content//-->
                                            </td>
                                            <td bgcolor="#000080"><img src="1x1Trans.gif" width="1" height="1"></td>
                                            <td width=100% bgcolor=#ffffff valign=top>
                                                <!-- begin center area content//-->
                                                        <?
                                                        // If no topic selected, display the default content.
                                                        if ($topic == '') {
                                                        include_temp("main");
                                                        }
                                                        else {
                                                        if (!mysql_num_rows(mysql_query("SELECT id FROM $temp_table WHERE name='$topic'"))) {include_temp("main");} else {  include_temp($topic);}
                                                        }
                                                        ?>
                                                <!-- end table that encompasses content//-->
                                            </td>
                                        </tr>
                                    </table>
                                        <!-- end table that encompasses body//-->
                                        <!-- begin table that encompasses footer//-->
                                        <?php
                                        include_temp("footer");
                                        ?>

<!-- end table that encompasses footer//-->
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
<!-- end table that encompasses entire page//-->
</body>
</html>
