<header class="navbar navbar-default pjCfHeader">
	<div class="navbar-header">
		<button type="button" class="navbar-toggle collapsed pull-left pjCfBtn pjCfBtnNavTrigger" data-toggle="collapse" data-target="#pjCsNav" aria-expanded="false">
			<span class="sr-only"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
		</button>
	</div><!-- /.navbar-header -->

	<nav class="collapse navbar-collapse navbar-left pjCsNav" id="pjCsNav">
		<ul class="nav navbar-nav">
			<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjLoad&amp;action=pjActionIndex"><?php __('front_menu_home');?></a></li>
			<?php
			if($tpl['option_arr']['o_use_categories'] == 'yes')
			{ 
				?>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjLoad&amp;action=pjActionCategory"><?php __('front_menu_categories');?></a></li>
				<?php
			}
			if($tpl['can_ask'] == true)
			{ 
				?>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjLoad&amp;action=pjActionAsk"><?php __('front_menu_new_question');?></a></li>
				<?php
			}
			if(!$controller->checkLogin())
			{ 
				if($tpl['option_arr']['o_use_registration'] == 'yes')
				{
					?>
					<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjLoad&amp;action=pjActionRegister"><?php __('front_menu_create_an_account');?></a></li>
					<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjLoad&amp;action=pjActionLogin"><?php __('front_menu_login');?></a></li>
					<?php
				}
			}else{ 
				?>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjLoad&amp;action=pjActionProfile"><?php __('front_menu_my_account');?></a></li>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjLoad&amp;action=pjActionLogout"><?php __('front_menu_logout');?></a></li>
				<?php
			} 
			?>
		</ul><!-- /.nav navbar-nav -->
	</nav><!-- /#pjCsNav.collapse navbar-collapse navbar-left pjCsNav -->
	<?php
	if($_GET['action'] != 'pjActionView')
	{ 
		?>
		<div class="navbar-form navbar-right pjCfForm pjCfFormSearch">
			<form id="pjCfFormSearch_<?php echo $index;?>" method="get" role="search">
				<input type="hidden" value="pjLoad" name="controller">
				<input type="hidden" value="pjActionIndex" name="action">
				<input type="hidden" value="1" name="question_search">
				<input type="hidden" value="1" name="pjPage">
				<input type="hidden" value="<?php echo isset($_GET['column']) ? $_GET['column'] : 'created'; ?>" name="column">
				<input type="hidden" value="<?php echo isset($_GET['direction']) ? $_GET['direction'] : 'DESC'; ?>" name="direction">
				
				<div class="form-group">
					<input type="text" name="keyword" class="form-control" value="<?php echo isset($_GET['keyword']) ? stripslashes($_GET['keyword']) : NULL;?>" placeholder="<?php __('front_search');?>" />
				</div><!-- /.form-group -->
	
				<button type="submit" class="btn btn-default pjCfBtn pjCfBtnSecondary"><?php __('front_btn_find');?></button>
			</form>
		</div><!-- /.navbar-form navbar-right pjCfForm pjCfFormSearch -->
		<?php
	} 
	?>
</header><!-- /.navbar navbar-default pjCfHeader -->