100 lines
3.5 KiB
PHP
Executable File
100 lines
3.5 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'];
|
|
?>
|
|
<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 "<div id='contenu'>";
|
|
echo "<center><h1>Modification du terrain</h1></center><br />";
|
|
echo "<center><h2>Veuillez saisir les informations à modifier</h2></center>";
|
|
echo "<form action='modification_terrain_suite2.php' method='post'>";
|
|
echo "<center><table>";
|
|
$id_terrain=$_POST['terrain'];
|
|
$requete="SELECT * FROM reservable WHERE id_reservable='$id_terrain'";
|
|
$reponse=mysqli_query($db_connection, $requete) or die ("Erreur no".mysqli_errno($db_connection)()." : ".mysqli_error($db_connection)()."<br />");
|
|
$terrain=mysqli_fetch_object($reponse);
|
|
echo "<tr><td><b>Nom du terrain : </b></td><td><input type=text size=20 maxlength=40 name='nom_terrain' value='$terrain->nom'></td></tr>";
|
|
echo "<tr><td><b>Type de terrain :</b></td><td><select name='type'>";
|
|
echo"<option value='Court'";
|
|
if($terrain->type=="Court") {
|
|
echo " selected='true'";
|
|
}
|
|
echo ">Court</option><option value='Mur'";
|
|
if($terrain->type=="Mur") {
|
|
echo" selected='true'";
|
|
}
|
|
echo ">Mur</option></select></td></tr>";
|
|
echo "<tr><td><b>Protection du terrain :</b></td><td><select name='protection'>";
|
|
echo "<option value='Couvert'";
|
|
if($terrain->protection=="Couvert") {
|
|
echo "selected='true'";
|
|
}
|
|
echo ">Couvert</option><option value='Extérieur'";
|
|
if($terrain->protection=="Extérieur") {
|
|
echo " selected='true'";
|
|
}
|
|
echo ">Extérieur</option></select></td></tr>";
|
|
echo "<tr><td><b>Surface du terrain :</b></td><td><select name='surface'>";
|
|
echo "<option value='Terre'";
|
|
if($terrain->surface=="Terre") {
|
|
echo "selected='true'";
|
|
}
|
|
echo ">Terre</option><option value='Parquet'";
|
|
if($terrain->surface=="Parquet") {
|
|
echo "selected='true'";
|
|
}
|
|
echo ">Parquet</option><option value='Ciment'";
|
|
if($terrain->surface=="Ciment") {
|
|
echo "selected='true'";
|
|
}
|
|
echo ">Ciment</option><option value='Gazon'";
|
|
if($terrain->surface=="Gazon") {
|
|
echo "selected='true'";
|
|
}
|
|
echo ">Gazon</option><option value='Résine'";
|
|
if($terrain->surface=="Résine") {
|
|
echo "selected='true'";
|
|
}
|
|
echo ">Résine</option><option value='Goudron'";
|
|
if($terrain->surface=="Goudron") {
|
|
echo "selected='true'";
|
|
}
|
|
echo ">Goudron</option></select></td></tr>";
|
|
echo "<tr><td><b>Lieu :</b></td><td><input type=text size=25 name='lieu' value='$terrain->lieu'></td></tr>";
|
|
echo "<tr><td><b>Heure d'ouverture : </b></td><td><input type=text size=12 maxlength='5' name='heure_ouv' value='$terrain->heure_ouverture'>(de type hh:mm)</td></tr>";
|
|
echo "<tr><td><b>Heure de fermeture : </b></td><td><input type=text size=12 maxlength='5'name='heure_fer' value='$terrain->heure_fermeture'>(de type hh:mm)</td></tr>";
|
|
echo "<input type='hidden' name='id_terrain' value='$id_terrain'>";
|
|
echo "<tr><center><td cospan='2'><input type='submit' value='Modifier'></center></td></tr>";
|
|
echo "</table></center>";
|
|
echo "</form>";
|
|
|
|
echo "<br /><br />";
|
|
|
|
include("deco_admin_club.php");
|
|
include("piedDePage.php");
|
|
}
|
|
else {
|
|
echo("Non autorisé - Redirection vers la page d'identification dans 2 secondes");
|
|
sleep(2);
|
|
include("admin_login.php");
|
|
}
|
|
|
|
?>
|