MMCT TEAM
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  ]

Current File : /home/u493057690/domains/iasfindia.com/public_html/admin/id-card.php
<?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 CONCAT(`serial_id`, `name`, `state`, `sport`, `designation`, `result`, `coach`) LIKE '%".$valueToSearch."%'";
    $search_result = filterTable($query);
    
}
 else {
    $query = "SELECT * FROM `registration` WHERE 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">Print ID Card</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">Print ID Card</li>
							</ol>
						</div>	
<div class = "panel panel-default">
			
			<div class = "panel-body">
				
				
								<form action="id-card.php" method="post">
            <input type="text" name="valueToSearch" placeholder="Value To Search">
            <input type="submit" name="search" value="Filter">
								
								<div class="card-body">
								
										
										<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>Coach</th>
							<th>Print</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><?php echo $fetch['coach']?></td>
							<td>
							<form method="post" action="id_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>
							
							
							
							
						</tr>
							
							
						<?php endwhile;?>
					</tbody>
				</table>
								
										
								</div>
								
								</form>
								
							</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');
?>







MMCT - 2023