application/modules/template/payroll.php
/*master ump sebagai parameter unutk perhitungan saat di slip gaji*/
master ump sebagai parameter unutk perhitungan saat di slip gaji
master ump sebagai parameter unutk perhitungan saat di slip gaji
public function ump()
	{
		 $group = "hr";
		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['dept'] = $this->emp_attribute->dept();
		$data['empcode'] = $this->emp_rn();
		$data['title'] = 'General Activity';
		$data['dd_empcode'] = $this->emp_attribute->dd_empcode();
        $data['empcode_selected'] = $this->input->post('f_empcode') ? $this->input->post('f_empcode') : '';
		$data['dd_emp_status'] = $this->emp_attribute->dd_emp_status();
        $data['empcode_status_selected'] = $this->input->post('id_position') ? $this->input->post('id_position') : '';
		$data['dd_attd_code'] = $this->emp_attribute->dd_attd_code();
        $data['attd_code_selected'] = $this->input->post('f_attd_code') ? $this->input->post('f_attd_code') : '';
         if ($this->ion_auth->in_group($group)) {
		$this->load->view('template/title',$data);
		$this->load->view('template/header');
		$this->load->view('template/sidebar');
		$this->load->view('f_uang_kehadiran');
		$this->load->view('ajax_uang_kehadiran',$data);
		$this->load->view('notif');
        }
    else
    {
			return show_error('You must be an administrator to view this page.');
    }
		}
	}
public function ump ( ) { $ group = " hr " ; 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 [ 'dept' ] = $ this -> emp_attribute -> dept ( ) ; $ data [ 'empcode' ] = $ this -> emp_rn ( ) ; $ data [ 'title' ] = 'General Activity' ; $ data [ 'dd_empcode' ] = $ this -> emp_attribute -> dd_empcode ( ) ; $ data [ 'empcode_selected' ] = $ this -> input -> post ( 'f_empcode' ) ? $ this -> input -> post ( 'f_empcode' ) : '' ; $ data [ 'dd_emp_status' ] = $ this -> emp_attribute -> dd_emp_status ( ) ; $ data [ 'empcode_status_selected' ] = $ this -> input -> post ( 'id_position' ) ? $ this -> input -> post ( 'id_position' ) : '' ; $ data [ 'dd_attd_code' ] = $ this -> emp_attribute -> dd_attd_code ( ) ; $ data [ 'attd_code_selected' ] = $ this -> input -> post ( 'f_attd_code' ) ? $ this -> input -> post ( 'f_attd_code' ) : '' ; if ( $ this -> ion_auth -> in_group ( $ group ) ) { $ this -> load -> view ( 'template/title' , $ data ) ; $ this -> load -> view ( 'template/header' ) ; $ this -> load -> view ( 'template/sidebar' ) ; $ this -> load -> view ( 'f_uang_kehadiran' ) ; $ this -> load -> view ( 'ajax_uang_kehadiran' , $ data ) ; $ this -> load -> view ( 'notif' ) ; } else { return show_error ( 'You must be an administrator to view this page.' ) ; } } }
master ump sebagai parameter unutk perhitungan saat di slip gaji
master ump sebagai parameter unutk perhitungan saat di slip gaji
// 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 empcode // dropdown untuk emp status // dropdown untuk attd code