%PDF- %GIF98; %PNG;
Server : ApacheSystem : 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_detail/ |
Upload File : |
<?php
include('../function.php');
if(isset($_GET['order_id'])){
$Order=mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM `order_tbl` WHERE order_id ='".$_GET['order_id']."'"));
if ($Order['type']=='User') {
$UserTbl=mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM `users_tbl` WHERE user_id ='".$Order['user_id']."'"));
}
$OrderDtl=mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM `order_detail_tbl` WHERE order_id ='".$Order['order_id']."' AND product_id='".$_GET['product_id']."'"));
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?=$rows_website['website_name']?> Invoice</title>
</head>
<body style="background-color:#fff;">
<div style="width: 900px;margin:auto;background-color:#fff; box-shadow: 0px 0px 5px rgb(0 0 0 / 30%);padding: 50px;">
<table cellspacing="0" style="width:900px;padding:20px;margin: 20px;margin-bottom: 50px;">
<tr style="margin-bottom: 20px;">
<td colspan="3" style="border-bottom:1px solid #000;">
<img src="<?=$base_url?>images/Upload/logo/<?=$rows_website['logo']?>" style="width:80px;">
</td>
<td style="border-bottom:1px solid #000;text-align: center;">
<p style="margin: 0;border-right: 1px solid #000;"><strong>User Type</strong></p>
<p style="margin: 0;border-right: 1px solid #000;"><?=$Order['type']?></p>
</td>
<td style="border-bottom:1px solid #000;text-align: center;">
<p style="margin: 0;border-right: 1px solid #000;"><strong>Order ID</strong></p>
<p style="margin: 0;border-right: 1px solid #000;"><?=$Order['order_id']?></p>
</td>
<td style="border-bottom:1px solid #000;text-align: center;">
<p style="margin: 0;"><strong>Date</strong></p>
<p style="margin: 0;"><?=$Order['recieve_date']?></p>
</td>
</tr>
<tr>
<td colspan="5">
<p style="font-weight: bold;margin: 0;margin-top: 20px; "><?=$rows_website['website_name']?></p>
<p style="margin: 0;"><strong>Payment Status: </strong><?php if($Order['status']==0){ echo "Pending"; } if($Order['status']==1){ echo "Success"; } if($Order['status']==2){ echo "Cancel"; } ?></p>
</td>
</tr>
<tr>
<td colspan="3">
<p style="margin: 0;margin-top: 20px;"><strong>Email: </strong> <?=$rows_website['website_email_id']?></p>
<p style="margin: 0;"><strong>Telephone: </strong> +<?=$rows_website['mobile_number1']?></p>
</td>
<td colspan="2">
<p style="margin: 0;margin-top: 20px;"><strong>Full Name: </strong><?=$OrderDtl['name']?></p>
<p style="margin: 0;"><strong>Email: </strong> <?=$OrderDtl['email']?></p>
</td>
</tr>
<tr>
<td colspan="3">
<p style="margin: 0;margin-top: 20px;"><strong>Address:</strong> <?=$rows_website['website_address']?>
<p style="margin: 0;"><strong>City: </strong> Praha 9</p>
<p style="margin: 0;"><strong>State: </strong> Praha</p>
<p style="margin: 0;"><strong>Country: </strong> Czech Republic</p>
<p style="margin: 0;"><strong>Postal Code: </strong> 17000</p>
</td>
<td colspan="2">
<p style="margin: 0;margin-top: 20px;"><strong>Address: </strong> <?=$OrderDtl['address']?></p>
<p style="margin: 0;"><strong>Country: </strong> <?=$OrderDtl['country']?></p>
<p style="margin: 0;"><strong>State: </strong> <?=$OrderDtl['state']?></p>
<p style="margin: 0;"><strong>City: </strong> <?=$OrderDtl['city']?></p>
<p style="margin: 0;margin-top: 10px;"><strong>Delivery Method: </strong> Postal Mail</p>
<p style="margin: 0;margin-bottom: 20px;"><strong>Payment Method: </strong> Paypal</p>
</td>
</tr>
<tr style="background:#eee!important;">
<td>
<p style="font-weight: bold;margin: 0;padding: 5px;">No.</p>
</td>
<td>
<p style="font-weight: bold;margin: 0;padding: 5px;">Items</p>
</td>
<td>
<p style="font-weight: bold;margin: 0;padding: 5px;">Quantity</p>
</td>
<td>
<p style="font-weight: bold;margin: 0;padding: 5px;">Price</p>
</td>
<td>
<p style="font-weight: bold;margin: 0;padding: 5px;">Total Price</p>
</td>
</tr>
<?php
$subtotal= 0;
$sql=mysqli_query($conn,"SELECT * FROM order_detail_tbl WHERE order_id ='".$Order['order_id']."' AND product_id='".$_GET['product_id']."'");
$fetch_row=mysqli_fetch_assoc($sql);
$product_row=mysqli_fetch_array(mysqli_query($conn,"SELECT * FROM `product_tbl` WHERE id ='".$OrderDtl['product_id']."'"));
$eachProductTotal=$fetch_row['quantity']*$product_row['price'];
$subtotal += $eachProductTotal;
?>
<tr>
<td>
<p style="margin: 0;padding: 5px;">1</p>
</td>
<td>
<p style="margin: 0;padding: 5px;"><?=$product_row['title']?></p>
</td>
<td>
<p style="margin: 0;padding: 5px;"><?=$fetch_row['quantity']?></p>
</td>
<td>
<p style="margin: 0;padding: 5px;">SAR <?=$product_row['price']?> </p>
</td>
<td>
<p style="margin: 0;padding: 5px;">SAR <?=$eachProductTotal?> </p>
</td>
</tr>
<!-- <tr>
<td colspan="3"></td>
<td>
<p style="font-weight: bold; margin-top: 10px;">Sub Total</p>
</td>
<td>
<p style="margin: 0;">SAR <?=$subtotal?></p>
</td>
</tr> -->
<!-- <tr>
<td colspan="3"></td>
<td>
<p style="font-weight: bold;margin: 0;">Discount</p>
</td>
<td>
<p style="margin: 0;">SAR </p>
</td>
</tr>
<tr>
<td colspan="3"></td>
<td>
<p style="font-weight: bold;margin: 0;">Transportation</p>
</td>
<td>
<p style="margin: 0;"> Charg</p>
</td>
</tr> -->
<!-- <tr style="border-top:1px solid #000;border-bottom:1px solid #000;">
<td colspan="3"></td>
<td>
<p style="font-weight: bold;margin: 0;text-transform: uppercase;margin-top: 10px;">Total Paid</p>
</td>
<td>
<p style="margin:0;margin-top:20px;background:#000 !important;;color: #fff;padding: 5px;">SAR <?=$subtotal?></p>
</td>
</tr> -->
</table>
</div>
</body>
</html>