 <div class="container">
<?php 
$logged_in=$this->session->userdata('logged_in');
?>
   
  

<?php 
if($logged_in['su']=='1'){
	?>
  

<?php 
}
?>


<h3><?php echo $title;?></h3>
 
  <div class="row">
 

</div><!-- /.row -->

 

  <div class="row">
 
<div class="col-md-12">
	<select id="test" name="form_select" onchange="showDiv(this)">
   <option value="1">Score Without Negative</option>
   <option value="0">With Negative</option>
  
  </select>
<div id="without_negative">
<br>
<a class="btn btn-success" href="<?php echo site_url(); ?>/export/qualifiedexport"><i class="fa fa-file-excel-o"></i> Export</a>
<br><br>		
<table class="table table-bordered">
		<tr>
		<th>Registration No.</th>
		 <th><?php echo $this->lang->line('email');?></th>
		 <th>Phone No </th>
		 <th><?php echo $this->lang->line('name');?></th>
		 <th><?php echo $this->lang->line('branch');?></th>
		<?php
         

		foreach($qualified_student_list as $key => $val){
			foreach ($category_list as $key => $value1) {
					 if($value1['category_name']=="Aptitude"){
					 	$apti_cutoff= $value1['cut-off'];
					 }
					 if($value1['category_name']=="Reasoning"){
					 	$reasoning_cutoff= $value1['cut-off'];
					 }
					 if($value1['category_name']=="Technical"){
					 	$tech_cutoff = $value1['cut-off'];
					 }
					  if($value1['category_name']=="English"){
					 	$eng_cutoff= $value1['cut-off'];
					 }
			   }
		   //echo"<pre>";print_r( $val);die();
		   if($val['apti_score']>=$apti_cutoff AND $val['reasoning_score']>=$reasoning_cutoff AND $val['technical_score']>=$tech_cutoff AND $val['english_score']>=$eng_cutoff  ){
		?>
		<tr>
		<td><?php echo $val['reg_no'];?></td> 
		 <td><?php echo $val['email'];?></td>
		  <td><?php echo $val['contact_no'];?></td>
		  <td><?php echo $val['name'];?></td>
		  <td><?php echo $val['branch'];?></td>
		</tr>
		<?php
		} ?>
		<?php
		} ?>
		</tr>

		</table>
</div>
<div id="with_negative" style="display:none;">
<br>
<a class="btn btn-success" href="<?php echo site_url(); ?>/export/Export_qualified_negative"><i class="fa fa-file-excel-o"></i> Export</a>

<br><br>		
<table class="table table-bordered">
	<tr>
		<th>Registration No.</th>
		 <th><?php echo $this->lang->line('email');?></th>
		 <th>Phone No </th>
		 <th><?php echo $this->lang->line('name');?></th>
		 <th><?php echo $this->lang->line('branch');?></th>
		 <?php
         

		foreach($qualified_student_list as $key => $val){
			foreach ($category_list as $key => $value1) {
					 if($value1['category_name']=="Aptitude"){

					 	$apti_cutoff= $value1['cut-off'];
					 	$aptiscore=$val['apti_score']- ($val['apti_negative']*$value1['negative_mark']);
					 }
					 if($value1['category_name']=="Reasoning"){
					 	$reasoning_cutoff= $value1['cut-off'];
					 	$reasoning_score=$val['reasoning_score']- ($val['reasoning_negative']*$value1['negative_mark']);
					 }
					 if($value1['category_name']=="Technical"){
					 	$tech_cutoff = $value1['cut-off'];
					 	$technical_score=$val['technical_score']- ($val['technical_negative']*$value1['negative_mark']);
					 }
					  if($value1['category_name']=="English"){
					 	$eng_cutoff= $value1['cut-off'];
					 	$english_score=$val['english_score']-($val['english_negative']*$value1['negative_mark']);
					 }
			   }
		  // echo"<pre>";print_r( $val);die();
		   if($aptiscore>=$apti_cutoff AND $reasoning_score >=$reasoning_cutoff AND $technical_score >=$tech_cutoff AND $english_score >=$eng_cutoff  ){
		?>
		<tr>
		<td><?php echo $val['reg_no'];?></td> 
		 <td><?php echo $val['email'];?></td>
		  <td><?php echo $val['contact_no'];?></td>
		  <td><?php echo $val['name'];?></td>
		  <td><?php echo $val['branch'];?></td>
		</tr>
		<?php
		} ?>
		<?php
		} ?>
		</tr>

</table>
</div>
</div>

</div>




</div>

<script type="text/javascript">
function showDiv(select){
   if(select.value==1){
    document.getElementById('without_negative').style.display = "block";
    document.getElementById('with_negative').style.display = "none";
   } else{
    document.getElementById('without_negative').style.display = "none";
    document.getElementById('with_negative').style.display = "block";
   }
} 
</script>