Removed DStar-ID collumn if MMDVMHost not D-Star enabled
This commit is contained in:
parent
35c2980280
commit
2e367cbbd8
6 changed files with 55 additions and 19 deletions
|
@ -247,7 +247,7 @@ function getMMDVMLog() {
|
||||||
// Open Logfile and copy loglines into LogLines-Array()
|
// Open Logfile and copy loglines into LogLines-Array()
|
||||||
$logPath = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
$logPath = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||||
//$logLines = explode("\n", `egrep -h "from|end|watchdog|lost|POCSAG" $logPath`);
|
//$logLines = explode("\n", `egrep -h "from|end|watchdog|lost|POCSAG" $logPath`);
|
||||||
$logLines = explode("\n", `egrep -h "from|watchdog|lost|POCSAG" $logPath`);
|
$logLines = explode("\n", `egrep -h "from|end|watchdog|lost|POCSAG" $logPath`);
|
||||||
return $logLines;
|
return $logLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -593,18 +593,26 @@ function getHeardList($logLines, $onlyLast) {
|
||||||
if ( strlen($callsign) < 11 ) {
|
if ( strlen($callsign) < 11 ) {
|
||||||
$name = "";
|
$name = "";
|
||||||
if (defined("ENABLEXTDLOOKUP")) {
|
if (defined("ENABLEXTDLOOKUP")) {
|
||||||
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $name, $id, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||||
|
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $name, $id, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||||
|
} else {
|
||||||
|
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $name, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||||
|
}
|
||||||
$alias = "";
|
$alias = "";
|
||||||
} else {
|
} else {
|
||||||
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $id, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||||
|
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $id, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||||
|
} else {
|
||||||
|
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $target, $source, $duration, $loss, $ber, $rssi, $alias));
|
||||||
|
}
|
||||||
$alias = "";
|
$alias = "";
|
||||||
}/*
|
}
|
||||||
$duration = "";
|
$duration = "";
|
||||||
$loss = "";
|
$loss = "";
|
||||||
$ber = "";
|
$ber = "";
|
||||||
$rssi = "";
|
$rssi = "";
|
||||||
$ts1alias = "---";
|
$ts1alias = "---";
|
||||||
$ts2alias = "---";*/
|
$ts2alias = "---";
|
||||||
if ($onlyLast && count($heardList )> 20) {
|
if ($onlyLast && count($heardList )> 20) {
|
||||||
return $heardList;
|
return $heardList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,12 @@ exec("wc -l ".DMRIDDATPATH." | cut -f1 -d' '", $output2);
|
||||||
<th><?php echo _("Name"); ?></th>
|
<th><?php echo _("Name"); ?></th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||||
?>
|
?>
|
||||||
<th><?php echo _("DSTAR-ID"); ?></th>
|
<th><?php echo _("DSTAR-ID"); ?></th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<th><?php echo _("Target"); ?></th>
|
<th><?php echo _("Target"); ?></th>
|
||||||
<th><?php echo _("Source"); ?></th>
|
<th><?php echo _("Source"); ?></th>
|
||||||
<th><?php echo _("Dur (s)"); ?></th>
|
<th><?php echo _("Dur (s)"); ?></th>
|
||||||
|
|
|
@ -19,8 +19,12 @@ $totalLH = count($lastHeard);
|
||||||
<th><?php echo _("Name"); ?></th>
|
<th><?php echo _("Name"); ?></th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||||
?>
|
?>
|
||||||
<th><?php echo _("DSTAR-ID"); ?></th>
|
<th><?php echo _("DSTAR-ID"); ?></th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<th><?php echo _("Target"); ?></th>
|
<th><?php echo _("Target"); ?></th>
|
||||||
<th><?php echo _("Source"); ?></th>
|
<th><?php echo _("Source"); ?></th>
|
||||||
<th><?php echo _("Dur (s)"); ?></th>
|
<th><?php echo _("Dur (s)"); ?></th>
|
||||||
|
|
|
@ -21,8 +21,12 @@
|
||||||
<th><?php echo _("Talker Alias"); ?></th>
|
<th><?php echo _("Talker Alias"); ?></th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||||
?>
|
?>
|
||||||
<th><?php echo _("DSTAR-ID"); ?></th>
|
<th><?php echo _("DSTAR-ID"); ?></th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<th><?php echo _("Target"); ?></th>
|
<th><?php echo _("Target"); ?></th>
|
||||||
<th><?php echo _("Source"); ?></th>
|
<th><?php echo _("Source"); ?></th>
|
||||||
<th><?php echo _("TX-Time"); ?></th>
|
<th><?php echo _("TX-Time"); ?></th>
|
||||||
|
|
42
txinfo.php
42
txinfo.php
|
@ -26,26 +26,42 @@ foreach ($lastHeard as $listElem) {
|
||||||
// echo"<!--";
|
// echo"<!--";
|
||||||
// var_dump($listElem);
|
// var_dump($listElem);
|
||||||
// echo"-->";
|
// echo"-->";
|
||||||
if (defined("ENABLEXTDLOOKUP") && $listElem[7] == null && $listElem[1] != "POCSAG" || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null && $listElem[1] != "POCSAG" ) {
|
if (getEnabled("D-Star", $mmdvmconfigs) == 1 && defined("ENABLEXTDLOOKUP") && $listElem[7] == null && $listElem[1] != "POCSAG" || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null && $listElem[1] != "POCSAG" || \
|
||||||
|
getEnabled("D-Star", $mmdvmconfigs) == 0 && defined("ENABLEXTDLOOKUP") && $listElem[6] == null && $listElem[1] != "POCSAG" || !defined("ENABLEXTDLOOKUP") && $listElem[5] == null && $listElem[1] != "POCSAG" ) {
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo"<td nowrap>$listElem[0]</td>";
|
echo"<td nowrap>$listElem[0]</td>";
|
||||||
echo"<td nowrap>$listElem[1]</td>";
|
echo"<td nowrap>$listElem[1]</td>";
|
||||||
echo"<td nowrap>$listElem[2]</td>";
|
echo"<td nowrap>$listElem[2]</td>";
|
||||||
if (defined("ENABLEXTDLOOKUP")) {
|
if (defined("ENABLEXTDLOOKUP")) {
|
||||||
echo"<td nowrap>$listElem[3]</td>";
|
echo"<td nowrap>$listElem[3]</td>";
|
||||||
if (defined("TALKERALIAS"))
|
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||||
echo"<td nowrap>$listElem[11]</td>";
|
if (defined("TALKERALIAS"))
|
||||||
echo"<td nowrap>$listElem[4]</td>";
|
echo"<td nowrap>$listElem[11]</td>";
|
||||||
echo"<td nowrap>$listElem[5]</td>";
|
echo"<td nowrap>$listElem[4]</td>";
|
||||||
if ($listElem[6] == "RF"){
|
echo"<td nowrap>$listElem[5]</td>";
|
||||||
echo "<td nowrap><span class=\"badge badge-success\">RF</span></td>";
|
if ($listElem[6] == "RF"){
|
||||||
}else{
|
echo "<td nowrap><span class=\"badge badge-success\">RF</span></td>";
|
||||||
echo"<td nowrap>$listElem[6]</td>";
|
}else{
|
||||||
|
echo"<td nowrap>$listElem[6]</td>";
|
||||||
|
}
|
||||||
|
$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>";
|
||||||
|
} else {
|
||||||
|
if (defined("TALKERALIAS"))
|
||||||
|
echo"<td nowrap>$listElem[10]</td>";
|
||||||
|
echo"<td nowrap>$listElem[4]</td>";
|
||||||
|
if ($listElem[5] == "RF"){
|
||||||
|
echo "<td nowrap><span class=\"badge badge-success\">RF</span></td>";
|
||||||
|
}else{
|
||||||
|
echo"<td nowrap>$listElem[5]</td>";
|
||||||
|
}
|
||||||
|
$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>";
|
||||||
}
|
}
|
||||||
$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>";
|
|
||||||
} else {
|
} else {
|
||||||
if (defined("TALKERALIAS"))
|
if (defined("TALKERALIAS"))
|
||||||
echo"<td nowrap>$listElem[10]</td>";
|
echo"<td nowrap>$listElem[10]</td>";
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
define("VERSION", "20201029-1 (".getGitVersion().")");
|
define("VERSION", "20201030-1 (".getGitVersion().")");
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue