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,319
Folders
408
Scanned Size
3.84 GB
PHP Files
879
Editable Text Files
12,580
File viewer
guarded to /htdocs
/SI/sms/bootstrap.php
<?php declare(strict_types=1); function si_sms_load_config(): void { $paths = [ dirname($_SERVER['DOCUMENT_ROOT'] ?? __DIR__) . '/private/config.php', dirname(__DIR__, 3) . '/private/config.php', ]; foreach ($paths as $path) { if (is_file($path) && is_readable($path)) { require_once $path; $twilioPath = dirname($path) . '/twilio.php'; if (is_file($twilioPath) && is_readable($twilioPath)) { require_once $twilioPath; } return; } } throw new RuntimeException('Private configuration file was not found.'); } function si_sms_post(string $key, string $default = ''): string { $value = $_POST[$key] ?? $default; return is_scalar($value) ? trim((string) $value) : $default; } function si_sms_escape(string $value): string { return htmlspecialchars($value, ENT_XML1 | ENT_QUOTES, 'UTF-8'); } function si_sms_reply(string $message): never { http_response_code(200); header('Content-Type: text/xml; charset=UTF-8'); header('Cache-Control: no-store'); echo '<?xml version="1.0" encoding="UTF-8"?>' . '<Response><Message>' . si_sms_escape($message) . '</Message></Response>'; exit; } function si_sms_log(string $event, array $details = []): void { $root = defined('GUARDIAN_PRIVATE_ROOT') ? (string) GUARDIAN_PRIVATE_ROOT : dirname($_SERVER['DOCUMENT_ROOT'] ?? __DIR__) . '/private'; $directory = rtrim($root, '/') . '/logs'; if (!is_dir($directory) && !@mkdir($directory, 0700, true) && !is_dir($directory)) { return; } $record = [ 'time' => gmdate('c'), 'event' => $event, 'message_sid' => si_sms_post('MessageSid'), 'from' => si_sms_post('From'), 'to' => si_sms_post('To'), 'details' => $details, ]; @file_put_contents( $directory . '/si_sms.ndjson', json_encode($record, JSON_UNESCAPED_SLASHES) . PHP_EOL, FILE_APPEND | LOCK_EX ); } try { si_sms_load_config(); } catch (Throwable $exception) { si_sms_reply('SI is temporarily unavailable. Please try again later.'); } From'), 'to' => si_sms_post('To'), 'details' => $details, ]; @file_put_contents( $directory . '/si_sms.ndjson', json_encode($record, JSON_UNESCAPED_SLASHES) . PHP_EOL, FILE_APPEND | LOCK_EX ); } try { si_sms_load_config(); } catch (Throwable $exception) { si_sms_reply('SI is temporarily unavailable. Please try again later.'); }
Save file
Quick jump
open a path
Open