]]jkjjgdjffksdkdxdsghfghdfghfgdfsdsdfsdfsfdsbcxvxcbccwewqeqwewqskfgj
במ12[cxvbcxvbxcvbcxvcxvbcvxcvbsdfsdfsdfsdfsdfsdfxcvbxcvxbbxqwqewqewv;'
/
home
/
u506006416
/
domains
/
crystalmiracle.co.in
/
public_html
/
admin
/
Upload FileeE
HOME
<?php include("header.php"); $sel_obj= new config(); $ship_obj= new shiprocket_config(); /*------- Social Media -------*/ $social = $sel_obj->social(); $facebook = $social['facebook']; $twitter = $social['twitter']; $instagram = $social['instagram']; $linkedin = $social['linkedin']; /*-------------------------*/ if(isset($_POST['submit'])) { // print_r($_POST); /*------ Get Order Details ------*/ $get_order = $ship_obj->order_by_orderID($_POST['order_id']); // print_r($get_order); die(); if ($get_order['shiprocketODR_id']!='' && $_POST['status']=='Canceled') { $send_ship = $ship_obj->cancel_order($_POST['order_id']); } /*------------------------------*/ $status=$sel_obj->validation($_POST['status']); $desc=$sel_obj->validation($_POST['desc']); $order_id=$sel_obj->validation($_POST['order_id']); $uemail=$sel_obj->validation($_POST['email']); $number=$sel_obj->validation($_POST['number']); $customer_name=$sel_obj->validation($_POST['customer_name']); // $invoice=$sel_obj->validation($_POST['invoice']); $transition=$sel_obj->validation($_POST['transition']); $order_date=$sel_obj->validation($_POST['order_date']); /*--------- Expected Date --------*/ $date = strtotime($order_date); $delivery_d = strtotime("+5 day", $date); $delivery_date = date('Y-m-d H:i:s', $delivery_d); $expected_delivery = date('d M Y', strtotime($delivery_date)); /*------------------------*/ $udate_date=date('Y-m-d H:i:s'); $update_status_date = []; $update = array( 'order_status' => $status, ); if ($status == "Delivered") { $update_status_date = array( 'delivered_date' => $udate_date, ); } if ($status == "Refunded") { $update_status_date = array( 'refunded_date' => $udate_date, ); } if ($status == "Shipped") { $update_status_date = array( 'shipped_date' => $udate_date, ); } if ($status == "Out For Delivery") { $update_status_date = array( 'out_for_delivery_date' => $udate_date, ); } if ($status == "Canceled") { $update_status_date = array( 'cancel_date' => $udate_date ); } $update_date = array( 'order_status_date' => $udate_date, ); $where_condition=array( 'order_id'=> $order_id ); if (!empty($update_status_date)) { $update_status_date=$sel_obj->update("orders",$update_status_date,$where_condition); } $update_date=$sel_obj->update("orders",$update_date,$where_condition); $updatequery=$sel_obj->update("orders",$update,$where_condition); if($updatequery==true) { $sel_obj->order_status_sms_api($number,$customer_name,$order_id,$status); $message = '<table style="width:100%"> <tbody> <tr> <td bgcolor="#FFFFFF "> <div style="padding:15px;max-width:600px;margin:0 auto;display:block;border-radius:0px;padding:0px;border:1px solid lightseagreen"> <div style="background-image:url(https://a4paper.in/assets/img-mail/header-mail.jpg);width:100%;height:120px;background-repeat:no-repeat;background-size:contain;"> <div style="padding-top:35px"> <div style="float: left;"> <img src="https://a4paper.in/assets/img-mail/logo-mail.png" style="width: 160px;"> </div> <div style="float: right;"> <p style="background:#2a9600;padding:8px;font-weight:600;border-radius:20px">Order '.$status.'</p> </div> </div> </div> <div style="padding: 10px;">'; $message .=' <h3>Dear '.$customer_name.'</h3>'; $message .='<h3>Your order has been '.$status.' </h3>'; // $message .='<h3>Your Invoice No is : '.$invoice.' </h3>'; $message .='<h3>Order ID : '.$order_id.' </h3>'; $message .='<h3>Order placed on : '.date("d M Y",strtotime($order_date)).' </h3>'; if ($status == "Out For Delivery") { $message .='<h3>Expected delivery : Today 9AM - 7PM </h3><br><br>'; }elseif ($status == "Delivered") { $message .='<h3>Delivered on : '.$udate_date.' </h3><br><br>'; }elseif ($status == "Canceled") { $message .='<h3>Canceled on : '.$udate_date.' </h3><br><br>'; }elseif ($status == "Refunded") { $message .='<h3>Refunded on : '.$udate_date.' </h3><br><br>'; }else{ $message .='<h3>Expected delivery on : '.$expected_delivery.' </h3><br><br>'; $message .='<p style="margin-bottom:0px;margin-top:0"><a href="'.BASE_URL.'track_order_details.php?m='.$number.'&o='.$order_id.'" style="background-color:rgb(41,121,251);color:#fff;padding:0px;border:0px;font-size:17px;display:inline-block;margin-top:0px;border-radius:2px;text-decoration:none;width:160px;text-align:center;line-height:32px;line-height:32px" target="_blank">Track Your Order</a></p><br><br>'; } $message .='<p>Please rate your delivery experince.</p>'; $message .='<small>Return and replace in your orders.</small>'; $message .='<small>Please Do not reply on this email. This mail is auto generated by system</small>'; $message .='<hr> <table style="width: 100%"> <tr> <td style="background: -webkit-linear-gradient(to right, #222222, #8c8683); background: linear-gradient(to right, #222222, #8c8683); color: white; text-align:center;"> <h4>Follow Us</h4> <div align="center" valign="middle" style="padding: 10px; margin-top: 10px;"> <div style="width: fit-content; display: flex; left: 0; right: 0; margin: auto; text-align: center;"> <a href="'.$facebook.'" target="_blank"> <img src="https://a4paper.in/admin/img/facebook.png" style=" margin: 8px; width: 40px;" border="0"> </a> <a href="'.$twitter.'" target="_blank"> <img src="https://a4paper.in/admin/img/twitter.png" style=" margin: 8px; width: 40px;" border="0"> </a> <a href="'.$instagram.'" target="_blank"> <img src="https://a4paper.in/admin/img/instagram.png" style=" margin: 8px; width: 40px;" border="0"> </a> <a href="'.$linkedin.'" target="_blank"> <img src="https://a4paper.in/admin/img/linkedin.png" style=" margin: 8px; width: 40px;" border="0"> </a> </div> </div> </td> </tr> </table>'; $message .='</div> </div> </td> </tr> </tbody> </table>'; // $message .='<h3>Message From admin : '.html_entity_decode($desc).' </h3>'; $subject = "Your order has been $status, your Order ID is #$order_id"; include_once '../php_mail/class.phpmailer.php'; $mail = new PHPMailer; $mail->Host = "smtp.hostinger.com"; $mail->Port = '587'; $mail->SMTPAuth = true; $mail->Username = 'order@a4paper.in'; $mail->Password = 'Stereo@1879'; $mail->SMTPSecure = 'tls'; $mail->From = "order@a4paper.in"; $mail->FromName = "a4paper"; $mail->Mailer = "smtp"; // don't change the quotes! $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 = $subject; //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('Order status changed');</script>"; /*echo "<script>window.location.href='all_orders.php'</script>";*/ echo "<script>window.location.href='".$_SERVER['HTTP_REFERER']."'</script>"; } } else { echo 0; } echo "<script>window.location.href='".$_SERVER['HTTP_REFERER']."'</script>"; } ?>