prepare(" SELECT p.*, c.brand, c.model, c.year, c.price, c.city, u.name as seller_name, u.phone as seller_phone FROM purchases p JOIN cars c ON p.car_id = c.id JOIN users u ON c.user_id = u.id WHERE p.id = ? AND p.status = 'approved' AND (p.user_id = ? OR ?) "); $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin'; $stmt->execute([$purchase_id, $_SESSION['user_id'], $isAdmin]); $data = $stmt->fetch(); if (!$data) { echo "
Premium Vehicle Marketplace
Receipt #: RC-= str_pad($data['id'], 6, '0', STR_PAD_LEFT) ?>
Date: = date('M d, Y', strtotime($data['created_at'])) ?>
= htmlspecialchars($data['buyer_name']) ?>
= htmlspecialchars($data['buyer_email']) ?>
= htmlspecialchars($data['buyer_phone']) ?>
Bank Verification ID: = htmlspecialchars($data['bank_id']) ?>
= htmlspecialchars($data['seller_name']) ?>
Status: Verified Premium Merchant
= htmlspecialchars($data['seller_phone']) ?>
= htmlspecialchars($data['city']) ?>, Afghanistan
| Transaction Description | Price (USD) |
|---|---|
|
= htmlspecialchars($data['brand'] . ' ' . $data['model']) ?>
= $data['year'] ?> Model Vehicle - Secured Transaction
|
$= number_format($data['price']) ?> |
| Total Transaction Amount | $= number_format($data['price']) ?> |
This official document is computer-generated and verified by AfgCars Security Systems.
NATIONAL AUTOMOTIVE REGISTRY OF AFGHANISTAN • SECURE MARKETPLACE VERIFICATION