<?php 
include("session.php");
require_once('dbcon.php');
	$_SESSION = array();
	//include('signout_user.php');
	      $t=time();
		  mysql_query("update airtime_logs set logout_time =Now() where id='$session_lid'  ");
	
	// expire cookie files before destroying this session
	if(isset($_COOKIE["user"]) && isset($_COOKIE["username"]) && isset($_COOKIE["phone"]) && isset($_COOKIE["email"])) {
		
		setcookie("user", '', strtotime('-5 days'), '/'); // set cookie to a time 5 days ago to destroy it
		setcookie("username", '', strtotime('-5 days'), '/');
		setcookie("phone", '', strtotime('-5 days'), '/'); // set cookie to a time 5 days ago to destroy it
		setcookie("email", '', strtotime('-5 days'), '/');
	}
	
	
	
	// destroy this session
	session_destroy();
	?>
	<script>
		window.location="index.php";
	</script>

