Your IP : 216.73.216.162


Current Path : /home/xbodynamge/namtation/reservation/
Upload File :
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="&nbsp;&nbsp;&nbsp;Mise &agrave; jour de vos donn&eacute;es&nbsp;&nbsp;&nbsp;"></form>
<form style="display: inline; margin: 0px;padding: 0px;" action="fiche_client.php" method="POST"><input type="submit" class="normal_bouton" value="&nbsp;&nbsp;&nbsp;D&eacute;connexion&nbsp;&nbsp;&nbsp;"></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&eacute;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(); 
?>