            
      <style>
        .hed{
        background-color:#028482 !important;
    }
    .list-group-item{
        max-height: 30px;
    }

    #datt{
        vertical-align: middle;
        width: 16px !important;
        height: 16px !important;
        margin-left: 250px !important;
        margin-top: -100px;
        cursor: pointer;
    }
    .tabs-left>li> a:hover {
        background-color:  rgba(38,185,154,0.88) !important;
    }
    .tabs-left>li.active>a, .tabs-left>li.active>a:hover, .tabs-left>li.active>a:focus {
        background-color:  rgba(38,185,154,0.88) !important;
    }
    .al{
        height: 5px;
        width:250px;
    }

</style>

        <div class="right_col" role="main">
          <div class="">
           
            

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                 
                  <div class="x_content">
    
        <div class="row">
            <!--<div class="col-md-4">-->
            <!--     <div class="panel panel-default">-->
            <!--    <div class="panel-heading hed">-->
            <!--        <h3 class="panel-title"><center style="color:white !important; ">-->
            <!--            Attendance Reports</center></h3>-->
            <!--    </div>-->
            <!--    <ul class="list-group" style="">-->
            <!--        <strong><a href="#"  data-toggle="collapse"   class="list-group-item" data-target="#dailyat">Daily Attendance</a></strong>-->
            <!--        <strong><a href="#"  data-toggle="collapse"  class="list-group-item" data-target="#summary">Summary Report</a></strong>-->
            <!--        <strong><a href="#" data-toggle="collapse"  class="list-group-item" data-target="#statwise">Status Wise</a></strong>-->
            <!--        <strong><a href="#" data-toggle="collapse"  class="list-group-item" data-target="#sectionwise">Section Wise</a></strong>-->
            <!--        <strong><a href="#"  data-toggle="collapse"  class="list-group-item" data-target="#singlest">Single Student</a></strong>-->
            <!--        <strong><a href="#" data-toggle="collapse"  class="list-group-item" data-target="#dailyemp">Daily Employee</a></strong>-->
            <!--        <strong> <a href="#" data-toggle="collapse" class="list-group-item"  data-target="#monthempat">Monthly Employee Attendance</a></strong>-->
            <!--        <strong><a href="#" data-toggle="collapse"  class="list-group-item" data-target="#sesswise" >Session Wise</a>-->
            <!--    </ul>-->
            <!--</div>-->
            <!--</div>-->
            

            <div class="col-md-2">
                     </div>

             <div class="row">
            
            
            
                        <div class="col-md-12 col-sm-12 col-xs-12">
                            <div class="x_title">
                                <h2>Attendance Reports</h2>
                                <ul class="nav navbar-right panel_toolbox">
                                </ul>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <div class="col-md-3">

                                    <ul class="nav nav-tabs tabs-left">
                                        <li class="active"><a href="#dailyat" data-toggle="tab">Daily Attendance Report</a>
                                        </li>
                                        <li><a href="#summary" data-toggle="tab">Summary Report</a>
                                        </li>
                                        <li class="navi"><a href="#statwise" data-toggle="tab">Status Wise Report</a>
                                        </li>
                                        <li class="navi"><a href="#sectionwise" data-toggle="tab">Section Wise Report</a>
                                        </li>
                                        
                                        
                                        
                                         <li><a href="#singlest" data-toggle="tab">Single Student Report</a>
                                        </li>
                                        <li class="navi"><a href="#dailyemp" data-toggle="tab">Daily Employee Report</a>
                                        </li>
                                        <li class="navi"><a href="#monthempat" data-toggle="tab">Monthly Employee Attendance</a>
                                        </li>

                                        <li class="navi"><a href="#sesswise" data-toggle="tab">Session Wise Report</a>
                                        </li>


                                    </ul>
                                </div>
                                <div class="col-md-2"></div>
                                <div class="col-md-6">

                                    <div class="tab-content">



                                        <div class="tab-pane active" id="dailyat">
             <form class="form-horizontal form-label-left" action="<?php echo $base_url; ?>Report/fetch_studentatt_status" method="post" id="dailyat1">
                 <div class="col-md-12">
                 <div class="col-md-2"></div>
                  <div class="col-md-6" style="display:inline-block;margin-left: 70px">
                         <div class="alert alert-success align-middle al"><center style="margin-top: -10px"><b>Daily Attendance Report
                                                                </b></center></div>
                                                    </div>
                 
                 <div class="col-md-1"></div>
                 </div>

                 <?php
                 if($this->user_model->is_super())
                 {
                     $com= $this->db->select("name,id")->from("branch")->get()->result_array();
                     ?>
                     <div class="item form-group">
                         <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Branch:<span class="required"></span>
                         </label>
                         <div class="col-md-8">
                             <select class="form-control select2" id="branch1"  name="branch" required style="width:240px !important;">
                                 <option value=''>Select Branch</option>

                                 <?php
                                 foreach ($com as $value) {
                                     ?>
                                     <option value="<?php echo $value['id']; ?>"><?php echo $value['name']?></option>
                                 <?php } ?>
                             </select>

                         </div>
                     </div>

                 <?php }else{$branch=$this->user_model->getbranch();?>

                     <div class="item form-group">
                         <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Branch:<span class="required">*</span></label>
                         <div class="col-md-6 col-sm-6 col-xs-12">
                             <input id="branch" name="branch" type="hidden" value="<?= $branch ?>">
                             <input class="form-control" id="branch_name" name="branch_name" type="input" readonly value="<?= $this->report_model->getBranch()[0]['name']; ?>">
                         </div>
                     </div>
                 <?php  } ?>

                 <div class="item form-group">
                     <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Class:<span class="required"></span>
                     </label>
                     <div class="col-md-8">
                         <select class="form-control select2" name="class" id="class"  style="width:240px !important;">
                             <option value=''>Select Class</option>
                         </select>

                     </div>
                 </div>


                 <div class="item form-group">
                     <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Section:<span class="required"></span>
                     </label>
                     <div class="col-md-8">
                         <select class="form-control select2" name="section" id="section"  style="width:240px !important;">
                             <option value=''>Select Section</option>
                         </select>

                     </div>
                 </div>

                 <div class="item form-group">
                     <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Status:<span class="required"></span>
                     </label>
                     <div class="col-md-8">
                         <select class="form-control" name="status" id="status"  style="width:240px !important;">
                             <option value="">Select Status</option>
                             <option value="1">P</option>
                             <option value="2">A</option>
                             <option value="3">L</option>
                             <option value="4">T</option>
                         </select>
                     </div>
                 </div>

                 <div class="item form-group" id="branch_div">
                     <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Date:<span class="text-danger">*</span>
                     </label>
                     <div class="col-md-6 col-sm-6 col-xs-12">
                         <input type="input" class="form-control date datepicker" id="name" name="month" pattern="([0-9]{2}|[0-9]{1})[-]([0-9]{2}|[0-9]{1})[-][0-9]{4}" required required-temp="true" placeholder="dd-mm-yyyy"
                                style="width:100%;">
                     </div>
                 </div>
                <!-- end-row -->
                                                <div class="form-group">
                                                    <div class="col-md-6" style="display:inline-block;margin-left: 180px">
                                                        <button id="send22" type="submit" class="btn btn-success pull-right">Get Report</button>
                                                    </div>
                                                </div>
             </form>
             
                                        </div>

                                        <div class="tab-pane" id="summary">
             <form class="form-horizontal form-label-left" action="<?php echo $base_url; ?>Report/att_status_overall" method="post" id="summary1">

                      

                 <div class="col-md-12">
                 <div class="col-md-2"></div>
                 
                 <div class="col-md-6" style="display:inline-block;margin-left: 70px">
                         <div class="alert alert-success align-middle al"><center style="margin-top: -10px"><b>Attendance Summary
                                                                </b></center></div>
                                                    </div>
                 
                 
                 <div class="col-md-1"></div>
                 </div>


                 <?php
                 if($this->user_model->is_super())
                 {
                 $com= $this->db->select("name,id")->from("branch")->get()->result_array();
                 ?>
                 <div class="item form-group">
                     <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Branch:<span class="required"></span>
                     </label>
                     <div class="col-md-8">
                         <select class="form-control select2" id="branch"  name="branch" required style="width:240px !important;">
                             <option value=''>Select Branch</option>
                             <?php

                             foreach ($com as $value) {
                                 ?>
                                 <option value="<?php echo $value['id']; ?>"><?php echo $value['name']?></option>
                             <?php } ?>

                         </select>

                     </div>
                 </div>


                 <?php }else{$branch=$this->user_model->getbranch();?>

                     <div class="item form-group">
                         <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Branch:<span class="required">*</span></label>
                         <div class="col-md-6 col-sm-6 col-xs-12">
                             <input id="branch" name="branch" type="hidden" value="<?= $branch ?>">
                             <input class="form-control" id="branch_name" name="branch_name" type="input" readonly value="<?= $this->report_model->getBranch()[0]['name']; ?>">
                         </div>
                     </div>
                 <?php  } ?>


                 <div class="item form-group" id="branch_div">
                     <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Date:<span class="text-danger">*</span>
                     </label>
                     <div class="col-md-6 col-sm-6 col-xs-12">
                                <input type="input" class="form-control date1 datepicker" required  name="date" pattern="([0-9]{2}|[0-9]{1})[-]([0-9]{2}|[0-9]{1})[-][0-9]{4}" required-temp="true" placeholder="dd-mm-yyyy"
                          style="width:100%; ">
                     </div>
                 </div>
   <!-- end-row -->
                         <div class="form-group">
                                                    <div class="col-md-6" style="display:inline-block;margin-left: 180px">
                                                        <button id="send1" type="submit" class="btn btn-success pull-right">Get Report</button>
                                                    </div>
                                                </div>
                    </form>
          
                                        </div>

                                        <div class="tab-pane" id="statwise">
                     <form class="form-horizontal form-label-left" action="<?php echo $base_url; ?>Report/fetch_att_status" method="post" id="statwise1">
                         <div class="col-md-12">
                             <div class="col-md-2"></div>
                             
                               <div class="col-md-6" style="display:inline-block;margin-left: 70px">
                         <div class="alert alert-success align-middle al"><center style="margin-top: -10px"><b>Status Wise Attendance Report
                                                                </b></center></div>
                                                    </div>
                 
                             
                             
                             
                             
                             <div class="col-md-1"></div>
                         </div>
                         <?php
                         if(!$this->user_model->is_super()){
                             ?>
                             <input type="hidden" value="<?php echo $branch; ?>" id="branch_idatt"  /><?php
                         }else{?>
                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Branch:<span class="required"></span>
                                 </label>
                                 <div class="col-md-8">
                                     <select class="form-control select2" id="branchatt"  name="branch" required style="width:240px !important;">
                                         <option value=''>Select Branch</option>
                                         <?php
                                         foreach ($branch as $key => $value) {
                                             ?>
                                             <option value="<?php echo $value['id']; ?>"><?php echo $value['name']?></option>

                                         <?php } ?>
                                     </select>

                                 </div>
                             </div>
                         <?php } ?>

                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Class:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2" name="branch" id="classatt"  style="width:240px !important;">
                                     <option value=''>Select Class</option>
                                 </select>

                             </div>
                         </div>


                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Section:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2" name="section" id="sectionatt"  style="width:240px !important;">
                                     <option value=''>Select Section</option>
                                 </select>

                             </div>
                         </div>

                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Status:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control" name="status" id="statusatt"  style="width:240px !important;">
                                     <option value="">Select Status</option>
                                     <option value="1">P</option>
                                     <option value="2">A</option>
                                     <option value="3">L</option>
                                     <option value="4">T</option>
                                 </select>
                             </div>
                         </div>

                         <div class="item form-group" id="branch_div">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">From:<span class="text-danger">*</span>
                             </label>
                             <div class="col-md-6 col-sm-6 col-xs-12">
                                
                         
                           <input type="input" class="form-control date1 datepicker" required  name="datefrom" pattern="([0-9]{2}|[0-9]{1})[-]([0-9]{2}|[0-9]{1})[-][0-9]{4}" required-temp="true" placeholder="dd-mm-yyyy"
                          style="width:100%; ">

                             </div>
                         </div>

                         <div class="item form-group" id="branch_div">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">To:<span class="text-danger">*</span>
                             </label>
                             <div class="col-md-6 col-sm-6 col-xs-12">
                                
                                      
                                      <input type="input" class="form-control date1 datepicker" required  id="name1" name="dateto" pattern="([0-9]{2}|[0-9]{1})[-]([0-9]{2}|[0-9]{1})[-][0-9]{4}" required-temp="true" placeholder="dd-mm-yyyy"
                          style="width:100%; ">  
                                        
                             </div>
                         </div>
                         <!-- end-row -->
                          <div class="form-group">
                                                    <div class="col-md-6" style="display:inline-block;margin-left: 180px">
                                                        <button id="send1" type="submit" class="btn btn-success pull-right">Get Report</button>
                                                    </div>
                                                </div>
                     </form>
                

                                        </div>

                                        <div class="tab-pane" id="sectionwise">

                     <form class="form-horizontal form-label-left" action="<?php echo $base_url; ?>Report/fetch_studentatt_sectionannual" method="post" id="sectionwise1">
                         <div class="col-md-12">
                             <div class="col-md-2"></div>
                              <div class="col-md-6" style="display:inline-block;margin-left: 70px">
                         <div class="alert alert-success align-middle al"><center style="margin-top: -10px"><b>Student Attendance
                                                                </b></center></div>
                                                    </div>
                             
                             <div class="col-md-1"></div>
                         </div>

                         <?php
                         if($this->user_model->is_super())
                         {
                             $com= $this->db->select("name,id")->from("branch")->get()->result_array();
                             ?>
                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Branch:<span class="required"></span>
                                 </label>
                                 <div class="col-md-8">
                                     <select class="form-control" id="branchsect"  name="branch" required style="width:240px !important;">
                                         <option value=''>Select Branch</option>
                                         <?php
                                         foreach ($com as $value) {
                                             ?>
                                             <option value="<?php echo $value['id']; ?>"><?php echo $value['name']?></option>
                                         <?php } ?>
                                     </select>

                                 </div>
                             </div>


                         <?php }else{$branch=$this->user_model->getbranch();?>

                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Branch:<span class="required">*</span></label>
                                 <div class="col-md-6 col-sm-6 col-xs-12">
                                     <input id="branchsect" name="branch" type="hidden" value="<?= $branch ?>">
                                     <input class="form-control" id="branch_namesect" name="branch_name" type="input" readonly value="<?= $this->report_model->getBranch()[0]['name']; ?>">
                                 </div>
                             </div>
                         <?php  } ?>

                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Class:<span class="required">*</span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control" name="class" id="classsect" required style="width:240px !important;">
                                     <option value=''>Select Class</option>
                                 </select>

                             </div>
                         </div>


                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Section:<span class="required">*</span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2" name="section" id="sectionsect" required style="width:240px !important;">
                                     <option value=''>Select Section</option>
                                 </select>

                             </div>
                         </div>

                         <!-- end-row -->
                         <div class="form-group">
                                                    <div class="col-md-6" style="display:inline-block;margin-left: 180px">
                                                        <button id="send22" type="submit" class="btn btn-success pull-right">Get Report</button>
                                                    </div>
                                                </div>
                     </form>
                 

                                        </div>
                                        
                                          <div class="tab-pane" id="singlest">
                     <form class="form-horizontal form-label-left" action="<?php echo $base_url; ?>Report/fetch_student_roll" method="post" id="singlest1">
                         <div class="col-md-12">
                             <div class="col-md-2"></div>
                             <div class="col-md-6" style="display:inline-block;margin-left: 70px">
                         <div class="alert alert-success align-middle al"><center style="margin-top: -10px"><b>Single Student Monthly
                                                                </b></center></div>
                                                    </div>
                             
                             
                             <div class="col-md-1"></div>
                         </div>

                         <?php
                         if($this->user_model->is_super())
                         {
                             $com= $this->db->select("name,id")->from("branch")->get()->result_array();
                             ?>
                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Branch:<span class="required"></span>
                                 </label>
                                 <div class="col-md-8">
                                     <select class="form-control select2" id="branchstd"  name="branch" required style="width:240px !important;">
                                         <option value=''>Select Branch</option>

                                         <?php
                                         foreach ($com as $value) {
                                             ?>
                                             <option value="<?php echo $value['id']; ?>"><?php echo $value['name']?></option>
                                         <?php } ?>
                                     </select>

                                 </div>
                             </div>


                         <?php }else{$branch=$this->user_model->getbranch();?>

                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Branch:<span class="required">*</span></label>
                                 <div class="col-md-6 col-sm-6 col-xs-12">
                                     <input id="branchstd" name="branch" type="hidden" value="<?= $branch ?>">
                                     <input class="form-control" id="branch_name" name="branch_name" type="input" readonly value="<?= $this->report_model->getBranch()[0]['name']; ?>">
                                 </div>
                             </div>
                         <?php  } ?>

                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Class:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2" name="class" id="classstd"  style="width:240px !important;">
                                     <option value=''>Select Class</option>
                                 </select>

                             </div>
                         </div>


                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Section:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2" name="section" id="sectionstd"  style="width:240px !important;">
                                     <option value=''>Select Section</option>
                                 </select>

                             </div>
                         </div>


                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Student:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control col-md-7 col-xs-12"  name="students" id="studentstd" required style="width:240px !important;">
                                 </select>

                             </div>
                         </div>

                         <div class="item form-group" id="branch_div">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Month:<span class="text-danger">*</span>
                             </label>
                             <div class="col-md-8">
                                 <input class="form-control"  type="month" name="bdaymonth"   required style="width:240px !important;">
                             </div>
                         </div>

                         <!-- end-row -->
                          <div class="form-group">
                                                    <div class="col-md-6" style="display:inline-block;margin-left: 180px">
                                                        <button id="send22" type="submit" class="btn btn-success pull-right">Get Report</button>
                                                    </div>
                                                </div>
                     </form>
                
                  

                                        </div>
                                        
                                         <div class="tab-pane" id="dailyemp">
                      <form class="form-horizontal form-label-left" action="<?php echo $base_url; ?>Report/fetch_teacher_daily" method="post" id="dailyemp1">
                         <div class="col-md-12">
                             <div class="col-md-2"></div>
                              <div class="col-md-6" style="display:inline-block;margin-left: 70px">
                         <div class="alert alert-success align-middle al"><center style="margin-top: -10px"><b>Daily Employee Attendance
                                                                </b></center></div>
                                                    </div>
                             
                             
                             <div class="col-md-1"></div>
                         </div>

                         <?php
                         if($this->user_model->is_super())
                         {
                             $com= $this->db->select("name,id")->from("branch")->get()->result_array();
                             ?>
                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Branch:<span class="required"></span>
                                 </label>
                                 <div class="col-md-8">
                                     <select class="form-control" id="branchsect"  name="branch" required style="width:240px !important;">
                                         <option value=''>Select Branch</option>
                                         <?php
                                         foreach ($com as $value) {
                                             ?>
                                             <option value="<?php echo $value['id']; ?>"><?php echo $value['name']?></option>
                                         <?php } ?>
                                     </select>

                                 </div>
                             </div>


                         <?php }else{$branch=$this->user_model->getbranch();?>

                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Branch:<span class="required">*</span></label>
                                 <div class="col-md-6 col-sm-6 col-xs-12">
                                     <input id="branchsect" name="branch" type="hidden" value="<?= $branch ?>">
                                     <input class="form-control" id="branch_namesect" name="branch_name" type="input" readonly value="<?= $this->report_model->getBranch()[0]['name']; ?>">
                                 </div>
                             </div>
                         <?php  } ?>

                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Date:<span class="required">*</span>
                             </label>
                             <div class="col-md-6 col-sm-6 col-xs-12">
                                
                                         <input type="input" class="form-control date1 datepicker" required  name="date" pattern="([0-9]{2}|[0-9]{1})[-]([0-9]{2}|[0-9]{1})[-][0-9]{4}" required-temp="true" placeholder="dd-mm-yyyy"
                          style="width:100%; ">


                             </div>
                         </div>


                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Type:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select name="type" id="type" class="form-control col-md-7 col-xs-12" style="width:75%;">
                                     <option>Select Type</option>
                                     <option value="teacher">Teacher Staff</option>
                                     <option value="staff">Non Teaching Staff</option>
                                 </select>
                             </div>
                         </div>


                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Status:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control" name="status" id="status" style="width:75%;">
                                     <option value="">Select Status</option>
                                     <?php
                                      $branch=$this->user_model->getbranch();
                                      $leaves=$this->db->select('*')
                                                       ->from('leave_types')
                                                       ->where('branch',$branch)
                                                       ->order_by('id',"ASC")
                                                       ->get()->result_array();
                                        if(!empty($leaves))
                                        {
                                            foreach($leaves as $row)
                                            {?>
                                           <option value="<?php echo $row['id'];?>"><?php echo $row['name'];?></option>     
                                        <?php    } } ?>
                                 </select>
                             </div>
                         </div>

                         <!-- end-row -->
                         <div class="form-group">
                                                    <div class="col-md-6" style="display:inline-block;margin-left: 180px">
                                                        <button id="send22" type="submit" class="btn btn-success pull-right">Get Report</button>
                                                    </div>
                                                </div>
                     </form>
                
                                        </div>
                                        
                                         <div class="tab-pane" id="monthempat">
                      <form class="form-horizontal form-label-left" action="<?php echo $base_url; ?>Report/fetch_teacher_month" method="post" id="monthempat1">
                         <div class="col-md-12">
                             <div class="col-md-2"></div>
                             <div class="col-md-6" style="display:inline-block;margin-left: 70px">
                         <div class="alert alert-success align-middle al"><center style="margin-top: -10px"><b>Monthly Attendance Report
                                                                </b></center></div>
                                                    </div>
                             
                             
                             <div class="col-md-1"></div>
                         </div>

                         <?php
                         if($this->user_model->is_super())
                         {
                             $com= $this->db->select("name,id")->from("branch")->get()->result_array();
                             ?>
                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Branch:<span class="required"></span>
                                 </label>
                                 <div class="col-md-8">
                                     <select class="form-control select2" id="branchstd"  name="branch" required style="width:240px !important;">
                                         <option value=''>Select Branch</option>

                                         <?php
                                         foreach ($com as $value) {
                                             ?>
                                             <option value="<?php echo $value['id']; ?>"><?php echo $value['name']?></option>
                                         <?php } ?>
                                     </select>

                                 </div>
                             </div>


                         <?php }else{$branch=$this->user_model->getbranch();?>

                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Branch:<span class="required">*</span></label>
                                 <div class="col-md-6 col-sm-6 col-xs-12">
                                     <input id="branchstd" name="branch" type="hidden" value="<?= $branch ?>">
                                     <input class="form-control" id="branch_name" name="branch_name" type="input" readonly value="<?= $this->report_model->getBranch()[0]['name']; ?>">
                                 </div>
                             </div>
                         <?php  } ?>

                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Type:<span class="required">*</span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2" name="type" id="typemonthly" required style="width:240px !important;">
                               
                                     <option value="teacher">Teaching Staff</option>
                                     <option value="staff">Non Teaching Staff</option>
                                 </select>

                             </div>
                         </div>


                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Employee:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2" name="teacher" id="teachermonthly" style="width:240px !important;">

                                 </select>

                             </div>
                         </div>


                         <div class="item form-group" id="branch_div">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Month:<span class="text-danger">*</span>
                             </label>
                             <div class="col-md-8">
                                 <input class="form-control"  type="month" name="bdaymonth"   required style="width:240px !important;">
                             </div>
                         </div>

                         <!-- end-row -->
                         <div class="form-group">
                                                    <div class="col-md-6" style="display:inline-block;margin-left: 180px">
                                                        <button id="send228" type="submit" class="btn btn-success pull-right">Get Report</button>
                                                    </div>
                                                </div>
                     </form>
                 </div>
                                         <div class="tab-pane" id="sesswise">
                     <form class="form-horizontal form-label-left" action="<?php echo $base_url; ?>Report/fetch_teacher_report" method="post" id="sesswise1">
                         <div class="col-md-12">
                             <div class="col-md-2"></div>
                              <div class="col-md-6" style="display:inline-block;margin-left: 70px">
                         <div class="alert alert-success align-middle al"><center style="margin-top: -10px"><b>Yearly Attendance Report
                                                                </b></center></div>
                                                    </div>
                             
                             <div class="col-md-1"></div>
                         </div>

                         <?php
                         if($this->user_model->is_super())
                         {
                             $com= $this->db->select("name,id")->from("branch")->get()->result_array();
                             ?>
                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Branch:<span class="required"></span>
                                 </label>
                                 <div class="col-md-8">
                                     <select class="form-control select2" id="branchstd"  name="branch" required style="width:240px !important;">
                                         <option value=''>Select Branch</option>

                                         <?php
                                         foreach ($com as $value) {
                                             ?>
                                             <option value="<?php echo $value['id']; ?>"><?php echo $value['name']?></option>
                                         <?php } ?>
                                     </select>

                                 </div>
                             </div>


                         <?php }else{$branch=$this->user_model->getbranch();?>

                             <div class="item form-group">
                                 <label class="control-label col-md-4 col-sm-3 col-xs-12" for="name">Branch:<span class="required">*</span></label>
                                 <div class="col-md-6 col-sm-6 col-xs-12">
                                     <input id="branchstd" name="branch" type="hidden" value="<?= $branch ?>">
                                     <input class="form-control" id="branch_name" name="branch_name" type="input" readonly value="<?= $this->report_model->getBranch()[0]['name']; ?>">
                                 </div>
                             </div>
                         <?php  } ?>

                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Type:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2" name="type" id="typeyearly" required style="width:240px !important;">
                                     <option>Select Type</option>
                                     <option value="teacher">Teaching Staff</option>
                                     <option value="staff">Non Teaching Staff</option>
                                 </select>

                             </div>
                         </div>


                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Employee:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2 tea" name="teacher" id="teacheryearly" required style="width:240px !important;">

                                 </select>

                             </div>
                         </div>

                         <div class="item form-group">
                             <label class="control-label col-md-4 col-sm-3 col-xs-12"   for="name">Session:<span class="required"></span>
                             </label>
                             <div class="col-md-8">
                                 <select class="form-control select2 sessionsss" name="session" id="sessionyearly" required style="width:240px !important;">
                                     <option value=''>Select Session</option>
                                     <?php foreach($session as $k=>$v){ ?>
                                         <option value='<?php echo $v['id']; ?>'><?php echo $v['name']; ?></option>
                                     <?php } ?>
                                 </select>

                             </div>
                         </div>




                         <!-- end-row -->
                         <div class="form-group">
                                                    <div class="col-md-6" style="display:inline-block;margin-left: 180px">
                                                        <button id="send221" type="submit" class="btn btn-success pull-right">Get Report</button>
                                                    </div>
                                                </div>
                     </form>
                 </div>
                
                   
                                       

                                    </div>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                        </div>
            
            
        </div>
            
        </div>

                  </div>
                </div>
              </div>
            </div>
          </div>
          
       
        <!-- /page content -->
       <!-- jQuery -->
    <script src="<?php echo base_url(); ?>assets/vendors/jquery/dist/jquery.min.js"></script>
    <script src="<?php echo base_url()?>assets/select/js/select2.min.js"></script>
    <!-- Custom JS -->
    <script src="<?php echo base_url(); ?>assets/js/main.js"></script>
    <!-- Bootstrap -->
    <script src="<?php echo base_url(); ?>assets/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="<?php echo base_url(); ?>assets/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="<?php echo base_url(); ?>assets/vendors/nprogress/nprogress.js"></script>
    <!-- Chart.js -->
    <script src="<?php echo base_url(); ?>assets/vendors/Chart.js/dist/Chart.min.js"></script>
    <!-- gauge.js -->
    <script src="<?php echo base_url(); ?>assets/vendors/gauge.js/dist/gauge.min.js"></script>
    <!-- bootstrap-progressbar -->
    <script src="<?php echo base_url(); ?>assets/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
    <!-- iCheck -->
    <script src="<?php echo base_url(); ?>assets/vendors/iCheck/icheck.min.js"></script>
    <!-- Skycons -->
    <script src="<?php echo base_url(); ?>assets/vendors/skycons/skycons.js"></script>
    <!-- Flot -->
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.pie.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.time.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.stack.js"></script>
    <script src="<?php echo base_url(); ?>assets/vendors/Flot/jquery.flot.resize.js"></script>
    <!-- Flot plugins -->
    <script src="<?php echo base_url(); ?>assets/js/flot/jquery.flot.orderBars.js"></script>
    <!--<script src="<?php echo base_url(); ?>assets/js/flot/date.js"></script>-->
    <script src="<?php echo base_url(); ?>assets/js/flot/jquery.flot.spline.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/flot/curvedLines.js"></script>
    <!-- jVectorMap -->
    <script src="<?php echo base_url(); ?>assets/js/maps/jquery-jvectormap-2.0.3.min.js"></script>
    <!-- bootstrap-daterangepicker -->
    <script src="<?php echo base_url(); ?>assets/js/moment/moment.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/bootstrap-datepicker.js"></script>
     <!-- bootstrap-daterangepicker -->
    <script src="<?php echo base_url(); ?>assets/js/moment/moment.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/js/datepicker/daterangepicker.js"></script>
    <!-- Jquery UI-daterangepicker -->
    <script src="<?php echo base_url(); ?>assets/vendors/datepicker/jquery-ui.min.js"></script>

        <script>
            $(document).ready(function() {
                $('#dailyat1').submit(function() {
                    window.open('<?php echo base_url()?>Report/fetch_studentatt_status', 'formpopup', 'width=800,height=1000,resizeable,scrollbars');
                    this.target = 'formpopup';
                });
                $('#summary1').submit(function() {
                    window.open('<?php echo base_url()?>Reports/att_status_overall', 'formpopup', 'width=800,height=1000,resizeable,scrollbars');
                    this.target = 'formpopup';
                });
                $('#statwise1').submit(function() {
                    window.open('<?php echo base_url()?>Report/fetch_att_status', 'formpopup', 'width=800,height=1000,resizeable,scrollbars');
                    this.target = 'formpopup';
                });
                
                 $('#sectionwise1').submit(function() {
                    window.open('<?php echo base_url()?>Report/fetch_studentatt_sectionannual', 'formpopup', 'width=800,height=1000,resizeable,scrollbars');
                    this.target = 'formpopup';
                });

                $('#singlest1').submit(function() {
                    window.open('<?php echo base_url()?>Report/fetch_student_roll', 'formpopup', 'width=800,height=1000,resizeable,scrollbars');
                    this.target = 'formpopup';
                });

                $('#dailyemp1').submit(function() {
                    window.open('<?php echo base_url()?>Report/fetch_teacher_daily', 'formpopup', 'width=800,height=1000,resizeable,scrollbars');
                    this.target = 'formpopup';
                });

                $('#monthempat1').submit(function() {
                    window.open('<?php echo base_url()?>Report/fetch_teacher_month', 'formpopup', 'width=800,height=1000,resizeable,scrollbars');
                    this.target = 'formpopup';
                });

                $('#sesswise1').submit(function() {
                    window.open('<?php echo base_url()?>Report/fetch_teacher_report', 'formpopup', 'width=800,height=1000,resizeable,scrollbars');
                    this.target = 'formpopup';
                });




                $('#allroles').click(function() {
                    window.open('<?php echo base_url()?>Report/all_roles', 'formpopup', 'width=800,height=1000,resizeable,scrollbars');
                    this.target = 'formpopup';
                });

                
            });
        </script>
        <!--<script>-->

        <!--    $( function() {-->
        <!--        $( '.date' ).datepicker({ dateFormat: 'd-m-yy' }).val();-->
        <!--    } );-->

        <!--    function date(selector) {-->
        <!--        var dNow = new Date();-->
        <!--        var localdate = dNow.getFullYear()+'/' +(dNow.getMonth() + 1)+'/' + dNow.getDate();-->

        <!--    };-->
        <!--</script>-->
