HEX
Server: LiteSpeed
System: Linux dune179.sitesanctuary.org 5.14.0-427.40.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 16 07:08:17 EDT 2024 x86_64
User: h278792 (1076)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/h278792/www/disc/thank_you.php
<?php
require 'config.php';

$code = $_GET['code'] ?? '';

// بررسی اعتبار کد
$stmt = $pdo->prepare("SELECT * FROM discounts WHERE discount_code = ?");
$stmt->execute([$code]);
$discount = $stmt->fetch();

if (!$discount) {
    die("<div class='alert alert-danger'>کد تخفیف نامعتبر است!</div>");
}

$expires_at = gregorianToJalali($discount['expires_at']);
$created_at = gregorianToJalali($discount['created_at']);
?>

<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>کد تخفیف شما</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body { background-color: #f8f9fa; }
        .discount-card {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            border-radius: 15px;
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .discount-code {
            font-size: 2.5rem;
            font-weight: bold;
            background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
    </style>
</head>
<body>
    <div class="container py-5">
        <div class="row justify-content-center">
            <div class="col-md-6">
                <div class="card discount-card border-0">
                    <div class="card-header bg-primary text-white text-center py-3 rounded-top">
                        <h3 class="mb-0">کد تخفیف شما با موفقیت ایجاد شد!</h3>
                    </div>
                    <div class="card-body text-center py-4">
                        <div class="discount-code mb-3"><?= htmlspecialchars($code) ?></div>
                        <div class="mb-2">
                            <i class="bi bi-calendar-check text-danger"></i>
                            <span class="text-muted">اعتبار تا:</span>
                            <strong><?= $expires_at ?></strong>
                        </div>
                        <div class="mb-4">
                            <i class="bi bi-clock-history text-info"></i>
                            <span class="text-muted">تاریخ ایجاد:</span>
                            <strong><?= $created_at ?></strong>
                        </div>
                        <a href="index.php" class="btn btn-primary px-4">
                            <i class="bi bi-arrow-right"></i> بازگشت به صفحه اصلی
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>