����JFIF��`�`�����Viewing File: /home/u820193700/domains/throtllr.in/public_html/admin/settings.php
<?php
require_once '../includes/db.php';
require_once '../includes/functions.php';
if(!is_logged_in()) { redirect("login.php"); }

// Fetch settings
$stmt = $pdo->query("SELECT * FROM website_settings");
$settings = $stmt->fetchAll();
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Settings - ReOwn Admin</title>
    <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="admin.css">
</head>
<body>

<?php include 'admin_sidebar.php'; ?>

<div id="main-content">
    <div class="d-flex justify-content-between align-items-center mb-4">
        <h2>Website Settings</h2>
        <a href="add_setting.php" class="btn btn-danger"><i class="fas fa-plus me-2"></i> Add Setting</a>
    </div>

    <div class="glass-card p-4">
        <div class="table-responsive">
            <table class="table table-dark table-hover align-middle">
                <thead>
                    <tr>
                        <th>Setting Key</th>
                        <th>Setting Value</th>
                        <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if (count($settings) > 0): ?>
                        <?php foreach($settings as $s): ?>
                        <tr>
                            <td><?php echo htmlspecialchars($s['setting_key']); ?></td>
                            <td><?php echo htmlspecialchars(substr($s['setting_value'], 0, 50)) . (strlen($s['setting_value']) > 50 ? '...' : ''); ?></td>
                            <td>
                                <a href="edit_setting.php?id=<?php echo $s['id']; ?>" class="btn btn-sm btn-outline-light" title="Edit"><i class="fas fa-edit"></i></a>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    <?php else: ?>
                        <tr><td colspan="3" class="text-center text-muted">No settings configured.</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
Back to Directory �������}�!1AQa"q2���#B��R��$3br� %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������������� ������w�!1AQaq"2�B���� #3R�br� $4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������ ��?��_��+��?��(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(�����