Get rid of tabs :-)
This commit is contained in:
parent
cef1f02eff
commit
c32e44f7ba
23 changed files with 1503 additions and 1503 deletions
392
ajax.php
392
ajax.php
|
@ -8,232 +8,232 @@ include "include/functions.php";
|
||||||
|
|
||||||
$mmdvmconfigs = getMMDVMConfig();
|
$mmdvmconfigs = getMMDVMConfig();
|
||||||
if (!defined("MMDVMLOGPREFIX"))
|
if (!defined("MMDVMLOGPREFIX"))
|
||||||
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
|
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
|
||||||
if (!defined("TIMEZONE"))
|
if (!defined("TIMEZONE"))
|
||||||
define("TIMEZONE", "UTC");
|
define("TIMEZONE", "UTC");
|
||||||
$logLinesMMDVM = getMMDVMLog();
|
$logLinesMMDVM = getMMDVMLog();
|
||||||
$reverseLogLinesMMDVM = $logLinesMMDVM;
|
$reverseLogLinesMMDVM = $logLinesMMDVM;
|
||||||
array_multisort($reverseLogLinesMMDVM,SORT_DESC);
|
array_multisort($reverseLogLinesMMDVM,SORT_DESC);
|
||||||
if ($_GET['section'] == "mode") {
|
if ($_GET['section'] == "mode") {
|
||||||
$mode = getActualMode(getLastHeard($reverseLogLinesMMDVM, TRUE), $mmdvmconfigs);
|
$mode = getActualMode(getLastHeard($reverseLogLinesMMDVM, TRUE), $mmdvmconfigs);
|
||||||
echo $mode;
|
echo $mode;
|
||||||
}
|
}
|
||||||
if ($_GET['section'] == "lastHeard") {
|
if ($_GET['section'] == "lastHeard") {
|
||||||
$lastHeard = getLastHeard($reverseLogLinesMMDVM, FALSE);
|
$lastHeard = getLastHeard($reverseLogLinesMMDVM, FALSE);
|
||||||
echo '{"data": '.json_encode($lastHeard)."}";
|
echo '{"data": '.json_encode($lastHeard)."}";
|
||||||
}
|
}
|
||||||
if ($_GET['section'] == "localTx") {
|
if ($_GET['section'] == "localTx") {
|
||||||
$localTXList = getHeardList($reverseLogLinesMMDVM, FALSE);
|
$localTXList = getHeardList($reverseLogLinesMMDVM, FALSE);
|
||||||
$lastHeard = Array();
|
$lastHeard = Array();
|
||||||
for ($i = 0; $i < count($localTXList); $i++) {
|
for ($i = 0; $i < count($localTXList); $i++) {
|
||||||
$listElem = $localTXList[$i];
|
$listElem = $localTXList[$i];
|
||||||
if (defined("ENABLEXTDLOOKUP")) {
|
if (defined("ENABLEXTDLOOKUP")) {
|
||||||
if ($listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
|
if ($listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
|
||||||
$listElem[3] = getName($listElem[2]);
|
$listElem[3] = getName($listElem[2]);
|
||||||
if ($listElem[2] !== "??????????") {
|
if ($listElem[2] !== "??????????") {
|
||||||
if (!is_numeric($listElem[2])) {
|
if (!is_numeric($listElem[2])) {
|
||||||
if (constant("SHOWQRZ")) {
|
if (constant("SHOWQRZ")) {
|
||||||
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a>";
|
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a>";
|
||||||
} else {
|
} else {
|
||||||
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</a>";
|
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</a>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>";
|
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
array_push($lastHeard, $listElem);
|
array_push($lastHeard, $listElem);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
|
if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
|
||||||
if ($listElem[2] !== "??????????") {
|
if ($listElem[2] !== "??????????") {
|
||||||
if (!is_numeric($listElem[2])) {
|
if (!is_numeric($listElem[2])) {
|
||||||
if (constant("SHOWQRZ")) {
|
if (constant("SHOWQRZ")) {
|
||||||
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a>";
|
$listElem[2] = "<a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a>";
|
||||||
} else {
|
} else {
|
||||||
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</a>";
|
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</a>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>";
|
$listElem[2] = "<a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
array_push($lastHeard, $listElem);
|
array_push($lastHeard, $listElem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo '{"data": '.json_encode($lastHeard)."}";
|
echo '{"data": '.json_encode($lastHeard)."}";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET['section'] == "sysinfo") {
|
if ($_GET['section'] == "sysinfo") {
|
||||||
$cputemp = NULL;
|
$cputemp = NULL;
|
||||||
$cpufreq = NULL;
|
$cpufreq = NULL;
|
||||||
if (file_exists ("/sys/class/thermal/thermal_zone0/temp")) {
|
if (file_exists ("/sys/class/thermal/thermal_zone0/temp")) {
|
||||||
exec("cat /sys/class/thermal/thermal_zone0/temp", $cputemp);
|
exec("cat /sys/class/thermal/thermal_zone0/temp", $cputemp);
|
||||||
$cputemp = $cputemp[0] / 1000;
|
$cputemp = $cputemp[0] / 1000;
|
||||||
}
|
}
|
||||||
showLapTime("cputemp");
|
showLapTime("cputemp");
|
||||||
if (file_exists ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq")) {
|
if (file_exists ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq")) {
|
||||||
exec("cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", $cpufreq);
|
exec("cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", $cpufreq);
|
||||||
$cpufreq = $cpufreq[0] / 1000;
|
$cpufreq = $cpufreq[0] / 1000;
|
||||||
}
|
}
|
||||||
showLapTime("cpufreq");
|
showLapTime("cpufreq");
|
||||||
|
|
||||||
if (defined("TEMPERATUREALERT") && $cputemp > TEMPERATUREHIGHLEVEL && $cputemp !== NULL) {
|
if (defined("TEMPERATUREALERT") && $cputemp > TEMPERATUREHIGHLEVEL && $cputemp !== NULL) {
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
function deleteLayer(id) {
|
function deleteLayer(id) {
|
||||||
if (document.getElementById && document.getElementById(id)) {
|
if (document.getElementById && document.getElementById(id)) {
|
||||||
var theNode = document.getElementById(id);
|
var theNode = document.getElementById(id);
|
||||||
theNode.parentNode.removeChild(theNode);
|
theNode.parentNode.removeChild(theNode);
|
||||||
}
|
}
|
||||||
else if (document.all && document.all[id]) {
|
else if (document.all && document.all[id]) {
|
||||||
document.all[id].innerHTML='';
|
document.all[id].innerHTML='';
|
||||||
document.all[id].outerHTML='';
|
document.all[id].outerHTML='';
|
||||||
}
|
}
|
||||||
// OBSOLETE CODE FOR NETSCAPE 4
|
// OBSOLETE CODE FOR NETSCAPE 4
|
||||||
else if (document.layers && document.layers[id]) {
|
else if (document.layers && document.layers[id]) {
|
||||||
document.layers[id].visibility='hide';
|
document.layers[id].visibility='hide';
|
||||||
delete document.layers[id];
|
delete document.layers[id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeLayer(id,L,T,W,H,bgColor,visible,zIndex) {
|
function makeLayer(id,L,T,W,H,bgColor,visible,zIndex) {
|
||||||
if (document.getElementById) {
|
if (document.getElementById) {
|
||||||
if (document.getElementById(id)) {
|
if (document.getElementById(id)) {
|
||||||
alert ('Layer with this ID already exists!');
|
alert ('Layer with this ID already exists!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var ST = 'position:absolute; text-align:center;padding-top:20px;'
|
var ST = 'position:absolute; text-align:center;padding-top:20px;'
|
||||||
+'; left:'+L+'px'
|
+'; left:'+L+'px'
|
||||||
+'; top:'+T+'px'
|
+'; top:'+T+'px'
|
||||||
+'; width:'+W+'px'
|
+'; width:'+W+'px'
|
||||||
+'; height:'+H+'px'
|
+'; height:'+H+'px'
|
||||||
+'; clip:rect(0,'+W+','+H+',0)'
|
+'; clip:rect(0,'+W+','+H+',0)'
|
||||||
+'; visibility:'
|
+'; visibility:'
|
||||||
+(null==visible || 1==visible ? 'visible':'hidden')
|
+(null==visible || 1==visible ? 'visible':'hidden')
|
||||||
+(null==zIndex ? '' : '; z-index:'+zIndex)
|
+(null==zIndex ? '' : '; z-index:'+zIndex)
|
||||||
+(null==bgColor ? '' : '; background-color:'+bgColor);
|
+(null==bgColor ? '' : '; background-color:'+bgColor);
|
||||||
|
|
||||||
var LR = '<DIV id='+id+' style="'+ST+'">CPU-Temperature is very high!<br><input type="button" value="Close" onclick="deleteLayer(\'LYR1\')"></DIV>';
|
var LR = '<DIV id='+id+' style="'+ST+'">CPU-Temperature is very high!<br><input type="button" value="Close" onclick="deleteLayer(\'LYR1\')"></DIV>';
|
||||||
|
|
||||||
if (document.body) {
|
if (document.body) {
|
||||||
if (document.body.insertAdjacentHTML)
|
if (document.body.insertAdjacentHTML)
|
||||||
document.body.insertAdjacentHTML("BeforeEnd",LR);
|
document.body.insertAdjacentHTML("BeforeEnd",LR);
|
||||||
else if (document.createElement && document.body.appendChild) {
|
else if (document.createElement && document.body.appendChild) {
|
||||||
var newNode = document.createElement('div');
|
var newNode = document.createElement('div');
|
||||||
newNode.setAttribute('id',id);
|
newNode.setAttribute('id',id);
|
||||||
newNode.setAttribute('style',ST);
|
newNode.setAttribute('style',ST);
|
||||||
document.body.appendChild(newNode);
|
document.body.appendChild(newNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var audio = new Audio('sounds/alert.mp3');
|
var audio = new Audio('sounds/alert.mp3');
|
||||||
audio.play();
|
audio.play();
|
||||||
var x = window.innerWidth/2-100;
|
var x = window.innerWidth/2-100;
|
||||||
var y = window.innerHeight/2-50;
|
var y = window.innerHeight/2-50;
|
||||||
|
|
||||||
makeLayer('LYR1',x,y,200,100,'red',1,1);
|
makeLayer('LYR1',x,y,200,100,'red',1,1);
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = shell_exec('cat /proc/loadavg');
|
$output = shell_exec('cat /proc/loadavg');
|
||||||
$sysload = substr($output,0,strpos($output," "))*100;
|
$sysload = substr($output,0,strpos($output," "))*100;
|
||||||
showLapTime("sysload");
|
showLapTime("sysload");
|
||||||
$stat1 = file('/proc/stat');
|
$stat1 = file('/proc/stat');
|
||||||
sleep(1);
|
sleep(1);
|
||||||
$stat2 = file('/proc/stat');
|
$stat2 = file('/proc/stat');
|
||||||
$info1 = explode(" ", preg_replace("!cpu +!", "", $stat1[0]));
|
$info1 = explode(" ", preg_replace("!cpu +!", "", $stat1[0]));
|
||||||
$info2 = explode(" ", preg_replace("!cpu +!", "", $stat2[0]));
|
$info2 = explode(" ", preg_replace("!cpu +!", "", $stat2[0]));
|
||||||
$dif = array();
|
$dif = array();
|
||||||
$dif['user'] = $info2[0] - $info1[0];
|
$dif['user'] = $info2[0] - $info1[0];
|
||||||
$dif['nice'] = $info2[1] - $info1[1];
|
$dif['nice'] = $info2[1] - $info1[1];
|
||||||
$dif['sys'] = $info2[2] - $info1[2];
|
$dif['sys'] = $info2[2] - $info1[2];
|
||||||
$dif['idle'] = $info2[3] - $info1[3];
|
$dif['idle'] = $info2[3] - $info1[3];
|
||||||
$total = array_sum($dif);
|
$total = array_sum($dif);
|
||||||
$cpu = array();
|
$cpu = array();
|
||||||
foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
|
foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
|
||||||
$cpuusage = round($cpu['user'] + $cpu['sys'], 2);
|
$cpuusage = round($cpu['user'] + $cpu['sys'], 2);
|
||||||
showLapTime("cpuusage");
|
showLapTime("cpuusage");
|
||||||
|
|
||||||
$output = shell_exec('grep -c processor /proc/cpuinfo');
|
$output = shell_exec('grep -c processor /proc/cpuinfo');
|
||||||
$cpucores = $output;
|
$cpucores = $output;
|
||||||
|
|
||||||
$output = shell_exec('cat /proc/uptime');
|
$output = shell_exec('cat /proc/uptime');
|
||||||
$uptime = format_time(substr($output,0,strpos($output," ")));
|
$uptime = format_time(substr($output,0,strpos($output," ")));
|
||||||
$idletime = format_time((substr($output,strpos($output," ")))/$cpucores);
|
$idletime = format_time((substr($output,strpos($output," ")))/$cpucores);
|
||||||
showLapTime("idletime");
|
showLapTime("idletime");
|
||||||
|
|
||||||
if (defined("SHOWPOWERSTATE")) {
|
if (defined("SHOWPOWERSTATE")) {
|
||||||
$pinStatus = trim(shell_exec("gpio -g read ".POWERONLINEPIN)); // Pin 18
|
$pinStatus = trim(shell_exec("gpio -g read ".POWERONLINEPIN)); // Pin 18
|
||||||
}
|
}
|
||||||
//returns 0 = low; 1 = high
|
//returns 0 = low; 1 = high
|
||||||
?>
|
?>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<?php
|
<?php
|
||||||
if (defined("SHOWPOWERSTATE")) {
|
if (defined("SHOWPOWERSTATE")) {
|
||||||
?>
|
?>
|
||||||
<th>Power</th>
|
<th>Power</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($cputemp !== NULL) {
|
if ($cputemp !== NULL) {
|
||||||
?>
|
?>
|
||||||
<th>CPU-Temperature</th>
|
<th>CPU-Temperature</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($cpufreq !== NULL) {
|
if ($cpufreq !== NULL) {
|
||||||
?>
|
?>
|
||||||
<th>CPU-Frequency</th>
|
<th>CPU-Frequency</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<th>System-Load</th>
|
<th>System-Load</th>
|
||||||
<th>CPU-Usage</th>
|
<th>CPU-Usage</th>
|
||||||
<th>Uptime</th>
|
<th>Uptime</th>
|
||||||
<th>Idle</th>
|
<th>Idle</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="gatewayinfo">
|
<tr class="gatewayinfo">
|
||||||
<?php
|
<?php
|
||||||
if (defined("SHOWPOWERSTATE")) {
|
if (defined("SHOWPOWERSTATE")) {
|
||||||
?>
|
?>
|
||||||
<td><?php if ($pinStatus == POWERONLINESTATE ) {echo "online";} else {echo "on battery";} ?></td>
|
<td><?php if ($pinStatus == POWERONLINESTATE ) {echo "online";} else {echo "on battery";} ?></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($cputemp !== NULL) {
|
if ($cputemp !== NULL) {
|
||||||
?>
|
?>
|
||||||
<td><?php echo $cputemp; ?> °C</td>
|
<td><?php echo $cputemp; ?> °C</td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($cpufreq !== NULL) {
|
if ($cpufreq !== NULL) {
|
||||||
?>
|
?>
|
||||||
<td><?php echo $cpufreq; ?> MHz</td>
|
<td><?php echo $cpufreq; ?> MHz</td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td><?php echo $sysload; ?> %</td>
|
<td><?php echo $sysload; ?> %</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if (defined("SHOWPROGRESSBARS")) {
|
if (defined("SHOWPROGRESSBARS")) {
|
||||||
?>
|
?>
|
||||||
<div class="progress"><div class="progress-bar <?php
|
<div class="progress"><div class="progress-bar <?php
|
||||||
if ($cpuusage < 30)
|
if ($cpuusage < 30)
|
||||||
echo "progress-bar-success";
|
echo "progress-bar-success";
|
||||||
if ($cpuusage >= 30 and $cpuusage < 60)
|
if ($cpuusage >= 30 and $cpuusage < 60)
|
||||||
echo "progress-bar-warning";
|
echo "progress-bar-warning";
|
||||||
if ($cpuusage >= 60)
|
if ($cpuusage >= 60)
|
||||||
echo "progress-bar-danger";
|
echo "progress-bar-danger";
|
||||||
?>" role="progressbar" aria-valuenow="<?php echo $cpuusage; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $cpuusage; ?>%;"><?php echo $cpuusage; ?>%</div></div>
|
?>" role="progressbar" aria-valuenow="<?php echo $cpuusage; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $cpuusage; ?>%;"><?php echo $cpuusage; ?>%</div></div>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
echo $cpuusage." %";
|
echo $cpuusage." %";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $uptime; ?></td>
|
<td><?php echo $uptime; ?></td>
|
||||||
<td><?php echo $idletime; ?></td>
|
<td><?php echo $idletime; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
22
credits.php
22
credits.php
|
@ -20,18 +20,18 @@
|
||||||
<p>I think, after all the time this dashboard is developed mainly by myself, it is time to say "Thank you" to all those, wo delivered some ideas or code into this project.</p>
|
<p>I think, after all the time this dashboard is developed mainly by myself, it is time to say "Thank you" to all those, wo delivered some ideas or code into this project.</p>
|
||||||
<p>This are explicit named following persons:</p>
|
<p>This are explicit named following persons:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>df2et</li>
|
<li>df2et</li>
|
||||||
<li>dg1tal</li>
|
<li>dg1tal</li>
|
||||||
<li>ayasystems</li>
|
<li>ayasystems</li>
|
||||||
<li>on3yh</li>
|
<li>on3yh</li>
|
||||||
<li>g0wfv</li>
|
<li>g0wfv</li>
|
||||||
<li>dg0cco</li>
|
<li>dg0cco</li>
|
||||||
<li>sa7bnt</li>
|
<li>sa7bnt</li>
|
||||||
<li>and some others...</li>
|
<li>and some others...</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Those, who felt forgotten, feel free to comit a change into github of this file.</p>
|
<p>Those, who felt forgotten, feel free to comit a change into github of this file.</p>
|
||||||
<p>Many thanks to you all!</p>
|
<p>Many thanks to you all!</p>
|
||||||
<p>Best 73, Kim, DG9VH</p>
|
<p>Best 73, Kim, DG9VH</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,60 +1,60 @@
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<!-- Standard-Panel-Inhalt -->
|
<!-- Standard-Panel-Inhalt -->
|
||||||
<div class="panel-heading">Disk Use</div>
|
<div class="panel-heading">Disk Use</div>
|
||||||
<!-- Tabelle -->
|
<!-- Tabelle -->
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="diskuse" class="table table-condensed table-striped table-hover">
|
<table id="diskuse" class="table table-condensed table-striped table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="w10p filesystem">File System</th>
|
<th class="w10p filesystem">File System</th>
|
||||||
<th class="w20p">Mount Point</th>
|
<th class="w20p">Mount Point</th>
|
||||||
<th>Use</th>
|
<th>Use</th>
|
||||||
<th class="w15p">Free</th>
|
<th class="w15p">Free</th>
|
||||||
<th class="w15p">Used</th>
|
<th class="w15p">Used</th>
|
||||||
<th class="w15p">Total</th>
|
<th class="w15p">Total</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
||||||
//include "./functions.php";
|
//include "./functions.php";
|
||||||
try{
|
try{
|
||||||
$datas = array();
|
$datas = array();
|
||||||
if (!(exec('/bin/df -T | awk -v c=`/bin/df -T | grep -bo "Type" | awk -F: \'{print $2}\'` \'{print substr($0,c);}\' | tail -n +2 | awk \'{print $1","$2","$3","$4","$5","$6","$7}\'', $df))) {
|
if (!(exec('/bin/df -T | awk -v c=`/bin/df -T | grep -bo "Type" | awk -F: \'{print $2}\'` \'{print substr($0,c);}\' | tail -n +2 | awk \'{print $1","$2","$3","$4","$5","$6","$7}\'', $df))) {
|
||||||
$datas[] = array(
|
$datas[] = array(
|
||||||
'total' => 'N.A',
|
'total' => 'N.A',
|
||||||
'used' => 'N.A',
|
'used' => 'N.A',
|
||||||
'free' => 'N.A',
|
'free' => 'N.A',
|
||||||
'percent_used' => 0,
|
'percent_used' => 0,
|
||||||
'mount' => 'N.A',
|
'mount' => 'N.A',
|
||||||
'filesystem' => 'N.A',
|
'filesystem' => 'N.A',
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$mounted_points = array();
|
$mounted_points = array();
|
||||||
$key = 0;
|
$key = 0;
|
||||||
foreach ($df as $mounted) {
|
foreach ($df as $mounted) {
|
||||||
list($filesystem, $type, $total, $used, $free, $percent, $mount) = explode(',', $mounted);
|
list($filesystem, $type, $total, $used, $free, $percent, $mount) = explode(',', $mounted);
|
||||||
if ((strpos($type, 'tmpfs') !== false) && (strpos($mount, '/mnt/ramdisk') === false))
|
if ((strpos($type, 'tmpfs') !== false) && (strpos($mount, '/mnt/ramdisk') === false))
|
||||||
continue;
|
continue;
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $filesystem ?></td>
|
<td><?php echo $filesystem ?></td>
|
||||||
<td><?php echo $mount ?></td>
|
<td><?php echo $mount ?></td>
|
||||||
<td><div class="progress"><div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo trim($percent, '%') ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo trim($percent, '%') ?>%;"><?php echo trim($percent, '%') ?>%</div></div></td>
|
<td><div class="progress"><div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo trim($percent, '%') ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo trim($percent, '%') ?>%;"><?php echo trim($percent, '%') ?>%</div></div></td>
|
||||||
<td><?php echo getSize($free * 1024) ?></td>
|
<td><?php echo getSize($free * 1024) ?></td>
|
||||||
<td><?php echo getSize($used * 1024) ?></td>
|
<td><?php echo getSize($used * 1024) ?></td>
|
||||||
<td><?php echo getSize($total * 1024) ?></td>
|
<td><?php echo getSize($total * 1024) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$key++;
|
$key++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,9 +2,9 @@
|
||||||
//Some basic inits
|
//Some basic inits
|
||||||
$mmdvmconfigs = getMMDVMConfig();
|
$mmdvmconfigs = getMMDVMConfig();
|
||||||
if (!defined("MMDVMLOGPREFIX"))
|
if (!defined("MMDVMLOGPREFIX"))
|
||||||
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
|
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
|
||||||
if (!defined("TIMEZONE"))
|
if (!defined("TIMEZONE"))
|
||||||
define("TIMEZONE", "UTC");
|
define("TIMEZONE", "UTC");
|
||||||
$logLinesMMDVM = getMMDVMLog();
|
$logLinesMMDVM = getMMDVMLog();
|
||||||
showLapTime("getMMDVMLog");
|
showLapTime("getMMDVMLog");
|
||||||
//getNames(" ");
|
//getNames(" ");
|
||||||
|
@ -19,12 +19,12 @@ showLapTime("getLastHeard");
|
||||||
//$_SESSION['lastHeard'] = $lastHeard;
|
//$_SESSION['lastHeard'] = $lastHeard;
|
||||||
|
|
||||||
if (defined("ENABLEYSFGATEWAY")) {
|
if (defined("ENABLEYSFGATEWAY")) {
|
||||||
$logLinesYSFGateway = getYSFGatewayLog();
|
$logLinesYSFGateway = getYSFGatewayLog();
|
||||||
showLapTime("getYSFGatewayLog");
|
showLapTime("getYSFGatewayLog");
|
||||||
$reverseLogLinesYSFGateway = $logLinesYSFGateway;
|
$reverseLogLinesYSFGateway = $logLinesYSFGateway;
|
||||||
array_multisort($reverseLogLinesYSFGateway,SORT_DESC);
|
array_multisort($reverseLogLinesYSFGateway,SORT_DESC);
|
||||||
showLapTime("array_multisort");
|
showLapTime("array_multisort");
|
||||||
$activeYSFReflectors = getActiveYSFReflectors();
|
$activeYSFReflectors = getActiveYSFReflectors();
|
||||||
showLapTime("getActiveYSFReflectors");
|
showLapTime("getActiveYSFReflectors");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -30,42 +30,42 @@ $totalLH = count($lastHeard);
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; ($i < $totalLH); $i++) {
|
for ($i = 0; ($i < $totalLH); $i++) {
|
||||||
$listElem = $lastHeard[$i];
|
$listElem = $lastHeard[$i];
|
||||||
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>";
|
||||||
if ($listElem[2] !== "??????????") {
|
if ($listElem[2] !== "??????????") {
|
||||||
if (!is_numeric($listElem[2])) {
|
if (!is_numeric($listElem[2])) {
|
||||||
if (constant("SHOWQRZ")) {
|
if (constant("SHOWQRZ")) {
|
||||||
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a></td>";
|
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a></td>";
|
||||||
} else {
|
} else {
|
||||||
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</td>";
|
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</td>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>";
|
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (defined("ENABLEXTDLOOKUP")) {
|
if (defined("ENABLEXTDLOOKUP")) {
|
||||||
echo "<td nowrap>".getName($listElem[2])."</td>";
|
echo "<td nowrap>".getName($listElem[2])."</td>";
|
||||||
}
|
}
|
||||||
echo"<td nowrap>$listElem[3]</td>";
|
echo"<td nowrap>$listElem[3]</td>";
|
||||||
echo"<td nowrap>$listElem[4]</td>";
|
echo"<td nowrap>$listElem[4]</td>";
|
||||||
if ($listElem[5] == "RF"){
|
if ($listElem[5] == "RF"){
|
||||||
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
|
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
|
||||||
}else{
|
}else{
|
||||||
echo"<td nowrap>$listElem[5]</td>";
|
echo"<td nowrap>$listElem[5]</td>";
|
||||||
}
|
}
|
||||||
if ($listElem[6] == null) {
|
if ($listElem[6] == null) {
|
||||||
echo'<td nowrap>transmitting</td><td></td><td></td>';
|
echo'<td nowrap>transmitting</td><td></td><td></td>';
|
||||||
} else if ($listElem[6] == "SMS") {
|
} else if ($listElem[6] == "SMS") {
|
||||||
echo'<td nowrap>sending or receiving SMS</td><td></td><td></td>';
|
echo'<td nowrap>sending or receiving SMS</td><td></td><td></td>';
|
||||||
} else {
|
} else {
|
||||||
echo"<td nowrap>$listElem[6]</td>";
|
echo"<td nowrap>$listElem[6]</td>";
|
||||||
echo"<td nowrap>$listElem[7]</td>";
|
echo"<td nowrap>$listElem[7]</td>";
|
||||||
echo"<td nowrap>$listElem[8]</td>";
|
echo"<td nowrap>$listElem[8]</td>";
|
||||||
}
|
}
|
||||||
echo"</tr>\n";
|
echo"</tr>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -33,27 +33,27 @@ $totalLH = count($lastHeard);
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
var lastHeardT = $('#lastHeard').dataTable( {
|
var lastHeardT = $('#lastHeard').dataTable( {
|
||||||
"aaSorting": [[0,'desc']],
|
"aaSorting": [[0,'desc']],
|
||||||
<?php $request = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}/{$_SERVER['REQUEST_URI']}";
|
<?php $request = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}/{$_SERVER['REQUEST_URI']}";
|
||||||
if (strpos($request,"index.php")> 0) {
|
if (strpos($request,"index.php")> 0) {
|
||||||
$request = substr($request,0,strpos($request,"index.php"));
|
$request = substr($request,0,strpos($request,"index.php"));
|
||||||
}
|
}
|
||||||
if (strpos($request,"?stoprefresh")> 0) {
|
if (strpos($request,"?stoprefresh")> 0) {
|
||||||
$request = substr($request,0,strpos($request,"?stoprefresh"));
|
$request = substr($request,0,strpos($request,"?stoprefresh"));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
"ajax": '<?php echo $request?>/ajax.php?section=lastHeard',
|
"ajax": '<?php echo $request?>/ajax.php?section=lastHeard',
|
||||||
"deferRender": true
|
"deferRender": true
|
||||||
} );
|
} );
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (!isset($_GET['stoprefresh'])) {
|
if (!isset($_GET['stoprefresh'])) {
|
||||||
?>
|
?>
|
||||||
setInterval( function () {
|
setInterval( function () {
|
||||||
lastHeardT.api().ajax.reload( );
|
lastHeardT.api().ajax.reload( );
|
||||||
}, <?php echo REFRESHAFTER * 1000 ?> );
|
}, <?php echo REFRESHAFTER * 1000 ?> );
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -34,39 +34,39 @@ $localTXList = getHeardList($reverseLogLinesMMDVM, FALSE);
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
for ($i = 0; $i < count($localTXList); $i++) {
|
for ($i = 0; $i < count($localTXList); $i++) {
|
||||||
$listElem = $localTXList[$i];
|
$listElem = $localTXList[$i];
|
||||||
if ($listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
|
if ($listElem[6] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF" || $listElem[1]=="P25")) {
|
||||||
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>";
|
||||||
if ($listElem[2] !== "??????????") {
|
if ($listElem[2] !== "??????????") {
|
||||||
if (!is_numeric($listElem[2])) {
|
if (!is_numeric($listElem[2])) {
|
||||||
if (constant("SHOWQRZ")) {
|
if (constant("SHOWQRZ")) {
|
||||||
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a></td>";
|
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a></td>";
|
||||||
} else {
|
} else {
|
||||||
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</td>";
|
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</td>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>";
|
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (defined("ENABLEXTDLOOKUP")) {
|
if (defined("ENABLEXTDLOOKUP")) {
|
||||||
echo "<td class=\"nowrap\">$listElem[3]</td>";
|
echo "<td class=\"nowrap\">$listElem[3]</td>";
|
||||||
}
|
}
|
||||||
echo"<td nowrap>$listElem[4]</td>";
|
echo"<td nowrap>$listElem[4]</td>";
|
||||||
echo"<td nowrap>$listElem[5]</td>";
|
echo"<td nowrap>$listElem[5]</td>";
|
||||||
echo"<td nowrap>$listElem[6]</td>";
|
echo"<td nowrap>$listElem[6]</td>";
|
||||||
if ($listElem[6] == null) {
|
if ($listElem[6] == null) {
|
||||||
echo'<td nowrap>in TX</td><td></td><td></td>';
|
echo'<td nowrap>in TX</td><td></td><td></td>';
|
||||||
} else if ($listElem[7] == "SMS") {
|
} else if ($listElem[7] == "SMS") {
|
||||||
echo'<td nowrap>sending or receiving SMS</td><td></td><td></td>';
|
echo'<td nowrap>sending or receiving SMS</td><td></td><td></td>';
|
||||||
} else {
|
} else {
|
||||||
echo"<td nowrap>$listElem[7]</td>";
|
echo"<td nowrap>$listElem[7]</td>";
|
||||||
echo"<td nowrap>$listElem[8]</td>";
|
echo"<td nowrap>$listElem[8]</td>";
|
||||||
echo"<td nowrap>$listElem[9]</td>";
|
echo"<td nowrap>$listElem[9]</td>";
|
||||||
}
|
}
|
||||||
echo"</tr>\n";
|
echo"</tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -33,29 +33,29 @@ $totalLH = count($lastHeard);
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
var localTxT = $('#localTx').dataTable( {
|
var localTxT = $('#localTx').dataTable( {
|
||||||
"aaSorting": [[0,'desc']],
|
"aaSorting": [[0,'desc']],
|
||||||
|
|
||||||
<?php $request = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}/{$_SERVER['REQUEST_URI']}";
|
<?php $request = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}/{$_SERVER['REQUEST_URI']}";
|
||||||
if (strpos($request,"index.php")> 0) {
|
if (strpos($request,"index.php")> 0) {
|
||||||
$request = substr($request,0,strpos($request,"index.php"));
|
$request = substr($request,0,strpos($request,"index.php"));
|
||||||
}
|
}
|
||||||
if (strpos($request,"?stoprefresh")> 0) {
|
if (strpos($request,"?stoprefresh")> 0) {
|
||||||
$request = substr($request,0,strpos($request,"?stoprefresh"));
|
$request = substr($request,0,strpos($request,"?stoprefresh"));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
"ajax": '<?php echo $request?>/ajax.php?section=localTx',
|
"ajax": '<?php echo $request?>/ajax.php?section=localTx',
|
||||||
"deferRender": true
|
"deferRender": true
|
||||||
} );
|
} );
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (!isset($_GET['stoprefresh'])) {
|
if (!isset($_GET['stoprefresh'])) {
|
||||||
?>
|
?>
|
||||||
setInterval( function () {
|
setInterval( function () {
|
||||||
localTxT.api().ajax.reload( );
|
localTxT.api().ajax.reload( );
|
||||||
}, <?php echo REFRESHAFTER * 1000 ?> );
|
}, <?php echo REFRESHAFTER * 1000 ?> );
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
<th>DMR TS2 last linked to</th>
|
<th>DMR TS2 last linked to</th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
echo"<tr>";
|
echo"<tr>";
|
||||||
echo"<td id=\"mode\">".getActualMode($lastHeard, $mmdvmconfigs)."</td>";
|
echo"<td id=\"mode\">".getActualMode($lastHeard, $mmdvmconfigs)."</td>";
|
||||||
echo"<td>".getActualLink($reverseLogLinesMMDVM, "D-Star")."</td>";
|
echo"<td>".getActualLink($reverseLogLinesMMDVM, "D-Star")."</td>";
|
||||||
echo"<td>".getYSFReflectorById(getActualLink($reverseLogLinesYSFGateway, "YSF"), $activeYSFReflectors)."</td>";
|
echo"<td>".getYSFReflectorById(getActualLink($reverseLogLinesYSFGateway, "YSF"), $activeYSFReflectors)."</td>";
|
||||||
echo"<td>".getActualLink($reverseLogLinesMMDVM, "DMR Slot 1")."</td>";
|
echo"<td>".getActualLink($reverseLogLinesMMDVM, "DMR Slot 1")."</td>";
|
||||||
echo"<td>".getActualLink($reverseLogLinesMMDVM, "DMR Slot 2")."/". getActualReflector($reverseLogLinesMMDVM, "DMR Slot 2") ."</td>";
|
echo"<td>".getActualLink($reverseLogLinesMMDVM, "DMR Slot 2")."/". getActualReflector($reverseLogLinesMMDVM, "DMR Slot 2") ."</td>";
|
||||||
echo"</tr>\n";
|
echo"</tr>\n";
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
|
@ -28,68 +28,68 @@
|
||||||
<th>TX-Freq.</th>
|
<th>TX-Freq.</th>
|
||||||
<th>RX-Freq.</th>
|
<th>RX-Freq.</th>
|
||||||
<?php
|
<?php
|
||||||
if (getEnabled("System Fusion Network", $mmdvmconfigs) == 1) {
|
if (getEnabled("System Fusion Network", $mmdvmconfigs) == 1) {
|
||||||
?>
|
?>
|
||||||
<th>YSFGateway</th>
|
<th>YSFGateway</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
|
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
|
||||||
?>
|
?>
|
||||||
<th>DMR CC</th>
|
<th>DMR CC</th>
|
||||||
<?php
|
<?php
|
||||||
if (getEnabled("DMR Network", $mmdvmconfigs) == 1) {
|
if (getEnabled("DMR Network", $mmdvmconfigs) == 1) {
|
||||||
?>
|
?>
|
||||||
<th>DMR-Master</th>
|
<th>DMR-Master</th>
|
||||||
<th>TS1</th>
|
<th>TS1</th>
|
||||||
<th>TS2</th>
|
<th>TS2</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
echo"<tr>";
|
echo"<tr>";
|
||||||
echo"<td>".getConfigItem("Info", "Location", $mmdvmconfigs)."</td>";
|
echo"<td>".getConfigItem("Info", "Location", $mmdvmconfigs)."</td>";
|
||||||
echo"<td>".getMHZ(getConfigItem("Info", "TXFrequency", $mmdvmconfigs))."</td>";
|
echo"<td>".getMHZ(getConfigItem("Info", "TXFrequency", $mmdvmconfigs))."</td>";
|
||||||
echo"<td>".getMHZ(getConfigItem("Info", "RXFrequency", $mmdvmconfigs))."</td>";
|
echo"<td>".getMHZ(getConfigItem("Info", "RXFrequency", $mmdvmconfigs))."</td>";
|
||||||
if (getEnabled("System Fusion Network", $mmdvmconfigs) == 1) {
|
if (getEnabled("System Fusion Network", $mmdvmconfigs) == 1) {
|
||||||
echo"<td>".getConfigItem("System Fusion Network", "GwyAddress", $mmdvmconfigs)."</td>";
|
echo"<td>".getConfigItem("System Fusion Network", "GwyAddress", $mmdvmconfigs)."</td>";
|
||||||
}
|
}
|
||||||
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
|
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
|
||||||
echo"<td>".getConfigItem("DMR", "ColorCode", $mmdvmconfigs)."</td>";
|
echo"<td>".getConfigItem("DMR", "ColorCode", $mmdvmconfigs)."</td>";
|
||||||
if (getEnabled("DMR Network", $mmdvmconfigs) == 1) {
|
if (getEnabled("DMR Network", $mmdvmconfigs) == 1) {
|
||||||
echo"<td>";
|
echo"<td>";
|
||||||
if (getDMRMasterState()) {
|
if (getDMRMasterState()) {
|
||||||
echo "<span class=\"label label-success\" title=\"Master connected\">";
|
echo "<span class=\"label label-success\" title=\"Master connected\">";
|
||||||
} else {
|
} else {
|
||||||
echo "<span class=\"label label-danger\" title=\"Master not connected\">";
|
echo "<span class=\"label label-danger\" title=\"Master not connected\">";
|
||||||
}
|
}
|
||||||
echo getConfigItem("DMR Network", "Address", $mmdvmconfigs);
|
echo getConfigItem("DMR Network", "Address", $mmdvmconfigs);
|
||||||
if (strlen(getDMRNetwork()) > 0 ) {
|
if (strlen(getDMRNetwork()) > 0 ) {
|
||||||
echo " (".getDMRNetwork().")";
|
echo " (".getDMRNetwork().")";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td><span class="label <?php
|
<td><span class="label <?php
|
||||||
if (getConfigItem("DMR Network", "Slot1", $mmdvmconfigs) == 1) {
|
if (getConfigItem("DMR Network", "Slot1", $mmdvmconfigs) == 1) {
|
||||||
echo 'label-success">enabled';
|
echo 'label-success">enabled';
|
||||||
} else {
|
} else {
|
||||||
echo 'label-default">disabled';
|
echo 'label-default">disabled';
|
||||||
}
|
}
|
||||||
?></span></td>
|
?></span></td>
|
||||||
<td><span class="label <?php
|
<td><span class="label <?php
|
||||||
if (getConfigItem("DMR Network", "Slot2", $mmdvmconfigs) == 1) {
|
if (getConfigItem("DMR Network", "Slot2", $mmdvmconfigs) == 1) {
|
||||||
echo 'label-success">enabled';
|
echo 'label-success">enabled';
|
||||||
} else {
|
} else {
|
||||||
echo 'label-default">disabled';
|
echo 'label-default">disabled';
|
||||||
}
|
}
|
||||||
?></span></td>
|
?></span></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,180 +1,180 @@
|
||||||
<?php
|
<?php
|
||||||
$cputemp = NULL;
|
$cputemp = NULL;
|
||||||
$cpufreq = NULL;
|
$cpufreq = NULL;
|
||||||
if (file_exists ("/sys/class/thermal/thermal_zone0/temp")) {
|
if (file_exists ("/sys/class/thermal/thermal_zone0/temp")) {
|
||||||
exec("cat /sys/class/thermal/thermal_zone0/temp", $cputemp);
|
exec("cat /sys/class/thermal/thermal_zone0/temp", $cputemp);
|
||||||
$cputemp = $cputemp[0] / 1000;
|
$cputemp = $cputemp[0] / 1000;
|
||||||
}
|
}
|
||||||
showLapTime("cputemp");
|
showLapTime("cputemp");
|
||||||
if (file_exists ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq")) {
|
if (file_exists ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq")) {
|
||||||
exec("cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", $cpufreq);
|
exec("cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", $cpufreq);
|
||||||
$cpufreq = $cpufreq[0] / 1000;
|
$cpufreq = $cpufreq[0] / 1000;
|
||||||
}
|
}
|
||||||
showLapTime("cpufreq");
|
showLapTime("cpufreq");
|
||||||
|
|
||||||
if (defined("TEMPERATUREALERT") && $cputemp > TEMPERATUREHIGHLEVEL && $cputemp !== NULL) {
|
if (defined("TEMPERATUREALERT") && $cputemp > TEMPERATUREHIGHLEVEL && $cputemp !== NULL) {
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
function deleteLayer(id) {
|
function deleteLayer(id) {
|
||||||
if (document.getElementById && document.getElementById(id)) {
|
if (document.getElementById && document.getElementById(id)) {
|
||||||
var theNode = document.getElementById(id);
|
var theNode = document.getElementById(id);
|
||||||
theNode.parentNode.removeChild(theNode);
|
theNode.parentNode.removeChild(theNode);
|
||||||
}
|
}
|
||||||
else if (document.all && document.all[id]) {
|
else if (document.all && document.all[id]) {
|
||||||
document.all[id].innerHTML='';
|
document.all[id].innerHTML='';
|
||||||
document.all[id].outerHTML='';
|
document.all[id].outerHTML='';
|
||||||
}
|
}
|
||||||
// OBSOLETE CODE FOR NETSCAPE 4
|
// OBSOLETE CODE FOR NETSCAPE 4
|
||||||
else if (document.layers && document.layers[id]) {
|
else if (document.layers && document.layers[id]) {
|
||||||
document.layers[id].visibility='hide';
|
document.layers[id].visibility='hide';
|
||||||
delete document.layers[id];
|
delete document.layers[id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeLayer(id,L,T,W,H,bgColor,visible,zIndex) {
|
function makeLayer(id,L,T,W,H,bgColor,visible,zIndex) {
|
||||||
if (document.getElementById) {
|
if (document.getElementById) {
|
||||||
if (document.getElementById(id)) {
|
if (document.getElementById(id)) {
|
||||||
alert ('Layer with this ID already exists!');
|
alert ('Layer with this ID already exists!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var ST = 'position:absolute; text-align:center;padding-top:20px;'
|
var ST = 'position:absolute; text-align:center;padding-top:20px;'
|
||||||
+'; left:'+L+'px'
|
+'; left:'+L+'px'
|
||||||
+'; top:'+T+'px'
|
+'; top:'+T+'px'
|
||||||
+'; width:'+W+'px'
|
+'; width:'+W+'px'
|
||||||
+'; height:'+H+'px'
|
+'; height:'+H+'px'
|
||||||
+'; clip:rect(0,'+W+','+H+',0)'
|
+'; clip:rect(0,'+W+','+H+',0)'
|
||||||
+'; visibility:'
|
+'; visibility:'
|
||||||
+(null==visible || 1==visible ? 'visible':'hidden')
|
+(null==visible || 1==visible ? 'visible':'hidden')
|
||||||
+(null==zIndex ? '' : '; z-index:'+zIndex)
|
+(null==zIndex ? '' : '; z-index:'+zIndex)
|
||||||
+(null==bgColor ? '' : '; background-color:'+bgColor);
|
+(null==bgColor ? '' : '; background-color:'+bgColor);
|
||||||
|
|
||||||
var LR = '<DIV id='+id+' style="'+ST+'">CPU-Temperature is very high!<br><input type="button" value="Close" onclick="deleteLayer(\'LYR1\')"></DIV>';
|
var LR = '<DIV id='+id+' style="'+ST+'">CPU-Temperature is very high!<br><input type="button" value="Close" onclick="deleteLayer(\'LYR1\')"></DIV>';
|
||||||
|
|
||||||
if (document.body) {
|
if (document.body) {
|
||||||
if (document.body.insertAdjacentHTML)
|
if (document.body.insertAdjacentHTML)
|
||||||
document.body.insertAdjacentHTML("BeforeEnd",LR);
|
document.body.insertAdjacentHTML("BeforeEnd",LR);
|
||||||
else if (document.createElement && document.body.appendChild) {
|
else if (document.createElement && document.body.appendChild) {
|
||||||
var newNode = document.createElement('div');
|
var newNode = document.createElement('div');
|
||||||
newNode.setAttribute('id',id);
|
newNode.setAttribute('id',id);
|
||||||
newNode.setAttribute('style',ST);
|
newNode.setAttribute('style',ST);
|
||||||
document.body.appendChild(newNode);
|
document.body.appendChild(newNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var audio = new Audio('sounds/alert.mp3');
|
var audio = new Audio('sounds/alert.mp3');
|
||||||
audio.play();
|
audio.play();
|
||||||
var x = window.innerWidth/2-100;
|
var x = window.innerWidth/2-100;
|
||||||
var y = window.innerHeight/2-50;
|
var y = window.innerHeight/2-50;
|
||||||
|
|
||||||
makeLayer('LYR1',x,y,200,100,'red',1,1);
|
makeLayer('LYR1',x,y,200,100,'red',1,1);
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = shell_exec('cat /proc/loadavg');
|
$output = shell_exec('cat /proc/loadavg');
|
||||||
$sysload = substr($output,0,strpos($output," "))*100;
|
$sysload = substr($output,0,strpos($output," "))*100;
|
||||||
showLapTime("sysload");
|
showLapTime("sysload");
|
||||||
$stat1 = file('/proc/stat');
|
$stat1 = file('/proc/stat');
|
||||||
sleep(1);
|
sleep(1);
|
||||||
$stat2 = file('/proc/stat');
|
$stat2 = file('/proc/stat');
|
||||||
$info1 = explode(" ", preg_replace("!cpu +!", "", $stat1[0]));
|
$info1 = explode(" ", preg_replace("!cpu +!", "", $stat1[0]));
|
||||||
$info2 = explode(" ", preg_replace("!cpu +!", "", $stat2[0]));
|
$info2 = explode(" ", preg_replace("!cpu +!", "", $stat2[0]));
|
||||||
$dif = array();
|
$dif = array();
|
||||||
$dif['user'] = $info2[0] - $info1[0];
|
$dif['user'] = $info2[0] - $info1[0];
|
||||||
$dif['nice'] = $info2[1] - $info1[1];
|
$dif['nice'] = $info2[1] - $info1[1];
|
||||||
$dif['sys'] = $info2[2] - $info1[2];
|
$dif['sys'] = $info2[2] - $info1[2];
|
||||||
$dif['idle'] = $info2[3] - $info1[3];
|
$dif['idle'] = $info2[3] - $info1[3];
|
||||||
$total = array_sum($dif);
|
$total = array_sum($dif);
|
||||||
$cpu = array();
|
$cpu = array();
|
||||||
foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
|
foreach($dif as $x=>$y) $cpu[$x] = round($y / $total * 100, 1);
|
||||||
$cpuusage = round($cpu['user'] + $cpu['sys'], 2);
|
$cpuusage = round($cpu['user'] + $cpu['sys'], 2);
|
||||||
showLapTime("cpuusage");
|
showLapTime("cpuusage");
|
||||||
|
|
||||||
$output = shell_exec('grep -c processor /proc/cpuinfo');
|
$output = shell_exec('grep -c processor /proc/cpuinfo');
|
||||||
$cpucores = $output;
|
$cpucores = $output;
|
||||||
|
|
||||||
$output = shell_exec('cat /proc/uptime');
|
$output = shell_exec('cat /proc/uptime');
|
||||||
$uptime = format_time(substr($output,0,strpos($output," ")));
|
$uptime = format_time(substr($output,0,strpos($output," ")));
|
||||||
$idletime = format_time((substr($output,strpos($output," ")))/$cpucores);
|
$idletime = format_time((substr($output,strpos($output," ")))/$cpucores);
|
||||||
showLapTime("idletime");
|
showLapTime("idletime");
|
||||||
|
|
||||||
if (defined("SHOWPOWERSTATE")) {
|
if (defined("SHOWPOWERSTATE")) {
|
||||||
$pinStatus = trim(shell_exec("gpio -g read ".POWERONLINEPIN)); // Pin 18
|
$pinStatus = trim(shell_exec("gpio -g read ".POWERONLINEPIN)); // Pin 18
|
||||||
}
|
}
|
||||||
//returns 0 = low; 1 = high
|
//returns 0 = low; 1 = high
|
||||||
?>
|
?>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<!-- Standard-Panel-Inhalt -->
|
<!-- Standard-Panel-Inhalt -->
|
||||||
<div class="panel-heading">System Info</div>
|
<div class="panel-heading">System Info</div>
|
||||||
<!-- Tabelle -->
|
<!-- Tabelle -->
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="sysinfo" class="table table-condensed">
|
<table id="sysinfo" class="table table-condensed">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<?php
|
<?php
|
||||||
if (defined("SHOWPOWERSTATE")) {
|
if (defined("SHOWPOWERSTATE")) {
|
||||||
?>
|
?>
|
||||||
<th>Power</th>
|
<th>Power</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($cputemp !== NULL) {
|
if ($cputemp !== NULL) {
|
||||||
?>
|
?>
|
||||||
<th>CPU-Temperature</th>
|
<th>CPU-Temperature</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($cpufreq !== NULL) {
|
if ($cpufreq !== NULL) {
|
||||||
?>
|
?>
|
||||||
<th>CPU-Frequency</th>
|
<th>CPU-Frequency</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<th>System-Load</th>
|
<th>System-Load</th>
|
||||||
<th>CPU-Usage</th>
|
<th>CPU-Usage</th>
|
||||||
<th>Uptime</th>
|
<th>Uptime</th>
|
||||||
<th>Idle</th>
|
<th>Idle</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="gatewayinfo">
|
<tr class="gatewayinfo">
|
||||||
<?php
|
<?php
|
||||||
if (defined("SHOWPOWERSTATE")) {
|
if (defined("SHOWPOWERSTATE")) {
|
||||||
?>
|
?>
|
||||||
<td><?php if ($pinStatus == POWERONLINESTATE ) {echo "online";} else {echo "on battery";} ?></td>
|
<td><?php if ($pinStatus == POWERONLINESTATE ) {echo "online";} else {echo "on battery";} ?></td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($cputemp !== NULL) {
|
if ($cputemp !== NULL) {
|
||||||
?>
|
?>
|
||||||
<td><?php echo $cputemp; ?> °C</td>
|
<td><?php echo $cputemp; ?> °C</td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ($cpufreq !== NULL) {
|
if ($cpufreq !== NULL) {
|
||||||
?>
|
?>
|
||||||
<td><?php echo $cpufreq; ?> MHz</td>
|
<td><?php echo $cpufreq; ?> MHz</td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td><?php echo $sysload; ?> %</td>
|
<td><?php echo $sysload; ?> %</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
if (defined("SHOWPROGRESSBARS")) {
|
if (defined("SHOWPROGRESSBARS")) {
|
||||||
?>
|
?>
|
||||||
<div class="progress"><div class="progress-bar <?php
|
<div class="progress"><div class="progress-bar <?php
|
||||||
if ($cpuusage < 30)
|
if ($cpuusage < 30)
|
||||||
echo "progress-bar-success";
|
echo "progress-bar-success";
|
||||||
if ($cpuusage >= 30 and $cpuusage < 60)
|
if ($cpuusage >= 30 and $cpuusage < 60)
|
||||||
echo "progress-bar-warning";
|
echo "progress-bar-warning";
|
||||||
if ($cpuusage >= 60)
|
if ($cpuusage >= 60)
|
||||||
echo "progress-bar-danger";
|
echo "progress-bar-danger";
|
||||||
?>" role="progressbar" aria-valuenow="<?php echo $cpuusage; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $cpuusage; ?>%;"><?php echo $cpuusage; ?>%</div></div>
|
?>" role="progressbar" aria-valuenow="<?php echo $cpuusage; ?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $cpuusage; ?>%;"><?php echo $cpuusage; ?>%</div></div>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
echo $cpuusage." %";
|
echo $cpuusage." %";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td><?php echo $uptime; ?></td>
|
<td><?php echo $uptime; ?></td>
|
||||||
<td><?php echo $idletime; ?></td>
|
<td><?php echo $idletime; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,28 +2,28 @@
|
||||||
<!-- Standard-Panel-Inhalt -->
|
<!-- Standard-Panel-Inhalt -->
|
||||||
<div class="panel-heading">System Info</div>
|
<div class="panel-heading">System Info</div>
|
||||||
<!-- Tabelle -->
|
<!-- Tabelle -->
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="sysinfo" class="table table-condensed">
|
<table id="sysinfo" class="table table-condensed">
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function loadXMLDocSysinfo() {
|
function loadXMLDocSysinfo() {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||||
xmlhttp=new XMLHttpRequest();
|
xmlhttp=new XMLHttpRequest();
|
||||||
} else {// code for IE6, IE5
|
} else {// code for IE6, IE5
|
||||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
}
|
}
|
||||||
xmlhttp.onreadystatechange=function() {
|
xmlhttp.onreadystatechange=function() {
|
||||||
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||||
document.getElementById("sysinfo").innerHTML=xmlhttp.responseText;
|
document.getElementById("sysinfo").innerHTML=xmlhttp.responseText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlhttp.open("GET","ajax.php?section=sysinfo",true);
|
xmlhttp.open("GET","ajax.php?section=sysinfo",true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
|
|
||||||
var timeout = window.setTimeout("loadXMLDocSysinfo()", 20000);
|
var timeout = window.setTimeout("loadXMLDocSysinfo()", 20000);
|
||||||
}
|
}
|
||||||
loadXMLDocSysinfo();
|
loadXMLDocSysinfo();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,115 +1,115 @@
|
||||||
<?php
|
<?php
|
||||||
function format_time($seconds) {
|
function format_time($seconds) {
|
||||||
$secs = intval($seconds % 60);
|
$secs = intval($seconds % 60);
|
||||||
$mins = intval($seconds / 60 % 60);
|
$mins = intval($seconds / 60 % 60);
|
||||||
$hours = intval($seconds / 3600 % 24);
|
$hours = intval($seconds / 3600 % 24);
|
||||||
$days = intval($seconds / 86400);
|
$days = intval($seconds / 86400);
|
||||||
$uptimeString = "";
|
$uptimeString = "";
|
||||||
|
|
||||||
if ($days > 0) {
|
if ($days > 0) {
|
||||||
$uptimeString .= $days;
|
$uptimeString .= $days;
|
||||||
$uptimeString .= (($days == 1) ? " day" : " days");
|
$uptimeString .= (($days == 1) ? " day" : " days");
|
||||||
}
|
}
|
||||||
if ($hours > 0) {
|
if ($hours > 0) {
|
||||||
$uptimeString .= (($days > 0) ? ", " : "") . $hours;
|
$uptimeString .= (($days > 0) ? ", " : "") . $hours;
|
||||||
$uptimeString .= (($hours == 1) ? " hr" : " hrs");
|
$uptimeString .= (($hours == 1) ? " hr" : " hrs");
|
||||||
}
|
}
|
||||||
if ($mins > 0) {
|
if ($mins > 0) {
|
||||||
$uptimeString .= (($days > 0 || $hours > 0) ? ", " : "") . $mins;
|
$uptimeString .= (($days > 0 || $hours > 0) ? ", " : "") . $mins;
|
||||||
$uptimeString .= (($mins == 1) ? " min" : " mins");
|
$uptimeString .= (($mins == 1) ? " min" : " mins");
|
||||||
}
|
}
|
||||||
if ($secs > 0) {
|
if ($secs > 0) {
|
||||||
$uptimeString .= (($days > 0 || $hours > 0 || $mins > 0) ? ", " : "") . $secs;
|
$uptimeString .= (($days > 0 || $hours > 0 || $mins > 0) ? ", " : "") . $secs;
|
||||||
$uptimeString .= (($secs == 1) ? " s" : " s");
|
$uptimeString .= (($secs == 1) ? " s" : " s");
|
||||||
}
|
}
|
||||||
return $uptimeString;
|
return $uptimeString;
|
||||||
}
|
}
|
||||||
|
|
||||||
function startsWith($haystack, $needle) {
|
function startsWith($haystack, $needle) {
|
||||||
return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== false;
|
return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMHZ($freq) {
|
function getMHZ($freq) {
|
||||||
return substr($freq,0,3) . "." . substr($freq,3,6) . " MHz";
|
return substr($freq,0,3) . "." . substr($freq,3,6) . " MHz";
|
||||||
}
|
}
|
||||||
|
|
||||||
function isProcessRunning($processname) {
|
function isProcessRunning($processname) {
|
||||||
exec("pgrep " . $processname, $pids);
|
exec("pgrep " . $processname, $pids);
|
||||||
if(empty($pids)) {
|
if(empty($pids)) {
|
||||||
// process not running!
|
// process not running!
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// process running!
|
// process running!
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createConfigLines() {
|
function createConfigLines() {
|
||||||
$out ="";
|
$out ="";
|
||||||
foreach($_GET as $key=>$val) {
|
foreach($_GET as $key=>$val) {
|
||||||
if($key != "cmd") {
|
if($key != "cmd") {
|
||||||
$out .= "define(\"$key\", \"$val\");"."\n";
|
$out .= "define(\"$key\", \"$val\");"."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSize($filesize, $precision = 2) {
|
function getSize($filesize, $precision = 2) {
|
||||||
$units = array('', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y');
|
$units = array('', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y');
|
||||||
foreach ($units as $idUnit => $unit) {
|
foreach ($units as $idUnit => $unit) {
|
||||||
if ($filesize > 1024)
|
if ($filesize > 1024)
|
||||||
$filesize /= 1024;
|
$filesize /= 1024;
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return round($filesize, $precision).' '.$units[$idUnit].'B';
|
return round($filesize, $precision).' '.$units[$idUnit].'B';
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkSetup() {
|
function checkSetup() {
|
||||||
$el = error_reporting();
|
$el = error_reporting();
|
||||||
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
||||||
if (defined(DISTRIBUTION)) {
|
if (defined(DISTRIBUTION)) {
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-danger" role="alert">You are using an old config.php. Please configure your Dashboard by calling <a href="setup.php">setup.php</a>!</div>
|
<div class="alert alert-danger" role="alert">You are using an old config.php. Please configure your Dashboard by calling <a href="setup.php">setup.php</a>!</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (file_exists ("setup.php")) {
|
if (file_exists ("setup.php")) {
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-danger" role="alert">You forgot to remove setup.php in root-directory of your dashboard or you forgot to configure it! Please delete the file or configure your Dashboard by calling <a href="setup.php">setup.php</a>!</div>
|
<div class="alert alert-danger" role="alert">You forgot to remove setup.php in root-directory of your dashboard or you forgot to configure it! Please delete the file or configure your Dashboard by calling <a href="setup.php">setup.php</a>!</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
error_reporting($el);
|
error_reporting($el);
|
||||||
}
|
}
|
||||||
|
|
||||||
function startStopwatch() {
|
function startStopwatch() {
|
||||||
$time = microtime();
|
$time = microtime();
|
||||||
$time = explode(' ', $time);
|
$time = explode(' ', $time);
|
||||||
$time = $time[1] + $time[0];
|
$time = $time[1] + $time[0];
|
||||||
$_SESSION['starttime'] = $time;
|
$_SESSION['starttime'] = $time;
|
||||||
return $time;
|
return $time;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLapTime() {
|
function getLapTime() {
|
||||||
$start = $_SESSION['starttime'];
|
$start = $_SESSION['starttime'];
|
||||||
$time = microtime();
|
$time = microtime();
|
||||||
$time = explode(' ', $time);
|
$time = explode(' ', $time);
|
||||||
$time = $time[1] + $time[0];
|
$time = $time[1] + $time[0];
|
||||||
$finish = $time;
|
$finish = $time;
|
||||||
$lap_time = round(($finish - $start), 4);
|
$lap_time = round(($finish - $start), 4);
|
||||||
return $lap_time;
|
return $lap_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLapTime($func) {
|
function showLapTime($func) {
|
||||||
if( defined("DEBUG") ) {
|
if( defined("DEBUG") ) {
|
||||||
?><script>console.log('<?php echo $func . ": ". getLapTime(); ?> sec.');</script><?php
|
?><script>console.log('<?php echo $func . ": ". getLapTime(); ?> sec.');</script><?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertTimezone($timestamp) {
|
function convertTimezone($timestamp) {
|
||||||
$date = new DateTime($timestamp);
|
$date = new DateTime($timestamp);
|
||||||
$date->setTimezone(new DateTimeZone(TIMEZONE));
|
$date->setTimezone(new DateTimeZone(TIMEZONE));
|
||||||
return $date->format('Y-m-d H:i:s');
|
return $date->format('Y-m-d H:i:s');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -29,43 +29,43 @@
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function doXMLHTTPRequest(scriptname, elem) {
|
function doXMLHTTPRequest(scriptname, elem) {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||||
xmlhttp=new XMLHttpRequest();
|
xmlhttp=new XMLHttpRequest();
|
||||||
} else {// code for IE6, IE5
|
} else {// code for IE6, IE5
|
||||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
}
|
}
|
||||||
xmlhttp.onreadystatechange=function() {
|
xmlhttp.onreadystatechange=function() {
|
||||||
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||||
document.getElementById(elem).innerHTML=xmlhttp.responseText;
|
document.getElementById(elem).innerHTML=xmlhttp.responseText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlhttp.open("GET",scriptname,true);
|
xmlhttp.open("GET",scriptname,true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshMode() {
|
function refreshMode() {
|
||||||
doXMLHTTPRequest("ajax.php?section=mode","mode");
|
doXMLHTTPRequest("ajax.php?section=mode","mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
var transmitting = false;
|
var transmitting = false;
|
||||||
function loadXMLDoc() {
|
function loadXMLDoc() {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||||
xmlhttp=new XMLHttpRequest();
|
xmlhttp=new XMLHttpRequest();
|
||||||
} else {// code for IE6, IE5
|
} else {// code for IE6, IE5
|
||||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
}
|
}
|
||||||
xmlhttp.onreadystatechange=function() {
|
xmlhttp.onreadystatechange=function() {
|
||||||
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||||
document.getElementById("txline").innerHTML=xmlhttp.responseText;
|
document.getElementById("txline").innerHTML=xmlhttp.responseText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xmlhttp.open("GET","txinfo.php",true);
|
xmlhttp.open("GET","txinfo.php",true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
|
|
||||||
var timeout = window.setTimeout("loadXMLDoc()", 1000);
|
var timeout = window.setTimeout("loadXMLDoc()", 1000);
|
||||||
refreshMode();
|
refreshMode();
|
||||||
}
|
}
|
||||||
loadXMLDoc();
|
loadXMLDoc();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class="label <?php
|
<td><span class="label <?php
|
||||||
if (isProcessRunning("YSFGateway")) {
|
if (isProcessRunning("YSFGateway")) {
|
||||||
echo "label-success";
|
echo "label-success";
|
||||||
?>">YSFGateway Process is running</span></td><?php
|
?>">YSFGateway Process is running</span></td><?php
|
||||||
} else {
|
} else {
|
||||||
echo "label-danger\" title=\"YSFGateway is down!";
|
echo "label-danger\" title=\"YSFGateway is down!";
|
||||||
?>">YSFGateway Process is down!</span></td><?php
|
?>">YSFGateway Process is down!</span></td><?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -27,32 +27,32 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (count($activeYSFReflectors) > 0) {
|
if (count($activeYSFReflectors) > 0) {
|
||||||
?>
|
?>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>No.</th>
|
<th>No.</th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Connections</th>
|
<th>Connections</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$counter = 1;
|
$counter = 1;
|
||||||
foreach ($activeYSFReflectors as $reflector) {
|
foreach ($activeYSFReflectors as $reflector) {
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td>$counter</td>";
|
echo "<td>$counter</td>";
|
||||||
for ($i = 0; $i < 4; $i++) {
|
for ($i = 0; $i < 4; $i++) {
|
||||||
echo"<td>$reflector[$i]</td>";
|
echo"<td>$reflector[$i]</td>";
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
$counter++;
|
$counter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tbody>
|
<tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
48
index.php
48
index.php
|
@ -32,43 +32,43 @@ include "version.php";
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/latest/js/bootstrap.min.js"></script>
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/latest/js/bootstrap.min.js"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css">
|
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css">
|
||||||
<script type="text/javascript" src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
|
<script type="text/javascript" src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.nowrap {
|
.nowrap {
|
||||||
white-space:nowrap
|
white-space:nowrap
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<title><?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH</title>
|
<title><?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="page-header" style="position:relative;">
|
<div class="page-header" style="position:relative;">
|
||||||
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
||||||
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
||||||
echo "Repeater";
|
echo "Repeater";
|
||||||
} else {
|
} else {
|
||||||
echo "Hotspot";
|
echo "Hotspot";
|
||||||
}
|
}
|
||||||
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
||||||
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?><br>Firmware: <?php echo getFirmwareVersion() ?>
|
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?><br>Firmware: <?php echo getFirmwareVersion() ?>
|
||||||
<?php
|
<?php
|
||||||
if (strlen(getDMRNetwork()) > 0 ) {
|
if (strlen(getDMRNetwork()) > 0 ) {
|
||||||
echo "<br>DMR-Network: ".getDMRNetwork();
|
echo "<br>DMR-Network: ".getDMRNetwork();
|
||||||
}
|
}
|
||||||
?></h4>
|
?></h4>
|
||||||
<?php
|
<?php
|
||||||
$logourl = "";
|
$logourl = "";
|
||||||
if (getDMRNetwork() == "BrandMeister") {
|
if (getDMRNetwork() == "BrandMeister") {
|
||||||
if (constant('BRANDMEISTERLOGO') !== NULL) {
|
if (constant('BRANDMEISTERLOGO') !== NULL) {
|
||||||
$logourl = BRANDMEISTERLOGO;
|
$logourl = BRANDMEISTERLOGO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getDMRNetwork() == "DMRplus") {
|
if (getDMRNetwork() == "DMRplus") {
|
||||||
if (constant('DMRPLUSLOGO') !== NULL) {
|
if (constant('DMRPLUSLOGO') !== NULL) {
|
||||||
$logourl = DMRPLUSLOGO;
|
$logourl = DMRPLUSLOGO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($logourl == "") {
|
if ($logourl == "") {
|
||||||
$logourl = LOGO;
|
$logourl = LOGO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($logourl !== "") {
|
if ($logourl !== "") {
|
||||||
|
@ -110,11 +110,11 @@ showLapTime("lh_ajax");
|
||||||
include "include/localtx_ajax.php";
|
include "include/localtx_ajax.php";
|
||||||
showLapTime("localtx_ajax");
|
showLapTime("localtx_ajax");
|
||||||
if (defined("ENABLEYSFGATEWAY")) {
|
if (defined("ENABLEYSFGATEWAY")) {
|
||||||
include "include/ysfgatewayinfo.php";
|
include "include/ysfgatewayinfo.php";
|
||||||
showLapTime("ysfgatewayinfo");
|
showLapTime("ysfgatewayinfo");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
<?php
|
<?php
|
||||||
//$datum = date("Y-m-d");
|
//$datum = date("Y-m-d");
|
||||||
//$uhrzeit = date("H:i:s");
|
//$uhrzeit = date("H:i:s");
|
||||||
|
@ -130,20 +130,20 @@ echo '<!--Page generated in '.getLapTime().' seconds.-->';
|
||||||
?> |
|
?> |
|
||||||
<?php
|
<?php
|
||||||
if (!isset($_GET['stoprefresh'])) {
|
if (!isset($_GET['stoprefresh'])) {
|
||||||
echo '<a href="?stoprefresh">stop refreshing</a>';
|
echo '<a href="?stoprefresh">stop refreshing</a>';
|
||||||
} else {
|
} else {
|
||||||
echo '<a href=".">start refreshing</a>';
|
echo '<a href=".">start refreshing</a>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
| get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a> | <a href="credits.php">Credits</a>
|
| get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a> | <a href="credits.php">Credits</a>
|
||||||
</div>
|
</div>
|
||||||
<noscript>
|
<noscript>
|
||||||
For full functionality of this site it is necessary to enable JavaScript.
|
For full functionality of this site it is necessary to enable JavaScript.
|
||||||
Here are the <a href="http://www.enable-javascript.com/" target="_blank">
|
Here are the <a href="http://www.enable-javascript.com/" target="_blank">
|
||||||
instructions how to enable JavaScript in your web browser</a>.
|
instructions how to enable JavaScript in your web browser</a>.
|
||||||
</noscript>
|
</noscript>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<?php
|
<?php
|
||||||
showLapTime("End of Page");
|
showLapTime("End of Page");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -14,8 +14,8 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && HALTUSER !== "" && HALTPW !== "") {
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
if ($_SERVER['PHP_AUTH_USER'] == HALTUSER && $_SERVER['PHP_AUTH_PW'] == HALTPW) {
|
if ($_SERVER['PHP_AUTH_USER'] == HALTUSER && $_SERVER['PHP_AUTH_PW'] == HALTPW) {
|
||||||
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
|
@ -37,9 +37,9 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && HALTUSER !== "" && HALTPW !== "") {
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
||||||
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
||||||
echo "Repeater";
|
echo "Repeater";
|
||||||
} else {
|
} else {
|
||||||
echo "Hotspot";
|
echo "Hotspot";
|
||||||
}
|
}
|
||||||
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
||||||
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
||||||
|
@ -54,7 +54,7 @@ include "../include/sysinfo.php";
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-info" role="alert">Executing <b><?php echo HALTSYS ?></b><br>Halt in progress...bye</div>
|
<div class="alert alert-info" role="alert">Executing <b><?php echo HALTSYS ?></b><br>Halt in progress...bye</div>
|
||||||
|
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -67,15 +67,15 @@ $time = $time[1] + $time[0];
|
||||||
$finish = $time;
|
$finish = $time;
|
||||||
$total_time = round(($finish - $start), 4);
|
$total_time = round(($finish - $start), 4);
|
||||||
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
header('WWW-Authenticate: Basic realm="Dashboard"');
|
header('WWW-Authenticate: Basic realm="Dashboard"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -16,8 +16,8 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && VIEWLOGUSER !== "" && VIEWLOGPW !== "")
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
if ($_SERVER['PHP_AUTH_USER'] == VIEWLOGUSER && $_SERVER['PHP_AUTH_PW'] == VIEWLOGPW) {
|
if ($_SERVER['PHP_AUTH_USER'] == VIEWLOGUSER && $_SERVER['PHP_AUTH_PW'] == VIEWLOGPW) {
|
||||||
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
|
@ -41,9 +41,9 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && VIEWLOGUSER !== "" && VIEWLOGPW !== "")
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
||||||
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
||||||
echo "Repeater";
|
echo "Repeater";
|
||||||
} else {
|
} else {
|
||||||
echo "Hotspot";
|
echo "Hotspot";
|
||||||
}
|
}
|
||||||
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
||||||
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
||||||
|
@ -72,19 +72,19 @@ $file = new SplFileObject($fileName);
|
||||||
|
|
||||||
// Loop until we reach the end of the file.
|
// Loop until we reach the end of the file.
|
||||||
while (!$file->eof()) {
|
while (!$file->eof()) {
|
||||||
$line = $file->fgets();
|
$line = $file->fgets();
|
||||||
// Echo one line from the file.
|
// Echo one line from the file.
|
||||||
echo"<tr>";
|
echo"<tr>";
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
echo substr($line,0,3);
|
echo substr($line,0,3);
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
echo substr($line,3,24);
|
echo substr($line,3,24);
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
echo substr($line,27);
|
echo substr($line,27);
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
echo"</tr>\n";
|
echo"</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unset the file to call __destruct(), closing the file handle.
|
// Unset the file to call __destruct(), closing the file handle.
|
||||||
|
@ -93,7 +93,7 @@ $file = null;
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -106,19 +106,19 @@ $time = $time[1] + $time[0];
|
||||||
$finish = $time;
|
$finish = $time;
|
||||||
$total_time = round(($finish - $start), 4);
|
$total_time = round(($finish - $start), 4);
|
||||||
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
header('WWW-Authenticate: Basic realm="Dashboard"');
|
header('WWW-Authenticate: Basic realm="Dashboard"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
var logT = $('#log').dataTable( {
|
var logT = $('#log').dataTable( {
|
||||||
"aaSorting": [[1,'asc']]
|
"aaSorting": [[1,'asc']]
|
||||||
} );}); </script>
|
} );}); </script>
|
||||||
|
|
|
@ -14,8 +14,8 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && REBOOTUSER !== "" && REBOOTPW !== "") {
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
if ($_SERVER['PHP_AUTH_USER'] == REBOOTUSER && $_SERVER['PHP_AUTH_PW'] == REBOOTPW) {
|
if ($_SERVER['PHP_AUTH_USER'] == REBOOTUSER && $_SERVER['PHP_AUTH_PW'] == REBOOTPW) {
|
||||||
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
|
@ -38,9 +38,9 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && REBOOTUSER !== "" && REBOOTPW !== "") {
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
||||||
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
||||||
echo "Repeater";
|
echo "Repeater";
|
||||||
} else {
|
} else {
|
||||||
echo "Hotspot";
|
echo "Hotspot";
|
||||||
}
|
}
|
||||||
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
||||||
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
||||||
|
@ -54,7 +54,7 @@ checkSetup();
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-info" role="alert">Executing <b><?php echo 'sleep 5s && '. REBOOTSYS . ' > /dev/null 2>&1 &'?></b><br>Reboot system in progress</div>
|
<div class="alert alert-info" role="alert">Executing <b><?php echo 'sleep 5s && '. REBOOTSYS . ' > /dev/null 2>&1 &'?></b><br>Reboot system in progress</div>
|
||||||
|
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -67,15 +67,15 @@ $time = $time[1] + $time[0];
|
||||||
$finish = $time;
|
$finish = $time;
|
||||||
$total_time = round(($finish - $start), 4);
|
$total_time = round(($finish - $start), 4);
|
||||||
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
header('WWW-Authenticate: Basic realm="Dashboard"');
|
header('WWW-Authenticate: Basic realm="Dashboard"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -15,8 +15,8 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && RESTARTUSER !== "" && RESTARTPW !== "")
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
if ($_SERVER['PHP_AUTH_USER'] == RESTARTUSER && $_SERVER['PHP_AUTH_PW'] == RESTARTPW) {
|
if ($_SERVER['PHP_AUTH_USER'] == RESTARTUSER && $_SERVER['PHP_AUTH_PW'] == RESTARTPW) {
|
||||||
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
|
@ -38,9 +38,9 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && RESTARTUSER !== "" && RESTARTPW !== "")
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
||||||
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
||||||
echo "Repeater";
|
echo "Repeater";
|
||||||
} else {
|
} else {
|
||||||
echo "Hotspot";
|
echo "Hotspot";
|
||||||
}
|
}
|
||||||
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
||||||
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
||||||
|
@ -55,7 +55,7 @@ include "../include/sysinfo.php";
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-info" role="alert">Executing <b><?php echo REBOOTMMDVM ?></b><br>Reboot MMDVMHost service in progress</div>
|
<div class="alert alert-info" role="alert">Executing <b><?php echo REBOOTMMDVM ?></b><br>Reboot MMDVMHost service in progress</div>
|
||||||
|
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -68,15 +68,15 @@ $time = $time[1] + $time[0];
|
||||||
$finish = $time;
|
$finish = $time;
|
||||||
$total_time = round(($finish - $start), 4);
|
$total_time = round(($finish - $start), 4);
|
||||||
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
header('WWW-Authenticate: Basic realm="Dashboard"');
|
header('WWW-Authenticate: Basic realm="Dashboard"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -16,8 +16,8 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWO
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
if ($_SERVER['PHP_AUTH_USER'] == SWITCHNETWORKUSER && $_SERVER['PHP_AUTH_PW'] == SWITCHNETWORKPW) {
|
if ($_SERVER['PHP_AUTH_USER'] == SWITCHNETWORKUSER && $_SERVER['PHP_AUTH_PW'] == SWITCHNETWORKPW) {
|
||||||
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
$fileName = MMDVMLOGPATH."/".MMDVMLOGPREFIX."-".date("Y-m-d").".log";
|
||||||
?>
|
?>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="es">
|
<html lang="es">
|
||||||
|
@ -40,9 +40,9 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWO
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
<h1><small>MMDVM-Dashboard by DG9VH for <?php
|
||||||
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
|
||||||
echo "Repeater";
|
echo "Repeater";
|
||||||
} else {
|
} else {
|
||||||
echo "Hotspot";
|
echo "Hotspot";
|
||||||
}
|
}
|
||||||
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
|
||||||
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
|
||||||
|
@ -54,26 +54,26 @@ if (!isset($_SERVER['PHP_AUTH_USER']) && SWITCHNETWORKUSER !== "" && SWITCHNETWO
|
||||||
checkSetup();
|
checkSetup();
|
||||||
include "../include/sysinfo.php";
|
include "../include/sysinfo.php";
|
||||||
if ($_GET['network'] == "DMRPLUS") {
|
if ($_GET['network'] == "DMRPLUS") {
|
||||||
setDMRNetwork("DMRplus");
|
setDMRNetwork("DMRplus");
|
||||||
exec( "sudo cp ".MMDVMINIPATH."/DMRPLUS.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
exec( "sudo cp ".MMDVMINIPATH."/DMRPLUS.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
||||||
exec( "sudo killall MMDVMHost");
|
exec( "sudo killall MMDVMHost");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
exec( "sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." > /dev/null 2>&1 &" );
|
exec( "sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." > /dev/null 2>&1 &" );
|
||||||
// exec( "sudo killall MMDVMHost && sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." &");
|
// exec( "sudo killall MMDVMHost && sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." &");
|
||||||
// exec( "sudo /etc/init.d/start_mmdvm restart ");
|
// exec( "sudo /etc/init.d/start_mmdvm restart ");
|
||||||
}
|
}
|
||||||
if ($_GET['network'] == "BRANDMEISTER") {
|
if ($_GET['network'] == "BRANDMEISTER") {
|
||||||
setDMRNetwork("BrandMeister");
|
setDMRNetwork("BrandMeister");
|
||||||
exec( "sudo cp ".MMDVMINIPATH."/BRANDMEISTER.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
exec( "sudo cp ".MMDVMINIPATH."/BRANDMEISTER.ini ".MMDVMINIPATH."/".MMDVMINIFILENAME );
|
||||||
exec( "sudo killall MMDVMHost");
|
exec( "sudo killall MMDVMHost");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
exec( "sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." > /dev/null 2>&1 &" );
|
exec( "sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." > /dev/null 2>&1 &" );
|
||||||
// exec( "sudo killall MMDVMHost && sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." &" );
|
// exec( "sudo killall MMDVMHost && sudo ".MMDVMHOSTPATH."/MMDVMHost ".MMDVMINIPATH."/".MMDVMINIFILENAME." &" );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-info" role="alert">Switching network to <b><?php echo getDMRNetwork2() ?></b><br>Restarting in new selected network in progress</div>
|
<div class="alert alert-info" role="alert">Switching network to <b><?php echo getDMRNetwork2() ?></b><br>Restarting in new selected network in progress</div>
|
||||||
|
|
||||||
<div class="panel panel-info">
|
<div class="panel panel-info">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -86,15 +86,15 @@ $time = $time[1] + $time[0];
|
||||||
$finish = $time;
|
$finish = $time;
|
||||||
$total_time = round(($finish - $start), 4);
|
$total_time = round(($finish - $start), 4);
|
||||||
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
echo '<!--Page generated in '.$total_time.' seconds.-->';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
header('WWW-Authenticate: Basic realm="Dashboard"');
|
header('WWW-Authenticate: Basic realm="Dashboard"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
echo 'Zur Ausführung bitte die geforderten Login-Daten eingeben!';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
44
setup.php
44
setup.php
|
@ -18,24 +18,24 @@ include "include/tools.php";
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
if (isset($_GET['cmd'])) {
|
if (isset($_GET['cmd'])) {
|
||||||
if ( "writeconfig" == $_GET['cmd']) {
|
if ( "writeconfig" == $_GET['cmd']) {
|
||||||
if (!file_exists('./config')) {
|
if (!file_exists('./config')) {
|
||||||
if (!mkdir('./config', 0777, true)) {
|
if (!mkdir('./config', 0777, true)) {
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-danger" role="alert">You forgot to give write-permissions to your webserver-user, see point 3 in <a href="linux-step-by-step.md">linux-step-by-step.md</a>!</div>
|
<div class="alert alert-danger" role="alert">You forgot to give write-permissions to your webserver-user, see point 3 in <a href="linux-step-by-step.md">linux-step-by-step.md</a>!</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$configfile = fopen("config/config.php", 'w');
|
$configfile = fopen("config/config.php", 'w');
|
||||||
fwrite($configfile,"<?php\n");
|
fwrite($configfile,"<?php\n");
|
||||||
fwrite($configfile,"# This is an auto-generated config-file!\n");
|
fwrite($configfile,"# This is an auto-generated config-file!\n");
|
||||||
fwrite($configfile,"# Be careful, when manual editing this!\n\n");
|
fwrite($configfile,"# Be careful, when manual editing this!\n\n");
|
||||||
fwrite($configfile,"date_default_timezone_set('UTC');\n");
|
fwrite($configfile,"date_default_timezone_set('UTC');\n");
|
||||||
fwrite($configfile, createConfigLines());
|
fwrite($configfile, createConfigLines());
|
||||||
fwrite($configfile,"?>\n");
|
fwrite($configfile,"?>\n");
|
||||||
fclose($configfile);
|
fclose($configfile);
|
||||||
?>
|
?>
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><small>MMDVM-Dashboard by DG9VH</small> Setup-Process</h1>
|
<h1><small>MMDVM-Dashboard by DG9VH</small> Setup-Process</h1>
|
||||||
|
@ -43,8 +43,8 @@ include "include/tools.php";
|
||||||
<p><a href="index.php">Your dashboard is now available.</a></p>
|
<p><a href="index.php">Your dashboard is now available.</a></p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1><small>MMDVM-Dashboard by DG9VH</small> Setup-Process</h1>
|
<h1><small>MMDVM-Dashboard by DG9VH</small> Setup-Process</h1>
|
||||||
|
@ -125,9 +125,9 @@ include "include/tools.php";
|
||||||
<h2>Global Configuration</h2>
|
<h2>Global Configuration</h2>
|
||||||
<?php
|
<?php
|
||||||
function get_tz_options($selectedzone, $label, $desc = '') {
|
function get_tz_options($selectedzone, $label, $desc = '') {
|
||||||
echo '<div class="input-group">';
|
echo '<div class="input-group">';
|
||||||
echo '<span class="input-group-addon" id="TIMEZONE" style="width: 300px">Timezone</span>';
|
echo '<span class="input-group-addon" id="TIMEZONE" style="width: 300px">Timezone</span>';
|
||||||
echo '<div class="input"><select name="TIMEZONE">';
|
echo '<div class="input"><select name="TIMEZONE">';
|
||||||
function timezonechoice($selectedzone) {
|
function timezonechoice($selectedzone) {
|
||||||
$all = timezone_identifiers_list();
|
$all = timezone_identifiers_list();
|
||||||
|
|
||||||
|
@ -156,9 +156,9 @@ function get_tz_options($selectedzone, $label, $desc = '') {
|
||||||
$city = $city . '/'. $subcity;
|
$city = $city . '/'. $subcity;
|
||||||
}
|
}
|
||||||
if ($continent != "UTC") {
|
if ($continent != "UTC") {
|
||||||
$structure .= "<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected "':'')." value=\"".($continent.'/'.$city)."\">".str_replace('_',' ',$city)."</option>"; //Timezone
|
$structure .= "<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected "':'')." value=\"".($continent.'/'.$city)."\">".str_replace('_',' ',$city)."</option>"; //Timezone
|
||||||
} else {
|
} else {
|
||||||
$structure .= "<option ".(("UTC"==$selectedzone)?'selected="selected "':'')." value=\"UTC\">UTC</option>"; //Timezone
|
$structure .= "<option ".(("UTC"==$selectedzone)?'selected="selected "':'')." value=\"UTC\">UTC</option>"; //Timezone
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!empty($subcity) != ''){
|
if (!empty($subcity) != ''){
|
||||||
|
@ -181,7 +181,7 @@ function get_tz_options($selectedzone, $label, $desc = '') {
|
||||||
}
|
}
|
||||||
get_tz_options(constant("TIMEZONE"), "Timezone", '');
|
get_tz_options(constant("TIMEZONE"), "Timezone", '');
|
||||||
?>
|
?>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon" id="LOGO" style="width: 300px">URL to Logo</span>
|
<span class="input-group-addon" id="LOGO" style="width: 300px">URL to Logo</span>
|
||||||
<input type="text" value="<?php echo constant("LOGO") ?>" name="LOGO" class="form-control" placeholder="http://your-logo" aria-describedby="LOGO">
|
<input type="text" value="<?php echo constant("LOGO") ?>" name="LOGO" class="form-control" placeholder="http://your-logo" aria-describedby="LOGO">
|
||||||
</div>
|
</div>
|
||||||
|
@ -294,7 +294,7 @@ get_tz_options(constant("TIMEZONE"), "Timezone", '');
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
114
txinfo.php
114
txinfo.php
|
@ -7,9 +7,9 @@ include "include/tools.php";
|
||||||
include "include/functions.php";
|
include "include/functions.php";
|
||||||
$mmdvmconfigs = getMMDVMConfig();
|
$mmdvmconfigs = getMMDVMConfig();
|
||||||
if (!defined("MMDVMLOGPREFIX"))
|
if (!defined("MMDVMLOGPREFIX"))
|
||||||
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
|
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
|
||||||
if (!defined("TIMEZONE"))
|
if (!defined("TIMEZONE"))
|
||||||
define("TIMEZONE", "UTC");
|
define("TIMEZONE", "UTC");
|
||||||
$logLinesMMDVM = getShortMMDVMLog();
|
$logLinesMMDVM = getShortMMDVMLog();
|
||||||
$reverseLogLinesMMDVM = $logLinesMMDVM;
|
$reverseLogLinesMMDVM = $logLinesMMDVM;
|
||||||
array_multisort($reverseLogLinesMMDVM,SORT_DESC);
|
array_multisort($reverseLogLinesMMDVM,SORT_DESC);
|
||||||
|
@ -20,61 +20,61 @@ var_dump($lastHeard);
|
||||||
echo"-->";
|
echo"-->";
|
||||||
$counter = 0;
|
$counter = 0;
|
||||||
foreach ($lastHeard as $listElem) {
|
foreach ($lastHeard as $listElem) {
|
||||||
$counter +=1;
|
$counter +=1;
|
||||||
if (defined("ENABLEXTDLOOKUP") && $listElem[7] == null || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null) {
|
if (defined("ENABLEXTDLOOKUP") && $listElem[7] == null || !defined("ENABLEXTDLOOKUP") && $listElem[6] == null) {
|
||||||
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>";
|
||||||
/*if ($listElem[2] !== "??????????") {
|
/*if ($listElem[2] !== "??????????") {
|
||||||
if (!is_numeric($listElem[2])) {
|
if (!is_numeric($listElem[2])) {
|
||||||
if (constant("SHOWQRZ")) {
|
if (constant("SHOWQRZ")) {
|
||||||
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a></td>";
|
echo"<td nowrap><a target=\"_new\" href=\"https://qrz.com/db/$listElem[2]\">".str_replace("0","Ø",$listElem[2])."</a></td>";
|
||||||
} else {
|
} else {
|
||||||
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</td>";
|
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?callsign=$listElem[2]\">".$listElem[2]."</td>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>";
|
echo"<td nowrap><a target=\"_new\" href=\"http://dmr.darc.de/dmr-userreg.php?usrid=$listElem[2]\">".$listElem[2]."</td>";
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
echo"<td nowrap>$listElem[2]</td>";
|
echo"<td nowrap>$listElem[2]</td>";
|
||||||
|
|
||||||
if (defined("ENABLEXTDLOOKUP")) {
|
if (defined("ENABLEXTDLOOKUP")) {
|
||||||
//echo "<td nowrap>".getName($listElem[2])."</td>";
|
//echo "<td nowrap>".getName($listElem[2])."</td>";
|
||||||
echo"<td nowrap>$listElem[3]</td>";
|
echo"<td nowrap>$listElem[3]</td>";
|
||||||
echo"<td nowrap>$listElem[4]</td>";
|
echo"<td nowrap>$listElem[4]</td>";
|
||||||
echo"<td nowrap>$listElem[5]</td>";
|
echo"<td nowrap>$listElem[5]</td>";
|
||||||
if ($listElem[6] == "RF"){
|
if ($listElem[6] == "RF"){
|
||||||
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
|
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
|
||||||
}else{
|
}else{
|
||||||
echo"<td nowrap>$listElem[6]</td>";
|
echo"<td nowrap>$listElem[6]</td>";
|
||||||
}
|
}
|
||||||
$d1 = new DateTime($listElem[0], new DateTimeZone(TIMEZONE));
|
$d1 = new DateTime($listElem[0], new DateTimeZone(TIMEZONE));
|
||||||
$d2 = new DateTime('now', new DateTimeZone(TIMEZONE));
|
$d2 = new DateTime('now', new DateTimeZone(TIMEZONE));
|
||||||
$diff = $d2->getTimestamp() - $d1->getTimestamp();
|
$diff = $d2->getTimestamp() - $d1->getTimestamp();
|
||||||
echo"<td nowrap>$diff s</td>";
|
echo"<td nowrap>$diff s</td>";
|
||||||
} else {
|
} else {
|
||||||
echo"<td nowrap>$listElem[3]</td>";
|
echo"<td nowrap>$listElem[3]</td>";
|
||||||
echo"<td nowrap>$listElem[4]</td>";
|
echo"<td nowrap>$listElem[4]</td>";
|
||||||
if ($listElem[5] == "RF"){
|
if ($listElem[5] == "RF"){
|
||||||
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
|
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
|
||||||
}else{
|
}else{
|
||||||
echo"<td nowrap>$listElem[5]</td>";
|
echo"<td nowrap>$listElem[5]</td>";
|
||||||
}
|
}
|
||||||
$tz = new DateTimeZone(TIMEZONE);
|
$tz = new DateTimeZone(TIMEZONE);
|
||||||
$d1 = new DateTime($listElem[0], $tz);
|
$d1 = new DateTime($listElem[0], $tz);
|
||||||
$d2 = new DateTime('now', $tz);
|
$d2 = new DateTime('now', $tz);
|
||||||
$diff = $d2->getTimestamp() - $d1->getTimestamp();
|
$diff = $d2->getTimestamp() - $d1->getTimestamp();
|
||||||
echo"<td nowrap>$diff s</td>";
|
echo"<td nowrap>$diff s</td>";
|
||||||
}
|
}
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
} else {
|
} else {
|
||||||
if ($counter == 1) {
|
if ($counter == 1) {
|
||||||
if (defined("ENABLEXTDLOOKUP")) {
|
if (defined("ENABLEXTDLOOKUP")) {
|
||||||
echo "<tr><td colspan='8'></td></tr>";
|
echo "<tr><td colspan='8'></td></tr>";
|
||||||
} else {
|
} else {
|
||||||
echo "<tr><td colspan='7'></td></tr>";
|
echo "<tr><td colspan='7'></td></tr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue