<?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> Students Reports | 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 -->
            <div class="right_col" role="main">

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

            <div class="row">
        <h3 style="float: left;">List of Classes<small>(<?php echo count($WorkAssignListings);?> Records)</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 data-toggle="modal" data-target="#StudentBackSideCard" style="font-size:14px;"  style="cursor:pointer;"  class="btn btn-success pull-right">

                  <i class="fa fa-print"></i> Print Portrait Card Back Side
                  </a>

        <a data-toggle="modal" data-target="#StudentBackSideCardLandscape" style="font-size:14px;"  style="cursor:pointer;"  class="btn btn-success pull-right">

                  <i class="fa fa-print"></i> Print Landscape Card Back Side
                  </a>


        <!-- Employee Experience Popup start -->


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

          <!-- Modal content-->
          <div class="modal-content" style="width: 100%;">
            <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;"> Choose Color   </h4>
            </div>

            <div class="modal-body">

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

           <input type="hidden" name="action" value="colorschemeBackSide"> 
           <input type="hidden" id="date"  name="class_id" value="<?php echo $WorkAssignListVal['class_id']; ?>" />
           <input type="hidden" id="date"  name="section" value="<?php echo $WorkAssignListVal['section_id']; ?>" />
                  <div class="col-md-6"> 
                  <label>Please Choose Color Scheme</label>  
                  <input class="form-control" type="Color" name="color" style="height: 52px;">              
                  </div>
               
                 <br><br><br><br>

            <div class="modal-footer">

            <button type="submit" class="btn btn-primary" name="submit" >Print </button>
              


            </div>



                 </form>

          </div>

          </div>

        </div>
      </div>

      <!-- Employee Experience popup ending -->



      <!-- print landscape card Popup start -->


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

          <!-- Modal content-->
          <div class="modal-content" style="width: 100%;">
            <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;"> Choose Color   </h4>
            </div>

            <div class="modal-body">

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

           <input type="hidden" name="action" value="colorschemeBackSideLandscape"> 
           <input type="hidden" id="date"  name="class_id" value="<?php echo $WorkAssignListVal['class_id']; ?>" />
           <input type="hidden" id="date"  name="section" value="<?php echo $WorkAssignListVal['section_id']; ?>" />
                  <div class="col-md-6"> 
                  <label>Please Choose Color Scheme</label>  
                  <input class="form-control" type="Color" name="color" style="height: 52px;">              
                  </div>

                  <br>
                   <div class="col-md-6"> 

                    <label class="required">Valid up to</label>

                    <input type="date" name="valid" class="form-control"
                    value="<?php echo date("Y-m-d");?>"  />
                  
                  </div>
               
                 <br><br><br><br>

            <div class="modal-footer">

            <button type="submit" class="btn btn-primary" name="submit" >Print </button>
              


            </div>



                 </form>

          </div>

          </div>

        </div>
      </div>

      <!-- print landscape card Popup End -->

  
  <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 data-toggle="modal" data-target="#StudentCard<?php echo $WorkAssignListVal['class_id'];?>-<?php echo $WorkAssignListVal['section_id'];?>" style="font-size:14px;"  style="cursor:pointer;"  class="btn btn-success">

                  <i class="fa fa-print"></i> Print Portrait Student Cards
                  </a>

                  <a data-toggle="modal" data-target="#LandscapeStudentCard<?php echo $WorkAssignListVal['class_id'];?>-<?php echo $WorkAssignListVal['section_id'];?>" style="font-size:14px;"  style="cursor:pointer;"  class="btn btn-success">

                  <i class="fa fa-print"></i> Print Landscape Student Cards
                  </a>

           

                  </td>

                  <!-- Employee Experience Popup start -->


      <div id="StudentCard<?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" style="width: 100%;">
            <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;"> Choose Color   </h4>
            </div>

            <div class="modal-body">

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

           <input type="hidden" name="action" value="colorscheme"> 
           <input type="hidden" id="date"  name="class_id" value="<?php echo $WorkAssignListVal['class_id']; ?>" />
           <input type="hidden" id="date"  name="section" value="<?php echo $WorkAssignListVal['section_id']; ?>" />
                  <div class="col-md-6"> 
                  <label>Please Choose Color Scheme</label>  
                  <input class="form-control" type="Color" name="color" style="height: 52px;">              
                  </div>
          <br> <br> <br> <br> <br>     
                <div class="form-group ">

                <label class="">Choose Display Parameter</label>
                    <select  name="RollAdm" class="form-control"  >

                      <option value='RollNo'>Roll No</option>
                      <option value='AdmNo'>Adm No</option>                   

                    </select>
                </div>

                <div class="form-group ">

                <label class="">Date of birth</label>
                    <select  name="DOB" class="form-control"  >

                      <option value='YES'>YES</option>
                      <option value='NO'>NO</option>                   

                    </select>
                </div>
                
                <div class="form-group ">

                    <label class="required">Valid up to</label>

                    <input type="date" name="valid" class="form-control"
                    value="<?php echo date("Y-m-d");?>"  />
                  
                  </div>

                 <br><br>

            <div class="modal-footer">

            <button type="submit" class="btn btn-primary" name="submit" >Print </button>
              


            </div>



                 </form>

          </div>

          </div>

        </div>
      </div>

      <!-- Employee Experience popup ending -->


      <!-- Employee Experience Popup start -->


      <div id="LandscapeStudentCard<?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" style="width: 100%;">
            <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;"> Choose Color   </h4>
            </div>

            <div class="modal-body">

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

           <input type="hidden" name="action" value="colorschemeLandscape"> 
           <input type="hidden" id="date"  name="class_id" value="<?php echo $WorkAssignListVal['class_id']; ?>" />
           <input type="hidden" id="date"  name="section" value="<?php echo $WorkAssignListVal['section_id']; ?>" />
                  <div class="col-md-6"> 
                  <label>Please Choose Color Scheme</label>  
                  <input class="form-control" type="Color" name="color" style="height: 52px;">              
                  </div>

               
                 <br><br><br><br>

            <div class="modal-footer">

            <button type="submit" class="btn btn-primary" name="submit" >Print </button>
              


            </div>



                 </form>

          </div>

          </div>

        </div>
      </div>

      <!-- Employee Experience popup ending -->

              </tr>

              <?php
      }   ?>

  
           
        </tbody>
        
    </table>

        </div> 
        </div>

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

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