Uname : Linux V-ShopU01 4.18.0-348.20.1.el8_5.x86_64 #1 SMP Thu Mar 10 20:59:28 UTC 2022 x86_64
Server : Apache/2.4.37 (rocky) OpenSSL/1.1.1k
Whoami : apache
Safe Mode : OFF
DOCUMENT ROOT : /var/www/html/site_shopudietDisable Function :
Path : /var/www/html/site_shopudiet/admin/
Server IP : 65.20.74.164
Client IP : 18.190.176.243
Current File : /var/www/html/site_shopudiet/admin/order_product.php |
<?php
include 'dbconnect.php';
session_start();
if(!isset($_SESSION["sess_user"])){
header("Location: shop.php");
}
else
{
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="apple-touch-icon" sizes="76x76" href="../assets/img/apple-icon.png">
<link rel="icon" type="image/png" href="../assets/img/favicon.png">
<title>shopUdiet | Category List </title>
<link rel="icon" type="image/png" href="../images/favicon.png"/>
<!-- Fonts and icons -->
<link href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,600,700,800" rel="stylesheet" />
<link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
<!-- Nucleo Icons -->
<link href="./css/nucleo-icons.css" rel="stylesheet" />
<!-- CSS Files -->
<link href="./css/black-dashboard.css?v=1.0.0" rel="stylesheet" />
<!-- CSS Just for demo purpose, don't include it in your project -->
<link href="./demo/demo.css" rel="stylesheet" />
</head>
<body class="">
<div class="wrapper">
<?php include('sidebar.php');?>
<div class="main-panel">
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-absolute navbar-transparent">
<div class="container-fluid">
<div class="navbar-wrapper">
<div class="navbar-toggle d-inline">
<button type="button" class="navbar-toggler">
<span class="navbar-toggler-bar bar1"></span>
<span class="navbar-toggler-bar bar2"></span>
<span class="navbar-toggler-bar bar3"></span>
</button>
</div>
<a class="navbar-brand" href="javascript:void(0)">shopUdiet</a>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-bar navbar-kebab"></span>
<span class="navbar-toggler-bar navbar-kebab"></span>
<span class="navbar-toggler-bar navbar-kebab"></span>
</button>
<div class="collapse navbar-collapse" id="navigation">
<ul class="navbar-nav ml-auto">
<li class="dropdown nav-item">
<a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
<div class="photo">
<img src="./img/anime3.png" alt="Profile Photo">
</div>
<b class="caret d-none d-lg-block d-xl-block"></b>
<p class="d-lg-none">
Log out
</p>
</a>
<ul class="dropdown-menu dropdown-navbar">
<li class="nav-link"><a href="change_pwd" class="nav-item dropdown-item">Change Password</a></li>
<li class="nav-link"> <?php echo $_SESSION['id']; ?><a href="logout.php" class="nav-item dropdown-item">Log out</a></li>
</ul>
</li>
<li class="separator d-lg-none"></li>
</ul>
</div>
</div>
</nav>
<div class="modal modal-search fade" id="searchModal" tabindex="-1" role="dialog" aria-labelledby="searchModal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<input type="text" class="form-control" id="inlineFormInputGroup" placeholder="SEARCH">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i class="tim-icons icon-simple-remove"></i>
</button>
</div>
</div>
</div>
</div>
<!-- End Navbar -->
<div class="content">
<div class="row">
<div class="col-md-12">
<div class="card ">
<div class="card-header">
<h4 class="card-title"> Orders List</h4>
</div>
<div class="card-body">
<div class="table-responsive" style="overflow: hidden; width:99%;">
<table class="table table-bordered " id="">
<thead class=" text-primary">
<tr>
<th>
Name
</th>
<th>Email</th>
<th>phone</th>
<th>Product Name</th>
<th>Price</th>
<th>status</th>
<th style="width: 15%;" class="text-center">Action</th>
</tr>
</thead>
<?php
include 'dbconnect.php';
$squery = "select * from product_cart where status='order'";
$result = mysqli_query($conn,$squery);
while( $row = mysqli_fetch_array($result))
{
?>
<tbody>
<tr id="<?php echo $row['id'] ?>">
<td>
<?php echo $row['user_name'];?>
</td>
<td>
<?php echo $row['email'];?>
</td>
<td>
<?php echo $row['phone'];?>
</td>
<td><?php echo $row['prdctname'];?></td>
<td><?php echo $row['price'];?></td>
<td><?php echo $row['status'];?></td>
<td class="text-center icons">
<!-- <a href="edit_pac.php?id=<?php echo $row['id']; ?>" title="Edit"><i class="tim-icons icon-pencil" aria-hidden="true"></i> -->
</a>
<a class="remove" title="Delete"><i class="fa fa-trash" aria-hidden="true" ></i></a>
<a href="view_order.php?id=<?php echo $row['id']; ?>" title="View"><i class="fa fa-eye" aria-hidden="true"></i></a>
</td>
</tr>
</tbody>
<?php
} ?>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container-fluid">
<div class="copyright">
©
<script>
document.write(new Date().getFullYear())
</script> Developped with <i class="tim-icons icon-heart-2"></i> by
<a href="javascript:void(0)" target="_blank">Ephphatha Softech</a>
</div>
</div>
</footer>
</div>
</div>
<!-- Core JS Files -->
<script src="./js/core/jquery.min.js"></script>
<script src="./js/core/popper.min.js"></script>
<script src="./js/core/bootstrap.min.js"></script>
<script src="./js/plugins/perfect-scrollbar.jquery.min.js"></script>
<!-- Google Maps Plugin -->
<!-- Place this tag in your head or just before your close body tag. -->
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
<!-- Chart JS -->
<script src=".js/plugins/chartjs.min.js"></script>
<!-- Notifications Plugin -->
<script src=".js/plugins/bootstrap-notify.js"></script>
<!-- Control Center for Black Dashboard: parallax effects, scripts for the example pages etc -->
<script src=".js/black-dashboard.min.js?v=1.0.0"></script><!-- Black Dashboard DEMO methods, don't include it in your project! -->
<script src="./demo/demo.js"></script>
<script src="https://cdn.trackjs.com/agent/v3/latest/t.js"></script>
<script>
window.TrackJS &&
TrackJS.install({
token: "ee6fab19c5a04ac1a32a645abde4613a",
application: "black-dashboard-free"
});
/*menu*/
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;
for (i = 0; i < dropdown.length; i++) {
dropdown[i].addEventListener("click", function() {
this.classList.toggle("active");
var dropdownContent = this.nextElementSibling;
if (dropdownContent.style.display === "block") {
dropdownContent.style.display = "none";
} else {
dropdownContent.style.display = "block";
}
});
}
</script>
</body>
<style type="text/css">
.icons a{
padding:10px;
}
.add{
float: right;
}
.sidenav a, .dropdown-btn {
padding: 6px 8px 6px 16px;
text-decoration: none;
display: block;
border: none;
background: none;
width: 100%;
text-align: left;
cursor: pointer;
outline: none;
color: #fff;
}
/* Main content */
.main {
margin-left: 200px; /* Same as the width of the sidenav */
padding: 0px 10px;
}
/* Add an active class to the active dropdown button */
/* Dropdown container (hidden by default). Optional: add a lighter background color and some left padding to change the design of the dropdown content */
.dropdown-container {
display: none;
padding-left: 8px;
}
.dropdown-container a{
text-align: right;
padding-right: 70px;
line-height: 30px;}
.sidenav a:hover {
color: #32325d;
}
a:focus {
/* outline: 1px dotted; */
outline: none;
background-color: #0000001c;
}
.sidenav li{
padding: 10px;
outline: 1px solid #0000001c;
/* background-color: #0000001c;
*/
}
.table tbody+tbody {
border-top: 0.125rem solid #3d3f51;
}
</style>
<script type="text/javascript">
$(".remove").click(function(){
var id = $(this).parents("tr").attr("id");
if(confirm('Are you sure to remove this record ?'))
{
$.ajax({
url: 'delete_order.php',
type: 'GET',
data: {id: id},
error: function() {
alert('Something is wrong');
},
success: function(data) {
$("#"+id).remove();
alert("Record removed successfully");
}
});
}
});
</script>
</html>
<?php
}
?>