application/modules/vehicle/controllers/Vehicle.php
/*controller untuk service setup atau header dari vehicle services*/
controller untuk service setup atau header dari vehicle services
controller untuk service setup atau header dari vehicle services
public function service_setup()
	{
		$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['title'] = 'Services Setup';
				$data['dd_empcode'] = $this->lov->dd_empcode();
		        $data['empcode_selected'] = $this->input->post('f_empcode') ? $this->input->post('f_empcode') : '';
				$data['dd_emp_status'] = $this->lov->dd_emp_status();
		        $data['empcode_status_selected'] = $this->input->post('id_position') ? $this->input->post('id_position') : '';
				$data['dd_attd_code'] = $this->lov->dd_attd_code();
		        $data['attd_code_selected'] = $this->input->post('f_attd_code') ? $this->input->post('f_attd_code') : '';	        
				$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_service_setup');
				$this->load->view('temp/sidebar');
				$this->load->view('notif');
				$this->load->view('ajax_service_setup',$data);
		        }
			    else
			    {
						return show_error('You must be an administrator to view this page.');
			    }
		}
	}
public function service_setup ( ) { $ 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 [ 'title' ] = 'Services Setup' ; $ data [ 'dd_empcode' ] = $ this -> lov -> dd_empcode ( ) ; $ data [ 'empcode_selected' ] = $ this -> input -> post ( 'f_empcode' ) ? $ this -> input -> post ( 'f_empcode' ) : '' ; $ data [ 'dd_emp_status' ] = $ this -> lov -> dd_emp_status ( ) ; $ data [ 'empcode_status_selected' ] = $ this -> input -> post ( 'id_position' ) ? $ this -> input -> post ( 'id_position' ) : '' ; $ data [ 'dd_attd_code' ] = $ this -> lov -> dd_attd_code ( ) ; $ data [ 'attd_code_selected' ] = $ this -> input -> post ( 'f_attd_code' ) ? $ this -> input -> post ( 'f_attd_code' ) : '' ; $ 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_service_setup' ) ; $ this -> load -> view ( 'temp/sidebar' ) ; $ this -> load -> view ( 'notif' ) ; $ this -> load -> view ( 'ajax_service_setup' , $ data ) ; } else { return show_error ( 'You must be an administrator to view this page.' ) ; } } }
controller untuk service setup atau header dari vehicle services
controller untuk service setup atau header dari vehicle services
/*jika tidak ada session  maka akan di redirect ke halaman login*/ /**/ /*$data['dept'] = $this->lov->dept();*/ /*$data['empcode'] = $this->emp_rn();*/ // dropdown untuk empcode // dropdown untuk emp status // dropdown untuk attd code //dropdown untuk vehicle code # code...