<div class="container">
<div class="row">
<div class="col-sm-12">
	<a href="<?php base_url();?>Add_Student" class="btn btn-primary mt-3 mb-3">Add Student</a>

<div class="table-responsive">
<table class="table table-bordered table-striped" id="mytable">

<thead>
<tr>
<th>Count</th>
<th>Name</th>
<th>Mobile</th>
<th>Status</th>
<th>Edit</th>
<th>PDF View</th>
</tr>
</thead>
<tbody>
<?php
$table='student';
$school_id=$this->session->userdata('school_id');
$get_student_data=$this->StudentModel->get_data($school_id,$table);
$count=0;
if($get_student_data){
foreach($get_student_data as $data){
$count= $count + 1;
?>
<tr>
<td><?php echo $count; ?></td>
<td><?php echo htmlspecialchars_decode($data['student_name']); ?></td>
<td><?php echo htmlspecialchars_decode($data['contact_no']); ?></td>
<td>
<?php
if($data['status']==1){
	?>
<button class="btn btn-sm btn-success">Active</button>
	<?php
}else{
?>
<button class="btn btn-sm btn-danger">Inactive</button>
<?php
}
?>

</td>
<td><a class="btn btn-primary" href="<?php echo base_url(); ?>School/edit_student/<?php echo $data['id']; ?>">EDIT</a></td>
<td><a href="<?php echo base_url(); ?>School/pdf/<?php echo $data['id']; ?>">View in PDF</a></td>
</tr>
<?php

}
}

?>
</tbody>
</table>
</div>

</div>

</div>
</div>