Ejemplo n.º 1
0
 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 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;
 }