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