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,379
Folders
436
Scanned Size
3.85 GB
PHP Files
950
Editable Text Files
12,628
File viewer
guarded to /htdocs
/old/phone/bootstrap.php
<?php declare(strict_types=1); require_once dirname(__DIR__) . '/_core/common.php'; function si_phone_load_config(): void { si_core_load(); if (!defined('TWILIO_ACCOUNT_SID') || !defined('TWILIO_PHONE_NUMBER')) throw new RuntimeException('Twilio configuration was not found.'); } function si_phone_xml(string $xml, int $status = 200): never { http_response_code($status); header('Content-Type: text/xml; charset=UTF-8'); header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0'); echo $xml; exit; } function si_phone_escape(string $value): string { return htmlspecialchars($value, ENT_XML1 | ENT_QUOTES, 'UTF-8'); } function si_phone_base_url(): string { return defined('SI_PHONE_WEBHOOK_BASE_URL') ? rtrim((string) SI_PHONE_WEBHOOK_BASE_URL, '/') : 'https://www.gaylordsinclair.com/si/phone'; } function si_phone_request_url(): string { if (defined('SI_TWILIO_REQUEST_URL') && (string) SI_TWILIO_REQUEST_URL !== '') { return (string) SI_TWILIO_REQUEST_URL; } $host = (string) ($_SERVER['HTTP_HOST'] ?? 'www.gaylordsinclair.com'); $uri = (string) ($_SERVER['REQUEST_URI'] ?? '/'); return 'https://' . $host . $uri; } function si_phone_validate_twilio_request(): void { if (PHP_SAPI === 'cli' || $_SERVER['REQUEST_METHOD'] !== 'POST') { return; } $token = defined('TWILIO_AUTH_TOKEN') ? (string) TWILIO_AUTH_TOKEN : ''; $signature = (string) ($_SERVER['HTTP_X_TWILIO_SIGNATURE'] ?? ''); if ($token === '' || $signature === '') { throw new RuntimeException('Twilio request authentication is unavailable.'); } $parameters = $_POST; ksort($parameters, SORT_STRING); $payload = si_phone_request_url(); foreach ($parameters as $key => $value) { if (is_scalar($value)) { $payload .= (string) $key . (string) $value; } } $expected = base64_encode(hash_hmac('sha1', $payload, $token, true)); if (!hash_equals($expected, $signature)) { throw new RuntimeException('Invalid Twilio request signature.'); } } function si_phone_post(string $key, string $default = ''): string { $value = $_POST[$key] ?? $default; return is_scalar($value) ? trim((string) $value) : $default; } function si_phone_log(string $event, array $details = []): void { si_core_log('si_phone', $event, $details); } try { si_phone_load_config(); si_phone_validate_twilio_request(); } catch (Throwable $exception) { si_phone_xml( '<?xml version="1.0" encoding="UTF-8"?>' . '<Response><Say>SI telephone configuration is temporarily unavailable.</Say></Response>', 500 ); }
Save file
Quick jump
open a path
Open