<?php

CLASS Index extends RasioProject
{
	public function __construct($config)
	{
		$this->getConfig($config);
		$this->validation();
		$this->layout = 'dashboard';
	}
	
	public function set()
	{
		
	}
	
	public function Index()
	{
		$menu = new Menu;
		$this->data->menu = $menu->modulActive($this->em);
		$this->data->width = count($this->data->menu) * 210;
		
		if($this->data->width > 900){
			$this->data->width = 210 * 4;
		}
		
		
		if(count($this->data->menu) == 1){
			foreach($this->data->menu as $row){
				header("location: ".$this->baseUrl."application/index/".$row->nama);
			}
		}
		
	}
}