<?php
session_start();
ob_start();
date_default_timezone_set("Asia/Kolkata");
require "../model/configuration.php";
$entrytime = date("h:i:s:A", time());
$date=date("Y-m-d");
$db->execute("INSERT INTO login_details(staff_username,staff_id,purpose,time,date) VALUES('".$_SESSION['UNAME']."','".$_SESSION['user_id']."','Logout','$entrytime','$date')");
$_SESSION = array(); 
session_unset();
session_destroy();
header("location:../index.php");
exit();
?>