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/update-news.php
<?php
	require_once 'validate.php';
	require 'name.php';
?>
<?php 
include('header.php');
?>
<?php 
include('sidebar.php');
?>

<!--app content-->
				<div class="app-content">
					<div class="side-app">
						<div class="page-header">
							<h4 class="page-title">Update News</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 News</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="#tab1" class="active" data-toggle="tab"><i class="fe fe-aperture mr-2"></i> Active</a></li>
										<li><a href="#tab2" data-toggle="tab" class=""><i class="fe fe-message-circle mr-2"></i>  Deactive</a></li>
										
									</ul>
									<div class="tab-content">
										<div class="tab-pane active show" id="tab1">
											
											<table id = "table" class = "table table-bordered">
					<thead>
						<tr>
							<th>ID</th>
							<th>Heading</th>
							<th>News</th>
							<th>Date</th>
							<th>Status</th>
							<th>Action</th>
						</tr>
					</thead>
					<tbody>
						<?php
						
						
							$query = $conn->query("SELECT * FROM `latest_news` WHERE `status` = 'Active'") 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['id']?></td>
							<td><?php echo $fetch['head']?></td>
							<td><?php echo $fetch['news']?></td>
							<td><?php echo $fetch['date']?></td>
							<td><?php echo $fetch['status']?></td>
							
							
							<td><center>
							<form action="update-newss.php" method="post">
							<input type = "hidden" class = "form-control" name = "id" value="<?php echo $fetch['id'];?>" />
							
							<input type = "submit" class = "btn btn-success btn-icon btn-sm fe fe-edit-2" name ="deactive" value="Deactive"></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>Heading</th>
							<th>News</th>
							<th>Date</th>
							<th>Status</th>
							<th>Action</th>
						</tr>
					</thead>
					<tbody>
						<?php
						
						
							$query = $conn->query("SELECT * FROM `latest_news` WHERE `status` = 'Deactive'") 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['id']?></td>
							<td><?php echo $fetch['head']?></td>
							<td><?php echo $fetch['news']?></td>
							<td><?php echo $fetch['date']?></td>
							<td><?php echo $fetch['status']?></td>
							
							
							<td><center>
							<form action="update-newss.php" method="post">
							<input type = "hidden" class = "form-control" name = "id" value="<?php echo $fetch['id'];?>" />
							
							<input type = "submit" class = "btn btn-success btn-icon btn-sm fe fe-edit-2" name ="active" value="Active"></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');
?>







MMCT - 2023