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

49 lines
2.4 KiB
PHTML
Executable File

<div class="masthead">
<div class="row">
<div class="span5"><a href="/"><img src="/images/westdc-logo-1.png" alt="Westdc Logo" /></a></div>
<div class="span5 pull-right">
<form method="get" action="/search" id="search" style="padding-top:17px;">
<div class="input-append">
<input type="text" value="" id="q" name="q" class="span4" placeholder="全文搜索">
<button type="submit" class="btn"><i class="icon-search"></i>搜索</button>
</div></form>
</div>
</div>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<button type="button" 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>
</button>
<a class="brand" href="/">CRENSED</a>
<div class="nav-collapse collapse">
<ul class="nav" id="mainmenu">
<li id="main-nav-index"><a href="/"><span>首页</span></a></li>
<li id="main-nav-data"><a href="/data"><span>数据产品</span></a></li>
<li id="main-nav-review"><a href="/review"><span>数据评审</span></a></li>
<li id="main-nav-author"><a href="/author"><span>数据作者</span></a></li>
<li id="main-nav-knowledge"><a href="/knowledge"><span>知识积累</span></a></li>
<li><a href="/archives"><span>新闻动态</span></a></li>
<li><a href="/about"><span>关于本站</span></a></li>
</ul>
<p class="navbar-text pull-right">
<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
echo '<a href="/account"><i class="icon-user"></i>'.$user->username.'</a> ';
if ($user->usertype=="administrator") echo '<a href="/admin"><i class="icon-cog"></i>后台</a> ';
echo '<a href="/data/order"><i class="icon-shopping-cart"></i>数据篮</a> <a href="/account/logout">注销</a>';
} else {
echo '<a href="/account/login"><i class="icon-user"></i>登录</a> <a href="/account/register">注册</a>';
} ?>
</p>
</div>
</div>
</div>
</div><!-- /.navbar -->
</div>