<?
#########################################################################################
# Impression du compte enseignant de Pnyx #
# Auteur : V. Blais #
# Création : 2006-05-02 #
# Modification : 2008-08-28 #
# #
# 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";
/*session_name("cliquez");
session_start();
bd_connexion();*/
# ou verifier si la session est valide
# puis verifier si l'usager dispose des autorisations requises
# pour la saisie
verifier_session();
$requete_sql = "SELECT titre
FROM site_parametres
";
$reponse_titre = mysql_query($requete_sql);
$ligne_titre = mysql_fetch_array($reponse_titre);
$requete_sql = "SELECT *
FROM responsable
WHERE resp_id = $usager
";
$reponse_resp = mysql_query($requete_sql);
$ligne_resp = mysql_fetch_array($reponse_resp);
if(isset($HTTP_SESSION_VARS['INSC']['ecole'])){
$requete_sql = "SELECT nom FROM ecole WHERE ecole_id = '" . $HTTP_SESSION_VARS['INSC']['ecole'] . "'";
$reponse_ecole = mysql_query($requete_sql);
$ligne_ecole = mysql_fetch_array($reponse_ecole);
}
else{
$requete_sql = "SELECT *
FROM ecole
WHERE ecole_id = '" . $ligne_resp['ecole_id'] . "'
";
$reponse_ecole = mysql_query($requete_sql);
$ligne_ecole = mysql_fetch_array($reponse_ecole);
}
if(isset($HTTP_SESSION_VARS['INSC']['com_scol'])){
$requete_sql = "SELECT nom FROM commission_scolaire WHERE comscol_id = '" . $HTTP_SESSION_VARS['INSC']['com_scol'] . "'";
$reponse_cs = mysql_query($requete_sql);
$ligne_cs = mysql_fetch_array($reponse_cs);
}
else{
$requete_sql = "SELECT *
FROM commission_scolaire
WHERE comscol_id = '" . $ligne_ecole['comscol_id'] . "'
";
$reponse_cs = mysql_query($requete_sql);
$ligne_cs = mysql_fetch_array($reponse_cs);
}
if(isset($HTTP_SESSION_VARS['INSC']['region'])){
$requete_sql = "SELECT nom FROM region WHERE region_id = '" . $HTTP_SESSION_VARS['INSC']['region'] . "'";
$reponse_region = mysql_query($requete_sql);
$ligne_region = mysql_fetch_array($reponse_region);
}
else{
$requete_sql = "SELECT *
FROM region
WHERE region_id = '" . $ligne_cs['region_id'] . "'
";
$reponse_region = mysql_query($requete_sql);
$ligne_region = mysql_fetch_array($reponse_region);
}
$requete_sql = "SELECT *
FROM usager
WHERE usager_id = '" . $ligne_resp['usager_id'] . "'
";
$reponse_usager = mysql_query($requete_sql);
$ligne_usager = mysql_fetch_array($reponse_usager);
$requete_sql = "SELECT *
FROM groupe
WHERE resp_id = '" . $ligne_resp['resp_id'] . "'
";
$reponse_groupe = mysql_query($requete_sql);
$ligne_groupe = mysql_fetch_array($reponse_groupe);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?= $ligne_titre['titre'] ?></title>
<script type="text/javascript" src="lib/fonctions.js"></script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1684383-1";
urchinTracker();
</script>
</head>
<body bgcolor="#FFFFFF">
<a name="haut" id="haut"></a>
<table bgcolor="#FFFFFF" width="500">
<tr>
<td>
<h3>Impression des informations de mon compte <em><?= $ligne_titre['titre'] ?></em></h3>
<table width="652" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="205"><strong>École :</strong></td>
<td width="221"><?= $ligne_ecole['nom'] ?></td>
</tr>
<tr>
<td><strong>Commission scolaire :</strong></td>
<td><?= $ligne_cs['nom'] ?></td>
</tr>
<tr>
<td><strong>Région :</strong></td>
<td><?= $ligne_region['nom'] ?></td>
</tr>
<tr>
<td colspan="3"> </td></tr>
<tr>
<td><strong>Prénom :</strong></td>
<td>
<?
if(isset($HTTP_SESSION_VARS['INSC']['prenom'])){
echo $HTTP_SESSION_VARS['INSC']['prenom'];
}else{
echo $ligne_resp['prenom'];
}
?>
</td>
</tr>
<tr>
<td><strong>Nom :</strong></td>
<td>
<?
if(isset($HTTP_SESSION_VARS['INSC']['nom'])){
echo $HTTP_SESSION_VARS['INSC']['nom'];
}else{
echo $ligne_resp['nom'];
}
?>
</td>
</tr>
<tr>
<td><strong>Fonction :</strong></td>
<td>
<?
if(isset($HTTP_SESSION_VARS['INSC']['fonction'])){
echo $HTTP_SESSION_VARS['INSC']['fonction'];
}else{
echo $ligne_resp['fonction'];
}
?>
</td>
</tr>
<tr>
<td><strong>Nom d'utilisateur (courriel) :</strong></td>
<td>
<?
if(isset($HTTP_SESSION_VARS['INSC']['login'])){
echo $HTTP_SESSION_VARS['INSC']['login'];
}else{
echo $ligne_usager['login'];
}
?>
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td><strong>Nom du groupe :</strong></td>
<td>
<?
if(isset($HTTP_SESSION_VARS['INSC']['nom_groupe'])){
echo $HTTP_SESSION_VARS['INSC']['nom_groupe'];
}else{
echo $ligne_groupe['nom'];
}
?>
</td>
</tr>
<tr>
<td><strong>Mot de passe du groupe :</strong></td>
<td>
<?
if(isset($HTTP_SESSION_VARS['INSC']['pass_groupe'])){
echo $HTTP_SESSION_VARS['INSC']['pass_groupe'];
}else{
echo $ligne_groupe['password'];
}
?>
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td><strong>Niveau du groupe :</strong></td>
<td>
<?
if(isset($HTTP_SESSION_VARS['INSC']['niveau'])){
echo $HTTP_SESSION_VARS['INSC']['niveau'];
}else{
echo $ligne_groupe['niveau'];
}
?>
</td>
</tr>
<tr>
<td><strong>Type de groupe :</strong></td>
<td>
<?
if(isset($HTTP_SESSION_VARS['INSC']['type'])){
echo $HTTP_SESSION_VARS['INSC']['type'];
}else{
echo $ligne_groupe['type'];
}
?>
</td>
</tr>
<tr>
<td><strong>Limite du nombre d'élèves<br /> pour ce groupe :</strong></td>
<td>
<?
if(isset($HTTP_SESSION_VARS['INSC']['limite'])){
if ($HTTP_SESSION_VARS['INSC']['limite'] != "" ){
echo $HTTP_SESSION_VARS['INSC']['limite'];
} else {
echo "Illimité";
}
}
else{
if ($ligne_groupe['limite'] != "" ){
echo $ligne_groupe['limite'];
} else {
echo "Illimité";
}
}
?>
</td>
</tr>
</table>
<div align="right"><a href="#haut"><img src="images/haut.gif" alt="Retour au haut de la page" width="37" height="17" border="0" /></a></div>
<input type="button" value="Imprimer" onclick="self.print()" />
<input type="button" value="Fermer" onclick="self.close()" />
</td>
</tr>
</table>
<?
mysql_close();
?>
</body>
</html>