61 lines
1.7 KiB
PHP
Executable File
61 lines
1.7 KiB
PHP
Executable File
<?php
|
|
session_start();
|
|
header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');
|
|
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("conf.php");
|
|
|
|
echo "<h2><center>Promotion de Tournois sur le serveur vocal</center></h2>";
|
|
|
|
echo "<form action='ajout_promo_suite.php' method='post'>";
|
|
echo "<center><table>";
|
|
echo "<tr><td>Sélectionnez le tournoi à promouvoir : </td><td><select name='tournoi'>";
|
|
$requete="SELECT nom, debut, fin, id_tournoi FROM tournoi WHERE id_club='$id_club'";
|
|
$reponse=mysqli_query($db_connection, $requete) or die ("Erreur no".mysqli_errno($db_connection)()." : ".mysqli_error($db_connection)()."<br>");
|
|
while($tournoi=mysqli_fetch_object($reponse)) {
|
|
list($a, $m, $j)=explode("-",$tournoi->debut);
|
|
$debut="$j-$m-$a";
|
|
list($a, $m, $j)=explode("-",$tournoi->fin);
|
|
$fin="$j-$m-$a";
|
|
echo "<option value='$tournoi->id_tournoi'>$tournoi->nom - $debut / $fin</option>";
|
|
}
|
|
echo "</select></td></tr>";
|
|
echo "<tr><td></td><td><input type=hidden name='valider' value='Valider'></td></tr>";
|
|
echo "</table></center>";
|
|
echo "</form>";
|
|
echo "<br /><br />";
|
|
|
|
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");
|
|
}
|
|
|
|
?>
|