<?php
session_start();
require_once(dirname(__DIR__, 1) . '/config.php');
require_once(BASE_PATH . '/db/idl_connect.php');
if(isset($_SESSION['user_id'])) {
	mysqli_query($bdd,"DELETE FROM ".$prefix."_userconnect WHERE user_id = '".$_SESSION['user_id']."'");
}

$_SESSION['essai_con'] = $_SESSION['essai_con'] ?? 0;
$_SESSION['essai_res'] = $_SESSION['essai_res'] ?? 0;
$_SESSION['max_reserv'] = $_SESSION['max_reserv'] ?? 0;
$_SESSION = array('essai_con' => $_SESSION['essai_con'], 'essai_res' => $_SESSION['essai_res'], 'max_reserv' => $_SESSION['max_reserv']);

mysqli_close($bdd);
echo '<script language="Javascript">
	<!--
	document.location.replace("../index.php");
	// -->
	</script>';
?>