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,534
Folders
437
Scanned Size
3.86 GB
PHP Files
996
Editable Text Files
12,782
File viewer
guarded to /htdocs
/si/business/alert-manager.php
<?php declare(strict_types=1);require_once __DIR__.'/bootstrap.php';require_once __DIR__.'/email-service.php'; function si_alert_send(array $alert):array{$settings=si_business_settings();$channels=(array)($alert['channels']??$settings['alert_channels']);$priority=(string)($alert['priority']??'normal');$subject=(string)($alert['subject']??'SI notification');$body=(string)($alert['body']??'Action requested.');$results=[];$row=si_business_event(['channel'=>'alert','event'=>'alert_created','subject'=>$subject,'body'=>$body,'priority'=>$priority,'details'=>['channels'=>$channels]]);si_business_append('si_alerts.ndjson',$row);$results['dashboard']=['ok'=>true,'status'=>'logged']; if(in_array('sms',$channels,true)){$to=defined('SI_KEITH_DIRECT_NUMBER')?si_ops_e164((string)SI_KEITH_DIRECT_NUMBER):(defined('SI_ADMIN_SMS_NUMBER')?si_ops_e164((string)SI_ADMIN_SMS_NUMBER):'');$from=defined('TWILIO_PHONE_NUMBER')?si_ops_e164((string)TWILIO_PHONE_NUMBER):'';$results['sms']=$to!==''&&$from!==''?si_ops_twilio('Messages',['To'=>$to,'From'=>$from,'Body'=>'['.strtoupper($priority).'] '.$subject."\n".$body]):['ok'=>false,'error'=>'SMS alert numbers unavailable.'];} if(in_array('email',$channels,true)){$to=defined('SI_EMAIL_ALERT_TO')?(string)SI_EMAIL_ALERT_TO:'admin@gaylordsinclair.com';$results['email']=si_email_send($to,'['.strtoupper($priority).'] '.$subject,$body);} si_core_log('alerts','alert_dispatched',['alert_id'=>$row['id'],'priority'=>$priority,'results'=>array_map(static fn($r)=>(bool)($r['ok']??false),$results)]);return ['ok'=>!in_array(false,array_map(static fn($r)=>(bool)($r['ok']??false),$results),true),'alert'=>$row,'results'=>$results];}
Save file
Quick jump
open a path
Open