日期:2014-05-17 浏览次数:20549 次
<div id="top-menu">
<?php
if(isset($_SESSION['username']))
{
echo "<div id='account'>";
echo "<ul><li><a href='account.html' class='my-account'>我的帐号</a></li>";
echo "<li><a href='tools/logout.php' class='logout'>退出</a></li></ul></div>";
echo "<div id='loggedas'>登录为 <a href='account.html'>".$_SESSION['username']."</a></div>";
}
else
{
echo "<div id='account'>";
echo "<ul><li><a href='login.html' class='login'>登录</a></li>";
echo "<li><a href='register.html' class='register'>注册</a></li></ul></div>";
}
?>