<?php 

/**
 * Home Page Controller
 * @category  Controller
 */
class HomeController extends SecureController{
	/**
     * Index Action
     * @return View
     */
	function index(){
		if(strtolower(USER_ROLE) == 'admin'){
			$this->render_view("home/admin.php" , null , "main_layout.php");
		}
		elseif(strtolower(USER_ROLE) == 'wanhat'){
			$this->render_view("home/wanhat.php" , null , "main_layout.php");
		}
		elseif(strtolower(USER_ROLE) == 'ppg'){
			$this->render_view("home/ppg.php" , null , "main_layout.php");
		}
		elseif(strtolower(USER_ROLE) == 'pjp solok'){
			$this->render_view("home/pjp solok.php" , null , "main_layout.php");
		}
		elseif(strtolower(USER_ROLE) == 'pjp lembah segar'){
			$this->render_view("home/pjp lembah segar.php" , null , "main_layout.php");
		}
		elseif(strtolower(USER_ROLE) == 'pjp dharmasraya utara'){
			$this->render_view("home/pjp dharmasraya utara.php" , null , "main_layout.php");
		}
		elseif(strtolower(USER_ROLE) == 'pjp dharmasraya selatan'){
			$this->render_view("home/pjp dharmasraya selatan.php" , null , "main_layout.php");
		}
		else{
			$this->render_view("home/index.php" , null , "main_layout.php");
		}
	}
}
