<?php
$db = new SQLite3(__DIR__ . '/.db.db');
echo "<pre>";
echo "Registros na tabela dns:\n";
$res = $db->query("SELECT * FROM dns");
$found = false;
while($row = $res->fetchArray(SQLITE3_ASSOC)){
    print_r($row);
    $found = true;
}
if(!$found) echo "❌ Nenhum DNS cadastrado!\n";

echo "\nRegistros na tabela menualuser:\n";
$res2 = $db->query("SELECT COUNT(*) as total FROM menualuser");
$r = $res2->fetchArray(SQLITE3_ASSOC);
echo "Total: " . $r['total'] . "\n";
$db->close();
echo "</pre>";
?>