<?php defined('BASEPATH')or exit('NO Direct Access Is allowed'); error_reporting(0);?>

<!DOCTYPE html>
<html>
  <head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?=$title;?></title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="<?=base_url('assets/adminlte/bootstrap/css/bootstrap.min.css');?>">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
     <link rel="stylesheet" href="<?=base_url('assets/adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.css');?>">
    <link rel="stylesheet" href="<?=base_url('assets/adminlte/plugins/daterangepicker/daterangepicker-bs3.css');?>">
    <link rel="stylesheet" href="<?=base_url('assets/adminlte/plugins/datepicker/datepicker3.css');?>">
    <link rel="stylesheet" href="<?=base_url('assets/adminlte/plugins/iCheck/all.css');?>">
    <link rel="stylesheet" href="<?=base_url('assets/adminlte/plugins/colorpicker/bootstrap-colorpicker.min.css');?>">
    <link rel="stylesheet" href="<?=base_url('assets/adminlte/plugins/timepicker/bootstrap-timepicker.min.css');?>">
    <link rel="stylesheet" href="<?=base_url('assets/adminlte/plugins/select2/select2.min.css');?>">


    <link rel="stylesheet" href="<?=base_url('assets/adminlte/dist/css/AdminLTE.min.css');?>">
    <link rel="stylesheet" href="<?=base_url('assets/adminlte/dist/css/skins/_all-skins.min.css');?>">
     <!--<link rel="stylesheet" href="<?=base_url('assets/adminlte/msdropdown/dd.css');?>">-->


	<?php echo $map['js']; ?>
<style>
.pagination {
  margin : 0 0 ;
  }
</style>
  </head>
  <!--
  BODY TAG OPTIONS:
  =================
  Apply one or more of the following classes to get the
  desired effect
  |---------------------------------------------------------|
  | SKINS         | skin-blue                               |
  |               | skin-black                              |
  |               | skin-purple                             |
  |               | skin-yellow                             |
  |               | skin-red                                |
  |               | skin-green                              |
  |---------------------------------------------------------|
  |LAYOUT OPTIONS | fixed                                   |
  |               | layout-boxed                            |
  |               | layout-top-nav                          |
  |               | sidebar-collapse                        |
  |               | sidebar-mini                            |
  |---------------------------------------------------------|
  -->
