81 lines
2.5 KiB
PHP
Executable File
81 lines
2.5 KiB
PHP
Executable File
<?php
|
|
/* include("admin_connecte.php"); */
|
|
session_start();
|
|
/* test si la session est lancée */
|
|
if((isset($_SESSION['Admin'])==true) && ($_SESSION['Admin']==1))
|
|
{
|
|
$titre="Création d'un nouveau terrain";
|
|
include("enTete.php");
|
|
?>
|
|
<body background="images/balle_raquette3.jpg">
|
|
<br>
|
|
<br>
|
|
<center><H2>Veuillez saisir les informations concernant le nouveau terrain</H2>
|
|
<form action="creation_terrain_suite.php" method="get">
|
|
<table>
|
|
<tr>
|
|
<td><b>Club concerné :</b></td><td><select name='club'>
|
|
<?php
|
|
include("conf.php");
|
|
include("mysql_compat.php");
|
|
include ("conf.php");
|
|
$db_connection=mysql_connect($db_host,$db_user,$password);
|
|
mysql_select_db($db_name,$db_connection);
|
|
$requete="SELECT id_club, nom FROM club GROUP BY nom";
|
|
$reponse=mysql_query($requete,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."<br />");
|
|
while($club=mysql_fetch_object($reponse)){
|
|
echo "<option value=$club->id_club>";
|
|
echo "$club->nom";
|
|
}
|
|
echo "</select></td>";
|
|
?>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Nom du terrain : </b></td>
|
|
<td><input type=text size=20 name='nom'></td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Type de terrain :</b></td>
|
|
<td><select name="type"><option value="Court">Court<option value="Mur">Mur</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Protection du terrain :</b></td>
|
|
<td><select name="protection"><option value="Couvert">Couvert<option value="Extérieur">Extérieur</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Surface du terrain :</b></td>
|
|
<td><select name="surface"><option value="Terre">Terre<option value="Parquet">Parquet<option value="Ciment">Ciment
|
|
<option value="Gazon">Gazon<option value="Résine">Résine<option value="Goudron">Goudron</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Lieu :</b></td><td><input type=text size=20 name="lieu"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Heure d'ouverture : </b></td><td><input type=text size=12 name="heure_ouv"></td>
|
|
<td>(de type hh:mm:ss)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b>Heure de fermeture : </b></td><td><input type=text size=12 name="heure_fer"></td>
|
|
<td>(de type hh:mm:ss)</td>
|
|
</tr>
|
|
</table></center>
|
|
<br /><br />
|
|
<table align="center" >
|
|
<tr>
|
|
<td><input type="submit" name="valider" value="Créer"><input type="reset" name="effacer" value="Annuler"></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<?php
|
|
include("deco_admin.php");
|
|
include("piedDePage.php");
|
|
/* sinon si la personne n'est pas autorisé la renvoyer àla page de login */
|
|
}
|
|
else
|
|
{
|
|
echo("Non autorisé - Redirection vers la page d'identification dans 2 secondes");
|
|
sleep(2);
|
|
include("identification_admin.php");
|
|
}
|
|
?>
|