['regexp' => '/^[a-z0-9]+$/']]); $poll_to_delete = $pollService->findById($delete_id); } // Traitement de la confirmation de suppression if (!empty($_POST['delete_confirm'])) { $poll_id = filter_input(INPUT_POST, 'delete_confirm', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => '/^[a-z0-9]+$/']]); $adminPollService->deleteEntirePoll($poll_id); } $polls = $superAdminService->findAllPolls(); // Assign data to template $smarty->assign('polls', $polls); $smarty->assign('poll_to_delete', $poll_to_delete); $smarty->assign('log_file', is_readable('../' . LOG_FILE) ? LOG_FILE : null); $smarty->display('admin/polls.tpl');