Merge pull request #53 from phl0/dev

Use correct variables in links to DMR DARC page
This commit is contained in:
Kim - DG9VH 2016-10-26 07:25:49 +02:00 committed by GitHub
commit 05743272f6
5 changed files with 61 additions and 26 deletions

View file

@ -26,19 +26,31 @@ if ($_GET['section'] == "localTx") {
if (defined("ENABLEXTDLOOKUP")) { if (defined("ENABLEXTDLOOKUP")) {
if ($listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) { if ($listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
$listElem[3] = getName($listElem[2]); $listElem[3] = getName($listElem[2]);
if (constant("SHOWQRZ") && $listElem[2] !== "??????????" && !is_numeric($listElem[2])) { if ($listElem[2] !== "??????????") {
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a>"; if (!is_numeric($listElem[2])) {
} else { if (constant("SHOWQRZ")) {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>"; $listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a>";
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</a>";
}
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>";
}
} }
array_push($lastHeard, $listElem); array_push($lastHeard, $listElem);
} }
} else { } else {
if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) { if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
if (constant("SHOWQRZ") && $listElem[2] !== "??????????" && !is_numeric($listElem[2])) { if ($listElem[2] !== "??????????") {
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a>"; if (!is_numeric($listElem[2])) {
} else { if (constant("SHOWQRZ")) {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>"; $listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a>";
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</a>";
}
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>";
}
} }
array_push($lastHeard, $listElem); array_push($lastHeard, $listElem);
} }
@ -220,4 +232,4 @@ if ($_GET['section'] == "sysinfo") {
</tbody> </tbody>
<?php <?php
} }
?> ?>

View file

@ -360,12 +360,17 @@ function getLastHeard($logLines, $onlyLast) {
$listElem[3] = "---"; $listElem[3] = "---";
} }
} }
if (constant("SHOWQRZ") && $listElem[2] !== "??????????" && !is_numeric($listElem[2])) { if ($listElem[2] !== "??????????") {
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a>"; if (!is_numeric($listElem[2])) {
} else { if (constant("SHOWQRZ")) {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>"; $listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a>";
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</a>";
}
} else {
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>";
}
} }
array_push($lastHeard, $listElem); array_push($lastHeard, $listElem);
$counter++; $counter++;
} }

View file

@ -34,10 +34,16 @@ for ($i = 0; ($i < $totalLH); $i++) {
echo"<tr>"; echo"<tr>";
echo"<td nowrap>$listElem[0]</td>"; echo"<td nowrap>$listElem[0]</td>";
echo"<td nowrap>$listElem[1]</td>"; echo"<td nowrap>$listElem[1]</td>";
if (constant("SHOWQRZ") && $listElem[2] !== "??????????" && !is_numeric($listElem[2])) { if ($listElem[2] !== "??????????") {
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a></td>"; if (!is_numeric($listElem[2])) {
} else { if (constant("SHOWQRZ")) {
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>"; echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a></td>";
} else {
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</td>";
}
} else {
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>";
}
} }
if (defined("ENABLEXTDLOOKUP")) { if (defined("ENABLEXTDLOOKUP")) {
echo "<td nowrap>".getName($listElem[2])."</td>"; echo "<td nowrap>".getName($listElem[2])."</td>";

View file

@ -38,10 +38,16 @@ for ($i = 0; $i < count($localTXList); $i++) {
echo"<tr>"; echo"<tr>";
echo"<td nowrap>$listElem[0]</td>"; echo"<td nowrap>$listElem[0]</td>";
echo"<td nowrap>$listElem[1]</td>"; echo"<td nowrap>$listElem[1]</td>";
if (constant("SHOWQRZ") && $listElem[2] !== "??????????" && !is_numeric($listElem[2])) { if ($listElem[2] !== "??????????") {
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a></td>"; if (!is_numeric($listElem[2])) {
} else { if (constant("SHOWQRZ")) {
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>"; echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a></td>";
} else {
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</td>";
}
} else {
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>";
}
} }
if (defined("ENABLEXTDLOOKUP")) { if (defined("ENABLEXTDLOOKUP")) {
echo "<td class=\"nowrap\">$listElem[3]</td>"; echo "<td class=\"nowrap\">$listElem[3]</td>";

View file

@ -19,10 +19,16 @@ foreach ($lastHeard as $listElem) {
echo "<tr>"; echo "<tr>";
echo"<td nowrap>$listElem[0]</td>"; echo"<td nowrap>$listElem[0]</td>";
echo"<td nowrap>$listElem[1]</td>"; echo"<td nowrap>$listElem[1]</td>";
/*if (constant("SHOWQRZ") && $listElem[2] !== "??????????" && !is_numeric($listElem[2])) { /*if ($listElem[2] !== "??????????") {
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a></td>"; if (!is_numeric($listElem[2])) {
} else { if (constant("SHOWQRZ")) {
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>"; echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","&Oslash;",$listElem[2])."</a></td>";
} else {
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</td>";
}
} else {
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>";
}
}*/ }*/
echo"<td nowrap>$listElem[2]</td>"; echo"<td nowrap>$listElem[2]</td>";