2017-02-02 16:37:38 +01:00
|
|
|
<?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'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-02 16:41:06 +01:00
|
|
|
if (isset($_GET['do'])) {
|
|
|
|
|
if ($_GET['do'] == "resetfilter") {
|
|
|
|
|
$_SESSION['FilterModule'] = null;
|
|
|
|
|
$_SESSION['FilterCallSign'] = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-14 15:15:20 +02:00
|
|
|
|
|
|
|
|
// Validate filter inputs
|
|
|
|
|
if (isset($_SESSION['FilterCallSign']) && $_SESSION['FilterCallSign'] !== null) {
|
|
|
|
|
$_SESSION['FilterCallSign'] = preg_replace('/[^A-Z0-9\*\-\/\s]/i', '', $_SESSION['FilterCallSign']);
|
|
|
|
|
}
|
|
|
|
|
if (isset($_SESSION['FilterModule']) && $_SESSION['FilterModule'] !== null) {
|
|
|
|
|
$_SESSION['FilterModule'] = validate_module($_SESSION['FilterModule']);
|
|
|
|
|
}
|
2017-02-02 16:41:06 +01:00
|
|
|
|
2017-02-02 16:37:38 +01:00
|
|
|
?>
|
2016-01-01 13:42:52 +01:00
|
|
|
<table border="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top">
|
2016-02-04 12:21:42 +01:00
|
|
|
|
2016-01-01 13:42:52 +01:00
|
|
|
|
2017-02-02 16:37:38 +01:00
|
|
|
<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" />
|
2025-10-14 15:15:20 +02:00
|
|
|
<input type="text" class="FilterField" value="'.sanitize_attribute($_SESSION['FilterCallSign']).'" name="txtSetCallsignFilter" placeholder="Callsign" onfocus="SuspendPageRefresh();" onblur="setTimeout(ReloadPage, '.$PageOptions['PageRefreshDelay'].');" />
|
2017-02-02 16:37:38 +01:00
|
|
|
<input type="submit" value="Apply" class="FilterSubmit" />
|
|
|
|
|
</form>
|
2017-02-02 16:41:06 +01:00
|
|
|
</td>';
|
|
|
|
|
if (($_SESSION['FilterModule'] != null) || ($_SESSION['FilterCallSign'] != null)) {
|
|
|
|
|
echo '
|
|
|
|
|
<td><a href="./index.php?do=resetfilter" class="smalllink">Disable filters</a></td>';
|
|
|
|
|
}
|
|
|
|
|
echo '
|
2017-02-02 16:37:38 +01:00
|
|
|
<td align="right" style="padding-right:3px;">
|
|
|
|
|
<form name="frmFilterModule" method="post" action="./index.php">
|
|
|
|
|
<input type="hidden" name="do" value="SetFilter" />
|
2025-10-14 15:15:20 +02:00
|
|
|
<input type="text" class="FilterField" value="'.sanitize_attribute($_SESSION['FilterModule']).'" name="txtSetModuleFilter" placeholder="Module" onfocus="SuspendPageRefresh();" onblur="setTimeout(ReloadPage, '.$PageOptions['PageRefreshDelay'].');" />
|
2017-02-02 16:37:38 +01:00
|
|
|
<input type="submit" value="Apply" class="FilterSubmit" />
|
|
|
|
|
</form>
|
|
|
|
|
</td>
|
|
|
|
|
</table>
|
|
|
|
|
</th>
|
|
|
|
|
</tr>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
2016-02-04 12:21:42 +01:00
|
|
|
<tr>
|
2016-01-01 13:42:52 +01:00
|
|
|
<th>#</th>
|
|
|
|
|
<th>Flag</th>
|
|
|
|
|
<th>Callsign</th>
|
|
|
|
|
<th>Suffix</th>
|
|
|
|
|
<th>DPRS</th>
|
2016-02-11 18:51:12 +01:00
|
|
|
<th>Via / Peer</th>
|
2016-01-01 13:42:52 +01:00
|
|
|
<th>Last heard</th>
|
2016-03-13 19:16:51 +01:00
|
|
|
<th align="center" valign="middle"><img src="./img/ear.png" alt="Listening on" /></th>
|
2017-02-02 16:37:38 +01:00
|
|
|
</tr><?php
|
2016-01-01 13:42:52 +01:00
|
|
|
|
|
|
|
|
$Reflector->LoadFlags();
|
|
|
|
|
$odd = "";
|
|
|
|
|
for ($i=0;$i<$Reflector->StationCount();$i++) {
|
2017-02-02 16:37:38 +01:00
|
|
|
$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 '
|
2025-10-14 15:15:20 +02:00
|
|
|
<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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '</td>
|
|
|
|
|
<td align="center" width="60">';
|
|
|
|
|
|
|
|
|
|
list ($Flag, $Name) = $Reflector->GetFlag($Reflector->Stations[$i]->GetCallSign());
|
|
|
|
|
if (file_exists("./img/flags/".$Flag.".png")) {
|
|
|
|
|
echo '<a href="#" class="tip"><img src="./img/flags/'.sanitize_attribute($Flag).'.png" height="15" alt="'.sanitize_attribute($Name).'" /><span>'.sanitize_output($Name).'</span></a>';
|
|
|
|
|
}
|
|
|
|
|
echo '</td>
|
|
|
|
|
<td width="75"><a href="https://www.qrz.com/db/'.sanitize_attribute($Reflector->Stations[$i]->GetCallsignOnly()).'" class="pl" target="_blank">'.sanitize_output($Reflector->Stations[$i]->GetCallsignOnly()).'</a></td>
|
|
|
|
|
<td width="60">'.sanitize_output($Reflector->Stations[$i]->GetSuffix()).'</td>
|
|
|
|
|
<td width="50" align="center"><a href="http://www.aprs.fi/'.sanitize_attribute($Reflector->Stations[$i]->GetCallsignOnly()).'" class="pl" target="_blank"><img src="./img/sat.png" /></a></td>
|
|
|
|
|
<td width="150">'.sanitize_output($Reflector->Stations[$i]->GetVia());
|
|
|
|
|
if ($Reflector->Stations[$i]->GetPeer() != $Reflector->GetReflectorName()) {
|
|
|
|
|
echo ' / '.sanitize_output($Reflector->Stations[$i]->GetPeer());
|
|
|
|
|
}
|
|
|
|
|
echo '</td>
|
|
|
|
|
<td width="150">'.sanitize_output(@date("d.m.Y H:i", $Reflector->Stations[$i]->GetLastHeardTime())).'</td>
|
|
|
|
|
<td align="center" width="30">'.sanitize_output($Reflector->Stations[$i]->GetModule()).'</td>
|
|
|
|
|
</tr>';
|
2017-02-02 16:37:38 +01:00
|
|
|
}
|
2017-03-08 14:27:04 +01:00
|
|
|
if ($i == $PageOptions['LastHeardPage']['LimitTo']) { $i = $Reflector->StationCount()+1; }
|
2016-01-01 13:42:52 +01:00
|
|
|
}
|
|
|
|
|
|
2016-02-04 12:21:42 +01:00
|
|
|
?>
|
|
|
|
|
|
2016-01-01 13:42:52 +01:00
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
<td style="padding-left:50px;" align="center" valign="top">
|
2016-02-04 12:21:42 +01:00
|
|
|
|
|
|
|
|
|
2016-01-01 13:42:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<table class="listingtable">
|
2016-02-04 12:21:42 +01:00
|
|
|
<?php
|
2016-01-01 13:42:52 +01:00
|
|
|
|
|
|
|
|
$Modules = $Reflector->GetModules();
|
2017-01-26 07:56:09 +01:00
|
|
|
sort($Modules, SORT_STRING);
|
2016-03-05 13:51:10 +01:00
|
|
|
echo '
|
2016-03-13 19:16:51 +01:00
|
|
|
<tr>';
|
2016-01-01 13:42:52 +01:00
|
|
|
for ($i=0;$i<count($Modules);$i++) {
|
2016-03-13 19:16:51 +01:00
|
|
|
|
2016-03-04 10:57:08 +01:00
|
|
|
if (isset($PageOptions['ModuleNames'][$Modules[$i]])) {
|
2016-03-13 19:16:51 +01:00
|
|
|
echo '
|
2025-10-14 15:15:20 +02:00
|
|
|
<th>'.sanitize_output($PageOptions['ModuleNames'][$Modules[$i]]);
|
2016-03-04 10:57:08 +01:00
|
|
|
if (trim($PageOptions['ModuleNames'][$Modules[$i]]) != "") {
|
|
|
|
|
echo '<br />';
|
|
|
|
|
}
|
2025-10-14 15:15:20 +02:00
|
|
|
echo sanitize_output($Modules[$i]).'</th>';
|
2016-03-04 10:57:08 +01:00
|
|
|
}
|
|
|
|
|
else {
|
2025-10-14 15:15:20 +02:00
|
|
|
echo '
|
|
|
|
|
<th>'.sanitize_output($Modules[$i]).'</th>';
|
2016-03-04 10:57:08 +01:00
|
|
|
}
|
2016-01-01 13:42:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '
|
2016-03-05 13:51:10 +01:00
|
|
|
</tr>
|
2016-01-01 13:42:52 +01:00
|
|
|
<tr bgcolor="#FFFFFF" style="padding:0px;">';
|
|
|
|
|
|
2017-01-24 08:45:11 +01:00
|
|
|
$GlobalPositions = array();
|
|
|
|
|
|
2016-01-01 13:42:52 +01:00
|
|
|
for ($i=0;$i<count($Modules);$i++) {
|
2017-01-24 08:45:11 +01:00
|
|
|
|
|
|
|
|
$Users = $Reflector->GetNodesInModulesByID($Modules[$i]);
|
|
|
|
|
echo '
|
2016-01-01 13:42:52 +01:00
|
|
|
<td valign="top" style="border:0px;padding:0px;">
|
2016-02-04 12:21:42 +01:00
|
|
|
|
2016-03-04 10:57:08 +01:00
|
|
|
<table width="100" border="0" style="padding:0px;margin:0px;">';
|
2016-01-01 13:42:52 +01:00
|
|
|
$odd = "";
|
2016-02-19 12:23:06 +01:00
|
|
|
|
|
|
|
|
$UserCheckedArray = array();
|
|
|
|
|
|
2016-01-01 13:42:52 +01:00
|
|
|
for ($j=0;$j<count($Users);$j++) {
|
2017-01-24 08:45:11 +01:00
|
|
|
|
2016-01-01 13:42:52 +01:00
|
|
|
if ($odd == "#FFFFFF") { $odd = "#F1FAFA"; } else { $odd = "#FFFFFF"; }
|
2017-01-24 08:45:11 +01:00
|
|
|
$Displayname = $Reflector->GetCallsignAndSuffixByID($Users[$j]);
|
2016-03-04 10:57:08 +01:00
|
|
|
echo '
|
|
|
|
|
<tr height="25" bgcolor="'.$odd.'" onMouseOver="this.bgColor=\'#FFFFCA\';" onMouseOut="this.bgColor=\''.$odd.'\';">
|
2025-10-14 15:15:20 +02:00
|
|
|
<td valign="top" style="border-bottom:1px #C1DAD7 solid;"><a href="http://www.aprs.fi/'.sanitize_attribute($Displayname).'" class="pl" target="_blank">'.sanitize_output($Displayname).'</a> </td>
|
2016-01-01 13:42:52 +01:00
|
|
|
</tr>';
|
2016-02-19 12:23:06 +01:00
|
|
|
$UserCheckedArray[] = $Users[$j];
|
2016-01-01 13:42:52 +01:00
|
|
|
}
|
|
|
|
|
echo '
|
2016-03-04 10:57:08 +01:00
|
|
|
</table>
|
2016-02-04 12:21:42 +01:00
|
|
|
|
2016-01-01 13:42:52 +01:00
|
|
|
</td>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '
|
|
|
|
|
</tr>';
|
|
|
|
|
|
|
|
|
|
?>
|
2016-02-04 12:21:42 +01:00
|
|
|
</table>
|
2016-01-01 13:42:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2016-02-04 12:21:42 +01:00
|
|
|
</table>
|