📁
SKYSHELL MANAGER-
🛒
PHP v7.4.33
Create Folder
Create File
Current Path:
home
/
oshofree
/
public_html
/
chbluxuries.com
/
chb_data
/
Name
Size
Permissions
Actions
📁
..
-
0755
🗑️
🔒
📄
config.php
7.06 KB
0444
🗑️
⬇️
✏️
🔒
📄
error_log
11824.99 KB
0644
🗑️
⬇️
✏️
🔒
Editing: allorders.php
<?php include "admin_header.php"; include "modifypay.php"; include"cancelorder.php"; include"pagestyle.php"; ?> <style>.btn{font-size:12px;}</style> <script> function showResult(str) { var stat = <?= json_encode($stat) ?>; var stocksElement = document.getElementById("stocks"); if (str.length === 0) { // Clear the content and border only if the element exists if (stocksElement) { stocksElement.innerHTML = ""; stocksElement.style.border = "0px"; } return; } $.ajax({ url: "searchorders.php", method: "GET", data: { q: str, stat: stat }, success: function(response) { if (stocksElement) { stocksElement.innerHTML = response; recalculateForNewForm(document.querySelector('.your-form')) } }, error: function() {} }); } </script> <!-- Begin Page Content --> <div class="container-fluid"> <h1 class="h3 mb-4 text-gray-800">View All Transactions</h1> <p><form action="" method="post" onsubmit="return false;"><input type="text" oninput="showResult(this.value)" class="form-control" value="" placeholder="Search order no or customer ID or name or mobile." autofocus></form></p> <div class="overflow-auto" id="stocks"></div> <div class="overflow-auto"> <table class="table table-bordered" id="dataTable" style="color:black; font-size:13px; font-weight:500;" data-toggle='bootgrid'> <thead><tr bgcolor="#FF339A" style="color:white;"> <th data-column-id='employee_name' width='200px'>Order</th> <th data-column-id='employee_name' width='200px'>Customer</th> <th data-column-id='employee_name' width='200px'>Payment Method</th> <th data-column-id='employee_name' width='200px'>Date</th> <th data-column-id='employee_salary' width='200px'>Total</th> <th data-column-id='employee_salary' width='200px'>Cashier</th> <th data-column-id='employee_salary' width='200px'>Notes</th> <th data-column-id='employee_salary' width='200px'>Type</th> <th data-column-id='employee_salary' width='200px'>View</th> <th data-column-id='employee_salary' width='200px'>Cancel</th> </tr></thead> <?php include "display.php"; ?> </table> <?php $countResult = $con->query($realsql); $row = $countResult->fetch_assoc(); $totalItems = $row['total']; $totalPages = ceil($totalItems / $itemsPerPage); echo '<ul class="pagination">'; if ($totalPages > 0) { // Display previous arrow if not on the first page if ($page > 1) { echo "<li><a href='allorders.php?page=".($page-1)."'><i class='fa fa-chevron-left'></i></a></li>"; } // Display first three pages for ($i = 1; $i <= min(3, $totalPages); $i++) { $activeClass = ($i == $page) ? 'active' : ''; echo "<li class='$activeClass'><a href='allorders.php?page=$i'>$i</a></li>"; } // Display ellipsis if there are more than three pages if ($totalPages > 3 && $page > 3) { echo '<li><span>...</span></li>'; } // Display pages around the current page $start = max($page - 1, 4); $end = min($page + 1, $totalPages - 1); for ($i = $start; $i <= $end; $i++) { $activeClass = ($i == $page) ? 'active' : ''; echo "<li class='$activeClass'><a href='allorders.php?page=$i'>$i</a></li>"; } // Display ellipsis if there are more than three pages if ($totalPages > 3 && $page < $totalPages - 2) { echo '<li><span>...</span></li>'; } // Display last page $activeClass = ($totalPages == $page) ? 'active' : ''; echo "<li class='$activeClass'><a href='allorders.php?page=$totalPages'>$totalPages</a></li>"; // Display next arrow if not on the last page if ($page < $totalPages) { echo "<li><a href='allorders.php?page=".($page+1)."'><i class='fa fa-chevron-right'></i></a></li>"; } } echo '</ul>'; ?> </div> </div> </div> <?php include "footer.php"; ?>
💾 Save Changes