<?php
require_once __DIR__ . '/../../config/constants.php';

$pageTitle = 'Langganan Kadaluarsa - KasirMurah.biz.id';
$customCSS = '
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        background: #f8f9fa;
    }
    .expired-container {
        text-align: center;
    }
    .expired-icon {
        font-size: 80px;
        color: #dc3545;
        margin-bottom: 20px;
    }
';
?>
<?php include '../layout/header.php'; ?>
<body>
    <div class="expired-container">
        <div class="expired-icon">
            ⚠️
        </div>
        <h1>Langganan Kadaluarsa</h1>
        <p class="text-muted lead">Langganan Anda telah berakhir</p>
        
        <p class="mt-4">Untuk melanjutkan menggunakan KasirMurah.biz.id, silakan perpanjang langganan Anda.</p>
        
        <div class="mt-4">
            <?php
            require_once __DIR__ . '/../../config/constants.php';
            require_once __DIR__ . '/../../config/database.php';
            require_once __DIR__ . '/../../app/Database.php';
            require_once __DIR__ . '/../../app/Auth.php';
            require_once __DIR__ . '/../../app/Helper.php';
            
            $database = new Database($pdo);
            $auth = new Auth($database);
            
            if ($auth->isLoggedIn()):
            ?>
            <a href="upgrade.php" class="btn btn-primary btn-lg">Upgrade Langganan</a>
            <a href="status.php" class="btn btn-secondary btn-lg">Lihat Status</a>
            <?php 
            else:
            ?>
            <a href="../auth/login.php" class="btn btn-primary btn-lg">Login</a>
            <?php 
            endif;
            ?>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
