hjkhghtjhjjhjhjhjhjjhjhjjhrrtrtoirh
bnmbertsurrttrtrtrtrjhjhjjhjhhjhjhjhf'tdfg
/
home
/
u506006416
/
domains
/
crystalmiracle.co.in
/
public_html
/
admin
/
Upload FileeE
HOME
<?php include("header.php"); $ins_obj= new config(); ?> <?php @$postaction=$_GET['edit']; $pid=$_GET['pid']; $tx_invoice=$_GET['invoice']; if($postaction=='1') { $condition1="`id`=".$_GET['post_id']; $query=$ins_obj->display_rcd('orders',$condition1); if(is_array($query) || !empty($query)) { foreach($query as $data) { $status=$data['order_status']; } foreach($query as $order_data) { } } } ?> <?php if($_SERVER['REQUEST_METHOD']=='POST') { $insertdata = array( 'order_status' => $ins_obj->validation($_POST['order_status']), 'courier_cname' => $ins_obj->validation($_POST['courier_cname']), 'courier_trackid' => $ins_obj->validation($_POST['courier_trackid']), 'courier_trackurl' => $ins_obj->validation($_POST['courier_trackurl']), 'courier_comment' => $ins_obj->validation($_POST['desc']), ); if(isset($_POST['submit'])) { $where_condition=array( 'id'=> $postaction ); $update_query=$ins_obj->update("orders",$insertdata,$where_condition); if($update_query=='TRUE') { // ==================================================================== $message =' <div style="font-family: Helvetica Neue, Helvetica, Helvetica, Arial, sans-serif;"> <table style="width: 100%;"> <tr> <td></td> <td bgcolor="#FFFFFF "> <div style="padding: 15px; max-width: 600px;margin: 0 auto;display: block; border-radius: 0px;padding: 0px; border: 1px solid lightseagreen;"> <table style="padding: 10px;font-size:14px; width:100%;"> <tr> <td colspan="2" style="padding:10px;font-size:14px; width:100%;"> <p>Dear '.$ins_obj->validation($_POST['useremail']).',</p> <h4 class="text-center">Order tracking Details Are :</h4> </td> <tr> <td>Courier company name : '.$ins_obj->validation($_POST['courier_cname']).'</td> </tr> <tr> <td>Tracking id : '.$ins_obj->validation($_POST['courier_trackid']).'</td> </tr> <tr> <td>Tracking url : '.$ins_obj->validation($_POST['courier_trackurl']).'</td> </tr> <tr> <td>Comment : '.html_entity_decode($ins_obj->validation($_POST['desc'])).'</td> </tr> <tr> <td>Order Id : '.$ins_obj->validation($_POST['order_id']).'</td> </tr><br> <p>Many Thanks <br> [Team crystalmiracle]<br> rohan@vdcpaper.com </p> <!-- /Callout Panel --> <!-- FOOTER --> </td> </tr> <tr> <td> <div align="center" style="font-size:12px; margin-top:20px; padding:5px; width:100%; background:#3e4095;color:#fff;"> <a href="'.BASE_URL.'" target="_blank" style="color:#fff; text-decoration: none;">momspet.in</a> </div> </td> </tr> </table> </div> '; require '../php_mail/class.phpmailer.php'; $mail = new PHPMailer; $mail->Host = "smtp.hostinger.com"; $mail->Port = '587'; $mail->SMTPAuth = true; $mail->Username = 'info@crystalmiracle.co.in'; $mail->Password = ''; $mail->SMTPSecure = 'tls'; $mail->From = "info@crystalmiracle.co.in"; $mail->FromName = "crystalmiracle"; $mail->Mailer = "smtp"; // don't change the quotes! //Sets the From name of the message $mail->AddAddress($uemail); $mail->WordWrap = 50; //Sets word wrapping on the body of the message to a given number of characters $mail->IsHTML(true); //Sets message type to HTML //$mail->AddAttachment($path); //Adds an attachment from a path on the filesystem $mail->Subject = "Order Status"; //Sets the Subject of the message $mail->Body = $message; //An HTML or plain text message body if($mail->Send()) //Send an Email. Return true on success or false on error { echo "<script>alert('Shiping details updated');window.location.href='shiping.php'</script>"; } else { echo "<script>alert('SMTP mail error');</script>"; } } else { echo "error".mysqli_error($this->con); } } } ?> <?php include("sidebar.php");?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1 class="m-0 text-dark">Order</h1> </div> <!-- /.col --> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item active">Order</li> </ol> </div> <!-- /.col --> </div> <!-- /.row --> </div> <!-- /.container-fluid --> </div> <!-- /.content-header --> <!-- Main content --> <section class="content"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="row no-print"> </div> <br> <div class="invoice p-3 mb-3" style="display: none;"> <h3>Courier Details</h3> <form action="?edit=<?php echo @$data['id'];?>" method="POST" enctype="multipart/form-data"> <div class="card-body"> <div class="tab-content" id="custom-tabs-five-tabContent"> <div class="tab-pane fade active show" id="general"> <div class="card-body"> <input type="hidden" name="order_status" value="Shipped"> <input type="hidden" name="order_id" value="<?php echo $_GET['post_id'];?>"> <input type="hidden" name="useremail" value="<?php echo $_GET['user_email'];;?>"> <div class="form-group row"> <label for="inputPassword3" class="col-sm-2 col-form-label">Company name </label> <div class="col-sm-10"> <input type="text" name="courier_cname" class="form-control"> </div> </div> <div class="form-group row"> <label for="inputPassword3" class="col-sm-2 col-form-label">Tracking code</label> <div class="col-sm-10"> <input type="text" name="courier_trackid" class="form-control"> </div> </div> <div class="form-group row"> <label for="inputPassword3" class="col-sm-2 col-form-label">Tracking url</label> <div class="col-sm-10"> <input type="text" name="courier_trackurl" class="form-control"> </div> </div> <div class="form-group row"> <label for="inputPassword3" class="col-sm-2 col-form-label">Comment</label> <div class="col-sm-10"> <textarea class="textarea" name="desc" placeholder="Place some text here" style="width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"><?php echo @$data['f_desc'];?> </textarea> </div> </div> </div> </div> </div> </div> <div class="card-footer"> <?php if($postaction=='1') { ?> <button type="submit" name="submit" class="btn btn-primary">Update</button> <?php } else { ?> <button type="submit" name="submit" class="btn btn-primary">Submit</button> <?php } ?> </div> </form> </div> <!-- Main content --> <div class="container-fluid text-right mb-2"> <button type="button" class="btn btn-sm btn-primary" onclick="printDiv()">Print Invoice</button> <script> function printDiv() { var printContents = document.getElementById("invoice_div").innerHTML; var originalContents = document.body.innerHTML; document.body.innerHTML = printContents; document.title = "Invoice"; window.print(); document.body.innerHTML = originalContents; } </script> </div> <div class="invoice p-3 mb-3" id="invoice_div"> <div class="row"> <div class="col-sm-3 invoice-col" style=" border-color: #dee2e6; border-style: solid; border-width: 1px 0 1px 1px;"> <b>Tax Invoice </b> <!-- <p class="text-capitalize"><?php echo strtolower("VINDASHARI DISTILLERS AND CHEMICALS"); ?></p> --> <!--<img src="img/barcode.gif" class="img-fluid">--> </div> <div class="col-sm-3 invoice-col" style=" border-color: #dee2e6; border-style: solid; border-width: 1px 0 1px 1px;"> <span><b>Order ID :</b> #<?php echo $data['order_id'];?></span><br> <span><b>Order Date :</b> <?php echo $data['order_date'];?></span> </div> <div class="col-sm-3 invoice-col" style=" border-color: #dee2e6; border-style: solid; border-width: 1px 0 1px 1px;"> <span><b>Invoice No :</b> <?php echo $tx_invoice;?></span><br> </div> <div class="col-sm-3 invoice-col" style=" border-color: #dee2e6; border-style: solid; border-width: 1px 1px 1px 1px;"> <span><b>GSTIN :</b> 07AAJPE6220F2Z3</span><br> </div> </div> <div class="row invoice-info" id="printTable" style="margin-bottom: 10px;"> <div class="col-sm-3 invoice-col" style=" border-color: #dee2e6; border-style: solid; border-width: 1px 0 1px 1px;"> <strong> From</strong> <!-- <address> <b>crystalmiracle.in</b><br> Third Floor Tagore Garden<br> Commercial Market<br> Delhi, Pin - 110027<br> Phone: +91 9958559900<br> Email: rohan@vdcpaper.com<br> GST no: 07ALOPC1087E1Z9 </address> --> <address> Vindashari Distillers and Chemicals<br> 3rd Floor Commercial Market,<br> Shopping Center, Tagore Garden New Delhi-110027<br> Email: info@crystalmiracle.in<br> </address> </div> <div class="col-sm-3 invoice-col" style=" border-color: #dee2e6; border-style: solid; border-width: 1px 0 1px 1px;"> <b>Shipping Address <span style="float: right; color: #17a2b8;"><?php echo $data['address_type'];?></span></b> <address> <?php echo $data['f_name']." ".$data['l_name'];?><br> <?php echo $data['str_address1'];?><br> <?php echo $data['str_address2'];?><br> <?php echo $data['town']." ".$data['pincode'];?><br> Phone: <?php echo $data['p_no'];?><br> Email: <?php echo $data['e_address'];?><br> </address> </div> <!-- /.col --> <div class="col-sm-3 invoice-col" style=" border-color: #dee2e6; border-style: solid; border-width: 1px 0 1px 1px;"> <?php $orderid =$data['order_id']; $condition1="`order_id`="."'$orderid'"; $query=$ins_obj->display_rcd('d_shipping_add',$condition1); if(is_array($query) || !empty($query)) { foreach($query as $different_data) { } } ?> <b>Delivery address <span style="float: right; color: #17a2b8;"><?php echo $data['address_type'];?></span></b> <address> <?php echo $different_data['f_name']." ".$different_data['l_name'];?><br> <?php echo $different_data['str_address1'];?><br> <?php echo $different_data['str_address2'];?><br> <?php echo $different_data['town']." ".$different_data['pincode'];?><br> Phone: <?php echo $different_data['p_no'];?><br> Email: <?php echo $different_data['e_address'];?><br> </address> </div> <!-- /.col --> <div class="col-sm-3 invoice-col" style=" border-color: #dee2e6; border-style: solid; border-width: 1px 1px 1px 1px;"> <b>Invoice : </b><?php echo $tx_invoice;?> <br> <b>Date : </b><?php echo date('d/m/yy');?> <br> <b>Order ID :</b> #<?php echo $od_id=$data['order_id'];?><br> <b>Transition ID :</b> #<?php echo $data['transction_id'];?><br> <br> <b>Payment :</b> <?php if($data['pay_type']=='1'){?><span class="right badge badge-info">COD</span><?php }else{?><span class="right badge badge-info">Payumoney</span><?php }?><br> <?php if($data['order_status']=="Pending" || $data['order_status']=="Processed" || $data['order_status']=="Shipped"){?> <b>Expected Delivery :</b> <span><?php echo expacted_delivery($data['order_date']); ?></span> <?php } if($data['order_status']=="Out For Delivery"){?> <b>Expected Delivery :</b> <span><?php echo "Today 9AM - 7PM"; ?></span> <?php } ?> </div> <!-- /.col --> </div> <!-- /.row --> <!-- Table row --> <div class="row"> <div class="col-12 table-responsive"> <table class="table table-striped table-bordered"> <thead> <tr> <th>S.no</th> <th>Image</th> <th>Product</th> <th>HSN Code</th> <th>Price</th> <th>Qty</th> <th>GST</th> <th>Gross Amount</th> <th>Subtotal</th> <th>Weight</th> </tr> </thead> <tbody> <tr> <?php $u_id=$data['user_id']; $post_id=$_GET['post_id']; $condition1="status='0' AND `order_id`='$post_id'"; $query=$ins_obj->display_rcd('temp_cart', $condition1); $a=0; if(is_array($query) || !empty($query)) { $total_gst = 0; $sub_total=""; foreach($query as $data) { $gst=str_replace("%"," ",$data['gst']); ?> <td><?php echo $a+1;?></td> <td><img width="100" height="75" src="upload/<?php echo $data['img'];?>"></td> <td> <?php echo $data['p_name'];?></td> <td><?php echo $data['hsn_code'];?></td> <td>₹<?php echo $data['d_price'];?> </td> <td> <small>x</small> <?php echo $data['quantity'];?></td> <td> <?php echo "GST ". $gst."%"; ?> </td> <td> <?php echo "₹". $totalamount=($data['quantity']*$data['d_price']);?> </td> <td> <?php $finalgst=$ins_obj->get_percentage($totalamount,$gst); $finaltotal=$finalgst+$totalamount; echo "₹". number_format($finaltotal,'2'); $total_gst+=$finalgst; $sub_total+=$totalamount; ?> </td> <td> <!-- ---- Weight ------- --> <?php $p_id = $data['p_id']; $get_product_condition="`p_id`="."'$p_id'"; $get_product_query=$ins_obj->display_rcd("product",$get_product_condition); foreach($get_product_query as $get_product) { } $sum_weight = $get_product['weight']*$data['quantity']; $total_weight += $sum_weight; ?> <?php if($get_product['weight']!=0){ ?> <span ><?php echo number_format($sum_weight, 2);?>Kg</span> <?php } ?> <!-- --------------------- --> </td> </tr> <?php $a++; } } ?> </tbody> </table> </div> <!-- /.col --> </div> <!-- /.row --> <div class="row"> <!-- accepted payments column --> <div class="col-8"> <table class="table table-responsive table-bordered"> <tbody> <tr> <td><b>TOTAL QTY:</b> <?php $where="`order_id`=".$_GET['post_id']; echo $ins_obj->sumallwhere('quantity','temp_cart',$where);?></td> </tr> <tr> <td> <span> <b>Declaration</b></span><br> <small>The goods sold are intended for end user consumption and not for resale. </small><br> <small>We declare that this invoice shows the actual price of the goods described and that all particular is true and correct.</small> <hr> <small><b>This is computer generated invoice.</b></small> </td> </tr> </tbody> </table> </div> <!------ New Subtotal -------> <?php $new_gst = @number_format($total_gst,'2'); $new_packaging = @number_format($order_data['packaging_price'],2); $sub_total = $order_data['t_price']-$new_gst-$new_packaging-$order_data['shipping_price']; ?> <!-- --------------------- --> <div class="col-4"> <?php $temp_id=$data['temp_id']; $condition1="temp_id="."'$temp_id'"; $query=$ins_obj->display_rcd('shiping', $condition1); if(is_array($query) || !empty($query)) { foreach($query as $ship_data) { $shipping=$ship_data['shiping_cost']; } } ?> <table class="table table-responsive table-bordered"> <tr> <th>Sub Total:</th> <td>₹<?php echo @number_format($sub_total,'2');?></td> </tr> <tr> <th>GST:</th> <td>₹<?php echo @number_format($total_gst,'2');?></td> </tr> <?php if($total_weight!=0){ ?> <tr> <th>Total Weight:</th> <td><?php echo number_format($total_weight,'2');?>Kg</td> </tr> <?php } ?> <tr> <th>Shipping Charge:</th> <td> ₹<?php echo @number_format($order_data['shipping_price'],2);?> </td> </tr> <tr> <th>Packaging Charge:</th> <td> ₹<?php echo @number_format($order_data['packaging_price'],2);?> </td> </tr> <?php if($order_data['offer_discount']>0){ ?> <tr> <th>Offer Discount:</th> <td>₹ <?php echo @number_format($order_data['offer_discount'],2);?> </td> </tr> <?php } ?> <?php if($order_data['bank_discount']>0){ ?> <tr> <th>Bank Discount:</th> <td>₹<?php echo @number_format($order_data['bank_discount'],2);?></td> </tr> <?php } ?> <?php if($order_data['discount_amount']>0){ ?> <tr> <th>Coupon Discount</th> <td>₹<?php echo $order_data['discount_amount']; ?></td> </tr> <?php } ?> <tr> <th>Grand Total: <br> <small>All values are in INR</small> </th> <td> ₹<?php echo $order_data['t_price'];?> </td> <!-- <td> ₹ <?php $grandtotal=($total_gst+$sub_total+ $order_data['shipping_price']+ $order_data['packaging_price']); echo @number_format($grandtotal,'2'); ?> </td> --> </tr> </table> </div> </div> </div> </div> <!-- /.col --> </div> <!-- /.row --> </div> <!-- /.container-fluid --> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <?php include("footer.php");?> <script type="text/javascript"> $(document).on('','#',function() { var order_id = $('#order_id').val(); var status = $('#status').val(); var notify = $('#notify').val(); var desc = $('#desc').val(); var datastring='order_id'+ order_id + '&status' + status + '¬ify' + notify + '&desc' + desc; alert(datastring); $.ajax({ url:'order_status.php', method:'POST', data:{order_id:order_id,status:status,notify:notify,desc:desc}, success:function(response){ alert(response); if(response==1) { alert("Order Status Changed"); } else { alert("error"); } } }); }); </script>