<?php

error_reporting(0); 
session_start();
$logout= $_GET[logout];
switch($logout){
case 'logout':
if(isset($_SESSION['username'])){
$_SESSION = array();
if(isset($_COOKIE[session_name()])){
setcookie(session_name(),'',time()-3600);
}
session_destroy();
}
echo "<script>top.location.href='../index.php'</script>";
}
$username=ubo($_SESSION['username']);
$sql1 = mysql_query("SELECT * FROM zhucema WHERE  user='$username'");
$row=mysql_fetch_array($sql1);
if($row[zdsl]!="0"){echo "<script>location.href='../index.php'</script>";}
?>
