<?php if(isset($user) && is_array($user)) { ?>

<a class="user-head-dropdown aa toogle" data-toggle="dropdown" >
	<img src="{$user['headimage']}" class="img-responsive img-circle headimage pull-left" width="30"><span class="login-txt">{lang('membercenter')}</span>
	<span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-menu-user">
	<?php if(count(pay::getInstance()->getrows())>1 ||
	(count(pay::getInstance()->getrows())==1 && count(pay::getInstance()->getrows('pay_code="nopay"'))==0) ){ ?>
	<li>
		<a rel="external nofollow" href="{url('manage/consumptionlist/manage/consumption')}" target="_blank" class="top-reg">
			<i class="icon-wallet"></i> {lang('finance')}
		</a>
		<a href="{url('archive/consumption')}" class="paycheck">
			{lang('recharge')}
		</a>
	</li>
	<li>
		<a href="{url('manage/consumptionlist/manage/consumption')}">
			<i class="icon-credit-card"></i>
			{lang('balance')}
			<small>{getmenoy()}</small>
		</a>
	</li>
	<?php } ?>
	<li>
		<a href="{url('question/questionlist/page/1/myseemid/1')}">
			<i class="icon-star"></i>
			{lang('myconcerns')}
		</a>
	</li>
	<li>
		<a href="{url('question/questionlist/page/1/myquestion/1')}">
			<i class="icon-question"></i>
			{lang('myquestion')}
		</a>
	</li>
	<li>
		<a href="{url('question/draftquestion')}">
			<i class="icon-note"></i>
			{lang('drafts')}
		</a>
	</li>
	<li>
		<a href="{url('user/index')}">
			<i class="icon-user"></i> {lang('membercenter')}
		</a>
	</li>
	{if $user['groupid']=='2'}<li>
	<a rel="external nofollow" href="{$admin_url}" target="_blank" class="top-login">
		<i class="icon-grid"></i> {lang('admin_login')}
	</a>
	</li>{/if}
	<li class="line"></li>
	<li>
		<a href="{url('user/edit/table/user')}">
			<i class="icon-note"></i> {lang('edituserinfo')}
		</a>
	</li>
	<li>
		<a href="{url('user/logout')}">
			<i class="icon-logout"></i> {lang('logout')}
		</a>
	</li>
</ul>


<?php }else{ ?>
<div class="user-panel">
	<a rel="external nofollow" title="{lang('login')}" href="{url('user/login/loginurl/1')}" class="top-login">{lang('login')}</a>
	<a class="top-reg" rel="external nofollow" title="{lang('register')}" href="{url('user/register')}">{lang('register')}</a>
</div>
<?php } ?>