<?
#########################################################################################
# Courriels des responsables de Pnyx #
# Auteur : V. Blais #
# Création : 2006-05-02 #
# Modification : 2008-08-19 #
# #
# 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";
# ou verifier si la session est valide
# puis verifier si l'usager dispose des autorisations requises
# pour la saisie
verifier_session();
$requete_sql = "SELECT R.nom, R.prenom, U.login
FROM responsable R, usager U, lien_resp_projet L
WHERE L.projet_id = $projet
AND L.valide = 1
AND R. resp_id = L.resp_id
AND U.usager_id = R.usager_id
ORDER BY R.nom
";
$reponse_resp_val = bd_executer_sql($requete_sql);
$requete_sql = "SELECT distinct R.nom, R.prenom, U.login
FROM responsable R, usager U, lien_resp_projet L
WHERE L.projet_id = $projet
AND L.valide = 0
AND R. resp_id = L.resp_id
AND U.usager_id = R.usager_id
ORDER BY R.nom
";
$reponse_resp = bd_executer_sql($requete_sql);
$requete_sql = "SELECT titre
FROM site_parametres
";
$reponse_titre = mysql_query($requete_sql);
$ligne_titre = mysql_fetch_array($reponse_titre);
?>
<!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">
<table bgcolor="#FFFFFF" width="500">
<tr>
<td>
<h3>Impression des courriels</h3>
<h4>Responsables validés</h4>
<blockquote>
<?
while ($ligne_val = mysql_fetch_array ($reponse_resp_val)){
echo $ligne_val['prenom']." ".$ligne_val['nom']." <".$ligne_val['login']."><br />";
}
?>
</blockquote>
<h4>Responsables non-validés</h4>
<blockquote>
<?
while ($ligne_resp = mysql_fetch_array ($reponse_resp)){
echo $ligne_resp['prenom']." ".$ligne_resp['nom']." <".$ligne_resp['login']."><br />";
}
?>
</blockquote>
<p> </p>
<input type="button" value="Imprimer" onclick="self.print()" />
<input type="button" value="Fermer" onclick="self.close()" />
</td>
</tr>
</table>
<?
mysql_close();
?>
</body>
</html>