Exemplo n.º 1
0
 public function detailAction()
 {
     $classes_id = $_GET['classes_id'];
     $classes = new Model_Classes();
     $findOne = $classes->findOneClasses($classes_id);
     $this->view->findOne = $findOne;
 }
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");
     }
 }