Exemplo n.º 1
0
 public function listAction()
 {
     $lop = new Model_Lophoc();
     $classes = new Model_Classes();
     $listHocky = $classes->listschoolyears();
     $this->view->listHocky = $listHocky;
     $giangvien = new Model_Giangvien();
     $monhoc = new Model_Monhoc();
     $listGiangvien = $giangvien->findAllGiangvien();
     $listMonhoc = $monhoc->findAllMon();
     $schoolyears = $classes->listschoolyears();
     $this->view->schoolyears = $schoolyears;
     $this->view->listGiangvien = $listGiangvien;
     $this->view->listMonhoc = $listMonhoc;
     if ($this->_request->isPost()) {
         $data = $this->_getParam('searchParam');
         $this->sessionGlobal->dataFind = $data;
         $this->view->dataFind = $this->sessionGlobal->dataFind;
         $listLop = $classes->findAllClassesByData($data);
     } else {
         $listLop = $classes->findAllClasses();
     }
     $this->view->listlop2 = $listLop;
     foreach ($listLop as $a) {
         $idlop = $a->classes_id;
         $sb[$idlop] = $lop->dembuoi($idlop);
     }
     $this->view->sb = $sb;
 }
Exemplo n.º 2
0
 public function updateAction()
 {
     $classes_id = $_GET['classes_id'];
     $classes = new Model_Classes();
     $findOne = $classes->findOneClasses($classes_id);
     $this->view->findOne = $findOne;
     $giangvien = new Model_Giangvien();
     $monhoc = new Model_Monhoc();
     $listGiangvien = $giangvien->findAllGiangvien();
     $listMonhoc = $monhoc->findAllMon();
     $schoolyears = $classes->listschoolyears();
     $this->view->schoolyears = $schoolyears;
     $this->view->listGiangvien = $listGiangvien;
     $this->view->listMonhoc = $listMonhoc;
     if ($this->_request->isPost()) {
         $data = $this->_getParam('searchParam');
         $classes->updateClasses($classes_id, $data);
         echo '<script>alert("Cập nhật thành công");</script>';
         header("Refresh:0");
     }
 }
Exemplo n.º 3
0
 public function indexAction()
 {
     $giangvien = new Model_Giangvien();
     $listGiangvien = $giangvien->findAllGiangvien();
     $this->view->listGiangvien = $listGiangvien;
 }