<!-- call datable with export -->
<script  src="js/call_datatable_with_exports.js"></script>

<?php

	
			  
	  //collect the passed
	  if(isset($_GET['pt']))
	  {
		 $pt =  $_GET['pt'];
	  }else{
	    header('location: gateway.php?act=view_admission_reports_landing');
	  }
	 
    
	   //collect the session
	 if(isset($_GET['ses']))
	  {
		 $ses =  $_GET['ses'];
	 }else{
	  	 $ses = 0;
	 }


	 //for single applicant change
	if (isset($_POST['change_btn'])) {
		
		$id = $_POST['app_id'];
		$prg = $_POST['prog_id'];
		
        $sch_id =  get_school_id_by_programme($prg);
        $dept_id = get_department_id_by_programme($prg);
        $q = 1;


        //echo $dept_id;

        change_applicant_course($id,$prg,$dept_id,$sch_id,$ses,$q);
        
        
	}
	//for all applicant change
	if (isset($_POST['change_all_btn'])) {
		
		
        /*change_applicant_course($id,$prg,$dept_id,$sch_id,$ses,$q);*/
        if (change_applicant_course_all($pt, $ses)){
        	echo 'All Approved Successfully';
        }
        
        
	}


?>
    
<ul class="breadcrumb">
     
       <li><a href="gateway.php?act=view_admission_reports">  Admission Manager</a> <span class="divider"></span></li>
     
        <li class="active"> Applicants Change of Course  </li>
            
</ul>


<div class="well">
	

      <ul class="tabs"> 
        
        <li><a href="#view1">Applicants Listings</a></li> 
       
       </ul> 
      <div class="tabcontents"> 
       
        
        <div id="view1">
        
        		
             <?php 
			  
			  
				  
			  
     			/*echo $p;
     			exit();*/

     			//if ($pt == 1) {
     		
	               echo view_applicants_list_for_course_change($pt, $ses ); // pt programm type , p programme  

     			//}

              ?>
              
        
        </div> 
	
      </div>
</div>

</form>

