예제 #1
0
 function form()
 {
     $data = initializeData($this, "Form");
     $data['page_url'] = main_url() . 'leave_credits';
     $leave = '';
     $dp = '';
     $stat = '';
     $dept = '';
     if (isset($_GET['id'])) {
         if (!empty($_GET['id'])) {
             $data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
             $leave = $data['data'][0]->leave_types_id;
             $dept = $this->mod->getEmpTypeOfLeaveCredit($data['data'][0]->id);
             $stat = $this->mod->getStatOfLeaveCredit($data['data'][0]->id);
             $dept = $dept[0]->id;
             $stat = $stat[0]->id;
         }
     }
     $sJs = 'class="form-control form-text"';
     $list1 = $this->emp_types_model->getObjectList('');
     $list2 = $this->status_model->getObjectList('');
     $data['emptypes_list'] = genEmpTypesListUI($this, $list1, $dept);
     $data['status_list'] = genStatusListUI($this, $list2, $stat);
     $this->load->model('leave_types_model');
     $list2 = $this->leave_types_model->getObjectList('');
     $data['leave'] = generateSelectUI($this, $list2, 'leave_types_id', 'id', 'title', $leave, $sJs);
     renderPage($this, $this->table . '/form', $data);
 }
예제 #2
0
 function report3()
 {
     $data = initializeData($this, "Statistics and Reports");
     echo $_POST['img'];
     exit;
     $data['image'] = base64_decode($_POST['img']);
     $content = $this->load->view('home/report3', $data, true);
     $html = pdf_create($content, "sample");
     pdf_create($html, 'filename');
 }
예제 #3
0
 function form()
 {
     $data = initializeData($this, "Department Form");
     $data['page_url'] = main_url() . 'departments';
     if (isset($_GET['id'])) {
         if (!empty($_GET['id'])) {
             $data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
         }
     }
     renderPage($this, $this->table . '/form', $data);
 }
예제 #4
0
 function form()
 {
     $data = initializeData($this, "Rank Form");
     $data['page_url'] = main_url() . 'ranks';
     if (isset($_GET['id'])) {
         if (!empty($_GET['id'])) {
             $data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
         }
     }
     $sJs = 'class="form-control form-text"';
     renderPage($this, $this->table . '/form', $data);
 }
예제 #5
0
 function form()
 {
     $data = initializeData($this, "Employee Types Form");
     $data['page_url'] = main_url() . 'emp_types';
     $da = '';
     if (isset($_GET['id'])) {
         if (!empty($_GET['id'])) {
             $data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
             $da = $data['data'][0]->time_unit;
         }
     }
     $sJs = 'class="form-control form-text"';
     $data['time_unit_list'] = form_dropdown('time_unit', array('h' => 'Hours', 'd' => 'Days'), $da, $sJs);
     renderPage($this, $this->table . '/form', $data);
 }
예제 #6
0
 function form()
 {
     $data = initializeData($this, "Role Form");
     $data['page_url'] = main_url() . 'roles';
     $r = '';
     if (isset($_GET['id'])) {
         if (!empty($_GET['id'])) {
             $data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
             $r = $data['data'][0]->role_code;
         }
     }
     $sJs = 'class="form-control form-text"';
     $rolecodelist = $this->mod->getEnumValues('roles', 'roles', 'role_code');
     $data['rolecode_list'] = form_dropdown('role_code', $rolecodelist, $r, $sJs);
     renderPage($this, $this->table . '/form', $data);
 }
예제 #7
0
 function form()
 {
     $data = initializeData($this, "Form");
     $data['page_url'] = main_url() . 'emp_types_stat';
     $empt = '';
     $stat = '';
     if (isset($_GET['id'])) {
         if (!empty($_GET['id'])) {
             $data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
             $empt = $data['data'][0]->emp_types_id;
             $stat = $data['data'][0]->status_id;
         }
     }
     $emptlist = $this->emp_types_model->getObjectList('');
     $statuslist = $this->status_model->getObjectList('');
     $data['emptypes_list'] = genEmpTypesListUI($this, $emptlist, $empt);
     $data['status_list'] = genStatusListUI($this, $statuslist, $stat);
     renderPage($this, $this->table . '/form', $data);
 }
예제 #8
0
 function form()
 {
     $data = initializeData($this, "Form");
     $data['page_url'] = main_url() . 'employment';
     $leave = '';
     $dp = '';
     if (isset($_GET['id'])) {
         if (!empty($_GET['id'])) {
             $data['data'] = $this->mod->getObjectById($this->table, 'id', $_GET['id']);
             $leave = $data['data'][0]->dept_stat_id;
             $dp = $data['data'][0]->employee_id;
         }
     }
     $sJs = 'class="form-control form-text"';
     $this->load->model('dept_stat_model');
     $emptstat = $this->emp_types_stat_model->getListByQuery('');
     $this->load->model('employees_model');
     $emp = $this->employees_model->getEmployeeList('');
     $data['emptypesstat_list'] = generateSelectUI($this, $list1, 'emp_types_stat_id', 'id', 'emp_types_name', $emptstat, $sJs);
     $data['employees_list'] = generateSelectUI($this, $list2, 'employee_id', 'id', 'fullname', $emp, $sJs);
     renderPage($this, $this->table . '/form', $data);
 }
예제 #9
0
 function uploadview($id = '')
 {
     $data = initializeData($this, "Leave Supporting Documents");
     $theid = $_GET['id'] ? $_GET['id'] : $id;
     $data['transid'] = $theid;
     $files = glob('upload/*_' . $theid . '.{jpg,png,gif,JPG}', GLOB_BRACE);
     $count = 0;
     foreach ($files as $file) {
         $count++;
         $html .= '
         <div class="media">
           <a class="pull-left" href="' . base_url() . $file . '">
             <img class="media-object" src="' . base_url() . $file . '" style="width: 1in; height: 1in">
           </a>
           <div class="media-body">
             <h4 class="media-heading">Document #' . $count . ' | ' . '<a href="#" onclick="deletefile(\'' . base_url() . $file . '\')">Delete</a>' . '</h4>
           </div>
         </div><hr />';
     }
     $data['html'] = $html;
     renderPage($this, $this->table . '/uploadpage', $data);
 }
예제 #10
0
 function change_password()
 {
     $data = initializeData($this, "Change Password");
     renderPage($this, $this->table . '/passchange', $data);
 }