//===============A modifier pour chaque sondage===========================================================
$sondage = "Le Père Noël"; // Nom du sondage
$jour_fin = "31"; //
$mois_fin = "12"; //
$annee_fin = "2008"; //
$heure_fin = "14"; //
$minute_fin = "00"; //
$question = "Selon vous, le Père Noël existe-t-il ou a-t-il existé ?"; // Question posée
$nb_rep = 3; // nombre de réponses différentes
$reponse[1] = "Oui, je l'ai même croisé encore cette semaine"; // Réponses
$reponse[2] = "Non, je n'y ai jamais cru même quand j'étais tout petit : c'était Tonton Robert avec une fausse barbe moche"; //
$reponse[3] = "Oui, mais maintenant, il est mort"; //
//======================================================================================================
$date_fin = $heure_fin."/".$minute_fin."/00/".$mois_fin."/".$jour_fin."/".$annee_fin ;
$date_comp = 'le '.$jour_fin.'/'.$mois_fin.'/'.$annee_fin.' à '.$heure_fin.'h'.$minute_fin;
if(isset($_POST['envoi']))
{
include("/var/www/html/thunder/fonctions.php");
}
if (verif_date($date_fin) == "OK")
{
if(isset($_POST['envoi']))
{
if($_POST['reponse'])
{
if(sondage_check($sondage) == 0)
{
sondage_lecture($sondage,$nb_rep);
sondage_ecriture($sondage,$nb_rep,$_POST['reponse'],$date_comp,$question);
header('Location: ../index.php?page=sondages/sondage_ec1&ok=1');
}
else
{
header('Location: ../index.php?page=sondages/sondage_ec1&ip=1');
}
}
else
{
header('Location: ../index.php?page=sondages/sondage_ec1&ko=1');
}
}
?>