36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
require_once __DIR__ . '/includes/init.php';
|
|
require_login();
|
|
|
|
$order_id = isset($_GET['order_id']) ? (int)$_GET['order_id'] : 0;
|
|
|
|
if ($order_id === 0) {
|
|
header('Location: orders.php');
|
|
exit;
|
|
}
|
|
|
|
$db = db();
|
|
$stmt = $db->prepare("SELECT * FROM orders WHERE id = ? AND user_id = ?");
|
|
$stmt->execute([$order_id, $_SESSION['user_id']]);
|
|
$order = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
|
|
if (!$order) {
|
|
header('Location: orders.php');
|
|
exit;
|
|
}
|
|
|
|
$page_title = t('order_confirmation');
|
|
|
|
require_once __DIR__ . '/includes/html_head.php';
|
|
require_once __DIR__ . '/includes/header.php';
|
|
?>
|
|
<div class="container mt-5">
|
|
<div class="alert alert-success" role="alert">
|
|
<h4 class="alert-heading"><?= t('thank_you_for_your_order') ?></h4>
|
|
<p><?= t('your_order_number') ?> <strong>#<?php echo $order['id']; ?></strong> <?= t('has_been_placed_successfully') ?></p>
|
|
<hr>
|
|
<p class="mb-0"><?= t('order_details_will_be_sent') ?> <a href="orders.php"><?= t('orders') ?></a>.</p>
|
|
</div>
|
|
<a href="index.php" class="btn btn-primary"><?= t('continue_shopping') ?></a>
|
|
</div>
|
|
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|