| Current Path : /home/xbodynamge/namtation/reservation/ |
| Current File : /home/xbodynamge/namtation/reservation/annuler.php |
<?php
include_once('./inc/init.inc.php');
include_once('./inc/secure.inc.php');
setlocale (LC_TIME, 'fr_FR.utf8','fra');
$sql = "SELECT * from reservation".$DB_prefixtable."client where id =".$_SESSION['id_client'];
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error());
$client = mysqli_fetch_assoc($req);
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style_client.css">
<meta http-equiv="refresh" content="6; url=<?php echo "action_annuler.php?id=".$_POST['id'];?>">
</head>
<body>
<div class="container_maintable">
<span style="float: right;">
<form style="display: inline; margin: 0px;padding: 0px;" action="fiche_client.php" method="POST"><input type="submit" class="normal_bouton" value=" Mise à jour de vos données "></form>
<form style="display: inline; margin: 0px;padding: 0px;" action="fiche_client.php" method="POST"><input type="submit" class="normal_bouton" value=" Déconnexion "></form></span><br>
<table class="main">
<?php include_once('./inc/header.php');?>
<tr class="calendrier_alternate1">
<td style="text-align:left; vertical-align:top;">
<div class="titre">Annulation de la séance en cours<br><br><br>Veuillez patienter.......</div>
<br>
</td>
</tr>
</table>
</div>
</body>
</html>
<?php
$sql = "SELECT * from reservation".$DB_prefixtable."reservation where id =".$_POST['id'];
$req = mysqli_query($db, $sql) or die('Erreur SQL !'.mysqli_error());
$reservation = mysqli_fetch_assoc($req);
if ($reservation['date']==date('Y-m-d')){
header('Location: reservation.php?message=7');
}
else{
/*
try {
$transactDB = new PDO("mysql:host=".$DB_server.";dbname=".$DB_dbname, $DB_login, $DB_pass);
$transactDB->beginTransaction();
$transactDB->query("delete from reservation".$DB_prefixtable."reservation where id = ".$_POST['id']);
$transactDB->query("update reservation".$DB_prefixtable."client set nb_seance=nb_seance+1 where id=".$_SESSION['id_client']);
$transactDB->commit();
} catch (Exception $e) {
$transactDB->rollback();
}
header('Location: reservation.php?message=2');
*/
}
#mysql_close();
?>