Use correct variables in links to DMR DARC page

This commit is contained in:
phl0 2016-10-26 01:39:19 +02:00
parent 8eb0ba8f3a
commit 18598a798e
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A
5 changed files with 63 additions and 28 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,11 +34,17 @@ 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,11 +38,17 @@ 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>";