westdc-zf1/application/default/views/scripts/header.phtml

77 lines
3.7 KiB
PHTML
Executable File

<div id="author-header" >
<div class="container">
<div class="navbar ">
<div class="navbar-inner">
<div class="container">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<!-- Be sure to leave the brand out there if you want it shown -->
<a href="#" class="brand "><img class="logo" src="/static-sanjy-np/img/logo.jpg" alt="" width="50"> <b>三江源国家公园星空地一体化生态监测及数据平台</b></a>
<div class="nav-collapse collapse navbar-responsive-collapse">
<ul class="nav pull-right">
<li>
<a href="/" class="active">首页</a>
</li>
<li>
<a href="/data">数据服务</a>
</li>
<li>
<a href="/archives/news/localnews">新闻动态</a>
</li>
<li>
<a href="/about">关于我们</a>
</li>
<li>
<form class="navbar-search pull-left" action="/search" id="search-form">
<input type="text" class="search-query span2" name="q" id="q" placeholder="Search">
</form>
</li>
<li class="divider-vertical"></li>
<li class="dropdown">
<a class="dropdown-toggle"
data-toggle="dropdown"
href="#">
<i class="icon-user"></i>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
echo '<li><a href="/account"><i class="icon-user"></i>'.$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 '<li><a href="/account/login"><i class="icon-user"></i>登录</a></li> <li><a href="/account/register">注册</a></li>';
} ?>
<li class="divider"></li>
</ul>
</li>
<li class="user-nav">
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>