<?
// Security
define("opendomains", true);
// create session
session_start();
if(!$_SESSION['code']) {
session_register("code");
$_SESSION['code']=rand(1000,9999);
}
// include
include('include/config.php');
include('include/function.php');
include('include/mysql.php');
// start template
include('include/template.php');
$page=new template;
$title="Home Page"; // Title of page
$des=""; // Description
$key=""; // Keywords
// select title
$at=$_GET['act'];
if(!$at ) $at="index";
switch ($at) {
case "home":
$title="Home Page";
break;
case "login":
$title="Login";
$config[scode]=$_SESSION['code']=rand(10000,99999);
break;
case "register":
$title="Register";
$config[scode]=$_SESSION['code']=rand(10000,99999);
break;
case "contact":
$title="Contact Us";
$config[scode]=$_SESSION['code']=rand(10000,99999);
break;
case "lastest":
$title="Lastest Domain";
break;
case "top":
$title="Top Domain";
break;
case "faq":
$title="F.A.Q";
break;
case "download":
$title="Download";
break;
case "spam":
$title="SPam Report";
$config[scode]=$_SESSION['code']=rand(10000,99999); break;
default:
$title="Home Page";
break;
}
if(file_exists("include/function.".$at.".php"))
include("include/function.".$at.".php");
// set special language page
if(file_exists("lang/".$config[lang]."/".$at.".php"))
include("lang/".$config[lang]."/".$at.".php");
$page->start($title,$des,$key);
// main page --> edit $file to get file in template
$file=$at;
$page->page($file);
// close mysql & page
$page->close();
include('include/close_mysql.php');
?>