/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/subjects_report.php
<?php
 session_start();
$_SESSION['active'] = 'subReport';

 include('include/header.php'); 

  

 if(!empty($_GET['delid'])){
    
    delete_branch($_GET['delid']);
 }
 $select_academic=select_academic();
  $select_class=select_class();
 $select_SyllabusData = select_SyllabusData();
  $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 ">Subjects Report</li>
    </ol>
  </nav>
</div>
<section class="section">
      <div class="row">
        <div class="col-lg-12">

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


<?php
  
  if(!empty($_GET['del'])){
     ?>
   <div align="center"><h4 style="color:red;">Data Deleted Sucessfully </h4></div>
     <?php
  }
   if(!empty($_GET['upd'])){
  ?>
  <div align="center"><h4 style="color:green;">Updated Data Successfully </h4></div>
  <?php
}
?>


 
    <form  method="post"> 
      <div class="row">

      <div class="col-md-3 mt-4">
            <label for="exampleInputEmail1" class="form-label">Academic Year</label>
             <select name="Year" id="Year" class="form-control">
              <option value="">Please Select Year</option>
              <?php
                 $select_academic = select_academic();
                  while($academic = mysqli_fetch_array($select_academic)){
              ?>
              <option value="<?= $academic['yearOf']?>"><?= $academic['yearOf']?></option>
              <?php
                   }
              ?>
           </select>
            
        </div>

        <div class="col-md-3 mt-4">
            <label for="exampleInputEmail1" class="form-label">Class</label>
             <select name="class_name" id="class_name" class="form-control">
              <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">Syllabus Type</label>
             <select name="syllabus" id="syllabus" class="form-control">
              <option value="">Please Select Syllabus</option>
              <?php
                  while($syllabus = mysqli_fetch_array($select_SyllabusData)){
              ?>
              <option value="<?= $syllabus['name']?>"><?= $syllabus['name']?></option>
              <?php
                   }
              ?>
           </select>
            
        </div>
          
  
      </div>
        <div class="mt-4">
        <input type="button" onclick="subject_validation()" class="btn" value="Search" name="submit" style="background-color:#69F0AE;">
        </div> 
    </form>
             
              <div class="row">
              <div id="result" class="mt-4">
     
   </div>
     </div>
    

   

   </div>
          </div>

        </div>
      </div>
    </section>
  
   

</main><!-- End #main --> 

<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>

  <script>
    function subject_validation()
    {
      
    
        var year = $('#Year').val();

       var class_name = $('#class_name').val();

       var syllabus = $('#syllabus').val();
       
        if(year == '')
        {
          swal('Please Select Year');
          return false;
        }
      
       else if(class_name == '')
        {
          swal('Please Select Class');
          return false;
        }
        else if(syllabus == '')
        {
          swal('Please Select syllabus');
          return false;
        }
        else{
             $.ajax({
            url : "subjectsData.php",
            data :  {year : year,class_name : class_name,syllabus : syllabus,type:2},
            type : 'POST',
            success : function(response) {
              $('#result').html(response);
               
            }
        });
        }
    }
  </script> 
 <script>
       function confirmDelete(subjectid)
       {
        
          if (subjectid != '') {
            var x = confirm('Are you sure to Delete?');
            if(x){
          $.ajax({
            url : "delete.php",
            data :  {subjectid : subjectid},
            type : 'POST',
            success : function(response) {
              if(response ==1){
                window.location.href = "subjects.php";
              }
                
               
            }
        });
        
       }
     }
     }
    </script>


    <script>
      function select_syllabus(class_list){
          if(class_list !=''){
              $.ajax({
            url : "section.php",
            data :  {class_list : class_list},
            type : 'POST',
            success : function(response) {
              $('#class_list').html(response);
                
               
            }
        });
          }
      }
    </script>

     <script>
      // function select_section(val){
      //     if(val !=''){
      //         $.ajax({
      //       url : "section.php",
      //       data :  {val : val},
      //       type : 'POST',
      //       success : function(response) {
      //         $('#section').html(response);
                
               
      //       }
      //   });
      //     }
      // }
    </script>

    <script>
      function search_data(){
         var syllabusdata = $('#syllabusdata').val();
         var class_listdata = $('#class_list').val();
          
         if(syllabusdata != '' && class_listdata != ''){
                $.ajax({
            url : "section.php",
            data :  {class_listdata : class_listdata,syllabusdata:syllabusdata},
            type : 'POST',
            success : function(response) {
              $('#result').html(response);
                
               
            }
          });
         } 
         else{
          alert("please Select");
         }

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

 
@LwBee Strong Bypass

LwBee Strong Bypass Mini Shell

Upload File

Create New File