<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php echo $title;?></title>
<link href="<?php echo base_url();?>assets/frontend/img/ico/favicon.png" rel="shortcut icon">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/backend/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/backend/css/font-awesome.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/backend/dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/backend/dist/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="<?php echo base_url();?>assets/backend/plugins/datatables/dataTables.bootstrap.css">
<link href="<?php echo base_url(); ?>assets/backend/css/datepicker.css" rel="stylesheet" type="text/css" /> 
<link href="<?php echo base_url(); ?>assets/backend/css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" />      
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="<?php echo base_url(); ?>assets/backend/css/custom.css" rel="stylesheet" type="text/css" /> 
<script src="<?php echo base_url(); ?>assets/backend/js/jquery-1.11.3.min.js"></script>
<script src="<?php echo base_url(); ?>assets/backend/js/jquery-migrate-1.2.1.min.js"></script>
<script src="<?php echo base_url(); ?>assets/backend/bootstrap/js/bootstrap.min.js"></script>
<!-- validation script -->
<script src="<?php echo base_url(); ?>assets/backend/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>assets/backend/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url(); ?>assets/backend/plugins/datatables/dataTables.bootstrap.min.js"></script>
</head>
<body class="hold-transition skin-red sidebar-mini">
<!-- Site wrapper -->
<div class="wrapper">

  <header class="main-header">
    <!-- Logo -->
    <a href="<?php echo base_url(); ?>" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><b>H</b>VA</span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg" style="font-family:Kaushan Script,cursive; font-style:italic;"><b><?php echo $this->config->item('project_name_page_first');?></b> <?php echo $this->config->item('project_name_page_second');?></span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top" role="navigation">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <!-- Messages: style can be found in dropdown.less-->
          <!--<li class="dropdown messages-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-envelope-o"></i>
              <span class="label label-success">4</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 4 messages</li>
              <li>
                
                <ul class="menu">
                  <li> 
                    <a href="#">
                      <div class="pull-left">
                        <img src="<?php echo base_url(); ?>assets/backend/dist/img/user2-160x1600.png" class="img-circle" alt="User Image">
                      </div>
                      <h4>
                        Support Team
                        <small><i class="fa fa-clock-o"></i> 5 mins</small>
                      </h4>
                      <p>Why not buy a new awesome theme?</p>
                    </a>
                  </li>
               
                </ul>
              </li>
              <li class="footer"><a href="#">See All Messages</a></li>
            </ul>
          </li>-->
          <!-- Notifications: style can be found in dropdown.less -->
          <!--<li class="dropdown notifications-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-bell-o"></i>
              <span class="label label-warning">10</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 10 notifications</li>
              <li>
                
                <ul class="menu">
                  <li>
                    <a href="#">
                      <i class="fa fa-users text-aqua"></i> 5 new members joined today
                    </a>
                  </li>
                </ul>
              </li>
              <li class="footer"><a href="#">View all</a></li>
            </ul>
          </li>-->
          
          <!--<li class="dropdown tasks-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-flag-o"></i>
              <span class="label label-danger">9</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">You have 9 tasks</li>
              <li>
               
                <ul class="menu">
                  <li> 
                    <a href="#">
                      <h3>
                        Design some buttons
                        <small class="pull-right">20%</small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                          <span class="sr-only">20% Complete</span>
                        </div>
                      </div>
                    </a>
                  </li>
                  
                </ul>
              </li>
              <li class="footer">
                <a href="#">View all tasks</a>
              </li>
            </ul>
          </li>-->
          <!-- User Account: style can be found in dropdown.less -->
			<li class="dropdown user user-menu">
			<a href="#" class="dropdown-toggle" data-toggle="dropdown">
				<?php if($session_details->image==''){ ?>
					<img alt="User Image" class="user-image" src="<?php echo base_url();?>assets/backend/images/1442581129avatar3.png"   />
				<?php }else{ ?>
					<img src="<?php echo base_url();?>assets/upload/photo/<?php echo $session_details->image;?>" class="user-image" alt="User Image"  />
				<?php } ?>
  				<span class="hidden-xs"><b><?php echo ucwords($session_details->name); ?></b></span>
			</a>
				<ul class="dropdown-menu">
					<li class="user-header">
						<?php if($session_details->image==''){ ?>
							<img src="<?php echo base_url();?>assets/backend/images/1442581129avatar3.png" class="img-circle" alt="User Image" />
						<?php }else{ ?>
							<img src="<?php echo base_url();?>assets/upload/photo/<?php echo $session_details->image;?>" class="img-circle" alt="User Image" />
						<?php } ?>
						<div style="color: rgb(255, 255, 255); font-size: 14px; font-weight: 600; text-align: center; margin-top: 10px;">
							Last Login <br>  
							<?php if(isset($session_details->last_login) && $session_details->last_login>0 && $session_details->last_login!=''){ echo date('F d, Y h:i:s A',$session_details->last_login); }else if(isset($session_details->current_login) && $session_details->current_login>0 && $session_details->current_login!=''){ echo date('F d, Y h:i:s A',$session_details->current_login);}else{echo 'Not Yet';}?> 
						</div>
 					</li>
 					<li class="user-footer">
						<div class="pull-left">
							<a href="<?php echo base_url().$this->config->item('admin_directory_name');?>/profile" class="btn btn-default btn-flat"><i class="fa fa-user"></i> Profile</a>
						</div>
						<div class="pull-right">
							<a href="<?php echo base_url().$this->config->item('admin_directory_name');?>/logout" class="btn btn-default btn-flat"><i class="fa fa-sign-out"></i> Sign out</a>
						</div>
					</li>
				</ul>
			</li>
            
        </ul>
      </div>
    </nav>

  </header>
 <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
	<section class="sidebar" style="height: auto;">
		<!-- Sidebar user panel -->
		<div class="user-panel">
			<div class="pull-left image">
				<?php if($session_details->image==''){ ?>
					<img src="<?php echo base_url();?>assets/backend/images/1442581129avatar3.png" class="img-circle" alt="User Image" />
				<?php }else{ ?>
					<img src="<?php echo base_url();?>assets/upload/photo/<?php echo $session_details->image;?>" class="img-circle" alt="User Image" />
				<?php } ?>
 			</div>
			<div class="pull-left info">
				<p><?php  echo ucwords($session_details->name);?></p> 
				<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
			</div>
		</div>
	
	<!-- sidebar menu: : style can be found in sidebar.less -->
		<ul class="sidebar-menu">
			<li class="header">MAIN NAVIGATION</li>
			<?php include(APPPATH.'views/Backend/includes/menu.php'); ?>
		</ul>
	</section>
    <!-- /.sidebar -->
  </aside>

<div class="content-wrapper" style="min-height: 647px;">
	<!-- Content Header (Page header) -->
	<section class="content-header">
		<h1><?php echo $page_title;?><small></small></h1>
		<?php if(isset($success_msg) && $success_msg!=''){?>
			<div class="alert alert-success "><img style="margin-top:-3px;" src="<?php echo base_url();?>/assets/backend/images/success.png" /> <?php echo $success_msg;?> </div> 
		<?php } ?>
		<?php if(isset($error_msg) && $error_msg!=''){?>
			<div class="alert alert-danger "><img style="margin-top:-3px;" src="<?php echo base_url();?>/assets/backend/images/warning.png" /> <?php echo $error_msg;?> </div>
		<?php } ?>
	</section> 