configurable resolving of name to callsign in lh and localtx
This commit is contained in:
parent
0f51be1ce7
commit
097f18881a
5 changed files with 36 additions and 2 deletions
|
@ -478,6 +478,13 @@ function getActiveYSFReflectors($logLines) {
|
|||
return $reflectorlist;
|
||||
}
|
||||
|
||||
function getName($callsign) {
|
||||
exec("grep ".$callsign." ".DMRIDDATPATH, $output);
|
||||
$name = substr($output[0], strpos($output[0]," ")+1);
|
||||
$name = substr($name, strpos($name," ")+1);
|
||||
return $name;
|
||||
}
|
||||
|
||||
//Some basic inits
|
||||
$mmdvmconfigs = getMMDVMConfig();
|
||||
$logLinesMMDVM = getMMDVMLog();
|
||||
|
|
|
@ -12,6 +12,13 @@ $totalLH = count($lastHeard);
|
|||
<th>Time (UTC)</th>
|
||||
<th>Mode</th>
|
||||
<th>Callsign</th>
|
||||
<?php
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
?>
|
||||
<th>Name</th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th>DSTAR-ID</th>
|
||||
<th>Target</th>
|
||||
<th>Source</th>
|
||||
|
@ -28,6 +35,9 @@ for ($i = 0; ($i < $totalLH); $i++) {
|
|||
echo"<td class=\"nowrap\">$listElem[0]</td>";
|
||||
echo"<td class=\"nowrap\">$listElem[1]</td>";
|
||||
echo"<td class=\"nowrap\">$listElem[2]</td>";
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
echo "<td class=\"nowrap\">".getName($listElem[2])."</td>";
|
||||
}
|
||||
echo"<td class=\"nowrap\">$listElem[3]</td>";
|
||||
echo"<td class=\"nowrap\">$listElem[4]</td>";
|
||||
if ($listElem[5] == "RF"){
|
||||
|
|
|
@ -15,6 +15,13 @@ $localTXList = getHeardList($reverseLogLinesMMDVM);
|
|||
<th>Time (UTC)</th>
|
||||
<th>Mode</th>
|
||||
<th>Callsign</th>
|
||||
<?php
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
?>
|
||||
<th>Name</th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th>DSTAR-ID</th>
|
||||
<th>Target</th>
|
||||
<th>Source</th>
|
||||
|
@ -33,6 +40,9 @@ for ($i = 0; $i < count($localTXList); $i++) {
|
|||
echo"<td nowrap>$listElem[0]</td>";
|
||||
echo"<td nowrap>$listElem[1]</td>";
|
||||
echo"<td nowrap>$listElem[2]</td>";
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
echo "<td class=\"nowrap\">".getName($listElem[2])."</td>";
|
||||
}
|
||||
echo"<td nowrap>$listElem[3]</td>";
|
||||
echo"<td nowrap>$listElem[4]</td>";
|
||||
echo"<td nowrap>$listElem[5]</td>";
|
||||
|
|
|
@ -72,10 +72,17 @@ include "include/tools.php";
|
|||
<span class="input-group-addon" id="MMDVMHOSTPATH" style="width: 300px">Path to MMDVMHost-executable</span>
|
||||
<input type="text" value="<?php echo constant("MMDVMHOSTPATH") ?>" name="MMDVMHOSTPATH" class="form-control" placeholder="/usr/local/bin/" aria-describedby="MMDVMHOSTPATH" required data-fv-notempty-message="Value is required">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="ENABLEXTDLOOKUP" style="width: 300px">Enable extended lookup (show names)</span>
|
||||
<div class="panel-body"><input type="checkbox" name="ENABLEXTDLOOKUP" <?php if (constant("ENABLEXTDLOOKUP")) echo "checked" ?>></div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="DMRIDDATPATH" style="width: 300px">Path to DMR-ID-Database-File</span>
|
||||
<input type="text" value="<?php echo constant("DMRIDDATPATH") ?>" name="DMRIDDATPATH" class="form-control" placeholder="/var/mmdvm/DMRIDs.dat" aria-describedby="DMRIDDATPATH">
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<h2>YSFGateway-Configuration</h2>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="ENABLEYSFGATEWAY" style="width: 300px">Enable YSFGateway</span>
|
||||
<div class="panel-body"><input type="checkbox" name="ENABLEYSFGATEWAY" <?php if (constant("ENABLEYSFGATEWAY")) echo "checked" ?>></div>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
define("VERSION", "20160713-1");
|
||||
define("VERSION", "20160715-1");
|
||||
?>
|
Loading…
Reference in a new issue