<?php
include_once "include/config.php";
session_start();
//session_unset();
#Update user log
mysql_query("UPDATE user_log SET  usr_date=current_date(), usr_timeout=current_time(), usr_status=20 WHERE usr_id='".$_SESSION['USER_ID']."' AND usr_status=10");
#insert history
mysql_query("INSERT INTO user_activity SET user_id='".$_SESSION['USER_ID']."', user_act='Logout dari Program IT Inventory', user_date=current_date(), user_time=current_time()");
session_destroy();
echo "<meta http-equiv='refresh' content='0; url=index.php'>";
exit;
?>