| Current Path : /home/x/b/o/xbodynamge/crosstraining/reservation/admin/ |
| Current File : /home/x/b/o/xbodynamge/crosstraining/reservation/admin/modif_sexcep.php |
<?php
include_once('init.inc.php');
if ($_POST['id']=="new"){
$print_salle='';
$print_jour='';
$print_heure_debut='';
$print_heure_fin='';
$print_type_seance='';
$print_nb_max_participant='';
}
else{
$sql = "SELECT * from reservation".$DB_prefixtable."seance_exceptionnelle where id=".$_POST['id'];
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error());
$sexcep = mysqli_fetch_assoc($req);
$print_salle=$sexcep['salle'];
$print_date=$sexcep['date'];
$print_heure_debut=$sexcep['heure_debut'];
$print_heure_fin=$sexcep['heure_fin'];
$print_type_seance=$sexcep['type_seance'];
$print_nb_max_participant=$sexcep['nb_max_participant'];
}
?>
<html>
<body>
<table style="width:100%;border:1px solid black;border-collapse:collapse;">
<tr>
<?php include_once('menu.php');?>
<td style="border:1px solid black;">
<form action="action_sexcep.php" method="POST">
<table style="width:100%;border:0px">
<tr>
<td style="width:90px;">
Salle
</td>
<td>
<select name="salle">
<option value="nam" <?php if ($print_salle=="nam") echo "selected";?> >Namur</option>
</select>
</td>
</tr>
<tr>
<td>
Date
</td>
<td>
<select name="date_jour">
<?php
for ($ind=1;$ind<=31;$ind++){
echo '<option value="'.$ind.'"'; if ($ind==date('d',strtotime( $print_date))) echo " selected"; echo'>'.$ind.'</option>';
}
?>
</select>
/
<select name="date_mois">
<?php
for ($ind=1;$ind<=12;$ind++){
echo '<option value="'.$ind.'"'; if ($ind==date('m',strtotime( $print_date))) echo " selected"; echo'>'.$ind.'</option>';
}
?>
</select>
/
<select name="date_annee">
<?php
for ($ind=2014;$ind<2020;$ind++){
echo '<option value="'.$ind.'"'; if ($ind==date('Y',strtotime( $print_date))) echo " selected"; echo'>'.$ind.'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td>
Heure debut
</td>
<td>
<input type="text" name="heure_debut" size="100" maxlength="5" value="<?php echo $print_heure_debut;?>">
</td>
</tr>
<tr>
<td>
Heure fin
</td>
<td>
<input type="text" name="heure_fin" size="100" maxlength="5" value="<?php echo $print_heure_fin;?>">
</td>
</tr>
<tr>
<td>
Type seance
</td>
<td>
<input type="text" name="type_seance" size="100" maxlength="200" value="<?php echo $print_type_seance;?>">
</td>
</tr>
<tr>
<td>
Nb max client
</td>
<td>
<input type="text" name="nb_max_participant" size="100" maxlength="2" value="<?php echo $print_nb_max_participant;?>">
</td>
</tr>
</table>
<?php
if ($_POST['id']=="new"){
echo '<input type="hidden" name="type" value="new">';
echo '<input type="submit" value="Creer seance type">';
echo "</form>";
}
else{
echo '<input type="hidden" name="type" value="modif">';
echo '<input type="hidden" name="id" value="'.$sexcep['id'].'">';
echo '<input type="submit" value="Modifier seance type">';
echo "</form>";
echo '<form action="action_sexcep.php" method="POST">';
echo '<input type="hidden" name="type" value="remove">';
echo '<input type="hidden" name="id" value="'.$sexcep['id'].'">';
echo '<input type="submit" value="Supprimer seance type">';
echo "</form>";
}
?>
<form>
</form>
</body>
</html>