<?php $this->load->view('includes/header'); ?> 


<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">
<?php if($this->session->userdata('admin_type')=='1'){?>
  <!-- START WIDGETS -->                    
  <div class="row">
    <div class="col-md-3">
      <div class="widget widget-default widget-item-icon" onclick="location.href = '<?php echo base_url('sitepanel/members'); ?>';">
        <div class="widget-item-left">
          <span class="fa fa-user"></span>
        </div>                             
        <div class="widget-data">
          <div class="widget-int num-count"><?php echo $total_member; ?></div>
          <div class="widget-title">Registred Members</div>
          <!--                                    <div class="widget-subtitle">In your mailbox</div>-->
        </div>      
        <div class="widget-controls">                                
          <a href="#" class="widget-control-right widget-remove" data-toggle="tooltip" data-placement="top" title="Remove Widget"><span class="fa fa-times"></span></a>
        </div>
      </div>           
    </div>
    <div class="col-md-3">
      <div class="widget widget-default widget-item-icon" onclick="location.href = '<?php echo base_url('sitepanel/category') ?>';">
        <div class="widget-item-left">
          <span class="fa fa-sitemap"></span>
        </div>
        <div class="widget-data">
          <div class="widget-int num-count"><?php echo $total_categories; ?></div>
          <div class="widget-title">Total Categories</div>
          <!--                                    <div class="widget-subtitle">On your website</div>-->
        </div>
        <div class="widget-controls">                                
          <a href="#" class="widget-control-right widget-remove" data-toggle="tooltip" data-placement="top" title="Remove Widget"><span class="fa fa-times"></span></a>
        </div>                            
      </div>                            
    </div>
    <div class="col-md-3">
      <div class="widget widget-default widget-item-icon" onclick="location.href = '<?php echo base_url('sitepanel/products') ?>';">
        <div class="widget-item-left">
          <span class="fa fa-cubes"></span>
        </div>
        <div class="widget-data">
          <div class="widget-int num-count"><?php echo $total_product; ?></div>
          <div class="widget-title">Total Products</div>
          <!--                                    <div class="widget-subtitle">On your website</div>-->
        </div>
        <div class="widget-controls">                                
          <a href="#" class="widget-control-right widget-remove" data-toggle="tooltip" data-placement="top" title="Remove Widget"><span class="fa fa-times"></span></a>
        </div>                            
      </div>                            
    </div>
    <div class="col-md-3 pull-right">

      <!-- START WIDGET CLOCK -->
      <div class="widget widget-danger widget-padding-sm">
        <div class="widget-big-int plugin-clock">00:00</div>                            
        <div class="widget-subtitle plugin-date">Loading...</div>
        <div class="widget-controls">                                
          <a href="#" class="widget-control-right widget-remove" data-toggle="tooltip" data-placement="left" title="Remove Widget"><span class="fa fa-times"></span></a>
        </div>                            
        <div class="widget-buttons widget-c3">
          <div class="col">
            <a href="#"><span class="fa fa-clock-o"></span></a>
          </div>
          <div class="col">
            <a href="#"><span class="fa fa-bell"></span></a>
          </div>
          <div class="col">
            <a href="#"><span class="fa fa-calendar"></span></a>
          </div>
        </div>                            
      </div>                        
      <!-- END WIDGET CLOCK -->

    </div>
  </div>
  <!-- END WIDGETS -->   
<?php }else{ 
  if($this->session->userdata('admin_type')=='2'){
    $my_profile_link='sitepanel/kisan_mitra/edit_profile';
  }
  if($this->session->userdata('admin_type')=='3'){
    $my_profile_link='sitepanel/kisan_sahayak/edit_profile';
  }
  if($this->session->userdata('admin_type')=='4'){
    $my_profile_link='sitepanel/kisans/edit_profile';
  }
  ?>
  <!-- START WIDGETS -->                    
  <div class="row">
    <div class="col-md-3">
      <div class="widget widget-default widget-item-icon" onclick="location.href = '<?php echo base_url($my_profile_link); ?>';">
        <div class="widget-item-left">
          <span class="fa fa-user"></span>
        </div>                             
        <div class="widget-data">
          <div class="widget-int num-count"><?php //echo $total_member; ?></div>
          <div class="widget-title">My Profile</div>
          <div class="widget-subtitle">Name : <?php echo $adminInfo['admin_name'];?></div>
          <div class="widget-subtitle">Email : <?php echo $adminInfo['admin_email'];?></div>
          <div class="widget-subtitle">Mobile Number : <?php echo $adminInfo['phone'];?></div>
        </div>      
        <div class="widget-controls">                                
          <a href="#" class="widget-control-right widget-remove" data-toggle="tooltip" data-placement="top" title="Remove Widget"><span class="fa fa-times"></span></a>
        </div>
      </div>           
    </div>
    <div class="col-md-3">
      <div class="widget widget-default widget-item-icon">
        <div class="widget-item-left">
          <span class="fa fa-sitemap"></span>
        </div>
        <div class="widget-data">
          <div class="widget-int num-count"><?php //echo $total_categories; ?></div>
          <div class="widget-title">My Teams</div>
          <?php if($total_kisan_mitras){ ?>
          <div class="widget-subtitle"><a href="<?php echo base_url('sitepanel/kisan_mitra');?>">Block Heads  (<?php echo $total_kisan_mitras;?>)</a> </div>
          <?php } ?>
          <?php if($total_km_sahyogies){ ?>
          <div class="widget-subtitle"><a href="<?php echo base_url('sitepanel/kisan_sahayak');?>">Kisaan Mitras  (<?php echo $total_km_sahyogies;?>)</a> </div>
          <?php } ?>
          <?php if($total_kisans){ ?>
          <div class="widget-subtitle"><a href="<?php echo base_url('sitepanel/kisans');?>">Kisaan Registrations  (<?php echo $total_kisans;?>)</a> </div>
          <?php } ?>
        </div>
        <div class="widget-controls">                                
          <a href="#" class="widget-control-right widget-remove" data-toggle="tooltip" data-placement="top" title="Remove Widget"><span class="fa fa-times"></span></a>
        </div>                            
      </div>                            
    </div>
    <div class="col-md-3">
      <div class="widget widget-default widget-item-icon">
        <div class="widget-item-left">
          <span class="fa fa-cubes"></span>
        </div>
        <div class="widget-data">
          <div class="widget-int num-count"><?php //echo $total_product; ?></div>
          <div class="widget-title"><?php echo $my_districts;?></div>
          <?php if($total_blocks){ ?>
            <div class="widget-subtitle">Blocks : <?php echo $total_blocks;?></div>
            <?php } ?>
            <?php if($total_panchayats){ ?>
            <div class="widget-subtitle">Panchayats : <?php echo $total_panchayats;?></div>
            <?php } ?>
            <?php if($total_villages){ ?>
            <div class="widget-subtitle">Villages : <?php echo $total_villages;?></div>
            <?php } ?>
        </div>
        <div class="widget-controls">                                
          <a href="#" class="widget-control-right widget-remove" data-toggle="tooltip" data-placement="top" title="Remove Widget"><span class="fa fa-times"></span></a>
        </div>                            
      </div>                            
    </div>
    <div class="col-md-3 pull-right">

      <!-- START WIDGET CLOCK -->
      <div class="widget widget-danger widget-padding-sm">
        <div class="widget-big-int plugin-clock">00:00</div>                            
        <div class="widget-subtitle plugin-date">Loading...</div>
        <div class="widget-controls">                                
          <a href="#" class="widget-control-right widget-remove" data-toggle="tooltip" data-placement="left" title="Remove Widget"><span class="fa fa-times"></span></a>
        </div>                            
        <div class="widget-buttons widget-c3">
          <div class="col">
            <a href="#"><span class="fa fa-clock-o"></span></a>
          </div>
          <div class="col">
            <a href="#"><span class="fa fa-bell"></span></a>
          </div>
          <div class="col">
            <a href="#"><span class="fa fa-calendar"></span></a>
          </div>
        </div>                            
      </div>                        
      <!-- END WIDGET CLOCK -->

    </div>
  </div>
  <!-- END WIDGETS -->   
<?php } ?>
  <?php /*<a href="<?php echo base_url('sitepanel/newproducts') ?>" style="margin:10px; background: #0084DA; color:#FFF; border: none; border-radius: 5px;padding:12px;text-decoration:none;">Add more products</a>*/ ?>

  <div class="row" style="margin-top:-70px">

    <div class="col-md-6 col-md-offset-3 text-center">
      <i class="fa fa-dashboard fa-4x"></i>
    </div>
    <div class="col-md-6 col-md-offset-3 text-center">
      <img src="<?php echo theme_url() ?>images/logo.png" class="logo" alt="Dmagine">
    </div>
  </div>



  <!-- START DASHBOARD CHART -->

  <!-- END DASHBOARD CHART -->

</div>
<!-- END PAGE CONTENT WRAPPER -->                                

<?php $this->load->view('includes/footer'); ?>