<!--  hold-transition skin-blue sidebar-mini
  hold-transition skin-blue sidebar-collapse sidebar-mini-->
   <!-- <body class="hold-transition skin-green sidebar-collapse sidebar-mini fixed  ">-->
    <body class="hold-transition skin-green sidebar-collapse sidebar-mini">
    <div class="wrapper">

      <!-- Main Header -->
      <header class="main-header">

        <!-- Logo -->
        <a href="<?=site_url('Admin');?>" class="logo">
          <!-- mini logo for sidebar mini 50x50 pixels -->
          <span class="logo-mini"><b>TOG</b></span>
          <!-- logo for regular state and mobile devices -->
          <span class="logo-lg"><b>TOG</b>Admin</span>
        </a>

        <!-- Header Navbar -->
        <nav class="navbar navbar-static-top" role="navigation" style="height:auto">
          <!-- Sidebar toggle button-->
          <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
          </a>
          <!-- <span class="btn btn-sm btn-warning"><?php echo anchor($_SERVER['HTTP_REFERER'],'Go Back',['style'=>"color:white !important"]);?></span> -->

         <span class="btn btn-sm btn-primary pull-left" ><?=$title;?></span>
         <a href="<?=$_SERVER['HTTP_REFERER']?>">
           <img src="<?=base_url('assets/adminlte/arrow-arrow-pointing-left-bullet-png-free-63488.png');?>" style='height:30px;width:30px;    margin-top: -17px;'>
         </img></a>
          <!-- Navbar Right Menu -->
          <?php echo  $link;?>
          <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
              <!-- Messages: style can be found in dropdown.less-->

            <li class="dropdown messages-menu">
                <!-- Menu toggle button -->
                <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>
                    <!-- inner menu: contains the messages -->
                    <ul class="menu">
                      <li><!-- start message -->
                        <a href="#">
                          <div class="pull-left">
                            <!-- User Image -->
                            <?=$img_property_logo=['src'=>'assets/adminlte/dist/img/logo.png','alt'=>'User image','class'=>'img-circle'];?>
          	  	  			<?=img($img_property_logo);?>
                          </div>
                          <!-- Message title and timestamp -->
                          <h4>
                            Support Team
                            <small><i class="fa fa-clock-o"></i> 5 mins</small>
                          </h4>
                          <!-- The message -->
                          <p>Why not buy a new awesome theme?</p>
                        </a>
                      </li><!-- end message -->
                    </ul><!-- /.menu -->
                  </li>
                  <li class="footer"><a href="#">See All Messages</a></li>
                </ul>
              </li><!-- /.messages-menu -->

              <!-- Notifications Menu -->
              <?php ?><li class="dropdown notifications-menu">
                <!-- Menu toggle button -->
                <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>
                    <!-- Inner Menu: contains the notifications -->
                    <ul class="menu">
                      <li><!-- start notification -->
                        <a href="#">
                          <i class="fa fa-users text-aqua"></i> 5 new members joined today
                        </a>
                      </li><!-- end notification -->
                    </ul>
                  </li>
                  <li class="footer"><a href="#">View all</a></li>
                </ul>
              </li><?php ?>
              <!-- Tasks Menu -->
              <?php ?><li class="dropdown tasks-menu">
                <!-- Menu Toggle Button -->
                <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>
                    <!-- Inner menu: contains the tasks -->
                    <ul class="menu">
                      <li><!-- Task item -->
                        <a href="#">
                          <!-- Task title and progress text -->
                          <h3>
                            Design some buttons
                            <small class="pull-right">20%</small>
                          </h3>
                          <!-- The progress bar -->
                          <div class="progress xs">
                            <!-- Change the css width attribute to simulate progress -->
                            <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><!-- end task item -->
                    </ul>
                  </li>
                  <li class="footer">
                    <a href="#">View all tasks</a>
                  </li>
                </ul>
              </li><?php ?>
              <!-- User Account Menu -->
              <li class="dropdown user user-menu">
                <!-- Menu Toggle Button -->
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                  <!-- The user image in the navbar-->
                  <!--<img src="<?=base_url("assets/adminlte/dist/img/user2-160x160.jpg");?>" class="user-image" alt="User Image">-->
                  <?php if(preg_match ('./',$userdata->profile_image) && ($userdata->profile_image!="")){
                            echo img(array("src"=>base_url($userdata->profile_image),"class"=>"img-user img-circle img-responsive",
                            "style"=>"width:30px;"));
                        }
                        else if(!preg_match ('./',$userdata->profile_image) && ($userdata->profile_image!="") ){
                            echo img(array("src"=>$userdata->profile_image,"class"=>"img-user img-circle img-responsive",
                            "style"=>"width:30px;"));
                        }
                        else {
                            echo img(array("src"=>"assets/easy-admin/images/user-img.png","class"=>"img-user img-circle img-responsive",
                            "style"=>"width:30px;"));
                        }
                        ?>
                  <!-- hidden-xs hides the username on small devices so only the image appears. -->
                  <span class="hidden-xs"><?=ucfirst($userdata->fname);?></span>
                </a>
                <ul class="dropdown-menu">
                  <!-- The user image in the menu -->
                  <li class="user-header">
                    <!--<img src="<?=base_url("assets/adminlte/dist/img/user2-160x160.jpg");?>" class="img-circle" alt="User Image">-->
                    <?php if(preg_match ('./',$userdata->profile_image) && ($userdata->profile_image!="")){
                            echo img(array("src"=>base_url($userdata->profile_image),"class"=>"img-user img-circle img-responsive",
                            "style"=>"width:93px;"));
                        }
                        else if(!preg_match ('./',$userdata->profile_image) && ($userdata->profile_image!="") ){
                            echo img(array("src"=>$userdata->profile_image,"class"=>"img-user img-circle img-responsive",
                            "style"=>"width:93px;"));
                        }
                        else {
                            echo img(array("src"=>"assets/easy-admin/images/user-img.png","class"=>"img-user img-circle img-responsive",
                            "style"=>"width:93px;"));
                        }
                        ?>

                    <p>
                      <?=ucfirst($userdata->first_name);?> - <?=$userdata->last_name;?>
                      <small>Member since <?=$userdata->created_at;?></small>
                    </p>
                  </li>
                  <!-- Menu Body -->
                  <?php /*?><li class="user-body">
                    <div class="col-xs-4 text-center">
                      <a href="#">Followers</a>
                    </div>
                    <div class="col-xs-4 text-center">
                      <a href="#">Sales</a>
                    </div>
                    <div class="col-xs-4 text-center">
                      <a href="#">Friends</a>
                    </div>
                  </li><?php */?>
                  <!-- Menu Footer-->
                  <li class="user-footer">
                    <div class="pull-left">
                    <!--  <a href="<?=admin/dashboard?>" class="btn btn-default btn-flat">Profile</a>-->
                      <?=anchor('admin/dashboard','Profile',array('class'=>'btn btn-default btn-flat'));?>
                    </div>
                    <div class="pull-right">
                      <?=anchor('admin/Adminlte/logout','Sign out',array('class'=>'btn btn-default btn-flat'));?>
                    </div>
                  </li>
                </ul>
              </li>
              <!-- Control Sidebar Toggle Button -->
              <?php /*?><li>
                <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
              </li><?php */?>
            </ul>
          </div>
        </nav>
  </header>
      <!-- Left side column. contains the logo and sidebar -->
