<?php session_start();
include("../conn.php");
 ?>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>chat online - logout</title>
<link href="css.php?id=<?php echo $_SESSION["chatid"] ?>"  rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../js/function.js"></script>
	</head>
<body>
<?php
$sql="update chat_user set userstate=0 where username='".$_SESSION["username"]."'";
mysql_query($sql,$dbconn);
unset($_SESSION['username']);
unset($_SESSION['password']);
unset($_SESSION['companyname']);
mysql_close($dbconn);
 ?>
<script type="text/javascript">
window.location="index.php";
</script>
</body>
</html>