<?php
   
    // On demarre la session  
    session_start ();  
	
	//setcookie('reset', 'ok', time() + 24*3600  ); 
	
	include('database.php');
	DB_connexion(); 
	
	//$data = $_COOKIE['analog_design'];
    //$myarray = unserialize($data);
	
	$sql="SELECT * FROM user_online WHERE login = '".$_SESSION['login']."' ";
	$result = mysql_query($sql);	
	$data = mysql_fetch_assoc($result);
	$sql = "UPDATE user_online SET connexion = 'offline' WHERE id = '".$data['id']."' ";
	$requete = mysql_query($sql); 
	 
    // mise à jour des variables de sessions   
	$_SESSION['logged'] = "no";
	$_SESSION['login'] = "no";
	$_SESSION['soumission']= 0;
	
	$_SESSION['repertoire'] = "";
	$_SESSION['repertoire'] = "";
    $_SESSION['start_session'] = "";
	$_SESSION['delai'] = "";
	
	unset($_SESSION["verrou"]);
		
	//$page_active = $_SESSION['page_active'];
	//header("Location: $page_active");
	header("Location: acceuil.php");

?> 

