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

$branch=$_SESSION['branch'];
$WorkAssignListings = $m->query("SELECT sec.*, cls.* FROM edu_adm_section_detail as sec LEFT JOIN edu_class_config as cls ON sec.class_id = cls.class_id where cls.class_id!='' and cls.branch_id='$branch' and sec.branch_id='$branch' ORDER BY cls.class_id asc");

?>

<!DOCTYPE html>
<html lang="en">
  <head>
   
    <title> Attendance Sheet | EduPortal </title>
    <?php include('RootMe/css_links.php');?>
   
  </head>
 
  <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 -->
         
            <!-- Modal -->
            <div class="right_col" role="main">
            <div class="row">

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

     <a href="mark_attendanceReport_list.php">Attendance Reports </a> &nbsp; <i style="" class="fa fa-angle-double-right"></i>  &nbsp; 
          
     Blank Attendance Sheets

       
        <a href="mark_attendanceReport_list.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>" class="btn btn-info" style=" float: right;"> Attendance Reports</a>
  
  <table  class="table table-striped table-bordered" style="width:100%;background-color:#FFFFFF;">
        <thead>
            <tr>

                <th width="10%" style="text-align:center;"> S.No </th>
                <th width="30%"> Class / Section </th>
                
                <th width="40%" style="text-align:center;">Action </th>
                
            </tr>
        </thead>
        <tbody>


   
     
     <?php 

   
     $count=1;
     $std=0;
      foreach($WorkAssignListings as $WorkAssignListVal)
      {   
      $cls=$WorkAssignListVal['class_id'];
      $section=$WorkAssignListVal['section_id'];
      ?>

        <tr>


                  
                  <td style="text-align:center;"> <?php echo $count; $count++;?> </td>

                  <td> <?php echo  $WorkAssignListVal['Class_Name']." - ".$WorkAssignListVal['section_name']; ?> </td>

                  
                  <td style="text-align:center;"> 


            


                  <a style="padding: 6px 8px; font-size:14px;" data-toggle="modal" data-target="#Modal<?php echo $WorkAssignListVal['class_id'];?>-<?php echo $WorkAssignListVal['section_id'];?>"  href="#" class="btn btn-success">
                  Print Blank Attendance Sheet  </a>

                


            <!-- Modal -->
            <div id="Modal<?php echo $WorkAssignListVal['class_id'];?>-<?php echo $WorkAssignListVal['section_id'];?>" class="modal fade" role="dialog">
              <div class="modal-dialog">

                <!-- Modal content-->
                <div class="modal-content">

                   
               <form target="_blank" action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post" enctype="multipart/form-data">

                  <input type="hidden" name="action" value="AttendanceSheetParameter">
             
                  <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title"> Choose The Parametters To Display in Print Report </h4>
                  </div>
                  <div class="modal-body">
                  

                  <input type="hidden" name="class_id" value="<?php echo $WorkAssignListVal['class_id'];?>" />
                  <input type="hidden" name="section" value="<?php echo $WorkAssignListVal['section_id'];?>" />
                  <input type="hidden" name="session" value="<?php echo $_SESSION['current_session'];?>" />
                  
                  <div class="col-md-12">
                 
                   <select name="month" id="month" class="form-control"  required>
 

                      <?php
                     
                      $match;
                      if(!isset($_REQUEST['month'])){
                        $match=date('m');
                      }else { $match=$_REQUEST['month']; }
                      
                      $WorkAssignList = $m->get("eduportal_month_config");
                      foreach($WorkAssignList as $WorkAssignListVal)
                      { ?>

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


                              <?php
                      } ?>

                      </select>

                    </div>
<br><br>
                     <div class="col-md-12">
                 
                      <select name="orderBy" id="orderBy" class="form-control"  required>
                       <option  value="SeqMrkAtt">Same Sequence Mark Attndc</option> 
                       <option  value="alphabetic">Alphabetic</option>
                       <option  value="AdmNoWise">Adm No Wise</option>
                      </select>

                    </div>
<br><br><br><br>
                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="father_name" checked value="1"/>
                    Father Name
                    <span class="checkmark"></span>
                  </label>

                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="cell_no" checked value="1"/>
                    Cell No
                    <span class="checkmark"></span>
                  </label>
             
             	  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="roll_no" checked value="1"/>
                    Roll No
                    <span class="checkmark"></span>
                </label>

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

                <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="month_absent" checked value="1"/>
                    Monthly Absent
                    <span class="checkmark"></span>
                </label>

             
                  <div class="modal-footer" style="text-align: right;">
                    <input type="submit" formtarget="_blank" class="btn btn-primary" checked value="Print" />
                  </div>


                   </form>
                </div>

              </div>
            </div>
            <!-- Modal -->

                  </td>

              </tr>

              <?php
      }   ?>

  
           
        </tbody>
        
    </table>

        </div> 
        </div>

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

        <?php include('RootMe/js_linksscript.php');?>
  
  </body>
</html>
