public function deleteFile($idPractice) { $managerPractice = new PracticeDAO(); $managerPractice->deletePractice($idPractice); }
public function showPractice() { if (isset($_GET['idPractice'])) { $managerPractice = new PracticeDAO(); $isPracticeExist = $managerPractice->verifPractice($_GET['idPractice']); if (!$isPracticeExist) { $_SESSION['error'] = 'Le cours n\'existe pas'; $_SESSION['display_msg_error'] = true; $this->profile(); } else { $infos = $managerPractice->getNameAndDescriptionPractice($_GET['idPractice']); $file = $managerPractice->getFile($_GET['idPractice']); $showFormPracticeView = new ShowPracticeView(); echo $showFormPracticeView->getView($_GET['idPractice'], $infos['name'], $infos['description'], $file['file'], $file['path'], $infos['editor']); } } else { $_SESSION['error'] = '[10] La page n\'existe pas'; $_SESSION['display_msg_error'] = true; $this->profile(); } }