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,547
Folders
418
Scanned Size
3.85 GB
PHP Files
911
Editable Text Files
12,808
File viewer
guarded to /htdocs
/connlink/test1/ui/old/lib/feeds.php
<?php declare(strict_types=1); function simon_feeds_file(): string { return SIMON_UI_DIR . '/feeds.json'; } function simon_feed_registry_file(): string { return SIMON_DATA_DIR . '/feed_registry.json'; } function simon_load_feeds(): array { $raw=simon_json_read(simon_feeds_file(),[]); if(isset($raw['feeds'])&&is_array($raw['feeds'])) $raw=$raw['feeds']; $feeds=[]; foreach(($raw?:[]) as $f){ if(!is_array($f)||empty($f['id'])) continue; $id=(string)$f['id']; $feeds[]=[ 'id'=>$id,'name'=>(string)($f['name']??ucfirst(str_replace('_',' ',$id))), 'category'=>(string)($f['category']??'general'),'engine'=>(string)($f['engine']??$f['provider']??'json'), 'enabled'=>(bool)($f['enabled']??true),'url'=>(string)($f['url']??$f['endpoint']??''),'stream'=>(string)($f['stream']??''), 'lat'=>$f['lat']??null,'lon'=>$f['lon']??null,'place'=>(string)($f['place']??''), 'params'=>isset($f['params'])&&is_array($f['params'])?$f['params']:[], 'map'=>isset($f['map'])&&is_array($f['map'])?$f['map']:[], 'refresh'=>(int)($f['refresh']??900),'priority'=>(int)($f['priority']??50),'color'=>(string)($f['color']??'#4be3ff'),'raw'=>$f ]; } usort($feeds,fn($a,$b)=>($b['priority']<=>$a['priority'])?:strcmp($a['name'],$b['name'])); return $feeds; } function simon_feed_by_id(string $id): ?array { foreach(simon_load_feeds() as $f) if($f['id']===$id) return $f; return null; } function simon_feed_route(array $f): string { if($f['url']!=='') return $f['url']; if($f['stream']!=='') return 'stream:'.$f['stream']; if($f['place']!=='') return $f['place']; if($f['lat']!==null||$f['lon']!==null) return 'lat/lon:'.$f['lat'].','.$f['lon']; return ''; } function simon_rebuild_feed_registry(): array { $feeds=simon_load_feeds(); $r=['version'=>'2.1','updated'=>gmdate('c'),'count'=>count($feeds),'feeds'=>$feeds]; simon_json_write(simon_feed_registry_file(),$r); return $r; } ?>
Save file
Quick jump
open a path
Open