session判断
session_start();
if (isset( $_SESSION [ 'admin' ]) && ! empty ( $_SESSION [ 'admin' ])) {
echo "<span></span>";
} else {
echo "<script language=javascript>alert('你还没登录!');location='../center/login.php';</script>";
}
session_start();
$_SESSION["admin"]=$id;