<?
    
/**
     *    Mambo Site Server Open Source Edition Version 3.0.6
     *    Dynamic portal server and Content managment engine
     *    04-05-2001
      *
     *    Copyright (C) 2000 - 2001 Miro Contruct Pty Ltd
     *    Distributed under the terms of the GNU General Public License
     *    This software may be used without warrany provided these statements are left
     *    intact and a "Powered By Mambo" appears at the bottom of each HTML page.
     *    This code is Available at http://sourceforge.net/projects/mambo
     *
     *    Site Name: Mambo Site Server Open Source Edition Version 3.0.6
     *    File Name: index2.php
     *    Developers: Danny Younes - danny@miro.com.au
     *                Nicole Anderson - nicole@miro.com.au
     *    Date: 27/07/2001
     *     Version #: 3.0.6
     *    Comments:
    **/

    
require ("classes/database.php");
    
$database = new database();

    
$past time()-3600;
    
$query "DELETE FROM session WHERE time < $past";
    
$database->openConnectionNoReturn($query);

    
session_start();
    
session_register("session_id");

    if (
$session_id){
        
$query "SELECT * FROM session WHERE session_id='$session_id'";
        
$result2 $database->openConnectionWithReturn($query);
        if (
mysql_num_rows($result2) <> 1){
            print 
"<SCRIPT>document.location.href='index.php'</SCRIPT>\n";
            }
        }
    else {
        print 
"<SCRIPT>document.location.href='index.php'</SCRIPT>\n";
        exit();
        }

    
$current_time time();
    
$query "UPDATE session SET time='$current_time' WHERE session_id='$session_id'";
    
$database->openConnectionNoReturn($query);
?>
<html>
<head>
    <title>Mambo Site Server - Administration</title>
    <link rel="stylesheet" href="../css/admin.css" type="text/css">
    <!--
         Mambo Site Server Open Source Edition
         Dynamic portal server and Content managment engine
         04-05-2001

         Copyright (C) 2000 - 2001 Miro Contruct Pty Ltd
         Distributed under the terms of the GNU General Public License
         Available at http://sourceforge.net/projects/mambo
    //-->
<style type="text/css">

</style>
<script language="JavaScript1.2" src="js/rollover.js"></SCRIPT>
<script language="javascript" src="js/adminjavascript.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
</HEAD>

<BODY bgcolor="White" leftmargin="0" rightmargin="0" topmargin="0">

<? if (($task != "edit") && ($task != "new") && ($task != "AddStep2") && ($task != "AddStep3") && ($task !="reply")) { ?>

<script type='text/javascript'>

//HV Menu v5- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more

function Go(){return}

</script>
<script type='text/javascript' src='js/mambomenu_var.js'></script>
<script type='text/javascript' src='js/menu_com.js'></script>
<noscript>Your browser does not support script</noscript>

<?}

 include(
"menubar.php");
 include (
"../configuration.php"); ?>

 <?
     $browse 
getenv("HTTP_USER_AGENT");
    if (
preg_match("/MSIE/i""$browse")){
        if (
preg_match("/Mac/i"$browse)){
            
$text_editor false;
            }
        elseif (
preg_match("/Windows/i"$browse)){
            
$text_editor true;
            }
        }
    elseif (
preg_match("/Mozilla/i""$browse")){
        if (
preg_match("/Mac/i"$browse)){
            
$text_editor false;
            }
        elseif (
preg_match("/Windows/i"$browse)){
            
$text_editor false;
            }
        }
?>

<TABLE CELLSPACING="0" CELLPADDING="10" BORDER="0" WIDTH="100%">
<TR>
    <TD>
    <?
        
/* Show list of items to edit or delete or create new */
        
switch ($option){
            case 
"Components":
                include(
"components.php");
                break;
            case 
"News":
                if (
$act == "categories"){
                    include(
"category.php");
                    }
                else {
                    include(
"news.php");
                    }
                break;
            case 
"Articles":
                if (
$act == "categories"){
                    include(
"category.php");
                    }
                else {
                    include(
"articles.php");
                    }
                break;
            case 
"Faq":
                if (
$act == "categories"){
                    include(
"category.php");
                    }
                else {
                    include(
"faq.php");
                    }
                break;
            case 
"Newsflash":
                include(
"newsflash.php");
                break;
            case 
"Survey":
                include(
"survey.php");
                break;
            case 
"Weblinks":
                if (
$act == "categories"){
                    include(
"category.php");
                    }
                else {
                    include(
"weblinks.php");
                    }
                break;
            case 
"top10":
                include(
"top10.php");
                break;
            case 
"Current":
                
$section="Current";
                include(
"banners_current.php");
                break;
            case 
"Finished":
                
$section="Finished";
                include(
"banners_finished.php");
                break;
            case 
"Clients":
                include(
"bannerClient.php");
                break;
            case 
"Users":
                include(
"users.php");
                break;
            case 
"Administrators":
                include(
"../configuration.php");
                include(
"administrators.php");
                break;
            case 
"MenuSections":
                include(
"menusections.php");
                break;
            case 
"SubSections":
                include(
"subsections.php");
                break;
            case 
"newsfeeds":
                include(
"newsfeeds.php");
                break;
            case 
"logout";
                include(
"logout.php");
                break;
            case 
"statistics":
                include(
"statistics.php");
                break;
            case 
"contact":
                include (
"contact.php");
                break;
            case 
"Forums":
                if (
$act == "threads"){
                    include(
"threads.php");
                }else {
                    include(
"forums.php");
                }
                break;
            default:
                
intro($browse);
            }
    
?>
    </TD>
</TR>
</TABLE>

</BODY>
</HTML>

<? function intro($browse) {?>

<table CELLPADDING="2" CELLSPACING="2" BORDER="0" ALIGN="center" WIDTH="561">
  <tr>
    <td VALIGN="top"><img SRC="../images/FP_images/mambo_masthead.gif" ALIGN="top"></td>
  </tr>
  <tr>
    <td VALIGN="top"> <img SRC="../images/admin/mamboman_S.jpg" WIDTH="150" HEIGHT="162" ALIGN="left" HSPACE=20 VSPACE=0">
<p><b><font COLOR="#FF9900">Welcome to Mambo Site Server</font></b>.<br>
        Miro International's website content management system for everyone.
      <p>This fully customisable application allows you to manage your own banners,
        polls, newsfeeds, news, articles, FAQs, links, and gives access to remote
        contributors at two levels of administration.
      <p>Use Mambo as a viable sales and marketing tool. From here, it is also
        the gateway to your web identity. You can manage your site as often, as
        much, or as little, as you like. You're in control.
      <p><b>This is Mambo Site Server 3.0.7 Open Source (GNU GPL) with
        LoudMouth Discussion Server 2.4 both highly customized and enhanced
        by Emir Sakic (saka@hotmail.com).</b>
      <p><? print "You are using: $browse"?>
      <p>&nbsp;
    </td>
  </tr>
  <!--<tr>
            <td align="center" valign="bottom" height="100%"><IMG SRC=../images/stories/mambositeserver.gif></td>
        </tr>//-->
</table>

<?}?>