<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php");

$pageName=basename($_SERVER['PHP_SELF']);


 $m->where("page_name", $pageName);
 $video = $m->get("eduportal_modules_pages_detail");

$pageName = basename($_SERVER['PHP_SELF']);

 $m->where("page_name", $pageName);
 $pageNameAccess=$m->get("eduportal_modules_pages_detail");


$m->where("user_id", $_SESSION['user_id']);
$m->where ("branch_id", $_SESSION['branch']);
$m->where("page_id", $pageNameAccess[0]['page_id']);
$access = $m->get("users_privilege_detail");

$default;
    
    if($_GET["month"]!=NULL ){
      $default= $_GET["month"];
    }
    else{
      $default= date("m");
    } 

?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Attendance Reports| EduPortal </title>
    <!-- bootstrap-progressbar -->
    <link href="../vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
    <?php include('RootMe/css_links.php');?>
    <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    <script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
     <!-- Flaticon CSS -->
    <link rel="stylesheet" href="fonts/flaticon.css">
       
    <link rel="stylesheet" href="stylebox.css">

  
  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
     
        <?php include('RootMe/sidebar.php');?>

        <?php include('RootMe/header.php');?>
     
        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="row top_tiles">

    <div class="col-md-12">

    <a href="<?php echo $_SESSION['dashboard'];?>">Dashboard </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp; 


     Attendance Reports



