application/modules/vehicle/controllers/Vehicle.php
/*controller untuk list document vehicle expierd */
controller untuk list document vehicle expierd
controller untuk list document vehicle expierd
public function vehicle_monitoring()
	{
	$group = "ga";
		if (!$this->ion_auth->logged_in())
		{
			redirect('auth/login', 'refresh');
		}
	else{
		 	$obj_user = $this->ion_auth->user()->row();
				$email = $obj_user->username;
				$data['username'] = $email;
		 $data = array(
            'title' => 'Vehicle Monitoring',
            'username' => $email,
		);
		$data['dd_vehicle_code'] = $this->lov->dd_vehicle();
        $data['vehicle_code'] = $this->input->post('f_nap') ? $this->input->post('f_nap') : '';
			 if ($this->ion_auth->in_group($group)) {
			$this->load->view('temp/title',$data);
			$this->load->view('template/header_ga');
			$this->load->view('temp/sidebar');
			$this->load->view('f_veh_mon');
			$this->load->view('temp/footer');
			$this->load->view('notif');
			$this->load->view('ajax_veh_mon');
	        }
		    else
		    {
					return show_error('You must be an administrator to view this page.');
	    }
		}
	}
public function vehicle_monitoring ( ) { $ group = " ga " ; if ( ! $ this -> ion_auth -> logged_in ( ) ) { redirect ( 'auth/login' , 'refresh' ) ; } else { $ obj_user = $ this -> ion_auth -> user ( ) -> row ( ) ; $ email = $ obj_user -> username ; $ data [ 'username' ] = $ email ; $ data = array ( 'title' => 'Vehicle Monitoring' , 'username' => $ email , ) ; $ data [ 'dd_vehicle_code' ] = $ this -> lov -> dd_vehicle ( ) ; $ data [ 'vehicle_code' ] = $ this -> input -> post ( 'f_nap' ) ? $ this -> input -> post ( 'f_nap' ) : '' ; if ( $ this -> ion_auth -> in_group ( $ group ) ) { $ this -> load -> view ( 'temp/title' , $ data ) ; $ this -> load -> view ( 'template/header_ga' ) ; $ this -> load -> view ( 'temp/sidebar' ) ; $ this -> load -> view ( 'f_veh_mon' ) ; $ this -> load -> view ( 'temp/footer' ) ; $ this -> load -> view ( 'notif' ) ; $ this -> load -> view ( 'ajax_veh_mon' ) ; } else { return show_error ( 'You must be an administrator to view this page.' ) ; } } }
controller untuk list document vehicle expierd
controller untuk list document vehicle expierd
// redirect them to the login page /*else if (!$this->ion_auth->is_admin()) // remove this elseif if you want to enable this for non-admins
		{
			// redirect them to the home page because they must be an administrator to view this
			return show_error('You must be an administrator to view this page.');
		}*/ //dropdown untuk vehicle code /*$data['dept_id'] = $this->last_dept_id();
		$data['title'] = 'Grade Satus';
		$data['username'] = $this->usr_session();*/