<?
require "include/application.php";
require('include/configure.php');

$sql="insert into log (l_user,l_desc) values ('".$_SESSION["egoUser"]."','System Logout')";
@mysql_query($sql) or die(mysql_error());


unset($_SESSION["egoUser"]);
unset($_SESSION["egoName"]);
unset($_SESSION["egoPosition"]);
unset($_SESSION["egoAccess"]);
unset($_SESSION["egoPermission"]);
unset($_SESSION["egoBlock"]);
unset($_SESSION["egoType"]);

header('Location: index.php');

?>