diff --git a/ajax.php b/ajax.php index c58e773..31ee457 100644 --- a/ajax.php +++ b/ajax.php @@ -47,16 +47,6 @@ if ($_GET['section'] == "lastHeard") { } echo '{"data": '.json_encode($lastHeard)."}"; } -/* - for ($i = 0; $i < count($localTXList); $i++) { - $listElem = $localTXList[$i]; - if (defined("ENABLEXTDLOOKUP")) { - $listElem[11] =""; - } else { - $listElem[10] =""; - } - echo '{"data": '.json_encode($lastHeard)."}"; -}*/ if ($_GET['section'] == "localTx") { $localTXList = getHeardList($reverseLogLinesMMDVM, FALSE); $lastHeard = Array(); diff --git a/include/functions.php b/include/functions.php index d5425ae..35da54a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -434,14 +434,12 @@ function getHeardList($logLines, $onlyLast) { $loss = $ts1loss; $ber = $ts1ber; $rssi = $ts1rssi; -// $alias = $ts1alias; break; case "DMR Slot 2": $duration = $ts2duration; $loss = $ts2loss; $ber = $ts2ber; $rssi = $ts2rssi; -// $alias = $ts2alias; break; case "YSF": $duration = $ysfduration; @@ -750,39 +748,6 @@ function getYSFReflectorById($id, $reflectors) { } } -/* -function getNames($delimiter) { - if (!isset($_SESSION['dmrIDs'])) { - $dmrIDs = Array(); - $file = fopen(DMRIDDATPATH, 'r'); - if ($file) { - while (($line = fgetcsv($file, 1000, $delimiter)) !== FALSE) { - array_push($dmrIDs, array('id'=>$line[0], 'callsign'=>$line[1], 'name'=>$line[2])); - } - } - $_SESSION['dmrIDs'] = $dmrIDs; - } -} -function getName($callsign) { - $dmrIDs = $_SESSION['dmrIDs']; - $key = array_search("$callsign", array_column($dmrIDs, 'callsign')); - //return $key; - $dmrID = $_SESSION['dmrIDs'][$key]; - //var_dump($dmrID); - return $dmrID['name']; -} - -function getName($callsign) { -// var_dump($_SESSION['dmrIDs']); - foreach ($_SESSION['dmrIDs'] as $dmrID) { - if ($dmrID[1] == $callsign) { - return $dmrID[2]; - } - } - return "---"; -} -*/ - function getName($callsign) { if (is_numeric($callsign)) { return "---"; @@ -810,10 +775,6 @@ function getName($callsign) { } $delimiter =" "; exec("sed -e 's/[[:space:]]\+/ /g' ".DMRIDDATPATH ." | grep -m1 '".$callsign.$delimiter."'" , $output); -// if (count($output) == 0) { -// $delimiter = "\t"; -// exec("egrep -m1 '".$callsign.$delimiter."' ".DMRIDDATPATH, $output); -// } if (count($output) !== 0) { $name = preg_replace('/[\x00-\x1F\x7F-\xA0\xAD]/u', '', substr($output[0], strpos($output[0],$delimiter)+1)); $name = substr($name, strpos($name,$delimiter)+1); @@ -845,8 +806,6 @@ function decodeAlias($logLine) { $tok4 = encode(substr($logLine, 49, 2)); $tok5 = encode(substr($logLine, 52, 2)); $tok6 = encode(substr($logLine, 55, 2)); -// https://github.com/g4klx/MMDVMHost/commit/bba5cbc0bad65f32dde6f673255a05534ebc13ab -// $tok7 = encode(dechex(hexdec(substr($logLine, 58, 2))/2)); $tok7 = encode(substr($logLine, 58, 2)); return $tok1.$tok2.$tok3.$tok4.$tok5.$tok6.$tok7; } diff --git a/include/init.php b/include/init.php index 6e384aa..811525a 100644 --- a/include/init.php +++ b/include/init.php @@ -7,18 +7,11 @@ if (!defined("TIMEZONE")) define("TIMEZONE", "UTC"); $logLinesMMDVM = getMMDVMLog(); showLapTime("getMMDVMLog"); -//getNames(" "); -showLapTime("getNames"); -//$_SESSION['logLinesMMDVM'] = $logLinesMMDVM; $reverseLogLinesMMDVM = $logLinesMMDVM; -//array_multisort($reverseLogLinesMMDVM,SORT_DESC); rsort($reverseLogLinesMMDVM); showLapTime("array_multisort"); -//$_SESSION['reverseLogLinesMMDVM'] = $reverseLogLinesMMDVM; $lastHeard = getLastHeard($reverseLogLinesMMDVM, FALSE); showLapTime("getLastHeard"); -//$_SESSION['lastHeard'] = $lastHeard; - if (defined("ENABLEYSFGATEWAY")) { $logLinesYSFGateway = getYSFGatewayLog(); showLapTime("getYSFGatewayLog"); diff --git a/include/lh.php b/include/lh.php deleted file mode 100644 index 1574dee..0000000 --- a/include/lh.php +++ /dev/null @@ -1,74 +0,0 @@ - -
- -
Last Heard List of today's callsigns.
- -
- - - - - - - - - - - - - - - - - - -"; - echo""; - echo""; - if ($listElem[2] !== "??????????") { - if (!is_numeric($listElem[2])) { - if (defined("SHOWQRZ")) { - echo""; - } else { - echo""; - } - } else { - echo""; - } - } - if (defined("ENABLEXTDLOOKUP")) { - echo ""; - } - echo""; - echo""; - if ($listElem[5] == "RF"){ - echo ""; - }else{ - echo""; - } - if ($listElem[6] == null) { - echo''; - } else if ($listElem[6] == "SMS") { - echo''; - } else { - echo""; - echo""; - echo""; - } - echo"\n"; - } -?> - -
Time (UTC)ModeCallsignNameDSTAR-IDTargetSourceDur (s)LossBER
$listElem[0]$listElem[1]".str_replace("0","Ø",$listElem[2])."".$listElem[2]."".$listElem[2]."".getName($listElem[2])."$listElem[3]$listElem[4]RF$listElem[5]transmittingsending or receiving SMS$listElem[6]$listElem[7]$listElem[8]
-
-
- diff --git a/include/localtx.php b/include/localtx.php deleted file mode 100644 index 16e8aa2..0000000 --- a/include/localtx.php +++ /dev/null @@ -1,77 +0,0 @@ - -
- -
Today's local transmissions
- -
- - - - - - - - - - - - - - - - - - - -"; - echo""; - echo""; - if ($listElem[2] !== "??????????") { - if (!is_numeric($listElem[2])) { - if (defined("SHOWQRZ")) { - echo""; - } else { - echo""; - } - } else { - echo""; - } - } - if (defined("ENABLEXTDLOOKUP")) { - echo ""; - } - echo""; - echo""; - echo""; - if ($listElem[6] == null) { - echo''; - } else if ($listElem[7] == "SMS") { - echo''; - } else { - echo""; - echo""; - echo""; - } - echo"\n"; - } -} - -?> - -
Time (UTC)ModeCallsignNameDSTAR-IDTargetSourceDur (s)LossBERRSSI
$listElem[0]$listElem[1]".str_replace("0","Ø",$listElem[2])."".$listElem[2]."".$listElem[2]."$listElem[3]$listElem[4]$listElem[5]$listElem[6]in TXsending or receiving SMS$listElem[7]$listElem[8]$listElem[9]
-
-
- diff --git a/include/sysinfo.php b/include/sysinfo.php deleted file mode 100644 index ab55b18..0000000 --- a/include/sysinfo.php +++ /dev/null @@ -1,180 +0,0 @@ - TEMPERATUREHIGHLEVEL && $cputemp !== NULL) { -?> - -$y) $cpu[$x] = round($y / $total * 100, 1); - $cpuusage = round($cpu['user'] + $cpu['sys'], 2); - showLapTime("cpuusage"); - - $output = shell_exec('grep -c processor /proc/cpuinfo'); - $cpucores = $output; - - $output = shell_exec('cat /proc/uptime'); - $uptime = format_time(substr($output,0,strpos($output," "))); - $idletime = format_time((substr($output,strpos($output," ")))/$cpucores); - showLapTime("idletime"); - - if (defined("SHOWPOWERSTATE")) { - $pinStatus = trim(shell_exec("gpio -g read ".POWERONLINEPIN)); // Pin 18 - } - //returns 0 = low; 1 = high -?> -
- -
System Info
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PowerCPU-TemperatureCPU-FrequencySystem-LoadCPU-UsageUptimeIdle
°C MHz % - -
= 30 and $cpuusage < 60) - echo "progress-bar-warning"; - if ($cpuusage >= 60) - echo "progress-bar-danger"; -?>" role="progressbar" aria-valuenow="" aria-valuemin="0" aria-valuemax="100" style="width: %;">%
- -
-
-
diff --git a/index.php b/index.php index 7f62ff2..b3e948c 100644 --- a/index.php +++ b/index.php @@ -1,10 +1,4 @@ - @@ -197,16 +190,9 @@ if (defined("ENABLEYSFGATEWAY")) { ?>
setTimezone(new DateTimeZone(TIMEZONE)); echo "MMDVMHost-Dashboard V ".VERSION." | "._("Last Reload")." ".$lastReload->format('Y-m-d, H:i:s')." (".TIMEZONE.")"; -/*$time = microtime(); -$time = explode(' ', $time); -$time = $time[1] + $time[0]; -$finish = $time; -$total_time = round(($finish - $start), 4);*/ echo ''; ?> | ";*/ $counter = 0; foreach ($lastHeard as $listElem) { $counter +=1; @@ -28,21 +24,8 @@ foreach ($lastHeard as $listElem) { echo ""; echo"$listElem[0]"; echo"$listElem[1]"; - /*if ($listElem[2] !== "??????????") { - if (!is_numeric($listElem[2])) { - if (defined("SHOWQRZ")) { - echo"".str_replace("0","Ø",$listElem[2]).""; - } else { - echo"".$listElem[2].""; - } - } else { - echo"".$listElem[2].""; - } - }*/ echo"$listElem[2]"; - if (defined("ENABLEXTDLOOKUP")) { - //echo "".getName($listElem[2]).""; echo"$listElem[3]"; if (defined("TALKERALIAS")) echo"$listElem[11]";