From 41d2ae6ef4cd4236bc1da5348ddffbefa28f53ef Mon Sep 17 00:00:00 2001 From: phl0 Date: Mon, 12 Jun 2017 14:12:15 +0200 Subject: [PATCH] Add country name as tooltip --- dashboard/pgs/class.reflector.php | 3 ++- dashboard/pgs/repeaters.php | 5 +++-- dashboard/pgs/users.php | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dashboard/pgs/class.reflector.php b/dashboard/pgs/class.reflector.php index bb4c848..4586cba 100755 --- a/dashboard/pgs/class.reflector.php +++ b/dashboard/pgs/class.reflector.php @@ -267,6 +267,7 @@ class xReflector { while (($z < count($this->Flagarray[$j]['DXCC'])) && (!$FoundFlag)) { if (trim($Prefix) == trim($this->Flagarray[$j]['DXCC'][$z])) { $Image = $this->Flagarray[$j]['ISO']; + $Name = $this->Flagarray[$j]['Country']; $FoundFlag = true; } $z++; @@ -275,7 +276,7 @@ class xReflector { } $Letters--; } - return strtolower($Image); + return array(strtolower($Image), $Name); } public function GetModules() { diff --git a/dashboard/pgs/repeaters.php b/dashboard/pgs/repeaters.php index ecf98dd..28a5e71 100755 --- a/dashboard/pgs/repeaters.php +++ b/dashboard/pgs/repeaters.php @@ -29,8 +29,9 @@ for ($i=0;$i<$Reflector->NodeCount();$i++) { '.($i+1).' '; - if (file_exists("./img/flags/".$Reflector->GetFlag($Reflector->Nodes[$i]->GetCallSign()).".png")) { - echo ''; + list ($Flag, $Name) = $Reflector->GetFlag($Reflector->Nodes[$i]->GetCallSign()); + if (file_exists("./img/flags/".$Flag.".png")) { + echo ''.$Name.''; } echo ' '; - if (file_exists("./img/flags/".$Reflector->GetFlag($Reflector->Stations[$i]->GetCallSign()).".png")) { - echo ''; + list ($Flag, $Name) = $Reflector->GetFlag($Reflector->Stations[$i]->GetCallSign()); + if (file_exists("./img/flags/".$Flag.".png")) { + echo ''.$Name.''; } echo ' '.$Reflector->Stations[$i]->GetCallsignOnly().'