<!DOCTYPE html>

<?php
$admin_type=$this->session->userdata("admin_type");
if($admin_type==2 || $admin_type==3 || $admin_type==4  ){
  $sitepanel_menu_array = lang('top_menu_list_'.$admin_type);
  $sitepanel_menu_icon_array = lang('top_menu_icon_'.$admin_type);

  $district_arrays=array("dashbord","kisan_mitra","kisan_sahayak","kisans");
  $kisan_mitra_arrays=array("dashbord","kisan_sahayak","kisans");
  $kisan_sahayak_arrays=array("dashbord","kisans");


  if($admin_type==2 && !in_array($this->uri->segment(2),$district_arrays)){
    redirect("sitepanel/dashbord","");
    //redirect("sitepanel/kisan_sahayak","");
    //print_r($this->uri->segments);
    //print_r($this->uri->rsegments);
  }
  if($admin_type==3 && !in_array($this->uri->segment(2),$kisan_mitra_arrays)){ 
    redirect("sitepanel/dashbord","");
    //redirect("sitepanel/kisans","");
  }
  if($admin_type==4 && !in_array($this->uri->segment(2),$kisan_sahayak_arrays)){ 
    redirect("sitepanel/dashbord","");
   // redirect("sitepanel/kisans","");
  }

}else{
  $sitepanel_menu_array = lang('top_menu_list');
  $sitepanel_menu_icon_array = lang('top_menu_icon');
}
?>

<html xmlns="http://www.w3.org/1999/xhtml" dir="#" lang="#" xml:lang="#">

  <meta http-equiv="content-type" content="text/html;charset=utf-8" />

  <head>  

    <script type="text/javascript">var _siteRoot = 'index.html', _root = 'index.html';</script>

    <script type="text/javascript" > var site_url = '<?php echo site_url(); ?>';</script>

    <script type="text/javascript" > var theme_url = '<?php echo theme_url(); ?>';</script>

    <script type="text/javascript" > var resource_url = '<?php echo resource_url(); ?>';</script>

    <!-- META SECTION -->

    <title><?php echo $heading_title ?></title>            

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <link rel="icon" href="<?php echo base_url('title_logo.ico') ?>" type="image/x-icon" />

    <!-- END META SECTION -->

    <!-- CSS INCLUDE --> 

    <!-----------------Old Files------------------>

    <link rel="stylesheet" type="text/css" href="<?php echo base_url('assets/developers'); ?>/css/proj.css" />

    <script type="text/javascript" src="<?php echo base_url('assets/sitepanel_new'); ?>/js/plugins/jquery/jquery.min.js"></script>

    <script type="text/javascript" src="<?php echo base_url(); ?>assets/sitepanel_new/js/common.js"></script>

    <!------ -----Olod files Ends Here-------------->        

    <link rel="stylesheet" type="text/css" id="theme" href="<?php echo base_url('assets/sitepanel_new') ?>/css/theme-default.css"/>

    <link rel="stylesheet" type="text/css" id="theme" href="<?php echo base_url('assets/sitepanel_new') ?>/css/custom.css"/>

    <!-- EOF CSS INCLUDE -->                   

  </head>

  <body>

    <!-- START PAGE CONTAINER -->

    <div class="page-container" id="container">

      <!-- START PAGE SIDEBAR -->

      <div class="page-sidebar collapsed-menu" id="header">

        <!-- START X-NAVIGATION -->

        <div class="logo-image text-center" >

          <a class="navbar-brand1" href="#"><?php echo $this->config->item('site_name');?></a>



        </div>

        <ul class="x-navigation" id="menu">

          <li class="xn-title">Navigation</li>

          <?php createMenu($sitepanel_menu_array, $sitepanel_menu_icon_array); ?>

          <li class="pull-right">

            <a href="javascript:void(0);">

              Welcome Admin

            </a>

          </li>

          <li class="pull-right"><a href="<?php echo base_url('sitepanel/logout'); ?>" >Sign Out <span class="fa fa-power-off" style="display: inline-block !important; margin-left: 5px;"></span></a></li>

        </ul>

        <!-- END X-NAVIGATION -->

      </div>

      <div class="page-content collapsed-menu12" id="content">

        <div class="content-frame">

          <!-- START X-NAVIGATION VERTICAL -->



          <!-- END X-NAVIGATION VERTICAL -->                     

          <!-- START BREADCRUMB -->

          <ul class="breadcrumb">

            <li><?php echo anchor('sitepanel/dashbord', 'Home'); ?></li>                    

            <?php

            if ($this->router->fetch_class() == 'category') {

              if($this->router->fetch_method() == 'edit'){

               echo category_breadcrumbs_admin($catresult['category_id']);

               ?><li class="active">Edit</li><?php

              }else{

                echo category_breadcrumbs_admin($parent_id);

                ?><li class="active"><?php echo $heading_title; ?></li><?php

              }

            } else {

              ?>

              <li class="active"><?php echo $heading_title; ?></li>

                <?php

              }

              ?>

          </ul>

          <!-- END BREADCRUMB --> 