<?php
/***************************************************************************
* Date Created: 19/07/2015
* Project Original Author / Creator: Jijuan
*
* Obejective: User Details Class
**************************************************************************/

Class SYSUser{
    var $usr_id, $usr_id_sys, $usrname, $fullname, $user_level, $user_jab, $user_parlimen, $user_dun, $user_daerah, $index, $logout, $profile, $katalaluan, $email, $profile_img;
		

    function __SYSUser() {
		$this->usr_id    	= "";
		$this->usr_id_sys  	= "";
		$this->usrname     	= "";
		$this->fullname     = "";
		$this->user_level	= "";
		$this->user_jab		= "";
		$this->user_parlimen= "";
		$this->user_dun		= "";
		$this->user_daerah	= "";
		$this->index		= "";
		$this->logout		= "";
		$this->profile		= "";
		$this->katalaluan	= "";
		$this->email		= "";
		$this->profile_img	= "";
		 
	}

	function setVars($user_details) {
		if(isset($user_details['id']))		        $this->usr_id 		= trim($user_details['id']);
		if(isset($user_details['id_sys']))	        $this->usr_id_sys 	= trim($user_details['id_sys']);
		if(isset($user_details['login'])) 	        $this->usrname 		= trim($user_details['login']);
		if(isset($user_details['user_name']))		$this->fullname 	= trim($user_details['user_name']);
	 	if(isset($user_details['role']))		    $this->user_level	= trim($user_details['role']);
	 	if(isset($user_details['jab']))		  		$this->user_jab		= trim($user_details['jab']);
	 	if(isset($user_details['parlimen']))		$this->user_parlimen= trim($user_details['parlimen']);
	 	if(isset($user_details['dun']))		  	  	$this->user_dun		= trim($user_details['dun']);
	 	if(isset($user_details['daerah']))		    $this->user_daerah	= trim($user_details['daerah']);
	 	if(isset($user_details['index']))		    $this->index		= trim($user_details['index']);
	 	if(isset($user_details['logout']))		    $this->logout		= trim($user_details['logout']);
	 	if(isset($user_details['profile']))		    $this->profile		= trim($user_details['profile']);
	 	if(isset($user_details['katalaluan']))		$this->katalaluan	= trim($user_details['katalaluan']);
	 	if(isset($user_details['emel']))			$this->email		= trim($user_details['emel']);
	 	if(isset($user_details['profile_img']))		$this->profile_img	= trim($user_details['profile_img']);
	
    }
}
?>