From bb784be15c52c4e97f99c91b3a7e44258cc737f0 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 08:29:29 -0400 Subject: [PATCH 01/18] index file changes --- index.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index 1229059..76ea0e2 100644 --- a/index.php +++ b/index.php @@ -1,13 +1,11 @@ SetXMLFile($Service['XMLFile']); $Reflector->LoadXML(); +/* if ($CallingHome['Active']) { $CallHomeNow = false; @@ -77,6 +76,8 @@ if ($CallingHome['Active']) { $Hash = ""; } ?> +*/ + @@ -152,7 +153,7 @@ if ($CallingHome['Active']) { >Last Heard >Links (NodeCount(); ?>) - mrefd vGetVersion(); ?> - Dashboard v1.1.1 + mrefd vGetVersion(); ?> - Dashboard v1.1.2 Service uptime: GetServiceUptime()); ?> From 107796e634c674ab2f3b1bd3eac7f9ee14a26e55 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 08:30:33 -0400 Subject: [PATCH 02/18] index file changes --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 76ea0e2..501ac18 100644 --- a/index.php +++ b/index.php @@ -75,8 +75,8 @@ if ($CallingHome['Active']) { } else { $Hash = ""; } -?> */ +?> From 190f11fcc67c19b595c35289d39611592bdaafd2 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 08:33:27 -0400 Subject: [PATCH 03/18] actually drop callinghome from index --- index.php | 58 +------------------------------------------------------ 1 file changed, 1 insertion(+), 57 deletions(-) diff --git a/index.php b/index.php index 501ac18..234ad66 100644 --- a/index.php +++ b/index.php @@ -33,49 +33,6 @@ $Reflector->SetXMLFile($Service['XMLFile']); $Reflector->LoadXML(); -/* -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 777 " . $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 = ""; -} -*/ ?> @@ -161,16 +118,6 @@ if ($CallingHome['Active']) {
- your private hash in ' . $CallingHome['HashFile'] . ' could not be created, please check your config file and the permissions for the defined folder. -
'; - } - } - */ switch ($_GET['show']) { case 'users' : require_once("./include/users.php"); @@ -199,12 +146,9 @@ if ($CallingHome['Active']) { + - - From 7285253ea2eb89e81e3b93d98f2e7723716e56a6 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 08:35:04 -0400 Subject: [PATCH 04/18] n7tea request changes to fuzzy time --- include/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/users.php b/include/users.php index 945f944..5810e00 100644 --- a/include/users.php +++ b/include/users.php @@ -154,7 +154,7 @@ if (isset($_GET['do'])) { echo ' / ' . $Reflector->Stations[$i]->GetPeer(); } echo ' - ' . @date("d.m.Y H:i", $Reflector->Stations[$i]->GetLastHeardTime()) . '
(about ' . elapsedTime($Reflector->Stations[$i]->GetLastHeardTime()) . ' ago.) + ' . @date("d.m.Y H:i", $Reflector->Stations[$i]->GetLastHeardTime()) . '
' . elapsedTime($Reflector->Stations[$i]->GetLastHeardTime()) . ' ago ' . $Reflector->Stations[$i]->GetModule() . ' '; } From 3e0a3bd7c0dc56165d54fd1d2213e73ffb6085fd Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 08:43:39 -0400 Subject: [PATCH 05/18] unneeded line --- include/users.php | 1 - 1 file changed, 1 deletion(-) diff --git a/include/users.php b/include/users.php index 5810e00..8c45221 100644 --- a/include/users.php +++ b/include/users.php @@ -168,7 +168,6 @@ if (isset($_GET['do'])) {
'; ?> - GetModules(); From 9c725b9cf7d11eeda8851cdb71572673a057c281 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 08:48:16 -0400 Subject: [PATCH 06/18] remove DPRS column --- include/users.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/users.php b/include/users.php index 8c45221..8bd2bca 100644 --- a/include/users.php +++ b/include/users.php @@ -85,7 +85,6 @@ if (isset($_GET['do'])) { - @@ -148,7 +147,6 @@ if (isset($_GET['do'])) { echo ' - - + '; $UserCheckedArray[] = $Users[$j]; } From c7175333af4f55ed90776534070095959933bbec Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 09:13:09 -0400 Subject: [PATCH 08/18] links page changes --- include/repeaters.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/repeaters.php b/include/repeaters.php index 4dd8d78..2cecf88 100644 --- a/include/repeaters.php +++ b/include/repeaters.php @@ -29,11 +29,11 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) { echo ''.$Name.''.$Name.''; } echo ' - + echo ' - - - + From 9baf80021513070e58b7a331124ad51f11de183c Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 16:04:15 -0400 Subject: [PATCH 13/18] is paresexml needed? --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 234ad66..525ee5d 100644 --- a/index.php +++ b/index.php @@ -19,7 +19,7 @@ if (file_exists("./include/config.inc.php")) { die("config.inc.php does not exist. Be sure to copy /include/config.inc.php.dist to /include/config.inc.php and edit the file accordingly."); } -if (!class_exists('ParseXML')) require_once("./include/class.parsexml.php"); +//if (!class_exists('ParseXML')) require_once("./include/class.parsexml.php"); if (!class_exists('Node')) require_once("./include/class.node.php"); if (!class_exists('xReflector')) require_once("./include/class.reflector.php"); if (!class_exists('Station')) require_once("./include/class.station.php"); From 2f02e1414d70e344ea1adb2e7ddf2a813625c0a4 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 16:06:01 -0400 Subject: [PATCH 14/18] yes it is --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 525ee5d..234ad66 100644 --- a/index.php +++ b/index.php @@ -19,7 +19,7 @@ if (file_exists("./include/config.inc.php")) { die("config.inc.php does not exist. Be sure to copy /include/config.inc.php.dist to /include/config.inc.php and edit the file accordingly."); } -//if (!class_exists('ParseXML')) require_once("./include/class.parsexml.php"); +if (!class_exists('ParseXML')) require_once("./include/class.parsexml.php"); if (!class_exists('Node')) require_once("./include/class.node.php"); if (!class_exists('xReflector')) require_once("./include/class.reflector.php"); if (!class_exists('Station')) require_once("./include/class.station.php"); From db601a7aefcc1a1cb8fb87b8d1982405bb9a0767 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 16:25:46 -0400 Subject: [PATCH 15/18] more cleanup --- include/class.reflector.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/class.reflector.php b/include/class.reflector.php index 7ea9da4..8089d7b 100644 --- a/include/class.reflector.php +++ b/include/class.reflector.php @@ -292,6 +292,7 @@ class xReflector { return $out; } + /* public function GetModuleOfNode($Node) { die("FUNCTION DEPRECATED..."); $Node = trim(str_replace(" ", "-", $Node)); @@ -310,6 +311,7 @@ class xReflector { } return $Module; } + */ public function GetCallSignsInModules($Module) { $out = array(); @@ -330,7 +332,8 @@ class xReflector { } return $out; } - + + /* public function SetCallingHome($CallingHomeVariables, $Hash) { if (!isset($CallingHomeVariables['Active'])) { $CallingHomeVariables['Active'] = false; } @@ -363,6 +366,7 @@ class xReflector { public function PushCallingHome() { $CallingHome = @fopen($this->CallingHomeServerURL."?ReflectorName=".$this->ReflectorName."&ReflectorUptime=".$this->ServiceUptime."&ReflectorHash=".$this->CallingHomeHash."&DashboardURL=".$this->CallingHomeDashboardURL."&Country=".urlencode($this->CallingHomeCountry)."&Comment=".urlencode($this->CallingHomeComment)."&OverrideIP=".$this->CallingHomeOverrideIP, "r"); } + */ public function ReadInterlinkFile() { if (file_exists($this->Interlinkfile) && (is_readable($this->Interlinkfile))) { @@ -418,6 +422,7 @@ class xReflector { '; } + /* public function CallHome() { $xml = ' CallingHome'.$this->ReflectorXML.$this->InterlinkXML; @@ -429,6 +434,7 @@ class xReflector { die("CONNECTION FAILED!"); } } + */ public function InterlinkCount() { return count($this->Interlinks); From 4c974875c8a28b7972cb897b54f87cdb5d4c1b8e Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 16:38:15 -0400 Subject: [PATCH 16/18] cleanup --- include/class.reflector.php | 70 ------------------------------------- 1 file changed, 70 deletions(-) diff --git a/include/class.reflector.php b/include/class.reflector.php index 8089d7b..c715869 100644 --- a/include/class.reflector.php +++ b/include/class.reflector.php @@ -292,27 +292,6 @@ class xReflector { return $out; } - /* - public function GetModuleOfNode($Node) { - die("FUNCTION DEPRECATED..."); - $Node = trim(str_replace(" ", "-", $Node)); - $Node = trim(str_replace(" ", "-", $Node)); - $Node = trim(str_replace(" ", "-", $Node)); - $found = false; - $i = 0; - $Module = ""; - while (!$found && $i<$this->NodeCount()) { - if (strpos($Node, $this->Nodes[$i]->GetFullCallsign()) !== false) { - $Module = $this->Nodes[$i]->GetLinkedModule(); - $found = true; - } - - $i++; - } - return $Module; - } - */ - public function GetCallSignsInModules($Module) { $out = array(); for ($i=0;$i<$this->NodeCount();$i++) { @@ -332,41 +311,6 @@ class xReflector { } return $out; } - - /* - public function SetCallingHome($CallingHomeVariables, $Hash) { - - if (!isset($CallingHomeVariables['Active'])) { $CallingHomeVariables['Active'] = false; } - if (!isset($CallingHomeVariables['MyDashBoardURL'])) { $CallingHomeVariables['MyDashBoardURL'] = ''; } - if (!isset($CallingHomeVariables['ServerURL'])) { $CallingHomeVariables['ServerURL'] = ''; } - if (!isset($CallingHomeVariables['Country'])) { $CallingHomeVariables['Country'] = ''; } - if (!isset($CallingHomeVariables['Comment'])) { $CallingHomeVariables['Comment'] = ''; } - if (!isset($CallingHomeVariables['OverrideIPAddress'])) { $CallingHomeVariables['OverrideIPAddress'] = false; } - if (!isset($CallingHomeVariables['InterlinkFile'])) { $CallingHomeVariables['InterlinkFile'] = ''; } - - if (!file_exists($CallingHomeVariables['InterlinkFile'])) { - $this->Interlinkfile = ''; - $this->Transferinterlink = false; - } - else { - $this->Transferinterlink = true; - $this->Interlinkfile = $CallingHomeVariables['InterlinkFile']; - } - - $this->CallingHomeActive = ($CallingHomeVariables['Active'] === true); - $this->CallingHomeHash = $Hash; - $this->CallingHomeDashboardURL = $CallingHomeVariables['MyDashBoardURL']; - $this->CallingHomeServerURL = $CallingHomeVariables['ServerURL']; - $this->CallingHomeCountry = $CallingHomeVariables['Country']; - $this->CallingHomeComment = $CallingHomeVariables['Comment']; - $this->CallingHomeOverrideIP = $CallingHomeVariables['OverrideIPAddress']; - - } - - public function PushCallingHome() { - $CallingHome = @fopen($this->CallingHomeServerURL."?ReflectorName=".$this->ReflectorName."&ReflectorUptime=".$this->ServiceUptime."&ReflectorHash=".$this->CallingHomeHash."&DashboardURL=".$this->CallingHomeDashboardURL."&Country=".urlencode($this->CallingHomeCountry)."&Comment=".urlencode($this->CallingHomeComment)."&OverrideIP=".$this->CallingHomeOverrideIP, "r"); - } - */ public function ReadInterlinkFile() { if (file_exists($this->Interlinkfile) && (is_readable($this->Interlinkfile))) { @@ -422,20 +366,6 @@ class xReflector { '; } - /* - public function CallHome() { - $xml = ' -CallingHome'.$this->ReflectorXML.$this->InterlinkXML; - $p = @stream_context_create(array('http' => array('header' => "Content-type: application/x-www-form-urlencoded\r\n", - 'method' => 'POST', - 'content' => http_build_query(array('xml' => $xml)) ))); - $result = @file_get_contents($this->CallingHomeServerURL, false, $p); - if ($result === false) { - die("CONNECTION FAILED!"); - } - } - */ - public function InterlinkCount() { return count($this->Interlinks); } From 0cde3fc20e5381a18c5ac0d00a43b7f156915b92 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 17:18:12 -0400 Subject: [PATCH 17/18] repeaters -> links --- include/config.inc.php.dist | 8 ++++---- include/{repeaters.php => links.php} | 10 +++++----- index.php | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) rename include/{repeaters.php => links.php} (88%) diff --git a/include/config.inc.php.dist b/include/config.inc.php.dist index fd13a8b..31bb169 100644 --- a/include/config.inc.php.dist +++ b/include/config.inc.php.dist @@ -27,10 +27,10 @@ $PageOptions['PageRefreshActive'] = true; $PageOptions['PageRefreshDelay'] = '10000'; // Page refresh time in miliseconds -$PageOptions['RepeatersPage'] = array(); -$PageOptions['RepeatersPage']['LimitTo'] = 99; // Number of Repeaters to show -$PageOptions['RepeatersPage']['IPModus'] = 'ShowLast2ByteOfIP'; // See possible options above -$PageOptions['RepeatersPage']['MasqueradeCharacter'] = '*'; // Character used for masquerade +$PageOptions['LinksPage'] = array(); +$PageOptions['LinksPage']['LimitTo'] = 99; // Number of Links to show +$PageOptions['LinksPage']['IPModus'] = 'ShowLast2ByteOfIP'; // See possible options above +$PageOptions['LinksPage']['MasqueradeCharacter'] = '*'; // Character used for masquerade $PageOptions['PeerPage'] = array(); diff --git a/include/repeaters.php b/include/links.php similarity index 88% rename from include/repeaters.php rename to include/links.php index e5aa1f6..8a0bc82 100644 --- a/include/repeaters.php +++ b/include/links.php @@ -9,7 +9,7 @@ IP'; } @@ -53,12 +53,12 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) { '; - if ($PageOptions['RepeatersPage']['IPModus'] != 'HideIP') { + if ($PageOptions['LinksPage']['IPModus'] != 'HideIP') { echo ''; } echo ''; - if ($i == $PageOptions['RepeatersPage']['LimitTo']) { $i = $Reflector->NodeCount()+1; } + if ($i == $PageOptions['LinksPage']['LimitTo']) { $i = $Reflector->NodeCount()+1; } } ?> diff --git a/index.php b/index.php index 234ad66..8024aee 100644 --- a/index.php +++ b/index.php @@ -108,7 +108,7 @@ $Reflector->LoadXML();
Flag Callsign SuffixDPRS Via / Peer Last heard Listening on ' . $Reflector->Stations[$i]->GetCallsignOnly() . ' ' . $Reflector->Stations[$i]->GetSuffix() . ' ' . $Reflector->Stations[$i]->GetVia(); if ($Reflector->Stations[$i]->GetPeer() != $Reflector->GetReflectorName()) { echo ' / ' . $Reflector->Stations[$i]->GetPeer(); From 05d980725fa939c5c4eb3fb826a4bae4fb2fc654 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 09:09:43 -0400 Subject: [PATCH 07/18] index file changes --- include/users.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/users.php b/include/users.php index 8bd2bca..f31d5ec 100644 --- a/include/users.php +++ b/include/users.php @@ -193,7 +193,7 @@ if (isset($_GET['do'])) { $Displayname = $Reflector->GetCallsignAndSuffixByID($Users[$j]); echo '
'.$Displayname.' '.$Displayname.'
Nodes[$i]->GetSuffix(); - echo '" class="pl" target="_blank">'.$Reflector->Nodes[$i]->GetCallSign(); + echo .$Reflector->Nodes[$i]->GetCallSign(); if ($Reflector->Nodes[$i]->GetSuffix() != "") { echo '-'.$Reflector->Nodes[$i]->GetSuffix(); } - echo ' '; if ($Reflector->Nodes[$i]->GetPrefix() == 'M17') { switch ($Reflector->Nodes[$i]->GetPrefix()) { From f2896ed1c897718079477643991dacccc886cf6d Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 09:15:53 -0400 Subject: [PATCH 09/18] links page changes --- include/repeaters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/repeaters.php b/include/repeaters.php index 2cecf88..07d2bcf 100644 --- a/include/repeaters.php +++ b/include/repeaters.php @@ -29,7 +29,7 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) { echo ''.$Name.''.$Name.''; } echo ''.$Reflector->Nodes[$i]->GetCallSign(); + ' if ($Reflector->Nodes[$i]->GetSuffix() != "") echo '-'.$Reflector->Nodes[$i]->GetSuffix(); echo .$Reflector->Nodes[$i]->GetCallSign(); if ($Reflector->Nodes[$i]->GetSuffix() != "") { echo '-'.$Reflector->Nodes[$i]->GetSuffix(); } From cf934909c1e4c0b5f33523d3d36e929ca573800e Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 09:18:04 -0400 Subject: [PATCH 10/18] links page changes --- include/repeaters.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/repeaters.php b/include/repeaters.php index 07d2bcf..407d80f 100644 --- a/include/repeaters.php +++ b/include/repeaters.php @@ -29,9 +29,7 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) { echo ''.$Name.''.$Name.''; } echo '' - if ($Reflector->Nodes[$i]->GetSuffix() != "") echo '-'.$Reflector->Nodes[$i]->GetSuffix(); - echo .$Reflector->Nodes[$i]->GetCallSign(); + '.$Reflector->Nodes[$i]->GetCallSign(); if ($Reflector->Nodes[$i]->GetSuffix() != "") { echo '-'.$Reflector->Nodes[$i]->GetSuffix(); } echo ' '; From 4a1269079003c960af90aafa347a0bda3927f29c Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 12:38:21 -0400 Subject: [PATCH 11/18] rename dongle --- include/repeaters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/repeaters.php b/include/repeaters.php index 407d80f..a5a5cbb 100644 --- a/include/repeaters.php +++ b/include/repeaters.php @@ -43,7 +43,7 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) { case 'A' : echo '23cm'; break; case 'B' : echo '70cm'; break; case 'C' : echo '2m'; break; - case 'D' : echo 'Dongle'; break; + case 'D' : echo 'DV Client'; break; case 'G' : echo 'Internet-Gateway'; break; default : echo ''; } From e372ed4e43c767994e7b6bdef8d450d55c6d86e3 Mon Sep 17 00:00:00 2001 From: kc1awv Date: Tue, 27 Oct 2020 13:32:37 -0400 Subject: [PATCH 12/18] links page changes --- include/repeaters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/repeaters.php b/include/repeaters.php index a5a5cbb..e5aa1f6 100644 --- a/include/repeaters.php +++ b/include/repeaters.php @@ -3,7 +3,7 @@ # Flag DV StationBandVia Last Heard Linked for ProtocolProtocol Module'.FormatSeconds(time()-$Reflector->Nodes[$i]->GetConnectTime()).' s '.$Reflector->Nodes[$i]->GetProtocol().' '.$Reflector->Nodes[$i]->GetLinkedModule().''; $Bytes = explode(".", $Reflector->Nodes[$i]->GetIP()); - $MC = $PageOptions['RepeatersPage']['MasqueradeCharacter']; + $MC = $PageOptions['LinksPage']['MasqueradeCharacter']; if ($Bytes !== false && count($Bytes) == 4) { - switch ($PageOptions['RepeatersPage']['IPModus']) { + switch ($PageOptions['LinksPage']['IPModus']) { case 'ShowLast1ByteOfIP': echo $MC.'.'.$MC.'.'.$MC.'.'.$Bytes[3]; break; @@ -85,7 +85,7 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) { echo '