<?php if ($video[0]['video_url']!=NULL) { ?>
  
  <a href="watch_video.php?videourl=<?php echo $video[0]['video_url'];?>" target="_blank" class="btn btn-success" style="padding: 10px 10px; font-size:14px;color:white;float: right;"><i class="fa fa-play"></i>&nbsp;&nbsp;Watch Demo</a>

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

               <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        <a href="select_edit_attendance.php?<?php echo session_id().session_id().session_id().session_id().session_id();?>&page=<?php echo $pageNameAccess[0]['page_id'];?>&date=<?php echo date('Y-m-d');?>&attendance=A">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-magenta">
                                        <i class="flaticon-checklist text-magenta"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content"style="margin-top: 16px; font-size: 22px;">
                                        <div class="item-title">Day Attendance Summary</div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        </a>
                    
            </div>


            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        <a href="classwise_monthly_attendance_report.php">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-blue">
                                        <i class="flaticon-checklist text-blue"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content"style="margin-top: 16px; font-size: 22px;">
                                        <div class="item-title"> Institute Attendance Summary</div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        </a>                    
            </div>


             <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        <a href="monthly_attendance_report.php">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-blue">
                                        <i class="flaticon-checklist text-blue"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content"style="margin-top: 16px; font-size: 22px;">
                                        <div class="item-title">Filled Attendance Sheet</div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        </a>
                    
            </div>

            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        <a href="attendance_sheet.php">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-red">
                                        <i class="flaticon-checklist text-red"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content"style="margin-top: 16px; font-size: 22px;">
                                        <div class="item-title"> Blank Attendance Sheet </div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        </a>
                    
            </div>
            

            

            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                        
                        <a href="#" data-toggle="modal" data-target="#mostabsent">
                        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="item-icon bg-light-green">
                                        <i class="flaticon-checklist text-green"></i>
                                    </div>
                                </div>
                                <div class="col-md-8">
                                    <div class="item-content"style="margin-top: 16px; font-size: 22px;">
                                        <div class="item-title">Most Absentees (<?php echo date("M");?>)</div>
                                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        </a>


                <!-- Student Result popup start -->


      <div id="mostabsent" class="modal fade" role="dialog">
        <div class="modal-dialog">

          <!-- Modal content-->
          <div class="modal-content">
            <div class="modal-header" style="border-bottom:none;">
              <button type="button" class="close" data-dismiss="modal">&times;</button>
              <h4 class="modal-title" style="text-align:center;">  </h4>
            </div>

            <div class="modal-body">

</form>


<form  action="absent_students.php" method="get">

  <input type="hidden" name="dashboard" value="dashboard">
                     
                   <div class="col-md-12" style="padding: 8px;">

                       <div class="form-group ">

                          <label class="required">Year</label>
                              <select name="session" class="form-control" >

                             
                        <option>Select Year</option>
                        <?php
 
                      $match;
                      if(!isset($_REQUEST['session'])){
                        $match=$_SESSION['current_session'];
                      }else { $match=$_REQUEST['session']; }
                     
       
                        $WorkAssignList = $m->get("edu_session_config");
                        foreach($WorkAssignList as $WorkAssignListVal)
                        { 
                            $yr=explode("-",$WorkAssignListVal['session_year']);
                          ?>

                           <option <?php if(date("Y")==$yr['0']){echo 'selected';}?> value="<?php echo $yr[0]; ?>"><?php echo $yr['0']; ?></option>


                                <?php
                        } ?>

                    </select>
                            </div>


                    </div> 


                    <div class="col-md-12" style="padding: 8px;">

                       <div class="form-group ">

                          <label class="required">No Of Records</label>
                              <select name="records" class="form-control" >
                        
                        <option value="50">50</option>
                        <option value="100">100</option>
                        <option value="150">150</option>
                        <option value="150">200</option>
                        <option value="200">500</option>
                        <option value="200">800</option>
                        <option value="200">1000</option>
                        <option value="200">1500</option>

                        

                    </select>
                            </div>


                    </div>
                                 
                

                  <div class="col-md-12" style="padding:8px;"  id="">

                       <div class="form-group ">

                          <label class="required"> Month</label>
                               <select style="height:40px;" name="month" id="month" class="form-control"  required>

                              <option value="All">All</option>
                        

                        <?php
                        $WorkAssignList = $m->get("eduportal_month_config");
                        foreach($WorkAssignList as $WorkAssignListVal)
                        { ?>

                           <option <?php if($default==$WorkAssignListVal['Month_Id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['Month_Id']; ?>"><?php echo $WorkAssignListVal['Month_Name']; ?></option>


                                <?php
                        } ?>

                    </select>
                       
                          </div>
                  </div>  

                  <div class="col-md-12">
                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="father_cellno" checked value="1"/>
                    Father Contact No
                    <span class="checkmark"></span>
                  </label>              

                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="mother_cell" checked value="1"/>
                    Mother Contact No
                    <span class="checkmark"></span>
                  </label>

                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="home_number" checked value="1"/>
                    Home Contact No
                    <span class="checkmark"></span>
                  </label>                   
                </div>
            <div class="modal-footer">

            <button type="submit" formtarget="_blank" class="btn btn-primary" name="submit" >Submit </button>
              


            </div>



                 </form>

          </div>

          </div>

        </div>
      </div>

      <!-- Student result popup ending -->
                    
            </div>


    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
        <!-- <a href="mark_attendanceReport_list.php" target="_blank"> -->
        <a href="attendance_report.php" target="_blank">
        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
            <div class="row">
                <div class="col-md-4">
                    <div class="item-icon bg-light-red">
                        <i class="flaticon-checklist text-red"></i>
                    </div>
                </div>
                <div class="col-md-8">
                    <div class="item-content"style="margin-top: 16px; font-size: 22px;">
                        <div class="item-title">Daily Attendance Report</div>
                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </a>

      </div>  

    <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
        <a href="#" data-toggle="modal" data-target="#studentAttendance">
        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
            <div class="row">
                <div class="col-md-4">
                    <div class="item-icon bg-light-red">
                        <i class="flaticon-checklist text-red"></i>
                    </div>
                </div>
                <div class="col-md-8">
                    <div class="item-content"style="margin-top: 16px; font-size: 22px;">
                        <div class="item-title">Single Student Attendance</div>
                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </a>





                        <!-- Student Result popup start -->


      <div id="studentAttendance" class="modal fade" role="dialog">
        <div class="modal-dialog">

          
          <div class="modal-content">
            <div class="modal-header" style="border-bottom:none;">
              <button type="button" class="close" data-dismiss="modal">&times;</button>
              <h4 class="modal-title" style="text-align:center;">  </h4>
            </div>

            <div class="modal-body">


<form  action="absent_students.php" method="get">

  <input type="hidden" name="dashboard" value="dashboard">
                     
                   <div class="col-md-12" style="padding: 8px;">
			

			<br> <br>

			<b> Step 1: </b> &nbsp;&nbsp;  Please Search Student Name In Top Search Bar And open its student profile.
			<br> <br>


			<b> Step 2: </b> &nbsp;&nbsp; At Student Profie Page Click on Button "Print Student" -> Attendance History



                    </div>               
                                 
                

                                     
      
            <div class="modal-footer">

           
              


            </div>



                

          </div>

          </div>

        </div>
      </div>

  
                    
            </div>




             <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
        <!-- <a href="mark_attendanceReport_list.php" target="_blank"> -->
        <a href="datewise_class_attendance_report.php" target="_blank">
        <div class="dashboard-summery-one" style="border: 1px solid lightgray;">
            <div class="row">
                <div class="col-md-4">
                    <div class="item-icon bg-light-green">
                        <i class="flaticon-checklist text-green"></i>
                    </div>
                </div>
                <div class="col-md-8">
                    <div class="item-content"style="margin-top: 16px; font-size: 22px;">
                        <div class="item-title">Date Wise Attendance Report</div>
                        <div class="item-number"><span></span><span class="counter" data-num=""></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </a>

      </div> 

                    


   

                            <div style="text-align: center;">
                              <ul class="verticle_bars list-inline">
                                <li>
                                  <div class="progress vertical progress_wide bottom">
                                    <div class="progress-bar progress-bar-dark" role="progressbar" data-transitiongoal="<?php //echo getTodayPresentStudentPercentage($m); ?>"></div>
                                  </div>
                                </li>
                               
                               
                                
                              </ul>
                            </div>
                            

                            


     

               


              </div>

              
                
    </div>
    </div>
          
            </div>
          </div>
        </div>
        <!-- /page content -->
  

    <?php include('RootMe/js_linksscript.php');?>
    <!-- Chart.js -->
    <script src="../vendors/Chart.js/dist/Chart.min.js"></script>
     <!-- ECharts -->
    <script src="../vendors/echarts/dist/echarts.min.js"></script>
    <script src="../vendors/echarts/map/js/world.js"></script>
    <!-- bootstrap-progressbar -->
    <script src="../vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
     <script src="../vendors/morris.js/morris.min.js"></script>
    <!-- Custom Theme Scripts -->
    <script src="../build/js/custom.min.js"></script>
     <!-- easy-pie-chart -->
    <script src="../vendors/jquery.easy-pie-chart/dist/jquery.easypiechart.min.js"></script>
      <!-- morris.js -->
    <script src="../vendors/raphael/raphael.min.js"></script>
    <script src="../vendors/morris.js/morris.min.js"></script>

  </body>
</html>
