<?php
if (!defined('ROOT')) exit('Can\'t Access !'); 
class view_class{
    function __construct(){
		$_GET['mod'] = empty($_GET['mod']) ? 'index' : $_GET['mod'];
		$_GET['act'] = empty($_GET['act']) ? 'main'  : $_GET['act'];
		if(config::get('closed')&&$_GET['mod']!='admin'&&$_GET['mod']!='tools') exit(config::get('closemsg'));
        $this->controller($_GET['mod'],$_GET['act']);
    }
	function controller($module,$action){
		$this->module = $module;
		$this->action = $action;
		$this->ctl = new controller_class($module,$action);		
	}
	function display(){
        $this->ctl->display();
	}
	function __destruct(){
		
	}
}
?>