<script>
        
     $( function() {
        $( '.date' ).datepicker({ dateFormat: 'd-m-yy' }).val();

      } );
    
        function date(selector) {
            var dNow = new Date();
            var localdate = dNow.getFullYear()+'/' +(dNow.getMonth() + 1)+'/' + dNow.getDate();
           
        };
    </script>

        <script>

            $( function() {
                $( '.date1' ).datepicker({ dateFormat: 'd-m-yy' }).val();

            } );

            function date1(selector) {
                var dNow = new Date();
                var localdate = dNow.getFullYear()+'/' +(dNow.getMonth() + 1)+'/' + dNow.getDate();

            };
        </script>
       
        <script>
            $(".abc").on("keypress", function (event) {

                var englishAlphabetAndWhiteSpace = /[A-Za-z ]/g;


                var key = String.fromCharCode(event.which);


                if (event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39 || englishAlphabetAndWhiteSpace.test(key)) {
                    return true;
                }
                return false;
            });

            $('.abc').on("paste", function (e) {
                e.preventDefault();
            });
            $(".abc1").on("keypress", function (event) {

                var englishAlphabetAndWhiteSpace = /[A-Za-z0-9|-]/g;


                var key = String.fromCharCode(event.which);


                if (event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 32 || event.keyCode == 37 || event.keyCode == 39 || englishAlphabetAndWhiteSpace.test(key)) {
                    return true;
                }
                return false;
            }); $('.abc1').on("paste", function (e) {
                e.preventDefault();
            });
            $(document).bind("contextmenu", function (e) {
                e.preventDefault();
            });
        </script>
        <script>

            $(document).ready(function(){
                <?php if($this->user_model->is_super()){ ?>
                $(document).on("change","#branch",function(){
                    var value = $(this).val();
                    $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                        var pre = '<option value="">Select class</opiton>';
                        $("#class").html(pre+d);
                    });
                });
                <?php }else{ ?>
                var value = $('#branch').val();
                $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                    var pre = '<option value="">Select class</opiton>';
                    $("#class").html(pre+d);
                });
                <?php } ?>

            });
            $(document).on("change","#class",function(){
                var val = $(this).val();
                $.get("<?php echo base_url(); ?>load/section/role/"+val,{},function(ret){
                    var d = '<option value="">Select Section</option>';
                    $("#section").html(d+ret);
                });
            });





        </script>
        <script src="<?php echo base_url()?>assets/select/js/select2.min.js"></script>
        <script>

            <?php if($this->user_model->is_super()){ ?>
            $('#branch').select2({
                //selectOnClose: true,
                placeholder: "Select a Branch",
                allowClear:true
            });
            <?php } ?>
            $('#class').select2({
                //selectOnClose: true,
                placeholder: "Select a Class",
                allowClear:true
            });

            $('#classatt').select2({
                //selectOnClose: true,
                placeholder: "Select a Class",
                allowClear:true
            });
            $('#section').select2({
                //selectOnClose: true,
                placeholder: "Select a Section",
                allowClear:true
            });
            $('#sectionatt').select2({
                //selectOnClose: true,
                placeholder: "Select a Section",
                allowClear:true
            });

            $('#statusatt').select2({
                //selectOnClose: true,
                placeholder: "Select a Status",
                allowClear:true
            });
            $('#student').select2({
                //selectOnClose: true,
                placeholder: "Select a Section",
                allowClear:true
            });
            $('#status').select2({
                //selectOnClose: true,
                placeholder: "Select a Status",
                allowClear:true
            });
            $('#classsect').select2({
                //selectOnClose: true,
                placeholder: "Select a Class",
                allowClear:true
            });
            $('#sectionsect').select2({
                //selectOnClose: true,
                placeholder: "Select a Section",
                allowClear:true
            });
            
             $('.sessionsss').select2({
                //selectOnClose: true,
                placeholder: "Select a Section",
                allowClear:true
            });
            
             ('.tea').select2({
                //selectOnClose: true,
                placeholder: "Select a Employee",
                allowClear:true
            });
            
        </script>
