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,026
Folders
377
Scanned Size
3.79 GB
PHP Files
791
Editable Text Files
12,310
File viewer
guarded to /htdocs
/_guardian/tracker.php
<?php declare(strict_types=1); if (session_status() !== PHP_SESSION_ACTIVE) { @session_start(); } if (!defined('GUARDIAN_TRACKER_BOOTED')) { define('GUARDIAN_TRACKER_BOOTED', true); function guardian_tracker_log_path(): string { $dir = __DIR__; if (!is_dir($dir)) { @mkdir($dir, 0755, true); } return $dir . '/events.ndjson'; } if (!function_exists('guardian_client_ip')) { function guardian_client_ip(): string { $keys = [ 'HTTP_CF_CONNECTING_IP', 'HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR', ]; foreach ($keys as $key) { $value = trim((string)($_SERVER[$key] ?? '')); if ($value !== '') { if ($key === 'HTTP_X_FORWARDED_FOR') { $parts = explode(',', $value); return trim((string)($parts[0] ?? '')); } return $value; } } return 'unknown'; } } if (!function_exists('guardian_user_agent')) { function guardian_user_agent(): string { return trim((string)($_SERVER['HTTP_USER_AGENT'] ?? 'unknown')); } } function guardian_track_event(string $eventType, array $meta = []): void { $logPath = guardian_tracker_log_path(); $payload = [ 'id' => 'guardian_' . bin2hex(random_bytes(6)), 'timestamp' => date('c'), 'event_type' => $eventType, 'request' => [ 'method' => (string)($_SERVER['REQUEST_METHOD'] ?? 'GET'), 'uri' => (string)($_SERVER['REQUEST_URI'] ?? ''), 'ip' => guardian_client_ip(), 'user_agent' => guardian_user_agent(), 'referer' => (string)($_SERVER['HTTP_REFERER'] ?? ''), ], 'session' => [ 'session_id' => session_id(), 'authenticated' => !empty($_SESSION['guardian_authenticated']), 'email' => (string)($_SESSION['guardian_email'] ?? $_SESSION['email'] ?? ''), 'user' => (string)($_SESSION['guardian_user'] ?? ''), 'role' => (string)($_SESSION['guardian_role'] ?? $_SESSION['role'] ?? 'guest'), 'risk_score' => (int)($_SESSION['guardian_risk_score'] ?? $_SESSION['risk_score'] ?? 0), 'trusted_device' => !empty($_SESSION['device_trusted']), 'authenticated_at' => (string)($_SESSION['authenticated_at'] ?? ''), ], 'meta' => $meta, ]; $json = json_encode($payload, JSON_UNESCAPED_SLASHES); if ($json === false) { return; } @file_put_contents($logPath, $json . PHP_EOL, FILE_APPEND | LOCK_EX); } }
Save file
Quick jump
open a path
Open