%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/public_html/website_6ca89795/admin/ |
Upload File : |
<?php
include('../dbcon.php');
if(!isset($_GET['order_id']))
{
echo "Invalid Order";
exit();
}
$order_id = $_GET['order_id'];
$order_query = "SELECT * FROM orders WHERE id='$order_id'";
$order_result = mysqli_query($conn,$order_query);
if(mysqli_num_rows($order_result)==0)
{
echo "Order not found";
exit();
}
$order = mysqli_fetch_assoc($order_result);
$item_query = "SELECT * FROM order_items WHERE order_id='$order_id'";
$item_result = mysqli_query($conn,$item_query);
?>
<?php
$qry1 = "SELECT * FROM `logo`";
$run = mysqli_query($conn, $qry1);
$logodatas = mysqli_fetch_assoc($run);
?>
<!DOCTYPE html>
<html>
<head>
<title>Invoice</title>
<style>
body{
font-family: 'Segoe UI', sans-serif;
background:#f4f6f9;
}
.invoice-box{
width:900px;
margin:auto;
background:#fff;
padding:30px;
border-radius:10px;
box-shadow:0 0 15px rgba(0,0,0,0.1);
}
/* HEADER */
.header{
display:flex;
justify-content:space-between;
align-items:center;
border-bottom:2px solid #eee;
padding-bottom:15px;
}
/* LOGO */
.logo1{
width:120px;
}
/* COMPANY ADDRESS */
.company-info{
margin-top:10px;
font-size:14px;
color:#555;
line-height:1.6;
}
/* RIGHT SIDE */
.invoice-info{
text-align:right;
}
.invoice-info h2{
margin:0;
color:#333;
}
/* CUSTOMER */
.section-title{
margin-top:25px;
font-size:18px;
border-left:4px solid #007bff;
padding-left:10px;
margin-bottom:10px;
}
.customer-details{
font-size:14px;
line-height:1.7;
}
/* TABLE */
table{
width:100%;
border-collapse:collapse;
margin-top:20px;
}
table th{
background:#007bff;
color:#fff;
padding:12px;
}
table td{
border:1px solid #ddd;
padding:10px;
text-align:center;
}
/* TOTAL */
.total{
text-align:right;
font-size:20px;
font-weight:bold;
margin-top:20px;
color:#000;
}
/* FOOT */
.footer{
margin-top:20px;
font-size:14px;
}
/* PRINT BUTTON */
.print{
text-align:center;
margin-top:20px;
}
button{
padding:10px 20px;
background:#007bff;
color:#fff;
border:none;
border-radius:5px;
cursor:pointer;
}
button:hover{
background:#0056b3;
}
</style>
</head>
<body>
<div class="invoice-box">
<!-- HEADER -->
<div class="header">
<div>
<img src="dataimg/<?= $logodatas['image']; ?>" class="logo1" alt="Logo">
<div class="company-info">
<b>JGT Tourism</b><br>
OFFICE 423, B1, FREEZONE AJMAN,<br>
AJMAN (UAE)<br><br>
📧 info@jgttourism.com<br>
📧 bookings@jgttourism.com
</div>
</div>
<div class="invoice-info">
<h2>INVOICE</h2>
Order ID : #<?php echo $order['id']; ?><br>
Date : <?php echo date("d M Y",strtotime($order['created_at'])); ?>
</div>
</div>
<!-- CUSTOMER -->
<div class="section-title">Customer Details</div>
<div class="customer-details">
<b>Name :</b> <?php echo $order['full_name']; ?><br>
<b>Email :</b> <?php echo $order['email']; ?><br>
<b>Phone :</b> <?php echo $order['phone']; ?><br>
<b>Address :</b> <?php echo $order['address']; ?>
</div>
<!-- ITEMS -->
<div class="section-title">Order Items</div>
<table>
<tr>
<th>Product ID</th>
<th>Price</th>
<th>Quantity</th>
<th>Total</th>
</tr>
<?php
while($item = mysqli_fetch_assoc($item_result))
{
$total = $item['price'] * $item['quantity'];
?>
<tr>
<td><?php echo $item['product_id']; ?></td>
<td>USD <?php echo $item['price']; ?></td>
<td><?php echo $item['quantity']; ?></td>
<td>USD <?php echo $total; ?></td>
</tr>
<?php } ?>
</table>
<p class="total">
Grand Total : USD <?php echo $order['total_amount']; ?>
</p>
<div class="footer">
<b>Payment :</b> <?php echo $order['payment_type']; ?><br>
<b>Status :</b> <?php echo $order['order_status']; ?>
</div>
<div class="print">
<button onclick="window.print()">Print Invoice</button>
</div>
</div>
</body>
</html>