130 lines
6.2 KiB
PHP
130 lines
6.2 KiB
PHP
<?php
|
|
$progname = basename($_SERVER['SCRIPT_FILENAME'],".php");
|
|
include_once 'include/config.php';
|
|
?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="refresh" content="30">
|
|
<title>DMR Server - Dashboard | Lastheard</title>
|
|
<script type="text/javascript" src="scripts/hbmon.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="css/styles.php" />
|
|
<meta name="description" content="Copyright (c) 2016-2021.The Regents of the K0USY Group. All rights reserved. Version SP2ONG 2019-2021 (v20210712). M0VUB 2020-2021 (v20210906-1.2.9)" />
|
|
</head>
|
|
<body style="background-color: #d0d0d0;font: 10pt arial, sans-serif;">
|
|
<center><div style="width:1100px; text-align: center; margin-top:5px;">
|
|
<img src="img/logo.jpg?random=323527528432525.24234" alt="" />
|
|
</div>
|
|
<div style="width: 1100px;">
|
|
<p style="text-align:center;"><span style="color:#000;font-size: 18px; font-weight:bold;"><?php echo REPORT_NAME;?></span></p>
|
|
<p></p>
|
|
</div>
|
|
<?php include_once 'buttons.html'; ?>
|
|
<div style="width: 1100px;">
|
|
<p align="middle">
|
|
<div style="overflow-x:auto;">
|
|
<center><fieldset style="background-color:#e0e0e0e0;margin-left:15px;margin-right:15px;margin-top:15px;font-size:14px;border-top-left-radius: 10px; border-top-right-radius: 10px;border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;">
|
|
<table style="border-collapse: collapse; border: 1px solid #C1DAD7; width: 100%;background-color:#f0f0f0;">
|
|
<thead><tr><th colspan=9 style="height: 30px;font-size:18px;font-weight:bold;">LastHeard</th></tr></thead>
|
|
<tr class="theme_color" style="height:35px; text-align: center;font-weight:bold;"><TH> Date<TH> Time<TH> Callsign (DMR-Id)<TH> Name<TH> TG#<TH> TG Name<TH>TX (s) <TH>Source
|
|
</tr>
|
|
|
|
<?php
|
|
// logging extension "last heard list" for hbmonitor
|
|
// developed by Heiko Amft,DL1BZ dl1bz@bzsax.de
|
|
|
|
// define array for CSV import of logfile
|
|
$log_time=array();
|
|
$transmit_timer=array();
|
|
$calltype=array();
|
|
$event=array();
|
|
$system=array();
|
|
$src_id=array();
|
|
$src_name=array();
|
|
$ts=array();
|
|
$tg=array();
|
|
$tgname=array();
|
|
$user_id=array();
|
|
$user_call=array();
|
|
$user_name=array();
|
|
|
|
// define location and name of logfile
|
|
// best practise is write logfile in the directory where this php script is saved because some php installations have problems to read files outside the webserver directories
|
|
$handle = fopen("/var/log/hbmon/lastheard.log","r");
|
|
|
|
// import to array
|
|
while (($data = fgetcsv ($handle)) !==false)
|
|
{
|
|
$log_time[] = $data[0];
|
|
$transmit_timer[] = $data[1];
|
|
$calltype[] = $data[2];
|
|
$event[] = $data[3];
|
|
$system[] = $data[4];
|
|
$src_id[] = $data[5];
|
|
$src_name[] = $data[6];
|
|
$ts[] = $data[7];
|
|
$tg[] = $data[8];
|
|
$tgname[] = $data[9];
|
|
$user_id[] = $data[10];
|
|
$user_call[] = $data[11];
|
|
$user_name[] = $data[12];
|
|
}
|
|
|
|
// define some macros for table output
|
|
$s = "<TD class=\"log\">";
|
|
$s_r = "<TD align=\"right\">";
|
|
$s_m = "<TD align=\"center\">";
|
|
|
|
// output to html table from the newest entry to the oldest
|
|
for ($i=count($log_time)-1; $i >= 0; $i--)
|
|
|
|
{
|
|
// prepare date string for output in european format
|
|
$split_date = substr($log_time[$i],0,10);
|
|
$date_eu = explode("-", $split_date);
|
|
|
|
$ts[$i] = substr($ts[$i],-1);
|
|
$tg[$i] = substr($tg[$i],2);
|
|
|
|
// define special character convert for number zero - we write calls with number zero with this character in logs in Germany
|
|
$src_name[$i] = str_replace("0","Ø",$src_name[$i]);
|
|
if (substr($user_call[$i],2,1)=="0") { $user_call[$i] = str_replace("0","Ø",$user_call[$i]); }
|
|
|
|
$log_time[$i]=substr($log_time[$i],0,19);
|
|
|
|
// thats a special thing for an Id comes without DMR-Id from PEGASUS project - it means we need to convert to "NoCall" thats for calls from source ECHOLINK
|
|
if ($user_id[$i]=="1234567") {$user_call[$i] = "*NoCallsign*"; $user_id[$i]="-";}
|
|
|
|
// output table
|
|
echo "<TR class=\"log\" style=\"height:25px; text-align: center;\">".$s.' '.$date_eu[2].".".$date_eu[1].".".$date_eu[0].$s.' '.substr($log_time[$i],11,5).$s.'<font color=#0066ff><b> '.$user_call[$i]."</b></font><font size=\"-1\"> (".$user_id[$i].")</font>".$s.'<font color=#002d62><b>'.TRIM($user_name[$i]).'</b></font>'.$s.'<font color=#b5651d><b>'.$tg[$i].'</b></font>'.$s.'<font color=green><b> '.$tgname[$i].'</b></font>'.$s."<center>".round($transmit_timer[$i])."</center>".$s.$system[$i]."</TR>\n";
|
|
}
|
|
|
|
echo "\n</table></fieldset></div>";
|
|
|
|
// close logfile after parsing
|
|
fclose ($handle);
|
|
?>
|
|
<div style="width: 1100px;">
|
|
<!-- Insert Revolver Globe here
|
|
|
|
-->
|
|
|
|
<!-- FOOTER BEGIN -->
|
|
<p style="text-align: center;"><span style="text-align: center;"><br>Server Version 1.2.9 <a title="The legend of HBlink & lead developer of the ultimate DMR Master Server" target="_blank" href="https://github.com/n0mjs710">Cortney T. Buffington</a> N0MJS. © All Rights Reserved 2020-2021<br>The Regents of the <a title="K0USY Group - Creators of HBLink" target="_blank" href=http://k0usy.mystrikingly.com/>K0USY Group.</a> © All Rights Reserved 2016-2019<br>Dashboard Monitor by © <a title="HBMonv2 SP2ONG - The ultimate dashboard king" target="_blank" href=https://github.com/sp2ong/HBMonv2>Waldek</a> SP2ONG 2019-2021<br>
|
|
Frontend by © <a title="AKA ShaYmez - George Michael Look-a-Like" target="_blank" href="https://github.com/ShaYmez">Shane Daley</a> M0VUB <br><a title="HackNix" target="_blank" href="https://github.com/HackNix/FreeDMR">HackNix.</a> © 2020-2021<br>
|
|
<br></span>
|
|
<!-- THIS COPYRIGHT NOTICE MUST BE DISPLAYED AS A CONDITION OF THE LICENCE GRANT FOR THIS SOFTWARE. ALL DERIVATEIVES WORKS MUST CARRY THIS NOTICE -->
|
|
<!-- This is version of HBMonitor SP2ONG 2019-2021 (v20210712)-->
|
|
<!-- This version of HBMonv2 Dash has been edited to By Shane Daley M0VUB. This dashboard has been designed for the latest FDMR Server https://github.com/shaymez/freedmr , which has been edited for use with this dashboard.
|
|
<!-- You can also get the latest FDMR server from the original developer here http://github.com/HackNix/FreeDMR
|
|
-->
|
|
</p>
|
|
<!-- FOOTER END -->
|
|
|
|
</div>
|
|
</center>
|
|
</body>
|
|
</html>
|