<?php
try {
    $db = new PDO('sqlite:' . __DIR__ . '/app_feed.db');
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    echo "<h3>Current Database Settings:</h3><pre>";
    $stmt = $db->query("SELECT setting_key, setting_value FROM app_feed_settings WHERE setting_key LIKE 'bg_%'");
    $results = $stmt->fetchAll(PDO::FETCH_ASSOC);
    
    foreach ($results as $row) {
        echo "Key: " . htmlspecialchars($row['setting_key']) . " | Value: " . htmlspecialchars($row['setting_value']) . "\n";
    }
    echo "</pre>";

} catch (Exception $e) {
    echo "Error: " . $e->getMessage();
}
?>