public function indexAction() { try { if ($this->getRequest()->isPost()) { $_data = $this->getRequest()->getPost(); $search = array('title' => $_data['title'], 'txtsearch' => $_data['title'], 'status' => $_data['status_search'], 'type' => $_data['type']); } else { $search = ''; } $db = new Accounting_Model_DbTable_DbServiceType(); $rs_rows = $db->getAllServicesType($search); $list = new Application_Form_Frmtable(); if (!empty($rs_rows)) { $glClass = new Application_Model_GlobalClass(); $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true, 1); } else { $result = Application_Model_DbTable_DbGlobal::getResultWarning(); } $collumns = array("PROGRAM_TITLE", "DISCRIPTION", "TYPE", "STATUS", "MODIFY_DATE", "BY_USER"); $link = array('module' => 'accounting', 'controller' => 'services', 'action' => 'edit-service-type'); $this->view->list = $list->getCheckList(1, $collumns, $rs_rows, array('cate_name' => $link, 'title' => $link)); } catch (Exception $e) { Application_Form_FrmMessage::message("APPLICATION_ERROR"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Application_Form_FrmOther(); $this->view->add_major = $frm->FrmAddMajor(null); $frm = new Global_Form_FrmSearchMajor(); $frm = $frm->frmServiceType(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; }
public function indexAction() { try { if ($this->getRequest()->isPost()) { $_data = $this->getRequest()->getPost(); $search = array('title' => $_data['title']); } else { $search = array('title' => ''); } $db = new Global_Model_DbTable_DbGroup(); $rs_rows = $db->getAllGroup($search); $list = new Application_Form_Frmtable(); $collumns = array("GROUP CODE", "DEGREE", "FACULTY", "BATCH", "YEAR", "SEMESTER", "SESSION", "ACADEMIC", "ROOM", "AMOUNT", "STATUS"); $link = array('module' => 'global', 'controller' => 'group', 'action' => 'edit'); $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('group_code' => $link, 'degree' => $link, 'major_name' => $link)); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Application_Form_FrmOther(); $this->view->add_major = $frm->FrmAddMajor(null); $frm = new Global_Form_FrmSearchMajor(); $frm = $frm->frmSearchTeacher(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; }
public function editAction() { if ($this->getRequest()->isPost()) { try { $_data = $this->getRequest()->getPost(); $_dbmodel = new Application_Model_DbTable_DbDept(); $_dbmodel->UpdateDepartment($_data); Application_Form_FrmMessage::Sucessfull("ការកៃប្រែដោយជោគជ័យ !", "/global/faculty/index"); //$this->_redirect(""); } catch (Exception $e) { $err = $e->getMessage(); Application_Form_FrmMessage::message("Application Error!"); Application_Model_DbTable_DbUserLog::writeMessageError($err); echo $e->getMessage(); exit; } } $id = $this->getRequest()->getParam("id"); $_db = new Application_Model_DbTable_DbGlobal(); $_row = $_db->getDeptById($id); $frm = new Application_Form_FrmOther(); $frm->FrmAddDept($_row); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_dept = $frm; }
public function indexAction() { try { $db = new Global_Model_DbTable_DbTeacher(); if ($this->getRequest()->isPost()) { $_data = $this->getRequest()->getPost(); $search = array('title' => $_data['title']); } else { $search = array('title' => ''); } $rs_rows = $db->getAllTeacher($search); $list = new Application_Form_Frmtable(); $collumns = array("CODE", "TEACHER_KH_NAME", "TEACHER_EN_NAME", "sex", "phone", "email", "degree", "STATUS", "BY_USER"); $link = array('module' => 'global', 'controller' => 'lecturer', 'action' => 'edit'); $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('teacher_code' => $link, 'teacher_name_kh' => $link, 'teacher_name_en' => $link)); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Application_Form_FrmOther(); $this->view->add_major = $frm->FrmAddMajor(null); $frm = new Global_Form_FrmSearchMajor(); $frm = $frm->frmSearchTeacher(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; }
public function indexAction() { try { $newstudent_session = Application_Model_DbTable_DbGlobal::SessionNavigetor('new-student'); if (empty($newstudent_session->limit)) { $newstudent_session->limit = Application_Form_FrmNavigation::getLimit(); $newstudent_session->lock(); } $limit = $newstudent_session->limit; $start = $this->start(); if ($this->getRequest()->isPost()) { $_data = $this->getRequest()->getPost(); $newstudent_session->unlock(); $newstudent_session->limit = $_data['rows_per_page']; $newstudent_session->lock(); //set value for display $search = array('txtsearch' => $newstudent_session->txtsearch, 'title' => $_data['title'], 'status' => $_data['status_search'], 'subjec_name' => $_data['subjec_name']); $limit = $newstudent_session->limit; } else { $search = ''; } $db = new Foundation_Model_DbTable_DbNewStudent(); $teacher = $db->getAllNewStudent($search, $start, $limit); $record_count = $teacher[1]; $row_num = $start; if (!empty($teacher)) { foreach ($teacher[0] as $i => $rs) { $result[$i] = array('id' => $rs['id'], 'num' => ++$row_num, 'stu_khname' => $rs['stu_khname'], 'stu_enname' => $rs['stu_enname'], 'sex' => $rs['sex'], 'stu_card' => $rs['stu_card'], 'dob' => $rs['dob'], 'phone' => $rs['phone'], 'degree' => Application_Model_DbTable_DbGlobal::getAllDegreeById($rs["degree"]), 'major_id' => $rs["major_name"], 'session' => Application_Model_DbTable_DbGlobal::getSessionById($rs["session"]), 'status' => $this->activelist[$rs["status"]], 'create_date' => $rs["create_date"], 'user_name' => $rs["user_name"]); } } else { $result = Application_Model_DbTable_DbGlobal::getResultWarning(); } $gride = new Application_Form_Frmlist(); $collumn = array("NAME_KH", "NAME_EN", "SEX", "ID_NUMBER", "DOB", "PHONE", "DEGREE", "MAJORS", "SESSION", "STATUS", "CREATED_DATE", "BY_USER"); $this->view->grideview = $gride->grideView(BASE_URL . "/foundation/newstudent/edit-student", "/foundation/newstudent/index", $collumn, @$result, $start, $limit, $record_count); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Application_Form_FrmOther(); $this->view->add_major = $frm->FrmAddMajor(null); $frm = new Global_Form_FrmSearchMajor(); $frm = $frm->frmSearchTeacher(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; }
public function editAction() { $id = $this->getRequest()->getParam("id"); if ($this->getRequest()->isPost()) { try { $_data = $this->getRequest()->getPost(); $_dbmodel = new Global_Model_DbTable_DbDept(); $_dbmodel->updatMajorById($_data); Application_Form_FrmMessage::Sucessfull("ការកែប្រែដោយជោគជ័យ", "/global/major/index"); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } } if (!empty($id)) { $frm = new Application_Form_FrmOther(); $db_model = new Global_Model_DbTable_DbDept(); $row = $db_model->getMajorById($id); $frm->FrmAddMajor($row); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_major = $frm; } else { } }
public function teacherListAction() { try { $db = new Global_Model_DbTable_DbTeacher(); if ($this->getRequest()->isPost()) { $_data = $this->getRequest()->getPost(); $search = array('title' => $_data['title'], 'subjec_name' => $_data['subjec_name'], 'status' => $_data['status_search']); } else { $search = array('title' => '', 'subjec_name' => -1, 'status' => -1); } $rs_rows = $db->getAllTeacher($search); $glClass = new Application_Model_GlobalClass(); $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true); $list = new Application_Form_Frmtable(); $collumns = array("TEACHER_KH_NAME", "TEACHER_EN_NAME", "SUBJECT_TEACH_KH", "SUBJECT_TEACH_EN", "MODIFY_DATE", "STATUS", "BY_USER"); $link = array('module' => 'global', 'controller' => 'index', 'action' => 'edit-teacher'); $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('teacher_name_kh' => $link, 'teacher_name_en' => $link)); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } $frm = new Application_Form_FrmOther(); $this->view->add_major = $frm->FrmAddMajor(null); $frm = new Global_Form_FrmSearchMajor(); $frm = $frm->frmSearchTeacher(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; }