From ea3f30b445698403e70488eaf613b68456c6750a Mon Sep 17 00:00:00 2001 From: Waldek Date: Sun, 23 May 2021 19:28:11 +0200 Subject: [PATCH] Delete log.php --- html/log.php | 125 --------------------------------------------------- 1 file changed, 125 deletions(-) delete mode 100644 html/log.php diff --git a/html/log.php b/html/log.php deleted file mode 100644 index fc73481..0000000 --- a/html/log.php +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -DMR Server monitor - STATUS - - - -"; -echo "table { border-collapse: collapse; border: 1px solid #C1DAD7; width: 100%;}"; -echo "th {".THEME_COLOR."height: 30px; text-align: center;}"; -echo "tr:nth-child(even) { background-color: #fafafa; }"; -echo "td {font-family: Monospace; height: 20px;}"; -echo "a:link { text-decoration: none; }"; -echo ""; ?> - - -
- -
-
-

-

-
- -
-\n"; -echo "
\n\n"; -echo "
"; -echo "\n\n"; -// define table row titels -echo""; -echo "\n\n"; - -// 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("/opt/HBMonv2/log/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 = "".$s.' '.$date_eu[2].".".$date_eu[1].".".$date_eu[0].$s.' '.substr($log_time[$i],11,5).$s.' '.$user_call[$i]." (".$user_id[$i].")".$s.TRIM($user_name[$i]).$s.''.$tg[$i].''.$s.' '.$tgname[$i].''.$s."
".round($transmit_timer[$i])."
".$s.$system[$i]."\n"; -} - -echo "\n
LastHeard
  Date Time Callsign (DMR-Id)  Name TG#  TG NameTX (s) Source
"; -$s_r = ""; -$s_m = ""; - -// 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 "
"; - -// close logfile after parsing -fclose ($handle); -?> -
-

-Copyright (c) 2016-2021
The Regents of the K0USY Group. All rights reserved.
Version SP2ONG 2019-2021
- - -© developed by DL1BZ as logging-extension of HBmonitor (2018,2019)
-

-
-
- -