Server : LiteSpeed System : Linux in-mum-web1743.main-hosting.eu 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64 User : u993087259 ( 993087259) PHP Version : 8.2.29 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail Directory : /home/u993087259/domains/naturalsveda.in/public_html/admin/ |
<!DOCTYPE html>
<html lang="en">
<head>
<?php
include 'header-script.php';
include "../connection2.php";
?>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- <style>
tr {
display: none;
}
</style> -->
</head>
<?php
$sql = "
SELECT
o.orderID,
o.productName,
o.quantity,
o.subtotal,
u.name,
u.email,
u.phone,
u.city,
u.state,
u.houseNo,
u.street,
u.pincode
FROM orders o
JOIN users u ON o.email = u.email
ORDER BY o.orderID DESC
";
$result = $conn->query($sql);
?>
<body class="">
<div class="wrapper ">
<?php
include 'side-bar.php';
?>
<div class="main-panel">
<!-- Navbar -->
<?php
include 'nav-bar.php';
?>
<!-- End Navbar -->
<div class="panel-header panel-header-sm">
</div>
<div class="content">
<div class="row">
<div class="col-md-12">
<div class="card px-3">
<div class="card-header">
<h4 class="card-title"> Contact Data</h4>
</div>
<!--<button onclick="downloadExcel()" style="margin: 20px;">Download</button>-->
<div class="header_wrap w-25 px-3">
<div class="num_rows">
<div class="form-group"> <!-- Show Numbers Of Rows -->
<select class="form-control" name="state" id="maxRows">
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
<option value="50">50</option>
<option value="70">70</option>
<option value="100">100</option>
<option value="5000">Show ALL Rows</option>
</select>
</div>
</div>
</div>
<div class="table-overflow-auto">
<table class="table table-bordered table-striped">
<thead class="table-light">
<tr>
<th>S.No</th>
<th>Order ID</th>
<th>Product Name</th>
<th>Quantity</th>
<th>Subtotal (₹)</th>
<th>Customer</th>
<th>Email</th>
<th>Phone</th>
<th>Address</th>
</tr>
</thead>
<tbody>
<?php
if ($result->num_rows > 0):
$i = 1;
while ($row = $result->fetch_assoc()):
?>
<tr>
<td><?php echo $i++; ?></td>
<td><?php echo $row['orderID']; ?></td>
<td><?php echo $row['productName']; ?></td>
<td><?php echo $row['quantity']; ?></td>
<td>₹<?php echo $row['subtotal']; ?></td>
<td><?php echo htmlspecialchars($row['name']); ?></td>
<td><?php echo $row['email']; ?></td>
<td><?php echo $row['phone']; ?></td>
<td>
<?php echo $row['houseNo'] . ', ' . $row['street'] . ', ' . $row['city'] . ', ' . $row['state'] . ' - ' . $row['pincode']; ?>
</td>
</tr>
<?php
endwhile;
else:
?>
<tr>
<td colspan="9" class="text-center">No orders found.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<!-- Start Pagination -->
<div class='pagination-container'>
<nav>
<ul class="pagination">
<!-- Here the JS Function Will Add the Rows -->
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include 'footer.php';
?>
</body>
</html>
<?php $conn->close(); ?>