<?php
#########################################################################################
# Gestion des enregistrements de Pnyx - scripts bdd #
# Auteur : V. Blais #
# Création : 2006-04-05 #
# Modification : 2008-07-01 #
# #
# 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'] == "ordonner_val"){
#CHOIX DE L'ORDONNANCEMENT DES RÉSULTATS
if ($HTTP_POST_VARS['ordre'] == "nb_groupe_asc"){
$ordre = "L.nb_groupe ASC";
} else if ($HTTP_POST_VARS['ordre'] == "nb_groupe_desc"){
$ordre = "L.nb_groupe DESC";
} else if ($HTTP_POST_VARS['ordre'] == "date_val_asc"){
$ordre = "L.date_valide ASC";
} else if ($HTTP_POST_VARS['ordre'] == "date_val_desc"){
$ordre = "L.date_valide DESC";
} else if ($HTTP_POST_VARS['ordre'] == "ecole_asc"){
$ordre = "E.nom ASC";
} else if ($HTTP_POST_VARS['ordre'] == "ecole_desc"){
$ordre = "E.nom DESC";
} else if ($HTTP_POST_VARS['ordre'] == "com_scol_asc"){
$ordre = "CS.nom ASC";
} else if ($HTTP_POST_VARS['ordre'] == "com_scol_desc"){
$ordre = "CS.nom DESC";
} else if ($HTTP_POST_VARS['ordre'] == "region_asc"){
$ordre = "RE.nom ASC";
} else if ($HTTP_POST_VARS['ordre'] == "region_desc"){
$ordre = "RE.nom DESC";
} else if ($HTTP_POST_VARS['ordre'] == "alpha_desc"){
$ordre = "R.nom DESC";
} else {
$ordre = "R.nom ASC";
}
$page = "adm_enregistrement.php?ordre=".$ordre;
header("Location: $page");
}
if ($HTTP_GET_VARS['type_action'] == "retour_projCour"){
$HTTP_SESSION_VARS['SESSION']['projet_admin'] = 0;
header("Location: adm_projet.php");
}
?>