| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/vhost/book.gyaniguru.org/ |
Upload File : |
<?php
$page_title = "Divine Order Placed — GyaniGuru by JMC";
include 'includes/header.php';
$id = $_GET['id'] ?? 0;
$order = get_row("SELECT * FROM orders WHERE id = ?", [$id]);
?>
<div class="container py-5 text-center">
<div class="p-5 bg-white rounded shadow-lg mx-auto" style="max-width: 650px; border: 1px solid var(--cream-dark)">
<div class="mb-4">
<div class="mx-auto shadow-sm" style="width: 120px; height: 120px; background: #27ae60; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 8px solid #ebf9f1;">
<i class="bi bi-check2-all text-white" style="font-size: 4rem;"></i>
</div>
</div>
<h2 class="font-cinzel mb-3" style="color: var(--maroon)">Order Placed Successfully!</h2>
<p style="color: var(--text-medium); font-size: 1.1rem;">Thank you for your order. Your sacred books have been allocated and will reach you soon.</p>
<?php if ($order && $order['payment_method'] === 'Online'): ?>
<div class="py-3 px-3 rounded-4 mb-4" style="background: #ebf9f1; border: 2px solid #27ae60;">
<p class="m-0 small fw-bold" style="color: #27ae60;"><i class="bi bi-check-circle-fill me-2"></i> Payment Successful</p>
<p class="m-0 small text-muted">Transaction ID: <?php echo $order['razorpay_payment_id']; ?></p>
</div>
<?php endif; ?>
<div class="py-4 px-3 rounded-4 mb-5 mt-4" style="background: var(--warm-white); border: 2px dashed var(--cream-dark)">
<p class="m-0 small text-uppercase fw-bold" style="color: var(--text-light); letter-spacing: 2px;">Your Reference ID</p>
<h2 class="m-0" style="color: var(--gerua-deep); font-weight: 800;">#ORD-<?php echo $id; ?></h2>
<?php if ($order): ?>
<p class="m-0 mt-2 small text-muted">Payment: <strong><?php echo $order['payment_method']; ?></strong></p>
<?php endif; ?>
</div>
<p class="small mb-5" style="color: var(--text-light)">A confirmation email with tracking details will be sent to your registered address shortly. 🙏</p>
<div class="d-flex flex-wrap gap-3 justify-content-center">
<a href="shop.php" class="btn btn-saffron px-5 py-3 shadow">Continue Shopping</a>
<a href="track-order.php?id=<?php echo $id; ?>&email=<?php echo $_SESSION['user_email'] ?? ''; ?>" class="btn btn-outline-gold px-5 py-3">Track My Order</a>
</div>
</div>
</div>
<script>
// Clear cart if not already cleared by checkout page
localStorage.setItem('gg_cart', '[]');
if(window.updateCartBadge) updateCartBadge();
</script>
<?php include 'includes/footer.php'; ?>