[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: today_bill.php
<?php include'header.php';?> <script src="jquery-1.11.1.min.js"></script> <div class="main-panel"> <div class="content"> <div class="container-fluid"> <div class="page-header"> <h4 class="page-title">Today's Orders</h4> </div> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-body"> <div class="table-responsive"> <table id="basic-datatables" class="display table table-striped table-hover"> <thead> <tr> <th>Sl</th> <th>Order Time</th> <th>Order No</th> <th>Customer Name/Phone/Address</th> <th>Maker/Name/Phone/Address</th> <th>Amount</th> <th>Payment Mode</th> <th>Payment Status</th> <th>Delivery Status</th> <th>Locality</th> <th>Show</th> </tr> </thead> <tbody> <?php $count=1; $date1=date("Y-m-d")." 00:00:00"; $date2=date("Y-m-d")." 23:59:59"; //$sq="select * from place_order where date between '$date1' and '$date2' and status!='paid' group by order_id order by id desc "; $sq="select * from place_order where date between '$date1' and '$date2' and agent_id='".$_SESSION['driver_id']."' group by order_id order by id desc "; $r=$con->prepare($sq); $r->execute(); while($row = $r->fetch(PDO::FETCH_ASSOC)){ //$status=$row['status']; $pro_id=$row['order_id']; $paym=$row['pay_status']; $txid=empty($row['txid'])?"---":$row['txid']; $sq1=$show->readwithdata('food_maker','maker_id',$row['maker_id']); while($row1=$sq1->fetch(PDO::FETCH_ASSOC)){ $com_name=$row1['title']; $maker_name=$row1['name']; $mphone=$row1['phone']; $locality=$row1['locality']; $maker_address=$row1['address']; } $delivery_type=$row['delivery_type']; if($delivery_type=='pickup'){ $del_amt="-".$row['self_pickup']; $del_label='Self-pickup'; }else{ $del_amt=$row['delivery_charge']; $del_label='Home-Delivery'; } if($row['payment_status']=='PENDING'){ $pay="<button type='button' class='btn btn-xs btn-info' id='$count' data-toggle='modal' data-target='#myModal$count'> Pay Now</button>"; } //<a href='repeat_order.php?uid=".base64_encode($row['user_id'])."&bid=".base64_encode($pro_id)."' class='btn btn-info btn-xs' >Repeat Order</a> echo " <tr> <td>$count</td> <td>".date('d-m-Y h:i A',strtotime($row['date']))."</td> <td>".$row['order_id']." </td> <td>".$row['client_name']."<br>".$row['phon']."<br> <a href='map_client.php?add=".$row['address']."' target='_blank'>Show on Map</a> </td> <td>".$com_name."<br>".$maker_name."<br>".$mphone."<br> <a href='map_client.php?add=".$maker_address."' target='_blank'>Show on Map</a></td> <td>".$row['amount']."</td> <td>".$paym."<br>$pay</td> <td>".$row['payment_status']."</td>"; ?> <td> <script> function status(Value){ //alert(Value); var st="#status"+Value; var id_txt="#id"+Value; var amt_txt="#amount"+Value; var deli_txt="#deli"+Value; var status=$(st).val(); var id=$(id_txt).val(); var table='place_order'; var amt=$(amt_txt).val(); var deli=$(deli_txt).val(); // alert(deli); var table='place_order'; if(deli=='Online'){ setTimeout(function() { swal({ title: "", text: "Payment mode=Online. Amount to be collected=0", type: "success" }, function() { window.location = ""; }); }, 1000); }else{ setTimeout(function() { swal({ title: "", text: "Payment mode=COD. Amount to be collected="+amt, type: "success" }, function() { window.location = ""; }); }, 1000); } $.ajax({ type: "POST", url: "ajax_check.php", // Name of the php files data: "order_status="+status+"&id="+id+"&table="+table, async: false, global: false, beforeSend: function(){ /* Show image container */ $("#loader").show(); }, success: function(result) { $( "#basic-datatables" ).load( "all_bill.php #basic-datatables" ); //window.location.reload(); //table.ajax.reload(); } }); } </script> <?php $interests = array('NOT DELIVERED','DELIVERED'); ?> <select name="status" onchange="status(<?=$count;?>)" id="status<?=$count;?>"> <?php foreach( $interests as $interest ): ?> <option value="<?php echo $interest ?>"<?php if( $interest==$row['order_status']): ?> selected="selected"<?php endif; ?>><?php echo $interest ?></option> <?php endforeach; ?> </select> <input type="hidden" id="id<?=$count?>" value="<?=$row['id']?>" > <input type="hidden" id="amount<?=$count?>" value="<?=$row['amount']?>" > <input type="hidden" id="deli<?=$count?>" value="<?=$row['pay_status']?>" > <!-- Image loader --> <div id='loader' style='display: none;'> <img src='loader.gif' width='32px' height='32px'> </div> </td> <?php echo "<td>".$locality."</td> <td><a href='bill_final.php?uid=".base64_encode($row['user_id'])."&bid=".base64_encode($pro_id)."' target='_blank'class='btn btn-secondary btn-xs'>Show Bill</a> </td> </tr>"; ?> <div class="modal fade" id="myModal<?=$count?>" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Pay Now</h4> </div> <div class="modal-body"> <form method="post" data-aos="fade-down" style="transition: all 1500ms ease-in-out;" class="aos-init aos-animate"> <input type="hidden" name="billid<?=$count?>" value="<?=$pro_id?>"> <div class="fill-box fill-half"> <select name="pay_type<?=$count?>" class="form-control" required> <option value="">Pay Now</option> <option value="UPI">UPI</option> <option value="Cash">Cash</option> </select> </div> <div class="fill-box fill-half"> <label>Amount</label> <input id="email" type="text" class="form-control" name="amount<?=$count?>" value="<?=$row['amount']?>" placeholder="Your Email Id" readonly> </div> <div class="fill-box fill-half"> <label>Scan Now</label> <img src="images.jpg" width="250"> </div> <div class="fill-box aos-init" style="border:none; padding: 0;transition: all 1400ms ease-in-out;" data-aos="zoom-in"> <input type="submit" title="Submit" class="btn btn-xs btn-info" value="Update Payment" name="sub<?=$count?>" required> </div> </form> <?php $sub='sub'.$count; $pay_type='pay_type'.$count; $billid='billid'.$count; if(isset($_POST[$sub])){ $sq="update place_order set pay_type='".$_POST[$pay_type]."',payment_status='PAID' where order_id='".$_POST[$billid]."'"; // echo $sq; $s1=$con->prepare($sq); $s1->execute(); echo "<script>sweetAlert('Ok','payment updated','success');window.location.href='".$_SERVER['request_uri']."';</script>"; }?> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <?php ++$count; } ?> </tbody></table> </div> </div> </div> </div> </div> </div> </div> </div> </div> <script > $(document).ready(function() { $('#basic-datatables').DataTable({ }); $('#multi-filter-select').DataTable( { "pageLength": 5, initComplete: function () { this.api().columns().every( function () { var column = this; var select = $('<select class="form-control"><option value=""></option></select>') .appendTo( $(column.footer()).empty() ) .on( 'change', function () { var val = $.fn.dataTable.util.escapeRegex( $(this).val() ); column .search( val ? '^'+val+'$' : '', true, false ) .draw(); } ); column.data().unique().sort().each( function ( d, j ) { select.append( '<option value="'+d+'">'+d+'</option>' ) } ); } ); } }); // Add Row $('#add-row').DataTable({ "pageLength": 5, }); var action = '<td> <div class="form-button-action"> <button type="button" data-toggle="tooltip" title="" class="btn btn-link btn-primary btn-lg" data-original-title="Edit Task"> <i class="la la-edit"></i> </button> <button type="button" data-toggle="tooltip" title="" class="btn btn-link btn-danger" data-original-title="Remove"> <i class="la la-times"></i> </button> </div> </td>'; $('#addRowButton').click(function() { $('#add-row').dataTable().fnAddData([ $("#addName").val(), $("#addPosition").val(), $("#addOffice").val(), action ]); $('#addRowModal').modal('hide'); }); }); </script> <?php include'footer.php';?>
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: 691.92 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