<?php TPL::output('global/header_meta.tpl.htm'); ?>

<body class="tnybasic">
<div class="wrapper">
	<div class="tnyhead">
    	<div class="tny-basic rel">
        	<h1 class="logo tny-left"><a href="<?php echo get_setting('base_url'); ?>"><img title="<?php echo get_setting('site_name'); ?>" class="img" src="<?php echo GET_STATIC_URL; ?>/css/<?php echo $this->template_name; ?>/img/logo_tanyacms.png" alt="<?php echo get_setting('site_name'); ?>" /></a></h1>

			<?php if ($this->user_id || $this->user_info['permission']['search_avail']) { ?>
            <div class="tny-search rel tny-left">
                <form action="search/" id="global_search_form" method="post" >
					<input class="tny-txt" autocomplete="off" name="q" value="Search question, topic or person" onSubmit="return false;" id="tny-search" data-category_enable="<?php echo (get_setting('category_enable') == 'Y') ? 1 : 0; ?>" title="Search question, topic or person..."/>
					<a href="javascript:;" id="global_search_btns" onClick="$('#global_search_form').submit();" class="tny-result abs" title="Click search »">Search</a>
				</form>
             </div>
			<?php } ?>

			<p class="b_menu tny-left">

                <a  href="home/explore/" class="tny-index<?php if ($_GET['app'] == 'question' OR $_GET['act'] == 'explore') { ?> cur<?php } ?>"><em class="q tny-small"></em>Question</a>
                <a href="topic/" class="tny-index<?php if ($_GET['app'] == 'topic') { ?> cur<?php } ?>"><em class="t tny-small"></em>Topic</a>
                <!--<a href="people/list/" class="tny-index<?php if ($_GET['app'] == 'people') { ?> cur<?php } ?>"><em class="u tny-small"></em>User</a>-->
               <a href="notifications/" id="not_message" class="not_message">Notice <?php if ($this->user_id) { ?><em class="mtooltips" style="display:none;" id="notifications_num" data-value="<?php echo $this->user_info['notification_unread']; ?>"><?php echo $this->user_info['notification_unread']; ?></em><?php } ?></a>
               
             </p>

				<?php if ($this->user_id) { ?>
					<div class="abs b_sQuestions">
		             	<a href="publish/<?php if ($_GET['category']) { ?>category_id-<?php echo intval($_GET['category']); ?>__<?php } ?><?php if ($this->topic_info) { ?>topic_title-<?php echo urlencode($this->topic_info['topic_title']); ?>__<?php } ?>" class="b_squestion tny-radiu5 <?php if ($_GET['app'] == 'publish') { ?> cur<?php } ?>"<?php if (get_setting('quick_publish') == 'Y' && $this->user_id) { ?> onClick="$.sQuestions({flgs:0, category_enable:<?php echo (get_setting('category_enable') == 'Y') ? 1 : 0; ?>, category_id:'<?php echo intval($_GET['category']); ?>', topic_title:'<?php echo $this->topic_info['topic_title']; ?>'}); return false;"<?php } ?> title="Initiate your question, searching Best Answer »">Ask Question</a>
		                <div class="b_user abs ">
							<a href="people/<?php echo $this->user_info['url_token']; ?>" class="user_head tny-gltxtHide"><?php echo $this->user_info['user_name']; ?><img src="<?php echo get_avatar_url($this->user_info['uid'], 'mid'); ?>" class="b_userpic tny-radiu3" title="<?php echo $this->user_info['user_name']; ?>" alt="<?php echo $this->user_info['user_name']; ?>"/><em class="mtooltips abs inbox_num" style="display:none;"><?php echo $this->inbox_unread; ?></em></a>
								
							<p class="b_drop_down rel bottomRadius5"><a href="inbox/" class="private_letter">Message<em class="mtooltips inbox_num" style="display:none;">0</em></a><a href="account/setting/profile/" title="Settings" class="set">Settings</a><?php if($this->user_info['permission']['is_administortar'] ) { ?><a href="<?php echo get_setting('base_url') . GET_INDEX_SCRIPT; ?>admin/" title="Management" class="manage" target="_blank">Management</a><?php } ?><a href="account/logout/" class="exit">Quit</a>
							</p>
						</div>
					</div>
				<?php }else{ ?>
					<div class="abs b_sQuestions" style="text-align:right;line-height:45px;"><a href="account/login/">Login</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class="highlight" href="account/register/">Sign up</a></div>

				<?php } ?>
        </div>
    </div>
 
    
    
