update header
This commit is contained in:
parent
1ccf42d4a2
commit
7ad5f05e2e
|
@ -44,26 +44,19 @@
|
|||
<a href="/about">关于我们</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
echo '<a href="/account" id="register">'.$user->username.'</a>';
|
||||
if ($user->usertype=="administrator") echo '<li><a href="/admin"><i class="icon-cog"></i>后台</a></li> ';
|
||||
echo '<li><a href="/data/order"><i class="icon-shopping-cart"></i>数据篮</a></li> <li><a href="/account/logout">注销</a></li>';
|
||||
} else {
|
||||
echo '<li><a href="/account/login"><i class="icon-user"></i>登录</a></li> <li><a href="/account/register">注册</a></li>';
|
||||
} ?>
|
||||
<!-- --><?php
|
||||
// $auth = Zend_Auth::getInstance();
|
||||
// if ($auth->hasIdentity()) {
|
||||
// echo '<a href="/data/order" id="register">数据篮</a></li>';
|
||||
// } else {
|
||||
// echo '<a href="/account/login" id="login">登录</a>';
|
||||
// } ?>
|
||||
<!---->
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<?php
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if ($auth->hasIdentity()) {
|
||||
$user = $auth->getIdentity();
|
||||
echo '<li><a href="/account">' . $user->username . '</a></li>';
|
||||
if ($user->usertype == "administrator") echo '<li><a href="/admin"><i class="icon-cog"></i>后台</a></li> ';
|
||||
echo '<li><a href="/data/order"><i class="icon-shopping-cart"></i>数据篮</a></li> <li><a href="/account/logout">注销</a></li>';
|
||||
} else {
|
||||
echo '<a href="/account/register" id="register">注册</a><a href="/account/login" id="login">登录</a>';
|
||||
} ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
Loading…
Reference in New Issue