public function recoverAction() { $sinhvien = new Model_Sinhvien(); $student_id = $_GET['student_id']; $sinhvien->recoverSinhvien($student_id); $this->redirect('giaovu/student/list'); }
public function liststudentAction() { $classes_id = $_GET['classes_id']; $classes = new Model_Classes(); $this->view->classes_id = $classes_id; $listStudent = $classes->listStudentClasses($classes_id); $this->view->listStudent = $listStudent; $sinhvien = new Model_Sinhvien(); if ($this->_request->isPost()) { $xoa = $sinhvien->deletesvlop($classes_id); $file = $_FILES['file']['tmp_name']; $handle = fopen($file, "r"); $c = 0; while (($filesop = fgetcsv($handle, 1000, ",")) !== false) { $student_id = $filesop[0]; echo "<pre>"; if ($c > 2) { $classes->importSinhVien($classes_id, $student_id); } $c = $c + 1; } header("Refresh:0"); echo "<script>alert('Cập nhật thành công');</script>"; } }