codex update
This commit is contained in:
@@ -3,13 +3,12 @@ header('Content-Type: text/html; charset=utf-8');
|
||||
$conf = @include __DIR__ . '/../../inc/config.php';
|
||||
function h($s){ return htmlspecialchars((string)$s, ENT_QUOTES|ENT_SUBSTITUTE,'UTF-8'); }
|
||||
|
||||
if (!is_array($conf) || !isset($conf['templates'])) {
|
||||
echo 'Invalid config.php (expected return array with keys templates/project)'; exit;
|
||||
if (!is_array($conf) || !isset($conf['projectdb'])) {
|
||||
echo 'Invalid config.php (expected return array with key projectdb)'; exit;
|
||||
}
|
||||
|
||||
$profile = $_GET['profile'] ?? 'templates';
|
||||
$cfg = ($profile==='project') ? ($conf['project'] ?? null) : $conf['templates'];
|
||||
$prefix = (string)(($profile==='project') ? ($conf['project']['prefix'] ?? '') : ($conf['templates']['prefix'] ?? ''));
|
||||
$cfg = $conf['projectdb'];
|
||||
$prefix = (string)($cfg['prefix'] ?? '');
|
||||
|
||||
$attempts=[]; $pdo=null;
|
||||
$mkPdo=function(array $cfg) use(&$attempts){
|
||||
@@ -57,7 +56,7 @@ if ($pdo){
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<meta charset="utf-8">
|
||||
<title>DB-Doctor (<?=h($profile)?>)</title>
|
||||
<title>DB-Doctor</title>
|
||||
<style>
|
||||
body{font:14px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:#f8fafc;color:#0f172a;margin:0;padding:24px;}
|
||||
.nav a{display:inline-block;margin-right:8px;padding:8px 12px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;text-decoration:none;color:#0f172a}
|
||||
@@ -69,12 +68,7 @@ if ($pdo){
|
||||
code{background:#0b1020;color:#e5e7eb;padding:2px 6px;border-radius:6px}
|
||||
</style>
|
||||
|
||||
<h1>DB-Doctor <small style="font-weight:400;color:#475569">(Profil: <?=h($profile)?>)</small></h1>
|
||||
|
||||
<div class="nav">
|
||||
<a href="?profile=templates" class="<?= $profile==='templates'?'active':'' ?>">Templates</a>
|
||||
<a href="?profile=project" class="<?= $profile==='project' ?'active':'' ?>">Project</a>
|
||||
</div>
|
||||
<h1>DB-Doctor</h1>
|
||||
|
||||
<div class="card">
|
||||
<h3>Verbindungsversuche</h3>
|
||||
@@ -115,4 +109,3 @@ if ($pdo){
|
||||
], JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES))?></pre>
|
||||
</div>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user