@ -1,9 +1,78 @@
<?php
if (!isset($_SESSION['FilterCallSign'])) {
$_SESSION['FilterCallSign'] = null;
}
if (!isset($_SESSION['FilterModule'])) {
$_SESSION['FilterModule'] = null;
}
if (isset($_POST['do'])) {
if ($_POST['do'] == 'SetFilter') {
if (isset($_POST['txtSetCallsignFilter'])) {
$_POST['txtSetCallsignFilter'] = trim($_POST['txtSetCallsignFilter']);
if ($_POST['txtSetCallsignFilter'] == "") {
$_SESSION['FilterCallSign'] = null;
}
else {
$_SESSION['FilterCallSign'] = $_POST['txtSetCallsignFilter'];
if (strpos($_SESSION['FilterCallSign'], "*") === false) {
$_SESSION['FilterCallSign'] = "*".$_SESSION['FilterCallSign']."*";
}
}
}
if (isset($_POST['txtSetModuleFilter'])) {
$_POST['txtSetModuleFilter'] = trim($_POST['txtSetModuleFilter']);
if ($_POST['txtSetModuleFilter'] == "") {
$_SESSION['FilterModule'] = null;
}
else {
$_SESSION['FilterModule'] = $_POST['txtSetModuleFilter'];
}
}
}
}
?>
< table border = "0" >
< tr >
< td valign = "top" >
< table class = "listingtable" >
< table class = "listingtable" > <?php
if ($PageOptions['UserPage']['ShowFilter']) {
echo '
< tr >
< th colspan = "8" >
< table width = "100%" border = "0" >
< tr >
< td align = "left" >
< form name = "frmFilterCallSign" method = "post" action = "./index.php" >
< input type = "hidden" name = "do" value = "SetFilter" / >
< input type = "text" class = "FilterField" value = "'.$_SESSION['FilterCallSign'].'" name = "txtSetCallsignFilter" placeholder = "Callsign" / >
< input type = "submit" value = "Apply" class = "FilterSubmit" / >
< / form >
< / td >
< td align = "right" style = "padding-right:3px;" >
< form name = "frmFilterModule" method = "post" action = "./index.php" >
< input type = "hidden" name = "do" value = "SetFilter" / >
< input type = "text" class = "FilterField" value = "'.$_SESSION['FilterModule'].'" name = "txtSetModuleFilter" placeholder = "Module" / >
< input type = "submit" value = "Apply" class = "FilterSubmit" / >
< / form >
< / td >
< / table >
< / th >
< / tr > ';
}
?>
< tr >
< th > #< / th >
< th > Flag< / th >
@ -13,42 +82,62 @@
< th > Via / Peer< / th >
< th > Last heard< / th >
< th align = "center" valign = "middle" > < img src = "./img/ear.png" alt = "Listening on" / > < / th >
< / tr >
<?php
</ tr > <?php
$Reflector->LoadFlags();
$odd = "";
for ($i=0;$i< $Reflector->StationCount();$i++) {
if ($odd == "#FFFFFF") { $odd = "#F1FAFA"; } else { $odd = "#FFFFFF"; }
echo '
$ShowThisStation = true;
if ($PageOptions['UserPage']['ShowFilter']) {
$CS = true;
if ($_SESSION['FilterCallSign'] != null) {
if (!fnmatch($_SESSION['FilterCallSign'], $Reflector->Stations[$i]->GetCallSign(), FNM_CASEFOLD)) {
$CS = false;
}
}
$MO = true;
if ($_SESSION['FilterModule'] != null) {
if (trim(strtolower($_SESSION['FilterModule'])) != strtolower($Reflector->Stations[$i]->GetModule())) {
$MO = false;
}
}
$ShowThisStation = ($CS & & $MO);
}
if ($ShowThisStation) {
if ($odd == "#FFFFFF") { $odd = "#F1FAFA"; } else { $odd = "#FFFFFF"; }
echo '
< tr height = "30" bgcolor = "'.$odd.'" onMouseOver = "this.bgColor=\'#FFFFCA\';" onMouseOut = "this.bgColor=\''.$odd.'\';" >
< td align = "center" valign = "middle" width = "35" > ';
if ($i==0 & & $Reflector->Stations[$i]->GetLastHeardTime() > (time() - 60)) {
echo '< img src = "./img/tx.gif" style = "margin-top:3px;" height = "20" / > ';
}
else {
echo ($i+1);
}
if ($i==0 & & $Reflector->Stations[$i]->GetLastHeardTime() > (time() - 60)) {
echo '< img src = "./img/tx.gif" style = "margin-top:3px;" height = "20" / > ';
}
else {
echo ($i+1);
}
echo '< / td >
echo '< / td >
< td align = "center" width = "60" > ';
if (file_exists("./img/flags/".$Reflector->GetFlag($Reflector->Stations[$i]->GetCallSign()).".png")) {
echo '< img src = "./img/flags/'.$Reflector->GetFlag($Reflector->Stations[$i]->GetCallSign()).'.png" height = "15" / > ';
}
echo '< / td >
if (file_exists("./img/flags/".$Reflector->GetFlag($Reflector->Stations[$i]->GetCallSign()).".png")) {
echo '< img src = "./img/flags/'.$Reflector->GetFlag($Reflector->Stations[$i]->GetCallSign()).'.png" height = "15" / > ';
}
echo '< / td >
< td width = "75" > < a href = "https://www.qrz.com/db/'.$Reflector->Stations[$i]->GetCallsignOnly().'" class = "pl" target = "_blank" > '.$Reflector->Stations[$i]->GetCallsignOnly().'< / a > < / td >
< td width = "60" > '.$Reflector->Stations[$i]->GetSuffix().'< / td >
< td width = "50" align = "center" > < a href = "http://www.aprs.fi/'.$Reflector->Stations[$i]->GetCallsignOnly().'" class = "pl" target = "_blank" > < img src = "./img/sat.png" / > < / a > < / td >
< td width = "150" > '.$Reflector->Stations[$i]->GetVia();
if ($Reflector->Stations[$i]->GetPeer() != $Reflector->GetReflectorName()) {
echo ' / '.$Reflector->Stations[$i]->GetPeer();
}
echo '< / td >
if ($Reflector->Stations[$i]->GetPeer() != $Reflector->GetReflectorName()) {
echo ' / '.$Reflector->Stations[$i]->GetPeer();
}
echo '< / td >
< td width = "150" > '.@date("d.m.Y H:i", $Reflector->Stations[$i]->GetLastHeardTime()).'< / td >
< td align = "center" width = "30" > '.$Reflector->Stations[$i]->GetModule().'< / td >
< / tr > ';
}
if ($i == 39) { $i = $Reflector->StationCount()+1; }
}