<!---Status Wise Attendance Report-->
        <script>
            $(document).ready(function(){
                var value=$('#branch_idatt').val();
                $('#send').hide();
                $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                    var pre = '<option value="">Select Class</opiton>';
                    $("#classatt").html(pre+d);
                });
            });

            $('#branchatt').change(function(){

                var value=$(this).val();

                $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                    var pre = '<option value="">Select Class</opiton>';
                    $("#classatt").html(pre+d);
                });
            });
            $('#classatt').change(function(){

                var value=$(this).val();

                $.get("<?php echo base_url(); ?>load/section/role/"+value,{},function(d){
                    var pre = '<option value="">Select Section</opiton>';
                    $("#sectionatt").html(pre+d);
                });
            });
            $('#classatt').change(function(){
                var val=$(this).val();

                $.ajax({
                    url: '<?php echo base_url(); ?>load/studentagainstclass/'+val,
                    data: {},
                    success: function (result) {
                        if(result!=""){

                            $('#send').show();
                            $("tbody.center").html(result);
                        }else{
                            $("tbody.center").html(result);}
                    }
                });
            });
            $('#sectionatt').change(function(){
                var val=$('#classatt').val();
                var se=$(this).val();
                $.ajax({
                    url: '<?php echo base_url(); ?>load/studentagainstsection/'+val+'/'+se,
                    data: {},
                    success: function (result) {

                        $("tbody.center").html(result);
                    }
                });
            });


        </script>
        <!---Section Wise Attendance Report-->
        <script>

            $(document).ready(function(){
                <?php if($this->user_model->is_super()){ ?>
                $(document).on("change","#branchsect",function(){
                    var value = $(this).val();
                    $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                        var pre = '<option value="">Select class</opiton>';
                        $("#classsect").html(pre+d);
                    });
                });
                <?php }else{ ?>
                var value = $('#branchsect').val();
                $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                    var pre = '<option value="">Select class</opiton>';
                    $("#classsect").html(pre+d);
                });
                <?php } ?>

            });
            $(document).on("change","#classsect",function(){
                var val = $(this).val();
                $.get("<?php echo base_url(); ?>load/section/role/"+val,{},function(ret){
                    var d = '<option value="">Select Section</option>';
                    $("#sectionsect").html(d+ret);
                });
            });
        </script>


        <!---Single student Attendance Report-->
        <script>

            <?php if($this->user_model->is_super()){ ?>
            $('#branchstd').select2({
                //selectOnClose: true,
                placeholder: "Select a Branch",
                allowClear:true
            });
            <?php } ?>
            $('#classstd').select2({
                //selectOnClose: true,
                placeholder: "Select a Class",
                allowClear:true
            });
            $('#sectionstd').select2({
                //selectOnClose: true,
                placeholder: "Select a Section",
                allowClear:true
            });
            $('#studentstd').select2({
                //selectOnClose: true,
                placeholder: "Select a Section",
                allowClear:true
            });


        </script>
        <script>
            $(document).ready(function(){
                <?php if($this->user_model->is_super()){ ?>
                $(document).on("change","#branchstd",function(){
                    var value = $(this).val();
                    $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                        var pre = '<option value="">Select class</opiton>';
                        $("#classstd").html(pre+d);
                    });
                });
                <?php }else{ ?>
                var value = $('#branchstd').val();
                $.get("<?php echo base_url(); ?>load/classs/role/"+value,{},function(d){
                    var pre = '<option value="">Select class</opiton>';
                    $("#classstd").html(pre+d);
                });
                <?php } ?>

            });
            $('#classstd').change(function(){

                var value=$(this).val();

                $.get("<?php echo base_url(); ?>load/section/role/"+value,{},function(d){
                    var pre = '<option value="">Select Section</opiton>';
                    $("#sectionstd").html(pre+d);
                });
            });
            $('#classstd').change(function(){
                var val=$(this).val();

                $.ajax({
                    url: '<?php echo base_url(); ?>load/studentagainstclass/'+val,
                    data: {},
                    success: function (result) {
                        if(result!=""){

                            $('#send').show();
                            $("tbody.center").html(result);
                        }else{
                            $("tbody.center").html(result);}
                    }
                });
            });
            $('#sectionstd').change(function(){
                var val=$('#classstd').val();
                var se=$(this).val();
                $.ajax({
                    url: '<?php echo base_url(); ?>load/studentagainstsection/'+val+'/'+se,
                    data: {},
                    success: function (result) {
                        $("tbody.center").html(result);
                    }
                });
            });
        </script>
        <script>

            $(document).on("change","#sectionstd",function(){
                var val = $(this).val();
                var clas=$('#classstd').val();
                $.get("<?php echo base_url(); ?>load/student/"+clas+"/"+val,{},function(ret){
                    $("#studentstd").html(ret);
                    jq('#studentstd').multiselect('reload');
                });
            });

            $(document).ready(function() {
                $("#studentstd").select2({

                });
            });

        </script>

        <!---Monthly Attendance Report-->
        <script> $('#typemonthly').change(function(){
                var ref=$(this).val();
                $.ajax({
                    url:'<?php echo base_url(); ?>/load/getemp1/'+ref,
                    data:{}, success:function(result)
                    { var pre = ' <option value="">Select Employee</option>';
                        $("#teachermonthly").html(pre+result);
                    } });
            });
        </script>

        <!---sessionwise Attendance Report-->
        <script>
            $('#typeyearly').change(function(){
                var ref=$(this).val();

                $.ajax({

                    url:'<?php echo base_url(); ?>/load/getemp1/'+ref,
                    data:{},
                    success:function(result){

                        var pre = '<option value="" id="teacheryearly">Select Employee</opiton>';
                        $("#teacheryearly").html(pre+result);
                    }
                });


            });

            $('#typemonthly').select2({
                //selectOnClose: true,
                placeholder: "Select a Type",
                allowClear:true
            });



            $('#teachermonthly').select2({
                //selectOnClose: true,
                placeholder: "Select a Employee",
                allowClear:true
            });

            $('#typeyearly').select2({
                //selectOnClose: true,
                placeholder: "Select a Type",
                allowClear:true
            });

           
            ('#sessionyearly').select2({
                //selectOnClose: true,
                placeholder: "Select a Session",
                allowClear:true
            });
        </script>

        </body>
        </html>