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,476
Folders
443
Scanned Size
3.86 GB
PHP Files
996
Editable Text Files
12,723
File viewer
guarded to /htdocs
/si/business/security.php
<?php declare(strict_types=1); require_once __DIR__.'/bootstrap.php'; function si_security_mask(string $value,int $visible=4):string{$len=strlen($value);return $len<=$visible?str_repeat('•',$len):str_repeat('•',max(4,$len-$visible)).substr($value,-$visible);} function si_security_csrf():string{if(session_status()!==PHP_SESSION_ACTIVE)session_start();if(empty($_SESSION['si_business_csrf']))$_SESSION['si_business_csrf']=bin2hex(random_bytes(24));return (string)$_SESSION['si_business_csrf'];} function si_security_verify_csrf(?string $token):bool{return is_string($token)&&$token!==''&&hash_equals(si_security_csrf(),$token);} function si_security_require_post():void{if(($_SERVER['REQUEST_METHOD']??'')!=='POST'){http_response_code(405);exit('POST required');}} function si_security_private_permissions():array{$root=si_ops_private_root();return ['root'=>$root,'outside_document_root'=>!str_starts_with(realpath($root)?:$root,realpath((string)($_SERVER['DOCUMENT_ROOT']??''))?:'/nonexistent'),'writable'=>is_dir($root)&&is_writable($root)];} function si_require_private_operator():void{$guardian=si_ops_guardian();if(!($guardian['authorized']??false)){http_response_code(401);throw new RuntimeException('Sign in to the SIMON Operations dashboard first, then open this test in the same browser session.');}}
Save file
Quick jump
open a path
Open