make talker-alias configurable

This commit is contained in:
dg9vh 2017-02-13 21:31:27 +00:00
parent 745f317d3d
commit c5b8592ffb
6 changed files with 15 additions and 6 deletions

View file

@ -242,7 +242,6 @@ function getHeardList($logLines, $onlyLast) {
$alias = "";
foreach ($logLines as $logLine) {
//echo $logLine;
$duration = "";
$loss = "";
$ber = "";
@ -261,7 +260,7 @@ function getHeardList($logLines, $onlyLast) {
} else if(strpos($logLine,"bad LC received")) {
continue;
}
//$alias = substr($logLine, 27, 5);
if(strpos($logLine, "0000") > 0){
$decodedAlias = decodeAlias($logLine);
if ($alias =="")

View file

@ -116,7 +116,7 @@ function convertTimezone($timestamp) {
function encode($hex) {
$validchars = " abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789";
$str = '';
$chrval = hexdec(substr($hex,$i,2));
$chrval = hexdec($hex);
$str = chr($chrval);
if (strpos($validchars, $str)>=0)
return $str;

View file

@ -15,8 +15,12 @@
<th>Name</th>
<?php
}
if (defined("TALKERALIAS")) {
?>
<th>Talker Alias</th>
<?php
}
?>
<th>DSTAR-ID</th>
<th>Target</th>
<th>Source</th>

View file

@ -295,6 +295,10 @@ get_tz_options(constant("TIMEZONE"), "Timezone", '');
</select>
</div>
</div>
<div class="input-group">
<span class="input-group-addon" id="TALKERALIAS" style="width: 300px">Show Talker Alias</span>
<div class="panel-body"><input type="checkbox" name="TALKERALIAS" <?php if (defined("TALKERALIAS")) echo "checked" ?>></div>
</div>
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" form="config">Save configuration</button>

View file

@ -44,7 +44,8 @@ foreach ($lastHeard as $listElem) {
if (defined("ENABLEXTDLOOKUP")) {
//echo "<td nowrap>".getName($listElem[2])."</td>";
echo"<td nowrap>$listElem[3]</td>";
echo"<td nowrap>$listElem[11]</td>";
if (defined("TALKERALIAS"))
echo"<td nowrap>$listElem[11]</td>";
echo"<td nowrap>$listElem[4]</td>";
echo"<td nowrap>$listElem[5]</td>";
if ($listElem[6] == "RF"){
@ -57,7 +58,8 @@ foreach ($lastHeard as $listElem) {
$diff = $d2->getTimestamp() - $d1->getTimestamp();
echo"<td nowrap>$diff s</td>";
} else {
echo"<td nowrap>$listElem[10]</td>";
if (defined("TALKERALIAS"))
echo"<td nowrap>$listElem[10]</td>";
echo"<td nowrap>$listElem[3]</td>";
echo"<td nowrap>$listElem[4]</td>";
if ($listElem[5] == "RF"){

View file

@ -1,3 +1,3 @@
<?php
define("VERSION", "20170120-1");
define("VERSION", "20170213-1");
?>