Files
resatennis_tyroltenn/www/tyroltenn/present_ag.php

71 lines
2.0 KiB
PHP
Executable File

<?php
session_start();
if(isset($_SESSION['Admin']) and $_SESSION['Admin']==2 and isset($_SESSION['Club'])) {
$id_club=$_SESSION['Club'];
$id_admin=$_SESSION['Id'];
?>
<html>
<head>
<meta http-equiv="Content-Language" content="fr">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>LE SERVEUR VOCAL DE RESERVATION DES SALLES DE TENNIS</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<div id="tout">
<?php
include("enTete.php");
include("menu.php");
include("mysql_compat.php");
include("conf.php");
$db_connection=mysql_connect($db_host,$db_user,$password);
echo "<div id='contenu'>";
echo "<center><h1>Selection d'une assembl&eacute;e g&eacute;n&eacute;rale</h1></center><br />";
$annee=date("Y");
$requete="SELECT * FROM assemblee_generale WHERE id_club='$id_club' AND YEAR(date)='$annee'";
$reponse=mysqli_query($db_connection, $requete) or die ("Erreur no".mysqli_errno($db_connection)()." : ".mysqli_error($db_connection)()."<br>");
$existe=mysqli_num_rows($reponse);
if($existe==0) {
echo "Aucun assembl&eacute;e g&eacute;n&eacute;rale n'est pr&eacute;vue cette ann&eacute;e.<br /><br />";
}
else {
echo "<form action='present_ag_suite.php' method='post'>";
echo "<center><table>";
echo "<tr><td>Assembl&eacute;e g&eacute;n&eacute;rale : </td><td><select name='id_ag'>";
while($ag=mysqli_fetch_object($reponse)) {
list($annee, $mois, $jour)=explode("-", $ag->date);
$date="$jour-$mois-$annee";
list($h, $m, $s)=explode(":", $ag->heure);
$heure="$h:$m";
echo "<option value='$ag->id_ag'>$ag->motif - $date - $heure</option>";
}
echo "</select></td></tr>";
echo "<tr><td></td><td><input type=submit name='valider' value='Valider'></td></tr>";
echo "</table></center>";
echo "</form>";
}
include("deco_admin_club.php");
echo "</div>";
include("piedDePage.php");
?>
</div>
</body>
</html>
<?php
}
else {
echo("Non autorisé - Redirection vers la page d'identification dans 2 secondes");
sleep(2);
include("admin_login.php");
}
?>