SIMON Master Console Rebuild
True command center for SIMON + WEB360
This rebuild gives you a cleaner production spine: interactive tree, live viewer, guarded editor, dynamic graphics, architecture map, and note storage. It is designed to sit beside your existing
console.php
and become the stronger replacement path.
Dashboard
Tree
Viewer
System Map
File Registry
Notes
Files
15,334
Folders
408
Scanned Size
3.84 GB
PHP Files
886
Editable Text Files
12,595
File viewer
guarded to /htdocs
/web360/api/settings.php
<?php require_once __DIR__ . '/app/bootstrap.php'; require_once __DIR__ . '/engine/AIRouter.php'; $providers = AIRouter::providers(); $csrf = web360_csrf(); ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"> <title>WEB360 AI Settings</title> <link rel="stylesheet" href="assets/style.css"> </head> <body> <div class="shell"> <aside class="nav"> <div class="logo">WEB360<br><span>AI SETTINGS</span></div> <a href="index.php">Dashboard</a><a href="builder.php">Builder</a><a href="jobs.php">Jobs</a><a class="active" href="settings.php">AI Keys</a> </aside> <main class="panel"> <h1>AI Provider Engine</h1> <p class="muted">Keys stay server-side. Use environment variables first when possible.</p> <form id="providersForm"> <input type="hidden" name="csrf" value="<?=htmlspecialchars($csrf)?>"> <?php foreach($providers as $id=>$p): ?> <section class="card"> <h2><?=htmlspecialchars($p['label'])?> <code><?=htmlspecialchars($id)?></code></h2> <label><input type="checkbox" data-field="enabled" data-id="<?=$id?>" <?=$p['enabled']?'checked':''?>> Enabled</label> <label>Endpoint <input data-field="endpoint" data-id="<?=$id?>" value="<?=htmlspecialchars($p['endpoint'])?>"></label> <label>Model <input data-field="model" data-id="<?=$id?>" value="<?=htmlspecialchars($p['model'])?>"></label> <label>Environment Key Name <input data-field="api_key_env" data-id="<?=$id?>" value="<?=htmlspecialchars($p['api_key_env'])?>"></label> <label>Manual API Key <input type="password" data-field="api_key" data-id="<?=$id?>" placeholder="Leave blank to keep existing or use env"></label> </section> <?php endforeach; ?> <button class="primary" type="submit">Save AI Engine Settings</button> </form> </main> </div> <script> const initial = <?=json_encode($providers, JSON_UNESCAPED_SLASHES)?>; document.getElementById('providersForm').addEventListener('submit', async e=>{ e.preventDefault(); const providers = structuredClone(initial); document.querySelectorAll('[data-id]').forEach(el=>{ const id=el.dataset.id, field=el.dataset.field; providers[id][field] = el.type === 'checkbox' ? el.checked : el.value; if(field==='api_key' && el.value==='') providers[id][field]=initial[id][field]||''; }); const fd=new FormData(); fd.append('csrf', '<?=htmlspecialchars($csrf)?>'); fd.append('action','save_providers'); fd.append('providers', JSON.stringify(providers)); const r=await fetch('api/router.php?action=save_providers',{method:'POST',body:fd}).then(r=>r.json()); alert(r.ok?'AI settings saved':'Error: '+r.error); }); </script> </body></html>
Save file
Quick jump
open a path
Open