UnknownSec Bypass
403
:
/
var
/
www
/
html
/
adminpnl
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
load_orderlist.php
<?php include "../conclass.php"; session_start(); if(!isset($_SESSION['admincanteenname'])){ header("Location: {$hostname}/admin_login.php"); } $canteenname= $_SESSION["admincanteenname"]; $connect = new PDO("mysql:localhost=3306; dbname=stbookingslotdb", "root", "root!@#123"); /*function get_total_row($connect) { $query = " SELECT * FROM tbl_webslesson_post "; $statement = $connect->prepare($query); $statement->execute(); return $statement->rowCount(); } $total_record = get_total_row($connect);*/ $limit = '1000'; $page = 1; if($_POST['page'] > 1) { $start = (($_POST['page'] - 1) * $limit); $page = $_POST['page']; } else { $start = 0; } $from=$_POST['fromdate']; $to= $_POST['todate']; $fromdateArray = array(); $fromdateArray=explode('-',$from); $todateArray = array(); $todateArray=explode('-',$to); $fromdateformat = intval($fromdateArray[2])."-".intval($fromdateArray[1])."-".intval($fromdateArray[0]); $todateformat = intval($todateArray[2])."-".intval($todateArray[1])."-".intval($todateArray[0]); $totalglcount=""; $query = "SELECT orderno,tokenno, DATE_FORMAT(orderdate,'%d/%m/%Y') AS orderdate,name,cusrank,mobileno,personalno from v_orderdetails where canteenname='". $_SESSION['admincanteenname']."' and orderdate between '". $fromdateformat."' and '".$todateformat."' GROUP by orderno,tokenno,orderdate,name,cusrank,personalno,mobileno "; $filter_query = $query . 'LIMIT '.$start.', '.$limit.''; $statement = $connect->prepare($query); $statement->execute(); $total_data = $statement->rowCount(); $statement = $connect->prepare($filter_query); $statement->execute(); $result = $statement->fetchAll(); $total_filter_data = $statement->rowCount(); if($total_filter_data ==0) { $msg="No Record Found"; echo $msg; return; } $output = ' <div align="Center"><label>Canteen Name - '.$canteenname.' </label> </div> <div align="Center"><label>From Date - '.$from.' To Date-'.$to.' </label></div> <div align="Center"> <label>Total Records - '.$total_data.' </label> </div> <table class="table table-striped table-bordered"> <tr> <th>Order No</th> <th>Token No</th> <th>Order Date</th> <th>Personal No</th> <th>Name</th> <th>Rank No</th> <th>Mobile No</th> <th>View</th> </tr> '; if($total_data > 0) { foreach($result as $row) { $output .= ' <tr> <td>'.$row["orderno"].'</td> <td>'.$row["tokenno"].'</td> <td>'.$row["orderdate"].'</td> <td>'.$row["personalno"].'</td> <td>'.$row["name"].'</td> <td>'.$row["cusrank"].'</td> <td>'.$row["mobileno"].'</td> <td> <a href=view_order.php?id='.$row["orderno"].' ><i > view</i></a></td> </tr> '; } } else { $output .= ' <tr> <td colspan="8" align="center">No Data Found</td> </tr> '; } $output .= ' </table> <br /> <div align="center"> <ul class="pagination"> '; $total_links = ceil($total_data/$limit); $previous_link = ''; $next_link = ''; $page_link = ''; //echo $total_links; if($total_links > 4) { if($page < 5) { for($count = 1; $count <= 5; $count++) { $page_array[] = $count; } $page_array[] = '...'; $page_array[] = $total_links; } else { $end_limit = $total_links - 5; if($page > $end_limit) { $page_array[] = 1; $page_array[] = '...'; for($count = $end_limit; $count <= $total_links; $count++) { $page_array[] = $count; } } else { $page_array[] = 1; $page_array[] = '...'; for($count = $page - 1; $count <= $page + 1; $count++) { $page_array[] = $count; } $page_array[] = '...'; $page_array[] = $total_links; } } } else { for($count = 1; $count <= $total_links; $count++) { $page_array[] = $count; } } for($count = 0; $count < count($page_array); $count++) { if($page == $page_array[$count]) { $page_link .= ' <li class="page-item active"> <a class="page-link" href="#">'.$page_array[$count].' <span class="sr-only">(current)</span></a> </li> '; $previous_id = $page_array[$count] - 1; if($previous_id > 0) { $previous_link = '<li class="page-item"><a class="page-link" href="javascript:void(0)" data-page_number="'.$previous_id.'">Previous</a></li>'; } else { $previous_link = ' <li class="page-item disabled"> <a class="page-link" href="#">Previous</a> </li> '; } $next_id = $page_array[$count] + 1; if($next_id >= $total_links) { $next_link = ' <li class="page-item disabled"> <a class="page-link" href="#">Next</a> </li> '; } else { $next_link = '<li class="page-item"><a class="page-link" href="javascript:void(0)" data-page_number="'.$next_id.'">Next</a></li>'; } } else { if($page_array[$count] == '...') { $page_link .= ' <li class="page-item disabled"> <a class="page-link" href="#">...</a> </li> '; } else { $page_link .= ' <li class="page-item"><a class="page-link" href="javascript:void(0)" data-page_number="'.$page_array[$count].'">'.$page_array[$count].'</a></li> '; } } } $output .= $previous_link . $page_link . $next_link; $output .= ' </ul> </div> '; echo $output; ?>
Copyright © 2025 - UnknownSec