/
txinfo.php
38 lines (38 loc) · 1.43 KB
/
txinfo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
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";
$configs = getYSFReflectorConfig();
$logLines = getShortYSFReflectorLog();
$reverseLogLines = $logLines;
array_multisort($reverseLogLines,SORT_DESC);
$lastHeard = getLastHeard($reverseLogLines, True);
$listElem = $lastHeard[0];
if (strlen($listElem[1]) !== 0) {
echo "<tr>";
echo"<td nowrap>$listElem[0]</td>";
if (constant("SHOWQRZ") && $listElem[1] !== "??????????" && !is_numeric($listElem[1])) {
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[1]\">".str_replace("0","Ø",$listElem[1])."</a></td>";
} else {
if (defined("GDPR"))
echo"<td nowrap>".str_replace("0","Ø",substr($listElem[1],0,3)."***")."</td>";
else
echo"<td nowrap>".str_replace("0","Ø",$listElem[1])."</td>";
}
echo"<td nowrap>$listElem[2]</td>";
if (constant("GDPR"))
echo"<td nowrap>".str_replace("0","Ø",substr($listElem[3],0,3)."***")."</td>";
else
echo"<td nowrap>".str_replace("0","Ø",$listElem[3])."</td>";
$UTC = new DateTimeZone("UTC");
$d1 = new DateTime($listElem[0], new DateTimeZone(TIMEZONE));
$d2 = new DateTime('now', new DateTimeZone(TIMEZONE));
$diff = $d2->getTimestamp() - $d1->getTimestamp();
echo"<td nowrap>$diff s</td>";
echo "</tr>";
} else {
echo"<tr><td colspan=\"5\"></tr>";
}
?>