<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>CHT Author</title>
    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" href="/js/poshytip/tip-yellow/tip-yellow.css" type="text/css" />
	<link rel="stylesheet" href="/js/modaldialog/css/jquery.modaldialog.css" type="text/css" />
	<link rel="stylesheet" href="/js/kindeditor/themes/default/default.css" type="text/css" media="screen" />
	<script type="text/javascript" src="/js/jquery.js"></script>
	<script type="text/javascript" src="/bootstrap/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="/js/poshytip/jquery.poshytip.min.js"></script>
	<script type="text/javascript" src="/js/jquery.form.min.js"></script> 
	<script type="text/javascript" src="/js/modaldialog/jquery.modaldialog.js"></script>
	<script type="text/javascript" src="/js/kindeditor/kindeditor.js"></script>
	<script type="text/javascript" src="/js/basic.js"></script>
	<script src="/js/ace/ace.js" type="text/javascript" charset="utf-8"></script>
  </head>

  <body>
	<?php 
		$admin_info=$this->session->userdata('session_admin'); 
		if(!empty($admin_info)){
	?>
   <div class="navbar">
  <div class="navbar-inner">

    <a class="brand" style="padding:2px 20px;" href="/"> <img src="/css/images/logo.png"> </a>
	

	
    <ul class="nav">
		
	 <li class="<?php echo $navbar_active=='mytask'?'active':false; ?>"><a href="<?php echo site_url('') ?>"><strong>Home</strong></a></li>
     <li class="<?php echo $navbar_active=='taskhall'?'active':false; ?>"><a href="<?php echo site_url('taskhall'); ?>"><strong>Tasks hall</strong> <?php $hall_count=get_task_hall_count(); if($hall_count!=0){ ?><span class="badge badge-important"><?php echo $hall_count;?></span><?php } ?></a></li>	 
	 <li class="<?php echo $navbar_active=='create_task'?'active':false; ?>"><a href="<?php echo site_url('welcome/create_task') ?>"><strong>suggest an article idea</strong></a></li>
	 <li class="<?php echo $navbar_active=='notice'?'active':false; ?>"><a href="<?php echo site_url('taskhall/notice') ?>"><strong>Standards and requirements</strong></a></li>

	 </ul>
	
	<ul class="nav pull-right">
		<li class="btn-group">
			<?php $all_unread_sms=get_all_unread_sms();?>
			<?php if(isset($task->t_id) && isset($all_unread_sms['sms'][$task->t_id])) {$all_unread_sms['sms_count']=$all_unread_sms['sms_count']-count($all_unread_sms['sms'][$task->t_id]);unset($all_unread_sms['sms'][$task->t_id]);} ?>
	        <div class="dropdown-toggle" data-toggle="dropdown" style="margin-top: 6px;"><i class="icon-envelope pull-left" style="margin-top:3px;"></i><span class="badge badge-important pull-right <?php if($all_unread_sms['sms_count']==0) echo 'hide'; ?>"><?php echo $all_unread_sms['sms_count'];?></span></div>
	        <ul class="dropdown-menu">
        	<?php foreach ($all_unread_sms['sms'] as $m) { ?>
        		<li><a href="<?php echo site_url('welcome/view/'.$m[0]->m_object_id); ?>"><?php echo $m[0]->t_title.' ('.count($m).')';?></a></li>
        	<?php } ?>
	        </ul>
	    </li>
	  <li class="divider-vertical"></li>
	<li class="dropdown">
		<a href="#" class="dropdown-toggle" data-toggle="dropdown">
	<?php echo $admin_info->a_name;?>
		  <b class="caret"></b>
		</a>
		<ul class="dropdown-menu">
			<li><a href="<?php echo site_url('login/out'); ?>" >Exit</a></li>
			<li><a href="<?php echo site_url('setting'); ?>">Personal information</a></li>
		</ul>
	</li>
	</ul>
	
   
  </div>
</div>
<?php } ?>
