<?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 id="Modal<?php echo $_GET['class_id'];?>-<?php echo $_GET['section'];?>" class="modal fade" role="dialog">


              <div class="modal-dialog">

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

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

                  <input type="hidden" name="action" value="ClassPrintParameter">
             
                  <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">
                  <!-- <label class="container1">Check All<input  type="checkbox" class="checkAll"/><span class="checkmark"></span></label> -->
                           
                  <input type="hidden" name="class_id" value="<?php echo $_GET['class_id'];?>" />
                  <input type="hidden" name="section" value="<?php echo $_GET['section'];?>" />
                  <input type="hidden" name="session" value="<?php echo $_GET['session'];?>" />

                  <label style="text-align: left; float: left;"> <b>Select Order By:</b>
                  <select name="orderBy" style="width: 562px;" id="orderBy" class="form-control" >
            
                     <option  value="alphabetic">Alphabetic</option>
                     <option  value="RollNoWise">Roll No Wise</option>
                       
                    </select>
                 </label>  
                 
                 <label style="text-align: left;"> <b>Sub Heading:</b>
                    <input type="text"  style="width: 562px; height:40px;" name="studnetlist" value="Student List"/>
                 </label>
               
                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="admission" checked value="1"/>
                    Admission
                    <span class="checkmark"></span>
                  </label>
                  
                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="student_name" checked value="1"/>
                    Student Name
                    <span class="checkmark"></span>
                  </label>

                  <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="class_sec" checked value="1"/>
                    Class/Sec
                    <span class="checkmark"></span>
                  </label>

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

                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="dob" checked value="1"/>
                    DOB
                    <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="tution_fee" checked value="1"/>
                    Tution Fee
                    <span class="checkmark"></span>
                  </label>

                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="previous_balance" checked value="1"/>
                    Previous Balance
                    <span class="checkmark"></span>
                  </label>
                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="miscellaneous" checked value="1"/>
                    <?php if ($brid[0]['misc_title']!=NULL){echo $brid[0]['misc_title'];}else {echo 'Misc.';} ?>
                    <span class="checkmark"></span>
                  </label>

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


                   </form>
                </div>

              </div>
            </div>
            <!-- Modal -->
            <div class="right_col" role="main">
            <div class="row">
        <h3 style="float: left;">List View Classes <small>(<?php echo count($WorkAssignListings);?> Rows)</small> </h3>

       <!--    <a target="_blank" class="btn btn-success pull-right" title="Print Students List" href="print_students_report.php?<?php echo session_id().session_id().session_id().session_id().session_id(); ?>&class_id=<?php echo $_GET['class_id'];?>&section=<?php echo $_GET['section'];?>">
          <i class="fa fa-print m-right-xs" target="_blank"></i> &nbsp; Print Report
        </a>

        <a target="_blank" class="btn btn-warning pull-right" title="Print Students List" data-toggle="modal" data-target="#Modal<?php echo $_GET['class_id'];?>-<?php echo $_GET['section'];?>" style=""><i class="fa fa-print m-right-xs" target="_blank"></i>&nbsp;Print Students List
            
          </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 </th>
                <th width="20%" style="text-align:center;"> Students </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'];
      
       // getting strength of students 
       
      $m->where("section_id", $section);
      $m->where("class_id", $cls);
      $m->where("status", 0);
      $m->where("branch_id", $_SESSION['branch']);
      /*$m->where("session_id", $_SESSION['current_session']);*/
      $total=$m->get("edu_student_details");
      $std+=count($total);
      ?>

        <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;"> <?php echo count($total);?> </td>
                  
                  <td style="text-align:center;"> 


                 <!--  <a target="_blank" style="font-size:14px;"  href="manage_students.php?<?php echo session_id().session_id().session_id().session_id().session_id();?>&class_id=<?php echo $WorkAssignListVal['class_id'];?>&section=<?php echo $WorkAssignListVal['section_id'];?>" style="cursor:pointer;"  class="btn btn-success">

                  View Class
                  </a>

              <a target="_blank" style="font-size:14px;"  href="view_challan.php?<?php echo session_id().session_id().session_id().session_id().session_id();?>&class_id=<?php echo $WorkAssignListVal['class_id'];?>&section=<?php echo $WorkAssignListVal['section_id'];?>&month=<?php echo date('m');?>&session=<?php echo $_SESSION['current_session'];?>&s=<?php echo session_id().session_id(); ?>" style="cursor:pointer;"  class="btn btn-success">
                  View Challan (<?php echo date('M');?>)
                  </a> -->


                 <!--  <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  </a> -->

                  <a style="padding: 6px 8px; font-size:14px;" href="print_attendance_sheet.php?<?php echo session_id().session_id().session_id().session_id().session_id();?>&class_id=<?php echo $WorkAssignListVal['class_id'];?>&section=<?php echo $WorkAssignListVal['section_id'];?>" class="btn btn-success">
                  Print Monthly 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 action="<?php echo DOMAIN.AgentDirectory;?>parent/InsertMe.php" method="post" enctype="multipart/form-data">

                  <input type="hidden" name="action" value="ClassPrintParameter">
             
                  <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'];?>" />
                 
                  <label style="text-align: left; float: left;"> <b>Select Order By:</b>
                  <select name="orderBy" style="width: 562px;" id="orderBy" class="form-control" >
            
                     <option  value="alphabetic">Alphabetic</option>
                     <option  value="RollNoWise">Roll No Wise</option>
                       
                    </select>
                 </label>  
                 
                 <label style="text-align: left;"> <b>Sub Heading:</b>
                    <input type="text"  style="width: 562px; height:40px;" name="studnetlist" value="Student List"/>
                 </label>

               
                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="admission" checked value="1"/>
                    Admission
                    <span class="checkmark"></span>
                  </label>
                  
                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="student_name" checked value="1"/>
                    Student Name
                    <span class="checkmark"></span>
                  </label>

                  <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="address" checked value="1"/>
                    Address
                    <span class="checkmark"></span>
                  </label>

                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="dob" checked value="1"/>
                    DOB
                    <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="tution_fee" checked value="1"/>
                    Tution Fee
                    <span class="checkmark"></span>
                  </label>

                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="previous_balance" checked value="1"/>
                    Previous Balance
                    <span class="checkmark"></span>
                  </label>
                  <label class="container1" style="text-align: left;">
                    <input type="checkbox" name="miscellaneous" checked value="1"/>
                    <?php if ($brid[0]['misc_title']!=NULL){echo $brid[0]['misc_title'];}else {echo 'Misc.';} ?>
                    <span class="checkmark"></span>
                  </label>

                                   

                  </div>
                  <div class="modal-footer" style="text-align: right;">
                    <input type="submit" 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>
