File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/dhyeyaprakashan.com/admin/submit_reservation_data.php
Back
<?php include '../core/init.php'; include('pager.php'); $Pager = new Pager(); $item_per_page = 15; if (isset($_POST["page"])) { $page_number = filter_var($_POST["page"], FILTER_SANITIZE_NUMBER_INT, FILTER_FLAG_STRIP_HIGH); if (!is_numeric($page_number)) { die('Invalid page number!'); } } else { $page_number = 1; } if (isset($_POST['all_search'])) { $custname = ltrim($_POST['custname']); $custmobile = ltrim($_POST['custmobile']); $data = array(); if (!empty($custname)) { $data[] = "cust_name Like '%" . $custname . "%'"; } if (!empty($custmobile)) { $data[] = "cust_mobile Like '%" . $custmobile . "%'"; } $data[] = "reg_id='".$user_data['id']."'"; $match = implode(" && ", $data); $orderby = 'id desc'; $sql_booking = "select * from table_reservation where $match order by $orderby"; $booking = mysqli_num_rows($conn->query($sql_booking)); if ($booking > 0) { $total_pages = ceil($booking / $item_per_page); $page_position = (($page_number - 1) * $item_per_page); $counter = $page_position + 1; $sql_booking1 = "select * from table_reservation where $match order by $orderby LIMIT $page_position, $item_per_page"; $exe_qry_bookingr = mysqli_num_rows($conn->query($sql_booking1)); $exe_qry_booking = $conn->query($sql_booking1); if($exe_qry_bookingr > 0) { echo '<table class="table table-bordered table-striped table-condensed" id="tbl" style="background: #ffffff;"> <thead> <tr> <th>#</th> <th>reg_id No</th> <th>cust_name</th> <th>cust_mobile</th> <th>reservation_date</th> <th>no_people</th> <th>special_note</th> <th>Update</th> <th>Delete</th> </tr> </thead> <tbody>'; while ($details = mysqli_fetch_assoc($exe_qry_booking)) { echo '<tr> <td>'.$counter.'</td> <td>'.$details['reg_id'].'</td> <td>'.$details['cust_name'].'</td> <td>'.$details['cust_mobile'].'</td> <td>'.$details['reservation_date'].'</td> <td>'.$details['no_people'].'</td> <td>'.$details['special_note'].'</td> <td><div id="modalpopup"><a href="#" data-toggle="modal" data-value="'.$details['id'].'" class="btn btn-info btn-xs">Update</a></div></td> <td id="item_'.$details["id"].'"><div class="del_wrapper"><a href="#" class="btn btn-danger del_button btn-xs" id="del-'.$details["id"].'">Delete</a></div></td> </tr>'; $counter++; } echo '</tbody></table>'; echo '<div class="text-center">'; echo $Pager->paginate_function($item_per_page, $page_number, $booking, $total_pages); echo '</div>'; } else { echo '<div class="alert alert-warning fade in"><strong><i class="fa fa-frown-o"></i></strong> No Records Available In this System</div>'; } } else { echo '<div class="alert alert-warning fade in"><strong><i class="fa fa-frown-o"></i></strong> No Records Available In this System</div>'; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings