findAllPolls(); echo '
' . "\n"; // Test et affichage du bouton de confirmation en cas de suppression de sondage foreach ($polls as $poll) { if (!empty($_POST['supprimersondage' . $poll->id])) { echo '

' . _("Confirm removal of the poll ") . '"' . $poll->id . '

'; } // Traitement de la confirmation de suppression if (!empty($_POST['confirmesuppression' . $poll->id])) { // On inclut la routine de suppression $date = date('H:i:s d/m/Y'); $adminPollService->deleteEntirePoll($poll->id); } } $btn_logs = (is_readable('../' . LOG_FILE)) ? '' . _("Logs") . '' : ''; echo '

' . count($polls) . ' ' . _("polls in the database at this time") . $btn_logs . '

' . "\n"; // tableau qui affiche tous les sondages de la base echo '' . "\n"; $i = 0; foreach ($polls as $poll) { $nb_users = $pollService->countVotesByPollId($poll->id); if ($poll->format === 'D') { $format_html = ''. _('Date').''; } else { $format_html = ''. _('Classic').''; } echo ' '; if (strtotime($poll->end_date) > time()) { echo ''; } else { echo ''; } echo ' ' . "\n"; ++$i; } echo '
' . _('Poll ID') . ' ' . _('Format') . ' ' . _('Title') . ' ' . _('Author') . ' ' . _('Email') . ' ' . _('Expiration\'s date') . ' ' . _('Users') . ' ' . _('Actions') . '
' . $poll->id . ' ' . $format_html . ' ' . htmlentities($poll->title) . ' ' . htmlentities($poll->admin_name) . ' ' . htmlentities($poll->admin_mail) . '' . date('d/m/y', strtotime($poll->end_date)) . '' . date('d/m/y', strtotime($poll->end_date)) . '' . $nb_users . ' ' . _('See the poll') . ' ' . _("Change the poll") . '
' . "\n"; bandeau_pied(true);