SetFlagFile("./pgs/country.csv"); $Reflector->SetPIDFile($Service['PIDFile']); $Reflector->SetXMLFile($Service['XMLFile']); $Reflector->LoadXML(); // Pre-parse journal data for co-located peer reflectors so the nav menu can // display live counts. Each page file checks isset() before re-parsing. require_once('./pgs/parse_journal_peers.php'); // These pages need a local peer in xlxd.interlink, hide them (and skip journalctl) without one $InterlinkFile = !empty($CallingHome['InterlinkFile']) ? $CallingHome['InterlinkFile'] : '/xlxd/xlxd.interlink'; foreach (['YSF' => 'YSFPeerPage', 'NXDN' => 'NXDNPeerPage', 'P25' => 'P25PeerPage'] as $PeerType => $PeerPage) { if (!empty($PageOptions[$PeerPage]['Show']) && !HasLocalPeer($PeerType, $InterlinkFile)) { $PageOptions[$PeerPage]['Show'] = false; $PageOptions[$PeerPage]['NoLocalPeer'] = true; } } $YSFPeers = []; if (!empty($PageOptions['YSFPeerPage']['Show'])) { $YSFPeers = ParseJournalPeers($PageOptions['YSFPeerPage']); } $NXDNPeers = []; if (!empty($PageOptions['NXDNPeerPage']['Show'])) { $NXDNPeers = ParseJournalPeers($PageOptions['NXDNPeerPage']); } $P25Peers = []; if (!empty($PageOptions['P25PeerPage']['Show'])) { $P25Peers = ParseJournalPeers($PageOptions['P25PeerPage']); } if ($CallingHome['Active']) { $CallHomeNow = false; if (!file_exists($CallingHome['HashFile'])) { $Hash = CreateCode(16); $LastSync = 0; $Ressource = @fopen($CallingHome['HashFile'], "w"); if ($Ressource) { @fwrite($Ressource, "'); @fclose($Ressource); @exec("chmod 600 " . $CallingHome['HashFile']); $CallHomeNow = true; } } else { include($CallingHome['HashFile']); if ($LastSync < (time() - $CallingHome['PushDelay'])) { $Ressource = @fopen($CallingHome['HashFile'], "w"); if ($Ressource) { @fwrite($Ressource, "'); @fclose($Ressource); } $CallHomeNow = true; } } if ($CallHomeNow || isset($_GET['callhome'])) { $Reflector->SetCallingHome($CallingHome, $Hash); $Reflector->ReadInterlinkFile(); $Reflector->PrepareInterlinkXML(); $Reflector->PrepareReflectorXML(); $Reflector->CallHome(); } } else { $Hash = ""; } ?>