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/incoming.php
<?php declare(strict_types=1); require_once __DIR__ . '/bootstrap.php'; $body = trim(si_sms_post('Body')); $normalized = strtolower($body); $sender = si_sms_post('From'); si_sms_log('incoming_sms', [ 'body' => $body, 'media_count' => si_sms_post('NumMedia', '0'), ]); if ($body === '') { si_sms_reply('SI received an empty message. Text HELP to see available options.'); } if (preg_match('/\b(stop|unsubscribe|cancel|end|quit)\b/i', $normalized) === 1) { si_sms_log('opt_out_requested'); si_sms_reply('You requested to stop messages. Twilio will process the opt-out for this number.'); } if (preg_match('/\b(help|menu|options|start)\b/i', $normalized) === 1) { si_sms_reply( 'SI menu: text STATUS for SIMON status, SALES for sales, PUBLISHING for books, ' . 'WEB360 for Web360 support, NEWS for live-feed information, MESSAGE to leave a message, ' . 'or type your question.' ); } if (preg_match('/\b(status|health|simon status|system)\b/i', $normalized) === 1) { si_sms_log('status_request'); si_sms_reply( 'SIMON is online for SMS testing. Telephone voice routing is staged for a later upgrade. ' . 'Reply HELP for available SI options.' ); } if (preg_match('/\b(sales|buy|price|pricing|order|purchase)\b/i', $normalized) === 1) { si_sms_log('sales_request'); si_sms_reply( 'Thank you for contacting Gaylord Sinclair sales. Tell SI which book, product, or service ' . 'interests you, along with the best name for follow-up.' ); } if (preg_match('/\b(publishing|book|author|manuscript|editing|publisher)\b/i', $normalized) === 1) { si_sms_log('publishing_request'); si_sms_reply( 'You reached Gaylord Sinclair Publishing. Please send the title or service you are asking ' . 'about and SI will organize the request for follow-up.' ); } if (preg_match('/\b(web ?360|website|builder|app|php|support)\b/i', $normalized) === 1) { si_sms_log('web360_request'); si_sms_reply( 'SI recorded your Web360 or technical-support request. Describe the problem, page address, ' . 'and any error shown so it can be routed correctly.' ); } if (preg_match('/\b(news|headline|feed|weather|briefing)\b/i', $normalized) === 1) { si_sms_log('feed_request'); si_sms_reply( 'Live-feed answers are the next connection stage. SI recorded this request; current SMS ' . 'testing supports routing, status, messages, publishing, sales, and Web360 questions.' ); } if (preg_match('/\b(message|contact|call me|callback|keith|human|person)\b/i', $normalized) === 1) { si_sms_log('follow_up_requested', ['message' => $body]); si_sms_reply( 'SI recorded your follow-up request. Please reply with your name, the best callback number, ' . 'and a short description of what you need.' ); } si_sms_log('general_question', ['question' => $body, 'sender' => $sender]); if (defined('OPENAI_API_KEY') && !str_contains((string) OPENAI_API_KEY, 'PASTE_')) { si_sms_reply( 'SI received your question and saved it for the connected intelligence response stage. ' . 'For this first test, reply HELP to use an active routing option.' ); } $preview = function_exists('mb_substr') ? mb_substr($body, 0, 180) : substr($body, 0, 180); si_sms_reply( 'SI received: "' . $preview . '". ' . 'This test currently routes requests by topic. Reply HELP for available options.' );
Save file
Quick jump
open a path
Open