MMDVMHost-Dashboard/txinfo.php

70 lines
2.4 KiB
PHP
Raw Normal View History

<?php
//session_start();
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
include "config/config.php";
include "include/tools.php";
include "include/functions.php";
$mmdvmconfigs = getMMDVMConfig();
2016-10-26 15:06:45 +02:00
if (!defined("MMDVMLOGPREFIX"))
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
$logLinesMMDVM = getShortMMDVMLog();
$reverseLogLinesMMDVM = $logLinesMMDVM;
array_multisort($reverseLogLinesMMDVM,SORT_DESC);
$lastHeard = getLastHeard($reverseLogLinesMMDVM, True);
//$oldLastHeard = $_SESSION['lastHeard'];
echo"<!--";
var_dump($lastHeard);
echo"-->";
2016-09-13 21:36:42 +02:00
foreach ($lastHeard as $listElem) {
if (defined("ENABLEXTDLOOKUP") && $listElem[7] == null || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null) {
echo "<tr>";
2016-09-15 21:49:48 +02:00
echo"<td nowrap>$listElem[0]</td>";
echo"<td nowrap>$listElem[1]</td>";
/*if ($listElem[2] !== "??????????") {
if (!is_numeric($listElem[2])) {
if (constant("SHOWQRZ")) {
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>";
2016-10-26 09:46:15 +02:00
2016-09-13 21:36:42 +02:00
if (defined("ENABLEXTDLOOKUP")) {
//echo "<td nowrap>".getName($listElem[2])."</td>";
echo"<td nowrap>$listElem[3]</td>";
echo"<td nowrap>$listElem[4]</td>";
echo"<td nowrap>$listElem[5]</td>";
if ($listElem[6] == "RF"){
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
}else{
echo"<td nowrap>$listElem[6]</td>";
}
$UTC = new DateTimeZone("UTC");
$d1 = new DateTime($listElem[0], $UTC);
$d2 = new DateTime('now', $UTC);
$diff = $d2->getTimestamp() - $d1->getTimestamp();
echo"<td nowrap>$diff s</td>";
} else {
echo"<td nowrap>$listElem[3]</td>";
echo"<td nowrap>$listElem[4]</td>";
if ($listElem[5] == "RF"){
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
}else{
echo"<td nowrap>$listElem[5]</td>";
}
$UTC = new DateTimeZone("UTC");
$d1 = new DateTime($listElem[0], $UTC);
$d2 = new DateTime('now', $UTC);
$diff = $d2->getTimestamp() - $d1->getTimestamp();
echo"<td nowrap>$diff s</td>";
2016-09-13 21:36:42 +02:00
}
echo "</tr>";
}
}
?>