JezK
Edit File: students_data.php
<?php session_start(); include_once("student_access.php"); include_once("encription_key.php"); $student=new student_access(); $encry=new Encryption(); $class_id=$_REQUEST['classid']; $section_id = $_REQUEST['sec_id']; $_SESSION['child']['section_id'] = $section_id; $_SESSION['child']['stu_class_id'] = $class_id; $school_id=$_SESSION['child']['log_school_id']; $academic_id = $_SESSION['child']['current_academic_id']; $choosen_acc_id = $_SESSION['child']['choosen_academic_id']; $student_details=$student->students_data($class_id,$section_id,$school_id,$choosen_acc_id); ?> <table id="myTable" class="table table-condensed table-hover" style="margin-top:-10px; font-family:Arial, Helvetica, sans-serif;font-style:normal;font-size:13px;"> <thead> <tr class="info"> <th class="col-md-1 text-center">Sl.No</th> <th>Student Roll Number</th> <th>Student Name</th> <th>Father Name</th> <th>Mother Name</th> <th>Guardian Name</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody> <?php if($student_details) { $i=1; foreach($student_details as $key=>$val){ ?> <tr> <td class="col-sm-1 text-center stu_details"><?=$i?></td> <td class="stu_details"><?=$val['student_rollno']?></td> <td class="stu_details"><a href="student_details.php?id=<?=$val['student_id']?>" ><?=$val['student_firstname']." ".$val['student_lastname']?></a></td> <td class="stu_details"><?=$val['student_father_name']?></td> <td class="stu_details"><?=$val['student_mother_name']?></td> <td class="stu_details"><?=$val['student_guardian_name']?></td> <td class="stu_details"><?=$val['status'] == '1'?'Active':'Deactivated'?></td> <td class="center"> <a class=" buttonn" href="edit_student.php?id=<?=$val['student_id']?>" style="margin:4px;"> <i class="glyphicon glyphicon-pencil" title ="Edit" style="font-size: 13px; color:#01aee6;"></i> </a> <?php if($val['status'] == "1") { ?> <a class=" buttonn" onclick="return confirm('Do you want to deactivate <?=$val['student_firstname']." ".$val['student_lastname']?> ?')" href="status_student.php?id=<?=$val['student_id']?>&status=<?=$val['status']?>" style="margin:4px;"> <i class="glyphicon glyphicon-ban-circle" title ="Deactivate" style="font-size: 13px;color:#ff0000!important;"></i> </a> <?php } else { ?> <a class=" buttonn" onclick="return confirm('Do you want to activate <?=$val['student_firstname']?> <?=$val['student_lastname']?> ?')" href="status_student.php?id=<?=$val['student_id']?>&status=<?=$val['status']?>" style="margin:4px;"> <i class="glyphicon glyphicon-ok-circle" title ="Activate" style="font-size: 13px;color:#0F9B0C!important;"></i> </a> <?php } ?> <a class=" buttonn" onclick="return confirm('Do you want to delete the Student <?=$val['student_firstname']." ".$val['student_lastname']?> ?')" href="delete_student.php?id=<?=$val['student_id']?>" style="margin:4px;"> <i class=" glyphicon glyphicon-remove" title="Delete" style="font-size: 13px; color:#01aee6;"></i> </a> </td> </tr> <?php $i++; } }else{ ?> <tr> <td></td> <td></td> <td></td> <td>No Data Found</td> <td></td> <td></td> <td></td> <td></td> </tr> <?php } ?> </tbody> </table>