<?php
#########################################################################################
# Gestion des élections de Pnyx - scripts bdd #
# Auteur : V. Blais #
# Création : 2006-04-05 #
# Modification : 2008-09-03 #
# #
# Pnyx - une application Web (PHP/MySQL) d'élections virtuelles conçue pour des élèves #
# du primaire et du secondaire, dans lequel ils sont amenés à faire des propositions #
# en ligne et voter pour leur favorite, sous la supervision d'un enseignant. #
# #
# Copyright (C) <2008 - 2009> #
# <Service national du RÉCIT de l'univers social de la Commission scolaire de la #
# Pointe-de-l'Île> #
# #
# This program is free software; you can redistribute it and/or modify it under the #
# terms of the GNU General Public License as published by the Free Software Foundation. #
# This program is distributed in the hope that it will be useful, but WITHOUT ANY #
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A #
# PARTICULAR PURPOSE. See the GNU General Public License for more details. #
# You should have received a copy of the GNU General Public License along with this #
# program as the file LICENSE.txt; if not, please see #
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. #
# #
# Service national du RÉCIT de l'univers social #
# http://www.recitus.qc.ca #
# Contact e-mail : steve-hide@address.com #
#########################################################################################
require "entete_php.php";
if ($HTTP_POST_VARS[type_action] == "ret_fin"){
$requete_sql = "DELETE FROM election
WHERE finaliste_id = '" . $HTTP_POST_VARS[id_final] . "'
";
$reponse_msg = bd_executer_sql($requete_sql);
# echo $requete_sql;
$HTTP_SESSION_VARS[SESSION][message] = "La proposition a été retirée de la liste de finalistes.";
$page = "adm_election.php";
header("Location: $page");
}
if ($HTTP_GET_VARS[type_action] == "aff_fiche"){
if (!session_is_registered("RETOUR")){
session_register("RETOUR");
}
$HTTP_SESSION_VARS["RETOUR"] = "<a href='".$HTTP_GET_VARS[page]."'>Retour à la page de gestion des élections</a>";
$page = "gen_fiche.php?id_prop=".$HTTP_GET_VARS[id_prop]."&pos=".$HTTP_GET_VARS[pos];
header("Location: $page");
}
?>