Modified Dashboards for YSF, P25, and NXDN Reflector monitoring.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

  1. <?php
  2. header("Cache-Control: no-cache, must-revalidate");
  3. header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
  4. include "config/config.php";
  5. include "include/tools.php";
  6. include "include/functions.php";
  7. $configs = getP25ReflectorConfig();
  8. $logLines = getShortP25ReflectorLog();
  9. $reverseLogLines = $logLines;
  10. array_multisort($reverseLogLines,SORT_DESC);
  11. $lastHeard = getLastHeard($reverseLogLines, True);
  12. if(isset($lastHeard[0])){
  13. $listElem = $lastHeard[0];
  14. if (strlen($listElem[0]) !== 0) {
  15. echo "<tr>";
  16. echo"<td nowrap>$listElem[0]</td>";
  17. if (constant("SHOWQRZ") && $listElem[1] !== "??????????" && !is_numeric($listElem[1])) {
  18. echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[1]\">".str_replace("0","&Oslash;",$listElem[1])."</a></td>";
  19. } else {
  20. echo"<td nowrap>".str_replace("0","&Oslash;",$listElem[1])."</td>";
  21. }
  22. echo"<td nowrap>$listElem[2]</td>";
  23. echo"<td nowrap>$listElem[3]</td>";
  24. $UTC = new DateTimeZone("UTC");
  25. $local = new DateTimeZone(TIMEZONE);
  26. $d1 = new DateTime($listElem[0], $local);
  27. $d2 = new DateTime('now', $UTC);
  28. $diff = $d2->getTimestamp() - $d1->getTimestamp();
  29. echo"<td nowrap>$diff s</td>";
  30. echo "</tr>";
  31. }
  32. }
  33. ?>