<?php
#########################################################################################
# Information du compte élève de Pnyx - script 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_GET_VARS['type_action'] == "debloc_msg"){
$requete_sql = "DELETE FROM bloc_msg
WHERE bloc_id = \"$HTTP_GET_VARS[id_bloc]\"
";
$reponse_ins = bd_executer_sql($requete_sql);
$HTTP_SESSION_VARS['SESSION']['message'] = $HTTP_GET_VARS['autre']." est débloqué. Vous pouvez maintenant vous envoyer des messages de nouveau.";
header("Location: ele_discussion.php");
}
if ($HTTP_GET_VARS['type_action'] == "bloc_msg"){
$requete_sql = "INSERT INTO bloc_msg (eleve_bloc, bloc_par,
bloc_type, date, projet_id)
VALUES (\"$HTTP_GET_VARS[id_eleve]\", $usager, \"eleve\", \"$date\", $projet)
";
$reponse_msg_grp = bd_executer_sql($requete_sql);
$HTTP_SESSION_VARS['SESSION']['message'] = $HTTP_GET_VARS['autre']." est maintenant bloqué. Tu ne recevras plus de message de sa part et tu ne peux plus lui en envoyer.";
header("Location: ele_discussion.php");
}
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 à mon compte</a>";
$page = "gen_fiche.php?id_prop=".$HTTP_GET_VARS['id_prop'];
header("Location: $page");
}
?>