<?php
if (is_blocked())
{
include("blocked.html");
exit;
}
$allowed_pages=array("login","logoff","forgottenpassword","register","admin-login-as-member.php","add-new-member","login_temp_suspended","paypal_renewal");
if (isset($the_page))
{
$the_page=str_replace("/","",$the_page);
if (preg_match("/__/i",$the_page)) header("Location: logoff");//"__" double underscore files with that name not allowed to load - logoff user for attempting to load them
if (in_array($the_page, $allowed_pages))
{
if (file_exists("php/".$the_page)) include("php/".$the_page);//filename and extension specified
else include(file_exists("php/".$the_page.".php")? $the_page.".php" :"404-file-not-found.php");//just filename specified
include_once("footer.html");
exit;
}
}
$WMM_Secure = new WMM_secure();
$WMM_Secure->authenticate("member");//user will be logged off if not authenticated
include_once("header.html");
if (paypal_enabled() AND !paypal_member_subscribed()) paypal_show_renewal();
if (!isset($the_page)) include(INITIAL_PAGE.".php");
else $WMM_Secure->SecureInclude($the_page);
include_once("footer.html");
?>