<?php

	//Security
	if( ! defined( 'IS_INIT' ) )
	{
		die( 'Unauthorized Access' );
	}
	
	define( 'PAGES' , 'register,login,cp' );
	define( 'MAIN_URL' , "http://69.64.34.156/index.php" );
	
	global $Handler;
        
	//Theme path for parser
	$Handler->theme->SetValue( "PATH" , "./public/" );
        
	//Start sessions
	$Handler->session->Start();
	
	//Set the default language
	$Handler->theme->SetLanguage( $_SESSION['LANGUAGE'] );
	
	//Delcare user permission level
	define( 'ACC_LEVEL' , $_SESSION['AccountLevel'] );
	
	//Declare if user is logged in
	define( 'LOGGED_IN' , $_SESSION['LoggedIn'] );
	
	//Fetch user information, if user is logged in
	( LOGGED_IN == true && ACC_LEVEL != GUEST ) ? $Handler->user->FetchInfo( $_SESSION['UserID'] , $_SESSION['PassWord'] ) : null;

	
	//Listen for page requests
	$Handler->theme->Listen();

	
	
	?>