update dashboards

pull/1/head
Tom Early 6 years ago
parent ba82e24988
commit ad4e9104fc

@ -2,31 +2,31 @@
class xReflector {
public $Nodes = null;
public $Stations = null;
public $Peers = null;
private $Flagarray = null;
private $Flagarray_DXCC = null;
private $Flagfile = null;
private $CallingHomeActive = null;
private $CallingHomeHash = null;
private $CallingHomeDashboardURL = null;
private $CallingHomeServerURL = null;
private $ReflectorName = null;
private $ServiceUptime = null;
private $ProcessIDFile = null;
private $XMLContent = null;
private $XMLFile = null;
private $ServiceName = null;
private $Version = null;
private $CallingHomeCountry = null;
private $CallingHomeComment = null;
private $CallingHomeOverrideIP = null;
private $Transferinterlink = null;
private $Interlinkfile = null;
public $Nodes = null;
public $Stations = null;
public $Peers = null;
private $Flagarray = null;
private $Flagarray_DXCC = null;
private $Flagfile = null;
private $CallingHomeActive = null;
private $CallingHomeHash = null;
private $CallingHomeDashboardURL = null;
private $CallingHomeServerURL = null;
private $ReflectorName = null;
private $ServiceUptime = null;
private $ProcessIDFile = null;
private $XMLContent = null;
private $XMLFile = null;
private $ServiceName = null;
private $Version = null;
private $CallingHomeCountry = null;
private $CallingHomeComment = null;
private $CallingHomeOverrideIP = null;
private $Transferinterlink = null;
private $Interlinkfile = null;
public $Interlinks = null;
private $InterlinkXML = null;
private $ReflectorXML = null;
private $InterlinkXML = null;
private $ReflectorXML = null;
public function __construct() {
$this->Nodes = array();
@ -239,7 +239,12 @@ class xReflector {
$i = 0;
while ($i < $this->NodeCount()) {
if ($this->Nodes[$i]->GetRandomID() == $RandomId) {
return $this->Nodes[$i]->GetCallSign().'-'.$this->Nodes[$i]->GetSuffix();
if (trim($this->Nodes[$i]->GetSuffix()) == "") {
return $this->Nodes[$i]->GetCallSign();
}
else {
return $this->Nodes[$i]->GetCallSign().'-'.$this->Nodes[$i]->GetSuffix();
}
}
$i++;
}

@ -10,7 +10,7 @@ Andorra;AD;C3
Angola;AO;D2-D3
Anguilla;AI;VP2E
Annobon Island;GQ;3C0
Antarctica;AQ;ATA-ATN-AT0-CE9-DP0-DP1-DP2-ED-EM-FT8Y-HL8-DT8-IA0-KC4AA-KC4US-LU1Z-LU2Z-LU3Z-LU4Z-LU5Z-LU6Z-LU7Z-LU8Z-LU9Z-LU0Z-LZ0-OA0-OJ1-OR4-RI1A-VK0-VP8-VU-ZL5-ZL9-ZS7-ZV0-ZX0-3Y-8J1
Antarctica;AQ;CE9-KC4A-KC4U
Antigua and Barbuda;AG;V2
Argentina;AR;LO-LP-LQ-LR-LS-LT-LU-LV-LW
Armenia;AM;EK
@ -57,7 +57,7 @@ Ceuta & Melilla;ES;EA9-EB9-EC9-ED9-EE9-EF9-EG9-EH9
Chad;TD;TT
Chagos Islands;;VQ9
Chatham Islands;NZ;ZL7
Chile;CL;CA-CB-CC-CD-CE
Chile;CL;CA-CB-CC-CD-CE-XQ-XR
China;CN;BA-BB-BC-BD-BE-BF-BG-BH-BI-BJ-BK-BL-BN-BP-BQ-BR-BS-BT-BY-BZ
Christmas Island;CX;VK9X
Cocos Island;;TI9
@ -88,7 +88,7 @@ Eastern Kiribati (Line Island);KI;T32
Ecuador;EC;HC-HD
Egypt;EG;SU
El Salvador;SV;YS-HU
England;GB;2E-M0-M1-M2-M3-M4-M5-M6-M7-M8-M9-MB-MM-G0-G1-G2-G3-G4-G5-G6-G7-G8-G9-GB-GX
England;EN;2E-M0-M1-M2-M3-M4-M5-M6-M7-M8-M9-MB-MX-G0-G1-G2-G3-G4-G5-G6-G7-G8-G9-GB-GX
Equatorial Guinea;GQ;3C
Eritrea;ER;E3
Estonia;EE;ES
@ -139,7 +139,7 @@ Israel;IL;4X-4Z
Italy;IT;I0-I1-I2-I3-I4-I5-I6-I7-I8-I9-IK-IN-IQ-IR-IS-IT-IU-IV-IW-IZ
Jamaica;JM;6Y
Jan Mayen;NO;JX
Japan;JP;JA-JB-JC-JD-JE-JF-JG-JH-JI-JJ-JK-JL-JM-JN-JO-JP-JQ-JR-JS-7J-7K-7L-7M-7N
Japan;JP;JA-JB-JC-JD-JE-JF-JG-JH-JI-JJ-JK-JL-JM-JN-JO-JP-JQ-JR-JS-7J-7K-7L-7M-7N-8J-8N
Jersey;JE;GJ-GH
Johnston Island;US;KH3
Jordan;JO;JY
@ -148,7 +148,7 @@ Kazakhstan;KZ;UN-UO-UP-UQ
Kenya;KE;5Y-5Z
Kermadec Islands;NZ;ZL8
Korea Democratic People's Republic of;KP;P5
Korea Republic of;KR;HL-6K-6L-6M-6N
Korea Republic of;KR;HL-6K-6L-6M-6N-DS
Kure Island;US;KH7K
Kuwait;KW;9K
Kyrgyzstan;KG;EX
@ -203,7 +203,7 @@ Niger;NE;5U
Nigeria;NG;5N
Niue;NU;ZK2
Norfolk Island;NF;VK9N
Northern Ireland;NIE;GI-GN
Northern Ireland;NIE;MI-GI-GN-2I
Northern Mariana Islands;MP;KH0
Norway;NO;LA-LB-LC-LD-LE-LF-LG-LH-LI-LJ-LK-LL-LM-LN
Oman;OM;A4-YP-YQ-YR
@ -218,7 +218,7 @@ Peru;PE;OA-OB-OC
Philippines;PH;DU-DV-DW-DX-DY-DZ
Pitcairn;PN;VP6
Poland;PL;3Z6-SN-SO-SP-SQ-SR
Portugal;PT;CQ0-CQ1-CQ2-CQ3-CQ7-CQ8-CR1-CR2-CR3-CR5-CR6-CR7-CR8-CR9-CS2-CS3-CS4-CS5-CS7-CS8-CT1-CT2-CT3-CT4-CT5-CT8-CT9-CU0-CU1-CU2-CU3-CU4-CU5-CU6-CU7-CU8-CU
Portugal;PT;CQ0-CQ1-CQ2-CQ3-CQ7-CQ8-CR1-CR2-CR3-CR5-CR6-CR7-CR8-CR9-CS2-CS3-CS4-CS5-CS7-CS8-CT1-CT2-CT3-CT4-CT5-CT6-CT7-CT8-CT9-CU0-CU1-CU2-CU3-CU4-CU5-CU6-CU7-CU8-CU
Pratas Islands;;BV9P
Prince Edward & Marion Islands;ZA;ZS8
Puerto Rico;PR;KP3-KP4
@ -242,7 +242,7 @@ Sao Tome and Principe;ST;S9
Sardinia;IT;IS0-IM0
Saudi Arabia;SA;HZ
Scarborough Reef;;BS7
Scotland;SH;GM-GS-2M0
Scotland;SH;GM-GS-MM-2M0
Senegal;SN;6V-6W
Serbia;RS;YT-YU
Seychelles;SC;S7
@ -299,7 +299,7 @@ Virgin Islands U.S.;VI;KP2
Wake Island;US;KH9
Wales;WL;2W-GC-GW-MW
Wallis and Futuna;WF;FW
West Malaysia;MY;9M2-9M4
West Malaysia;MY;9M2-9M4-9W2
Western Kiribati (Gilbert Island);KI;T30
Western Sahara;EH;S0
Willis Island;AU;VK9W

1 Afghanistan AF YA-T6
10 Angola AO D2-D3
11 Anguilla AI VP2E
12 Annobon Island GQ 3C0
13 Antarctica AQ ATA-ATN-AT0-CE9-DP0-DP1-DP2-ED-EM-FT8Y-HL8-DT8-IA0-KC4AA-KC4US-LU1Z-LU2Z-LU3Z-LU4Z-LU5Z-LU6Z-LU7Z-LU8Z-LU9Z-LU0Z-LZ0-OA0-OJ1-OR4-RI1A-VK0-VP8-VU-ZL5-ZL9-ZS7-ZV0-ZX0-3Y-8J1 CE9-KC4A-KC4U
14 Antigua and Barbuda AG V2
15 Argentina AR LO-LP-LQ-LR-LS-LT-LU-LV-LW
16 Armenia AM EK
57 Chad TD TT
58 Chagos Islands VQ9
59 Chatham Islands NZ ZL7
60 Chile CL CA-CB-CC-CD-CE CA-CB-CC-CD-CE-XQ-XR
61 China CN BA-BB-BC-BD-BE-BF-BG-BH-BI-BJ-BK-BL-BN-BP-BQ-BR-BS-BT-BY-BZ
62 Christmas Island CX VK9X
63 Cocos Island TI9
88 Ecuador EC HC-HD
89 Egypt EG SU
90 El Salvador SV YS-HU
91 England GB EN 2E-M0-M1-M2-M3-M4-M5-M6-M7-M8-M9-MB-MM-G0-G1-G2-G3-G4-G5-G6-G7-G8-G9-GB-GX 2E-M0-M1-M2-M3-M4-M5-M6-M7-M8-M9-MB-MX-G0-G1-G2-G3-G4-G5-G6-G7-G8-G9-GB-GX
92 Equatorial Guinea GQ 3C
93 Eritrea ER E3
94 Estonia EE ES
139 Italy IT I0-I1-I2-I3-I4-I5-I6-I7-I8-I9-IK-IN-IQ-IR-IS-IT-IU-IV-IW-IZ
140 Jamaica JM 6Y
141 Jan Mayen NO JX
142 Japan JP JA-JB-JC-JD-JE-JF-JG-JH-JI-JJ-JK-JL-JM-JN-JO-JP-JQ-JR-JS-7J-7K-7L-7M-7N JA-JB-JC-JD-JE-JF-JG-JH-JI-JJ-JK-JL-JM-JN-JO-JP-JQ-JR-JS-7J-7K-7L-7M-7N-8J-8N
143 Jersey JE GJ-GH
144 Johnston Island US KH3
145 Jordan JO JY
148 Kenya KE 5Y-5Z
149 Kermadec Islands NZ ZL8
150 Korea Democratic People's Republic of KP P5
151 Korea Republic of KR HL-6K-6L-6M-6N HL-6K-6L-6M-6N-DS
152 Kure Island US KH7K
153 Kuwait KW 9K
154 Kyrgyzstan KG EX
203 Nigeria NG 5N
204 Niue NU ZK2
205 Norfolk Island NF VK9N
206 Northern Ireland NIE GI-GN MI-GI-GN-2I
207 Northern Mariana Islands MP KH0
208 Norway NO LA-LB-LC-LD-LE-LF-LG-LH-LI-LJ-LK-LL-LM-LN
209 Oman OM A4-YP-YQ-YR
218 Philippines PH DU-DV-DW-DX-DY-DZ
219 Pitcairn PN VP6
220 Poland PL 3Z6-SN-SO-SP-SQ-SR
221 Portugal PT CQ0-CQ1-CQ2-CQ3-CQ7-CQ8-CR1-CR2-CR3-CR5-CR6-CR7-CR8-CR9-CS2-CS3-CS4-CS5-CS7-CS8-CT1-CT2-CT3-CT4-CT5-CT8-CT9-CU0-CU1-CU2-CU3-CU4-CU5-CU6-CU7-CU8-CU CQ0-CQ1-CQ2-CQ3-CQ7-CQ8-CR1-CR2-CR3-CR5-CR6-CR7-CR8-CR9-CS2-CS3-CS4-CS5-CS7-CS8-CT1-CT2-CT3-CT4-CT5-CT6-CT7-CT8-CT9-CU0-CU1-CU2-CU3-CU4-CU5-CU6-CU7-CU8-CU
222 Pratas Islands BV9P
223 Prince Edward & Marion Islands ZA ZS8
224 Puerto Rico PR KP3-KP4
242 Sardinia IT IS0-IM0
243 Saudi Arabia SA HZ
244 Scarborough Reef BS7
245 Scotland SH GM-GS-2M0 GM-GS-MM-2M0
246 Senegal SN 6V-6W
247 Serbia RS YT-YU
248 Seychelles SC S7
299 Wake Island US KH9
300 Wales WL 2W-GC-GW-MW
301 Wallis and Futuna WF FW
302 West Malaysia MY 9M2-9M4 9M2-9M4-9W2
303 Western Kiribati (Gilbert Island) KI T30
304 Western Sahara EH S0
305 Willis Island AU VK9W

@ -1,33 +1,33 @@
<?php
class xReflector {
public $Nodes = null;
public $Stations = null;
public $Peers = null;
private $Flagarray = null;
private $Flagarray_DXCC = null;
private $Flagfile = null;
private $CallingHomeActive = null;
private $CallingHomeHash = null;
private $CallingHomeDashboardURL = null;
private $CallingHomeServerURL = null;
private $ReflectorName = null;
private $ServiceUptime = null;
private $ProcessIDFile = null;
private $XMLContent = null;
private $XMLFile = null;
private $ServiceName = null;
private $Version = null;
private $CallingHomeCountry = null;
private $CallingHomeComment = null;
private $CallingHomeOverrideIP = null;
private $Transferinterlink = null;
private $Interlinkfile = null;
public $Nodes = null;
public $Stations = null;
public $Peers = null;
private $Flagarray = null;
private $Flagarray_DXCC = null;
private $Flagfile = null;
private $CallingHomeActive = null;
private $CallingHomeHash = null;
private $CallingHomeDashboardURL = null;
private $CallingHomeServerURL = null;
private $ReflectorName = null;
private $ServiceUptime = null;
private $ProcessIDFile = null;
private $XMLContent = null;
private $XMLFile = null;
private $ServiceName = null;
private $Version = null;
private $CallingHomeCountry = null;
private $CallingHomeComment = null;
private $CallingHomeOverrideIP = null;
private $Transferinterlink = null;
private $Interlinkfile = null;
public $Interlinks = null;
private $InterlinkXML = null;
private $ReflectorXML = null;
private $InterlinkXML = null;
private $ReflectorXML = null;
public function __construct() {
$this->Nodes = array();
$this->Stations = array();
@ -35,61 +35,61 @@ class xReflector {
$this->Interlinks = array();
$this->Transferinterlink = false;
}
public function LoadXML() {
if ($this->XMLFile != null) {
$handle = fopen($this->XMLFile, 'r');
$this->XMLContent = fread($handle, filesize($this->XMLFile));
fclose($handle);
$this->ServiceName = substr($this->XMLContent, strpos($this->XMLContent, "<XRF")+4, 3);
$this->ServiceName = substr($this->XMLContent, strpos($this->XMLContent, "<XLX")+4, 3);
if (!is_numeric($this->ServiceName)) {
$this->ServiceName = null;
return false;
}
$this->ReflectorName = "XRF".$this->ServiceName;
$LinkedPeersName = "XRF".$this->ServiceName." linked peers";
$LinkedNodesName = "XRF".$this->ServiceName." linked nodes";
$LinkedUsersName = "XRF".$this->ServiceName." heard users";
$this->ReflectorName = "XLX".$this->ServiceName;
$LinkedPeersName = "XLX".$this->ServiceName." linked peers";
$LinkedNodesName = "XLX".$this->ServiceName." linked nodes";
$LinkedUsersName = "XLX".$this->ServiceName." heard users";
$XML = new ParseXML();
$AllNodesString = $XML->GetElement($this->XMLContent, $LinkedNodesName);
$tmpNodes = $XML->GetAllElements($AllNodesString, "NODE");
for ($i=0;$i<count($tmpNodes);$i++) {
$Node = new Node($XML->GetElement($tmpNodes[$i], 'Callsign'), $XML->GetElement($tmpNodes[$i], 'IP'), $XML->GetElement($tmpNodes[$i], 'LinkedModule'), $XML->GetElement($tmpNodes[$i], 'Protocol'), $XML->GetElement($tmpNodes[$i], 'ConnectTime'), $XML->GetElement($tmpNodes[$i], 'LastHeardTime'), CreateCode(16));
$this->AddNode($Node);
}
$AllStationsString = $XML->GetElement($this->XMLContent, $LinkedUsersName);
$tmpStations = $XML->GetAllElements($AllStationsString, "STATION");
for ($i=0;$i<count($tmpStations);$i++) {
$Station = new Station($XML->GetElement($tmpStations[$i], 'Callsign'), $XML->GetElement($tmpStations[$i], 'Via node'), $XML->GetElement($tmpStations[$i], 'Via peer'), $XML->GetElement($tmpStations[$i], 'LastHeardTime'), $XML->GetElement($tmpStations[$i], 'On module'));
$this->AddStation($Station, false);
}
$AllPeersString = $XML->GetElement($this->XMLContent, $LinkedPeersName);
$tmpPeers = $XML->GetAllElements($AllPeersString, "PEER");
for ($i=0;$i<count($tmpPeers);$i++) {
$Peer = new Peer($XML->GetElement($tmpPeers[$i], 'Callsign'), $XML->GetElement($tmpPeers[$i], 'IP'), $XML->GetElement($tmpPeers[$i], 'LinkedModule'), $XML->GetElement($tmpPeers[$i], 'Protocol'), $XML->GetElement($tmpPeers[$i], 'ConnectTime'), $XML->GetElement($tmpPeers[$i], 'LastHeardTime'));
$this->AddPeer($Peer, false);
}
$this->Version = $XML->GetElement($this->XMLContent, "Version");
$this->Version = $XML->GetElement($this->XMLContent, "Version");
}
}
public function GetVersion() {
return $this->Version;
}
public function GetReflectorName() {
return $this->ReflectorName;
}
public function SetXMLFile($XMLFile) {
if (file_exists($XMLFile) && (is_readable($XMLFile))) {
$this->XMLFile = $XMLFile;
@ -99,7 +99,7 @@ class xReflector {
$this->XMLContent = null;
}
}
public function SetPIDFile($ProcessIDFile) {
if (file_exists($ProcessIDFile)) {
$this->ProcessIDFile = $ProcessIDFile;
@ -110,11 +110,11 @@ class xReflector {
$this->ServiceUptime = null;
}
}
public function GetServiceUptime() {
return $this->ServiceUptime;
}
public function SetFlagFile($Flagfile) {
if (file_exists($Flagfile) && (is_readable($Flagfile))) {
$this->Flagfile = $Flagfile;
@ -122,7 +122,7 @@ class xReflector {
}
return false;
}
public function LoadFlags() {
if ($this->Flagfile != null) {
$this->Flagarray = array();
@ -133,18 +133,18 @@ class xReflector {
while(!feof($handle)) {
$row = fgets($handle,1024);
$tmp = explode(";", $row);
if (isset($tmp[0])) { $this->Flagarray[$i]['Country'] = $tmp[0]; } else { $this->Flagarray[$i]['Country'] = 'Undefined'; }
if (isset($tmp[1])) { $this->Flagarray[$i]['ISO'] = $tmp[1]; } else { $this->Flagarray[$i]['ISO'] = "Undefined"; }
//$this->Flagarray[$i]['DXCC'] = array();
if (isset($tmp[2])) {
if (isset($tmp[2])) {
$tmp2 = explode("-", $tmp[2]);
for ($j=0;$j<count($tmp2);$j++) {
//$this->Flagarray[$i]['DXCC'][] = $tmp2[$j];
$this->Flagarray_DXCC[ trim($tmp2[$j]) ] = $i;
}
}
$i++;
$i++;
}
fclose($handle);
}
@ -152,17 +152,17 @@ class xReflector {
}
return false;
}
public function AddNode($NodeObject) {
if (is_object($NodeObject)) {
$this->Nodes[] = $NodeObject;
}
}
public function NodeCount() {
return count($this->Nodes);
}
public function GetNode($ArrayIndex) {
if (isset($this->Nodes[$ArrayIndex])) {
return $this->Nodes[$ArrayIndex];
@ -175,11 +175,11 @@ class xReflector {
$this->Peers[] = $PeerObject;
}
}
public function PeerCount() {
return count($this->Peers);
}
public function GetPeer($ArrayIndex) {
if (isset($this->Peer[$ArrayIndex])) {
return $this->Peer[$ArrayIndex];
@ -189,34 +189,34 @@ class xReflector {
public function AddStation($StationObject, $AllowDouble = false) {
if (is_object($StationObject)) {
if ($AllowDouble) {
$this->Stations[] = $StationObject;
}
else {
$FoundStationInList = false;
$i = 0;
$tmp = explode(" ", $StationObject->GetCallsign());
$RealCallsign = trim($tmp[0]);
while (!$FoundStationInList && $i<$this->StationCount()) {
if ($this->Stations[$i]->GetCallsignOnly() == $RealCallsign) {
$FoundStationInList = true;
}
$i++;
}
if (!$FoundStationInList) {
if (strlen(trim($RealCallsign)) > 3) {
$this->Stations[] = $StationObject;
}
}
}
}
}
public function GetSuffixOfRepeater($Repeater, $LinkedModul, $StartWithIndex = 0) {
$suffix = "";
$found = false;
@ -232,31 +232,36 @@ class xReflector {
}
return $suffix;
}
public function GetCallsignAndSuffixByID($RandomId) {
$suffix = "";
$callsign = "";
$i = 0;
while ($i < $this->NodeCount()) {
if ($this->Nodes[$i]->GetRandomID() == $RandomId) {
return $this->Nodes[$i]->GetCallSign().'-'.$this->Nodes[$i]->GetSuffix();
if (trim($this->Nodes[$i]->GetSuffix()) == "") {
return $this->Nodes[$i]->GetCallSign();
}
else {
return $this->Nodes[$i]->GetCallSign().'-'.$this->Nodes[$i]->GetSuffix();
}
}
$i++;
}
return 'N/A';
}
public function StationCount() {
return count($this->Stations);
}
public function GetStation($ArrayIndex) {
if (isset($this->Stations[$ArrayIndex])) {
return $this->Stations[$ArrayIndex];
}
return false;
}
public function GetFlag($Callsign) {
$Image = "";
$Letters = 4;
@ -272,7 +277,7 @@ class xReflector {
}
return array(strtolower($Image), $Name);
}
public function GetModules() {
$out = array();
for ($i=0;$i<$this->NodeCount();$i++) {
@ -290,7 +295,7 @@ class xReflector {
}
return $out;
}
public function GetModuleOfNode($Node) {
die("FUNCTION DEPRECATED...");
$Node = trim(str_replace(" ", "-", $Node));
@ -300,38 +305,38 @@ class xReflector {
$i = 0;
$Module = "";
while (!$found && $i<$this->NodeCount()) {
if (strpos($Node, $this->Nodes[$i]->GetFullCallsign()) !== false) {
$Module = $this->Nodes[$i]->GetLinkedModule();
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++) {
if ($this->Nodes[$i]->GetLinkedModule() == $Module) {
$out[] = $this->Nodes[$i]->GetCallsign();
}
}
}
return $out;
}
public function GetNodesInModulesById($Module) {
$out = array();
for ($i=0;$i<$this->NodeCount();$i++) {
if ($this->Nodes[$i]->GetLinkedModule() == $Module) {
$out[] = $this->Nodes[$i]->GetRandomID();
}
}
}
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'] = ''; }
@ -339,16 +344,16 @@ class xReflector {
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 = '';
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'];
@ -356,13 +361,13 @@ class xReflector {
$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))) {
$this->Interlinks = array();
@ -374,7 +379,7 @@ class xReflector {
$this->Interlinks[] = new Interlink();
if (isset($Interlink[0])) { $this->Interlinks[count($this->Interlinks)-1]->SetName(trim($Interlink[0])); }
if (isset($Interlink[1])) { $this->Interlinks[count($this->Interlinks)-1]->SetAddress(trim($Interlink[1])); }
if (isset($Interlink[2])) {
if (isset($Interlink[2])) {
$Modules = str_split(trim($Interlink[2]), 1);
for ($j=0;$j<count($Modules);$j++) {
$this->Interlinks[count($this->Interlinks)-1]->AddModule($Modules[$j]);
@ -386,7 +391,7 @@ class xReflector {
}
return false;
}
public function PrepareInterlinkXML() {
$xml = '
<interlinks>';
@ -402,7 +407,7 @@ class xReflector {
</interlinks>';
$this->InterlinkXML = $xml;
}
public function PrepareReflectorXML() {
$this->ReflectorXML = '
<reflector>
@ -416,28 +421,28 @@ class xReflector {
<reflectorversion>'.$this->Version.'</reflectorversion>
</reflector>';
}
public function CallHome() {
$xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<query>CallingHome</query>'.$this->ReflectorXML.$this->InterlinkXML;
$p = @stream_context_create(array('http' => array('header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'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);
}
public function GetInterlink($Index) {
if (isset($this->Interlinks[$Index])) return $this->Interlinks[$Index];
return array();
}
public function IsInterlinked($Reflectorname) {
$i = -1;
$f = false;
@ -452,7 +457,7 @@ class xReflector {
}
return -1;
}
}
?>

@ -10,7 +10,7 @@ Andorra;AD;C3
Angola;AO;D2-D3
Anguilla;AI;VP2E
Annobon Island;GQ;3C0
Antarctica;AQ;ATA-ATN-AT0-CE9-DP0-DP1-DP2-ED-EM-FT8Y-HL8-DT8-IA0-KC4AA-KC4US-LU1Z-LU2Z-LU3Z-LU4Z-LU5Z-LU6Z-LU7Z-LU8Z-LU9Z-LU0Z-LZ0-OA0-OJ1-OR4-RI1A-VK0-VP8-VU-ZL5-ZL9-ZS7-ZV0-ZX0-3Y-8J1
Antarctica;AQ;CE9-KC4A-KC4U
Antigua and Barbuda;AG;V2
Argentina;AR;LO-LP-LQ-LR-LS-LT-LU-LV-LW
Armenia;AM;EK
@ -57,7 +57,7 @@ Ceuta & Melilla;ES;EA9-EB9-EC9-ED9-EE9-EF9-EG9-EH9
Chad;TD;TT
Chagos Islands;;VQ9
Chatham Islands;NZ;ZL7
Chile;CL;CA-CB-CC-CD-CE
Chile;CL;CA-CB-CC-CD-CE-XQ-XR
China;CN;BA-BB-BC-BD-BE-BF-BG-BH-BI-BJ-BK-BL-BN-BP-BQ-BR-BS-BT-BY-BZ
Christmas Island;CX;VK9X
Cocos Island;;TI9
@ -88,7 +88,7 @@ Eastern Kiribati (Line Island);KI;T32
Ecuador;EC;HC-HD
Egypt;EG;SU
El Salvador;SV;YS-HU
England;GB;2E-M0-M1-M2-M3-M4-M5-M6-M7-M8-M9-MB-MM-G0-G1-G2-G3-G4-G5-G6-G7-G8-G9-GB-GX
England;EN;2E-M0-M1-M2-M3-M4-M5-M6-M7-M8-M9-MB-MX-G0-G1-G2-G3-G4-G5-G6-G7-G8-G9-GB-GX
Equatorial Guinea;GQ;3C
Eritrea;ER;E3
Estonia;EE;ES
@ -139,7 +139,7 @@ Israel;IL;4X-4Z
Italy;IT;I0-I1-I2-I3-I4-I5-I6-I7-I8-I9-IK-IN-IQ-IR-IS-IT-IU-IV-IW-IZ
Jamaica;JM;6Y
Jan Mayen;NO;JX
Japan;JP;JA-JB-JC-JD-JE-JF-JG-JH-JI-JJ-JK-JL-JM-JN-JO-JP-JQ-JR-JS-7J-7K-7L-7M-7N
Japan;JP;JA-JB-JC-JD-JE-JF-JG-JH-JI-JJ-JK-JL-JM-JN-JO-JP-JQ-JR-JS-7J-7K-7L-7M-7N-8J-8N
Jersey;JE;GJ-GH
Johnston Island;US;KH3
Jordan;JO;JY
@ -148,7 +148,7 @@ Kazakhstan;KZ;UN-UO-UP-UQ
Kenya;KE;5Y-5Z
Kermadec Islands;NZ;ZL8
Korea Democratic People's Republic of;KP;P5
Korea Republic of;KR;HL-6K-6L-6M-6N
Korea Republic of;KR;HL-6K-6L-6M-6N-DS
Kure Island;US;KH7K
Kuwait;KW;9K
Kyrgyzstan;KG;EX
@ -203,7 +203,7 @@ Niger;NE;5U
Nigeria;NG;5N
Niue;NU;ZK2
Norfolk Island;NF;VK9N
Northern Ireland;NIE;GI-GN
Northern Ireland;NIE;MI-GI-GN-2I
Northern Mariana Islands;MP;KH0
Norway;NO;LA-LB-LC-LD-LE-LF-LG-LH-LI-LJ-LK-LL-LM-LN
Oman;OM;A4-YP-YQ-YR
@ -218,7 +218,7 @@ Peru;PE;OA-OB-OC
Philippines;PH;DU-DV-DW-DX-DY-DZ
Pitcairn;PN;VP6
Poland;PL;3Z6-SN-SO-SP-SQ-SR
Portugal;PT;CQ0-CQ1-CQ2-CQ3-CQ7-CQ8-CR1-CR2-CR3-CR5-CR6-CR7-CR8-CR9-CS2-CS3-CS4-CS5-CS7-CS8-CT1-CT2-CT3-CT4-CT5-CT8-CT9-CU0-CU1-CU2-CU3-CU4-CU5-CU6-CU7-CU8-CU
Portugal;PT;CQ0-CQ1-CQ2-CQ3-CQ7-CQ8-CR1-CR2-CR3-CR5-CR6-CR7-CR8-CR9-CS2-CS3-CS4-CS5-CS7-CS8-CT1-CT2-CT3-CT4-CT5-CT6-CT7-CT8-CT9-CU0-CU1-CU2-CU3-CU4-CU5-CU6-CU7-CU8-CU
Pratas Islands;;BV9P
Prince Edward & Marion Islands;ZA;ZS8
Puerto Rico;PR;KP3-KP4
@ -242,7 +242,7 @@ Sao Tome and Principe;ST;S9
Sardinia;IT;IS0-IM0
Saudi Arabia;SA;HZ
Scarborough Reef;;BS7
Scotland;SH;GM-GS-2M0
Scotland;SH;GM-GS-MM-2M0
Senegal;SN;6V-6W
Serbia;RS;YT-YU
Seychelles;SC;S7
@ -299,7 +299,7 @@ Virgin Islands U.S.;VI;KP2
Wake Island;US;KH9
Wales;WL;2W-GC-GW-MW
Wallis and Futuna;WF;FW
West Malaysia;MY;9M2-9M4
West Malaysia;MY;9M2-9M4-9W2
Western Kiribati (Gilbert Island);KI;T30
Western Sahara;EH;S0
Willis Island;AU;VK9W

1 Afghanistan AF YA-T6
10 Angola AO D2-D3
11 Anguilla AI VP2E
12 Annobon Island GQ 3C0
13 Antarctica AQ ATA-ATN-AT0-CE9-DP0-DP1-DP2-ED-EM-FT8Y-HL8-DT8-IA0-KC4AA-KC4US-LU1Z-LU2Z-LU3Z-LU4Z-LU5Z-LU6Z-LU7Z-LU8Z-LU9Z-LU0Z-LZ0-OA0-OJ1-OR4-RI1A-VK0-VP8-VU-ZL5-ZL9-ZS7-ZV0-ZX0-3Y-8J1 CE9-KC4A-KC4U
14 Antigua and Barbuda AG V2
15 Argentina AR LO-LP-LQ-LR-LS-LT-LU-LV-LW
16 Armenia AM EK
57 Chad TD TT
58 Chagos Islands VQ9
59 Chatham Islands NZ ZL7
60 Chile CL CA-CB-CC-CD-CE CA-CB-CC-CD-CE-XQ-XR
61 China CN BA-BB-BC-BD-BE-BF-BG-BH-BI-BJ-BK-BL-BN-BP-BQ-BR-BS-BT-BY-BZ
62 Christmas Island CX VK9X
63 Cocos Island TI9
88 Ecuador EC HC-HD
89 Egypt EG SU
90 El Salvador SV YS-HU
91 England GB EN 2E-M0-M1-M2-M3-M4-M5-M6-M7-M8-M9-MB-MM-G0-G1-G2-G3-G4-G5-G6-G7-G8-G9-GB-GX 2E-M0-M1-M2-M3-M4-M5-M6-M7-M8-M9-MB-MX-G0-G1-G2-G3-G4-G5-G6-G7-G8-G9-GB-GX
92 Equatorial Guinea GQ 3C
93 Eritrea ER E3
94 Estonia EE ES
139 Italy IT I0-I1-I2-I3-I4-I5-I6-I7-I8-I9-IK-IN-IQ-IR-IS-IT-IU-IV-IW-IZ
140 Jamaica JM 6Y
141 Jan Mayen NO JX
142 Japan JP JA-JB-JC-JD-JE-JF-JG-JH-JI-JJ-JK-JL-JM-JN-JO-JP-JQ-JR-JS-7J-7K-7L-7M-7N JA-JB-JC-JD-JE-JF-JG-JH-JI-JJ-JK-JL-JM-JN-JO-JP-JQ-JR-JS-7J-7K-7L-7M-7N-8J-8N
143 Jersey JE GJ-GH
144 Johnston Island US KH3
145 Jordan JO JY
148 Kenya KE 5Y-5Z
149 Kermadec Islands NZ ZL8
150 Korea Democratic People's Republic of KP P5
151 Korea Republic of KR HL-6K-6L-6M-6N HL-6K-6L-6M-6N-DS
152 Kure Island US KH7K
153 Kuwait KW 9K
154 Kyrgyzstan KG EX
203 Nigeria NG 5N
204 Niue NU ZK2
205 Norfolk Island NF VK9N
206 Northern Ireland NIE GI-GN MI-GI-GN-2I
207 Northern Mariana Islands MP KH0
208 Norway NO LA-LB-LC-LD-LE-LF-LG-LH-LI-LJ-LK-LL-LM-LN
209 Oman OM A4-YP-YQ-YR
218 Philippines PH DU-DV-DW-DX-DY-DZ
219 Pitcairn PN VP6
220 Poland PL 3Z6-SN-SO-SP-SQ-SR
221 Portugal PT CQ0-CQ1-CQ2-CQ3-CQ7-CQ8-CR1-CR2-CR3-CR5-CR6-CR7-CR8-CR9-CS2-CS3-CS4-CS5-CS7-CS8-CT1-CT2-CT3-CT4-CT5-CT8-CT9-CU0-CU1-CU2-CU3-CU4-CU5-CU6-CU7-CU8-CU CQ0-CQ1-CQ2-CQ3-CQ7-CQ8-CR1-CR2-CR3-CR5-CR6-CR7-CR8-CR9-CS2-CS3-CS4-CS5-CS7-CS8-CT1-CT2-CT3-CT4-CT5-CT6-CT7-CT8-CT9-CU0-CU1-CU2-CU3-CU4-CU5-CU6-CU7-CU8-CU
222 Pratas Islands BV9P
223 Prince Edward & Marion Islands ZA ZS8
224 Puerto Rico PR KP3-KP4
242 Sardinia IT IS0-IM0
243 Saudi Arabia SA HZ
244 Scarborough Reef BS7
245 Scotland SH GM-GS-2M0 GM-GS-MM-2M0
246 Senegal SN 6V-6W
247 Serbia RS YT-YU
248 Seychelles SC S7
299 Wake Island US KH9
300 Wales WL 2W-GC-GW-MW
301 Wallis and Futuna WF FW
302 West Malaysia MY 9M2-9M4 9M2-9M4-9W2
303 Western Kiribati (Gilbert Island) KI T30
304 Western Sahara EH S0
305 Willis Island AU VK9W
Loading…
Cancel
Save

Powered by TurnKey Linux.