[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: show_bill.php
<?php $id=$_REQUEST['id']; include('header.php'); ?> <style> .col-md-6,.col-md-4,.col-md-3,.col-md-2{ display:inline-block !important; } </style> <div class="main-panel"> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-header"> <div class="card-title">Bill Details</div> </div> <?php $total1=0; $stmt1=$show->readwithdata('place_order','order_id',$id); $num1=$stmt1->rowCount(); if($num1>0){ while($row=$stmt1->fetch(PDO::FETCH_ASSOC)){ $pro_id=$row['order_id']; $cname=$row['user_id']; $date=$row['date']; $amt=$row['amount']; $phone=$row['phon']; $add=$row['address']; $st=$row['status']; $status=$row['status']; ?> <form method="post" data-toggle="validator" enctype="multipart/form-data" > <div class="form-group"> <div class="col-md-4"> <label>Order Id</label> <input type="text" class="form-control" placeholder="Full Name" name="order_id" value="<?=$row['order_id']?>" size="30" readonly> </div> <div class="col-md-4"> <label>Order Date</label> <input type="text" class="form-control" placeholder="Full Name" value="<?=date('d-m-Y h:i a',strtotime($row['date']))?>" size="30" readonly> </div> </div> <div class="form-group"> <div class="col-md-4"> <label>Customer Name</label> <input type="text" class="form-control" value="<?=$row['client_name']?>" size="30" readonly/> </div> <div class="col-md-3"> <label>Customer Email</label> <input type="text" class="form-control" placeholder="Full Name" name="pname" value="<?=$row['email']?>" size="30" readonly> </div> <div class="col-md-3"> <label>Customer Phone</label> <input type="text" class="form-control" placeholder="Full Name" value="<?=$row['phon']?>" size="30" readonly> </div> </div> <div class="form-group"> <div class="col-md-3"> <label>Order Amount</label> <input type="text" class="form-control" value="<?=$row['amount']?>" size="30" readonly> </div> <div class="col-md-3"> <label>Payment Status</label> <input type="text" class="form-control" value="<?=$row['pay_status']?>" name="pay_status" readonly> </div> <div class="col-md-3"> <label>Order Status</label> <input type="text" class="form-control" value="<?=$row['status']?>" name="price" readonly> </div> </div> <div class="form-group"> <div class="col-md-3"> <label>Delivery Status</label> <?php $options = array("DELIVERED","NOT DELIVERED"); ?> <select class="form-control" name="status" required> <?php foreach ($options as $option): ?> <option value="<?php echo $option; ?>"<?php if ($row['delivery'] == $option): ?> selected="selected"<?php endif; ?>> <?php echo $option; ?> </option> <?php endforeach; ?> </select> </div> <div class="col-md-3"> <label>Refund Status</label> <?php $options = array("NO","YES"); ?> <select class="form-control" name="refund" required> <?php foreach ($options as $option): ?> <option value="<?php echo $option; ?>"<?php if ($row['refund'] == $option): ?> selected="selected"<?php endif; ?>> <?php echo $option; ?> </option> <?php endforeach; ?> </select> </div> <div class="col-md-3"> <label>Delivery Link</label> <input type="text" class="form-control" name="delivery_link" value="<?=$row['delivery_link']?>" placeholder="Delivery Link"> </div> </div> <div class="form-group form-show-validation row" > <?php $total1=0;$count=1; $stmt1 =$show->readwithdata('bill','order_id',$id); $num1 = $stmt1->rowCount(); if($num1>0){ ?> <table id="basic-datatables" class="display table table-striped table-hover"> <thead> <tr> <th>Sl No </th> <th>Product Name</th> <th>Product Price </th> <th> Total </th> </tr> </thead> <tbody> <?php while ($row11 = $stmt1->fetch(PDO::FETCH_ASSOC)){ $sq=$show->readwithdata('product_img','product_id',$row11['product_id']); while ($row1 = $sq->fetch(PDO::FETCH_ASSOC)){ $img=$row1['img']; } ?> <tr> <td><?=$count?>.</td> <td><img src="<?=$pic_img?>/<?=$img?>" width="100px" style="float: left; padding: 0 10px 0 10px;"> <?=$row11['product_name']?> </td> <td><?=$row11['quantity']?>x<?=$row11['price']?></td> <td><?=$row11['total']?></td> </tr> <?php ++$count;} ?> </tbody> </table> <?php }?> </div> <div class="card-action"> <div class="row"> <div class="col-md-12"> <a href="all_bill.php" class="btn btn-info" name="back">Back</a> <input class="btn btn-success" type="submit" name="sub" value="Update"> <button class="btn btn-danger">Cancel</button> </div> </div> </div> </form> <?php } } ?> <?php if(isset($_POST['sub'])){ $allowed = ["delivery_link","refund","delivery"]; $params = []; $setStr = ""; foreach ($allowed as $key) { if (isset($_POST[$key]) && $key != "uid") { $setStr .= "`$key` = :$key,"; $params[$key] = htmlspecialchars($_POST[$key]); } } $setStr = rtrim($setStr, ","); $params['order_id'] =$pro_id; $show->table ='place_order'; $show->cols =$setStr; $show->id_name ='order_id'; $show->params =$params; print_r($params); if($show->update_all()){ echo '<script> setTimeout(function() { swal({ title: "Thank You ", text: "for Updating!", type: "success" }, function() { window.location = "'.$_SERVER['REQUEST_URI'].'"; }); }, 1000); </script>'; } else{ echo "ss"; } }?> </div> <script src="js/bootstrap-datepicker.js"></script> <script type="text/javascript"> // When the document is ready $(document).ready(function(){ $("#date1").datepicker({ format: 'dd-mm-yyyy', }); $("#date2").datepicker({ format: 'dd-mm-yyyy', }); $("#date3").datepicker({ format: 'dd-mm-yyyy', }); $("#date4").datepicker({ format: 'dd-mm-yyyy', }); }); </script> </div></div> </div></div> </div> <!--footer--> <?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: 692.22 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