Esempio 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;
 }
Esempio n. 2
0
 public function listAction()
 {
     $lop = new Model_Lophoc();
     $lecturer_id = $this->sessionGlobal->lecturer_id;
     $listHocky = $lop->listschoolyears();
     $this->view->listHocky = $listHocky;
     $listLop = $lop->getLopByLecturerID($lecturer_id);
     $this->view->listlop2 = $listLop;
     if ($this->_request->isPost()) {
         $params = $this->_getParam('searchParam');
         $semester = $params['semester'];
         $schoolyears_id = $params['schoolyears_id'];
         $schoolyears_name = $lop->findschoolyears($schoolyears_id);
         $this->view->semester = $semester;
         $this->view->schoolyears_name = $schoolyears_name;
         $listLop = $lop->getLop($lecturer_id, $semester, $schoolyears_id);
         //var_dump($listLop);
         $this->view->listlop2 = $listLop;
         foreach ($listLop as $a) {
             $idlop = $a->classes_id;
             $sb[$idlop] = $lop->dembuoi($idlop);
         }
         $this->view->sb = $sb;
     }
 }
Esempio n. 3
0
 public function listAction()
 {
     $lop = new Model_Lophoc();
     $listLop = $lop->listlop();
     $this->view->listlop1 = $listLop;
     foreach ($listLop as $a) {
         $idlop = $a->classes_id;
         $sb[$idlop] = $lop->dembuoi($idlop);
     }
     $this->view->sb = $sb;
 }