<?php
if (is_blocked())
{
include("blocked.html");
exit;
}
$allowed_pages=array("login.php","logoff.php","forgottenpassword.php");
if (isset($the_page))
{
if (in_array($the_page, $allowed_pages))
{
include(file_exists("php/".$the_page)? $the_page:"404-file-not-found.php");
include_once("footer.html");
exit;
}
}
$WMM_Secure = new WMM_secure();
$logged_in=$WMM_Secure->authenticate("admin");
if (!isset($the_page))
{
include("header.html");
include("main_menu.html");
include("main_menu-open.html");
}
else
{ // special case for templateswitcher.php so loads changed template
if ($the_page!="templateswitcher.php")
{
include("header.html");
include("main_menu.html");
include("main_menu-close.html");
}
include(file_exists("php/".$the_page)? $the_page:"404-file-not-found.php");
}
include_once("footer.html");
?>