<?php
include("conn.php");
include_once("function.php");


$sid=sqlstr($_COOKIE["dl"]);
$user=mysql_fetch_array(mysql_query("select * from user where sid='$sid'"));
if($user){
header("Location:diary/index.php");
exit;//查询到登录则跳转到个人中心  
}
else{
header("Location:login.php");
exit;//反之，则跳转到登录界面
}

?>