| Current Path : /home/xbodynamge/namtation/reservation/admin/ |
| Current File : /home/xbodynamge/namtation/reservation/admin/action_sexcep.php |
<?php
include_once('init.inc.php');
if ($_POST['type']=="new"){
echo $sql = "insert into reservation".$DB_prefixtable."seance_exceptionnelle (salle, date, heure_debut, heure_fin, type_seance, nb_max_participant) value ('".$_POST['salle']."','".$_POST['date_annee']."/".$_POST['date_mois']."/".$_POST['date_jour']."','".$_POST['heure_debut']."','".$_POST['heure_fin']."','".$_POST['type_seance']."',".$_POST['nb_max_participant'].")";
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error());
header('Location: page_sexcep.php');
}
if ($_POST['type']=="modif"){
echo $sql = "update reservation".$DB_prefixtable."seance_exceptionnelle set salle='".$_POST['salle']."', date='".$_POST['date_annee']."/".$_POST['date_mois']."/".$_POST['date_jour']."', heure_debut='".$_POST['heure_debut']."', heure_fin='".$_POST['heure_fin']."', type_seance='".$_POST['type_seance']."', nb_max_participant=".$_POST['nb_max_participant']." where id=".$_POST['id'];
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error());
header('Location: page_sexcep.php');
}
if ($_POST['type']=="remove"){
echo $sql = "delete from reservation".$DB_prefixtable."seance_exceptionnelle where id=".$_POST['id'];
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error());
header('Location: page_sexcep.php');
}
?>