first commit
This commit is contained in:
Executable
+61
@@ -0,0 +1,61 @@
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading"><?php echo _("Disk Use"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
|
||||
<div class="panel-body">
|
||||
<!-- Tabelle -->
|
||||
<div class="table-responsive">
|
||||
<table id="diskuse" class="table diskuse table-condensed table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w10p filesystem"><?php echo _("File System"); ?></th>
|
||||
<th class="w20p"><?php echo _("Mount Point"); ?></th>
|
||||
<th><?php echo _("Use"); ?></th>
|
||||
<th class="w15p"><?php echo _("Free"); ?></th>
|
||||
<th class="w15p"><?php echo _("Used"); ?></th>
|
||||
<th class="w15p"><?php echo _("Total"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
||||
try{
|
||||
$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))) {
|
||||
$datas[] = array(
|
||||
'total' => 'N.A',
|
||||
'used' => 'N.A',
|
||||
'free' => 'N.A',
|
||||
'percent_used' => 0,
|
||||
'mount' => 'N.A',
|
||||
'filesystem' => 'N.A',
|
||||
);
|
||||
} else {
|
||||
$mounted_points = array();
|
||||
$key = 0;
|
||||
foreach ($df as $mounted) {
|
||||
list($filesystem, $type, $total, $used, $free, $percent, $mount) = explode(',', $mounted);
|
||||
if ((strpos($type, 'tmpfs') !== false) && (strpos($mount, '/mnt/ramdisk') === false))
|
||||
continue;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $filesystem ?></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><?php echo getSize($free * 1024) ?></td>
|
||||
<td><?php echo getSize($used * 1024) ?></td>
|
||||
<td><?php echo getSize($total * 1024) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+1058
File diff suppressed because it is too large
Load Diff
Executable
+27
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
//Some basic inits
|
||||
$mmdvmconfigs = getMMDVMConfig();
|
||||
if (!defined("MMDVMLOGPREFIX"))
|
||||
define("MMDVMLOGPREFIX", getConfigItem("Log", "FileRoot", $mmdvmconfigs));
|
||||
if (!defined("TIMEZONE"))
|
||||
define("TIMEZONE", "UTC");
|
||||
if (defined("RESOLVETGS")) {
|
||||
$tgList = getTGList();
|
||||
}
|
||||
$logLinesMMDVM = getMMDVMLog();
|
||||
showLapTime("getMMDVMLog");
|
||||
$reverseLogLinesMMDVM = $logLinesMMDVM;
|
||||
rsort($reverseLogLinesMMDVM);
|
||||
showLapTime("array_multisort");
|
||||
$lastHeard = getLastHeard($reverseLogLinesMMDVM, FALSE);
|
||||
showLapTime("getLastHeard");
|
||||
if (defined("ENABLEYSFGATEWAY")) {
|
||||
$logLinesYSFGateway = getYSFGatewayLog();
|
||||
showLapTime("getYSFGatewayLog");
|
||||
$reverseLogLinesYSFGateway = $logLinesYSFGateway;
|
||||
rsort($reverseLogLinesYSFGateway);
|
||||
showLapTime("array_multisort");
|
||||
$activeYSFReflectors = getActiveYSFReflectors();
|
||||
showLapTime("getActiveYSFReflectors");
|
||||
}
|
||||
?>
|
||||
Executable
+72
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
$totalLH = count($lastHeard);
|
||||
if (defined("ENABLEXTDLOOKUP") && !defined("USESQLITE")) {
|
||||
$TMP_CALL_NAME = "/tmp/Callsign_Name.txt";
|
||||
exec("wc -l ".$TMP_CALL_NAME." | cut -f1 -d' '", $output);
|
||||
exec("wc -l ".DMRIDDATPATH." | cut -f1 -d' '", $output2);
|
||||
}
|
||||
?>
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading"><?php
|
||||
echo _("Last Heard List of today's")." ".$totalLH." "._("callsigns.")." ";
|
||||
if (defined("ENABLEXTDLOOKUP") && !defined("USESQLITE")) {
|
||||
echo _("Cached")." (".$output[0]."/".$output2[0].")";
|
||||
}
|
||||
?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
|
||||
<div class="panel-body">
|
||||
<!-- Tabelle -->
|
||||
<div class="table-responsive">
|
||||
<table id="lastHeard" class="table lastHeard table-condensed table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo _("Time"); ?> (<?php echo TIMEZONE;?>)</th>
|
||||
<th><?php echo _("Mode"); ?></th>
|
||||
<th><?php echo _("Callsign"); ?></th>
|
||||
<?php
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
?>
|
||||
<th><?php echo _("Name"); ?></th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th><?php echo _("DSTAR-ID"); ?></th>
|
||||
<th><?php echo _("Target"); ?></th>
|
||||
<th><?php echo _("Source"); ?></th>
|
||||
<th><?php echo _("Dur (s)"); ?></th>
|
||||
<th><?php echo _("Loss"); ?></th>
|
||||
<th><?php echo _("BER"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var lastHeardT = $('#lastHeard').dataTable( {
|
||||
"language": <?php echo DATATABLESTRANSLATION; ?>,
|
||||
"aaSorting": [[0,'desc']],
|
||||
<?php $request = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}/{$_SERVER['REQUEST_URI']}";
|
||||
if (strpos($request,"index.php")> 0) {
|
||||
$request = substr($request,0,strpos($request,"index.php"));
|
||||
}
|
||||
if (strpos($request,"?stoprefresh")> 0) {
|
||||
$request = substr($request,0,strpos($request,"?stoprefresh"));
|
||||
}
|
||||
?>
|
||||
"ajax": '<?php echo $request?>/ajax.php?section=lastHeard',
|
||||
"deferRender": true
|
||||
} );
|
||||
|
||||
<?php
|
||||
if (!isset($_GET['stoprefresh'])) {
|
||||
?>
|
||||
setInterval( function () {
|
||||
lastHeardT.api().ajax.reload( );
|
||||
}, <?php echo REFRESHAFTER * 1000 ?> );
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
});
|
||||
</script>
|
||||
Executable
+70
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
$totalLH = count($lastHeard);
|
||||
?>
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading"><?php echo _("Today's local transmissions"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
|
||||
<div class="panel-body">
|
||||
<!-- Tabelle -->
|
||||
<div class="table-responsive">
|
||||
<table id="localTx" class="table localTx table-condensed table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo _("Time"); ?> (<?php echo TIMEZONE;?>)</th>
|
||||
<th><?php echo _("Mode"); ?></th>
|
||||
<th><?php echo _("Callsign"); ?></th>
|
||||
<?php
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
?>
|
||||
<th><?php echo _("Name"); ?></th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th><?php echo _("DSTAR-ID"); ?></th>
|
||||
<th><?php echo _("Target"); ?></th>
|
||||
<th><?php echo _("Source"); ?></th>
|
||||
<th><?php echo _("Dur (s)"); ?></th>
|
||||
<th><?php echo _("Loss"); ?></th>
|
||||
<th><?php echo _("BER"); ?></th>
|
||||
<?php
|
||||
if (constant("RSSI") == "min") echo "<th>"._("RSSI (min)")."</th>";
|
||||
else if (constant("RSSI") == "max") echo "<th>"._("RSSI (max)")."</th>";
|
||||
else if (constant("RSSI") == "avg") echo "<th>"._("RSSI (avg)")."</th>";
|
||||
else if (constant("RSSI") == "all") echo "<th>"._("RSSI (min/max/avg)")."</th>";
|
||||
else echo "<th>"._("RSSI (avg)")."</th>";
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var localTxT = $('#localTx').dataTable( {
|
||||
"language": <?php echo DATATABLESTRANSLATION; ?>,
|
||||
"aaSorting": [[0,'desc']],
|
||||
|
||||
<?php $request = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}/{$_SERVER['REQUEST_URI']}";
|
||||
if (strpos($request,"index.php")> 0) {
|
||||
$request = substr($request,0,strpos($request,"index.php"));
|
||||
}
|
||||
if (strpos($request,"?stoprefresh")> 0) {
|
||||
$request = substr($request,0,strpos($request,"?stoprefresh"));
|
||||
}
|
||||
?>
|
||||
"ajax": '<?php echo $request?>/ajax.php?section=localTx',
|
||||
"deferRender": true
|
||||
} );
|
||||
|
||||
<?php
|
||||
if (!isset($_GET['stoprefresh'])) {
|
||||
?>
|
||||
setInterval( function () {
|
||||
localTxT.api().ajax.reload( );
|
||||
}, <?php echo REFRESHAFTER * 1000 ?> );
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
});
|
||||
</script>
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading"><?php echo _("Enabled Modes"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
|
||||
<div class="panel-body">
|
||||
<!-- Tabelle -->
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<?php showMode("DMR", $mmdvmconfigs);?>
|
||||
<?php showMode("DMR Network", $mmdvmconfigs);?>
|
||||
<?php showMode("D-Star", $mmdvmconfigs);?>
|
||||
<?php showMode("D-Star Network", $mmdvmconfigs);?>
|
||||
<?php showMode("System Fusion", $mmdvmconfigs);?>
|
||||
<?php showMode("System Fusion Network", $mmdvmconfigs);?>
|
||||
<?php showMode("P25", $mmdvmconfigs);?>
|
||||
<?php showMode("P25 Network", $mmdvmconfigs);?>
|
||||
<?php showMode("NXDN", $mmdvmconfigs);?>
|
||||
<?php showMode("NXDN Network", $mmdvmconfigs);?>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+126
@@ -0,0 +1,126 @@
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading"><?php echo _("Repeater Info"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
|
||||
<div class="panel-body">
|
||||
<!-- Tabelle -->
|
||||
<div class="table-responsive">
|
||||
<table class="table repeaterinfo">
|
||||
<tr>
|
||||
<th><?php echo _("Current Mode"); ?></th>
|
||||
<?php
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||
?>
|
||||
<th><?php echo _("D-Star linked to"); ?></th>
|
||||
<?php
|
||||
}
|
||||
if (getEnabled("System Fusion", $mmdvmconfigs) == 1) {
|
||||
?>
|
||||
<th><?php echo _("YSF linked to"); ?></th>
|
||||
<?php
|
||||
}
|
||||
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
|
||||
if (getConfigItem("DMR Network", "Slot1", $mmdvmconfigs) == "1") {
|
||||
?>
|
||||
<th><?php echo _("DMR TS1 last linked to"); ?></th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th><?php echo _("DMR TS2 last linked to"); ?></th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
echo"<tr>";
|
||||
echo"<td id=\"mode\">".getActualMode($lastHeard, $mmdvmconfigs)."</td>";
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||
echo"<td id=\"dstarlink\">".getActualLink($reverseLogLinesMMDVM, "D-Star")."</td>";
|
||||
}
|
||||
if (getEnabled("System Fusion", $mmdvmconfigs) == 1) {
|
||||
echo"<td id=\"ysflink\">".getActualLink($reverseLogLinesYSFGateway, "YSF")."</td>";
|
||||
}
|
||||
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
|
||||
if (getConfigItem("DMR Network", "Slot1", $mmdvmconfigs) == "1") {
|
||||
echo"<td id=\"dmr1link\">".getActualLink($reverseLogLinesMMDVM, "DMR Slot 1")."</td>";
|
||||
}
|
||||
echo"<td id=\"dmr2link\">".getActualLink($reverseLogLinesMMDVM, "DMR Slot 2")."/". getActualReflector($reverseLogLinesMMDVM, "DMR Slot 2") ."</td>";
|
||||
}
|
||||
echo"</tr>\n";
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th><?php echo _("Location"); ?></th>
|
||||
<th><?php echo _("TX-Freq."); ?></th>
|
||||
<th><?php echo _("RX-Freq."); ?></th>
|
||||
<?php
|
||||
if (getEnabled("System Fusion Network", $mmdvmconfigs) == 1) {
|
||||
?>
|
||||
<th><?php echo _("YSFGateway"); ?></th>
|
||||
<?php
|
||||
}
|
||||
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
|
||||
?>
|
||||
<th><?php echo _("DMR CC"); ?></th>
|
||||
<?php
|
||||
if (getEnabled("DMR Network", $mmdvmconfigs) == 1) {
|
||||
?>
|
||||
<th><?php echo _("DMR-Master"); ?></th>
|
||||
<th><?php echo _("TS1"); ?></th>
|
||||
<th><?php echo _("TS2"); ?></th>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
echo"<tr>";
|
||||
echo"<td>".getConfigItem("Info", "Location", $mmdvmconfigs)."</td>";
|
||||
echo"<td>".getMHZ(getConfigItem("Info", "TXFrequency", $mmdvmconfigs))."</td>";
|
||||
echo"<td>".getMHZ(getConfigItem("Info", "RXFrequency", $mmdvmconfigs))."</td>";
|
||||
if (getEnabled("System Fusion Network", $mmdvmconfigs) == 1) {
|
||||
echo"<td>".getConfigItem("System Fusion Network", "GatewayAddress", $mmdvmconfigs)."</td>";
|
||||
}
|
||||
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
|
||||
echo"<td>".getConfigItem("DMR", "ColorCode", $mmdvmconfigs)."</td>";
|
||||
if (getEnabled("DMR Network", $mmdvmconfigs) == 1) {
|
||||
echo"<td>";
|
||||
if (getDMRMasterState()) {
|
||||
echo "<span class=\"badge badge-success\" title=\"Master connected\">";
|
||||
} else {
|
||||
echo "<span class=\"badge badge-danger\" title=\"Master not connected\">";
|
||||
}
|
||||
echo getConfigItem("DMR Network", "Address", $mmdvmconfigs);
|
||||
if (strlen(getDMRNetwork()) > 0 ) {
|
||||
echo " (".getDMRNetwork().")";
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
</td>
|
||||
<td><span class="badge <?php
|
||||
if (getConfigItem("DMR Network", "Slot1", $mmdvmconfigs) == 1) {
|
||||
echo 'badge-success">'._("enabled");
|
||||
} else {
|
||||
echo 'badge-default">'._("disabled");
|
||||
}
|
||||
?></span></td>
|
||||
<td><span class="badge <?php
|
||||
if (getConfigItem("DMR Network", "Slot2", $mmdvmconfigs) == 1) {
|
||||
echo 'badge-success">'._("enabled");
|
||||
} else {
|
||||
echo 'badge-default">'._("disabled");
|
||||
}
|
||||
?></span></td>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading"><?php echo _("System Info"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
|
||||
<div class="panel-body">
|
||||
<!-- Tabelle -->
|
||||
<div class="table-responsive">
|
||||
<table id="sysinfo" class="table sysinfo table-condensed">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function loadXMLDocSysinfo() {
|
||||
var xmlhttp;
|
||||
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||
xmlhttp=new XMLHttpRequest();
|
||||
} else {// code for IE6, IE5
|
||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
xmlhttp.onreadystatechange=function() {
|
||||
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||
document.getElementById("sysinfo").innerHTML=xmlhttp.responseText;
|
||||
}
|
||||
}
|
||||
xmlhttp.open("GET","ajax.php?section=sysinfo",true);
|
||||
xmlhttp.send();
|
||||
|
||||
var timeout = window.setTimeout("loadXMLDocSysinfo()", 20000);
|
||||
}
|
||||
loadXMLDocSysinfo();
|
||||
</script>
|
||||
Executable
+136
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
function format_time($seconds) {
|
||||
$secs = intval($seconds % 60);
|
||||
$mins = intval($seconds / 60 % 60);
|
||||
$hours = intval($seconds / 3600 % 24);
|
||||
$days = intval($seconds / 86400);
|
||||
$uptimeString = "";
|
||||
|
||||
if ($days > 0) {
|
||||
$uptimeString .= $days;
|
||||
$uptimeString .= (($days == 1) ? " day" : " days");
|
||||
}
|
||||
if ($hours > 0) {
|
||||
$uptimeString .= (($days > 0) ? ", " : "") . $hours;
|
||||
$uptimeString .= (($hours == 1) ? " hr" : " hrs");
|
||||
}
|
||||
if ($mins > 0) {
|
||||
$uptimeString .= (($days > 0 || $hours > 0) ? ", " : "") . $mins;
|
||||
$uptimeString .= (($mins == 1) ? " min" : " mins");
|
||||
}
|
||||
if ($secs > 0) {
|
||||
$uptimeString .= (($days > 0 || $hours > 0 || $mins > 0) ? ", " : "") . $secs;
|
||||
$uptimeString .= (($secs == 1) ? " s" : " s");
|
||||
}
|
||||
return $uptimeString;
|
||||
}
|
||||
|
||||
function startsWith($haystack, $needle) {
|
||||
return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== false;
|
||||
}
|
||||
|
||||
function getMHZ($freq) {
|
||||
return substr($freq,0,3) . "." . substr($freq,3,6) . " MHz";
|
||||
}
|
||||
|
||||
function isProcessRunning($processname) {
|
||||
exec("pgrep " . $processname, $pids);
|
||||
if(empty($pids)) {
|
||||
// process not running!
|
||||
return false;
|
||||
} else {
|
||||
// process running!
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function clean($string) {
|
||||
return preg_replace('/[^A-Za-z0-9:\-\/\ \.\_\>\&]/', '', $string); // Removes special chars.
|
||||
}
|
||||
|
||||
function createConfigLines() {
|
||||
$out ="";
|
||||
foreach($_GET as $key=>$val) {
|
||||
if($key != "cmd") {
|
||||
//$val = clean($val);
|
||||
$out .= "define(\"$key\", \"$val\");"."\n";
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
function getSize($filesize, $precision = 2) {
|
||||
$units = array('', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y');
|
||||
foreach ($units as $idUnit => $unit) {
|
||||
if ($filesize > 1024)
|
||||
$filesize /= 1024;
|
||||
else
|
||||
break;
|
||||
}
|
||||
return round($filesize, $precision).' '.$units[$idUnit].'B';
|
||||
}
|
||||
|
||||
function checkSetup() {
|
||||
$el = error_reporting();
|
||||
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
||||
if (file_exists ("setup.php") && ! defined("DISABLESETUPWARNING")) {
|
||||
?>
|
||||
<div class="alert alert-danger" role="alert"><?php echo _("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
|
||||
}
|
||||
error_reporting($el);
|
||||
}
|
||||
|
||||
function startStopwatch() {
|
||||
$time = microtime();
|
||||
$time = explode(' ', $time);
|
||||
$time = $time[1] + $time[0];
|
||||
$_SESSION['starttime'] = $time;
|
||||
return $time;
|
||||
}
|
||||
|
||||
function getLapTime() {
|
||||
$start = $_SESSION['starttime'];
|
||||
$time = microtime();
|
||||
$time = explode(' ', $time);
|
||||
$time = $time[1] + $time[0];
|
||||
$finish = $time;
|
||||
$lap_time = round(($finish - $start), 4);
|
||||
return $lap_time;
|
||||
}
|
||||
|
||||
function showLapTime($func) {
|
||||
if( defined("DEBUG") ) {
|
||||
?><script>console.log('<?php echo $func . ": ". getLapTime(); ?> sec.');</script><?php
|
||||
}
|
||||
}
|
||||
|
||||
function convertTimezone($timestamp) {
|
||||
try {
|
||||
$date = new DateTime($timestamp);
|
||||
$date->setTimezone(new DateTimeZone(TIMEZONE));
|
||||
return $date->format('Y-m-d H:i:s');
|
||||
} catch (Exception $err) {}
|
||||
}
|
||||
|
||||
function encode($hex) {
|
||||
$validchars = " abcdefghijklmnopqrstuvwxyzäöüßABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ0123456789";
|
||||
$str = '';
|
||||
$chrval = hexdec($hex);
|
||||
$str = chr($chrval);
|
||||
if (strpos($validchars, $str)>=0)
|
||||
return $str;
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
function recursive_array_search($needle,$haystack) {
|
||||
foreach($haystack as $key=>$value) {
|
||||
$current_key = $key;
|
||||
if($needle===$value OR (is_array($value) && recursive_array_search($needle,$value) !== false)) {
|
||||
return $current_key;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
Executable
+114
@@ -0,0 +1,114 @@
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading"><?php echo _("Currently TXing"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
|
||||
<div class="panel-body">
|
||||
<!-- Tabelle -->
|
||||
<div class="table-responsive">
|
||||
<table id="currtx" class="table curTx table-condensed table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo _("Time"); ?> (<?php echo TIMEZONE;?>)</th>
|
||||
<th><?php echo _("Mode"); ?></th>
|
||||
<th><?php echo _("Callsign"); ?></th>
|
||||
<?php
|
||||
if (defined("ENABLEXTDLOOKUP")) {
|
||||
?>
|
||||
<th><?php echo _("Name"); ?></th>
|
||||
<?php
|
||||
}
|
||||
if (defined("TALKERALIAS")) {
|
||||
?>
|
||||
<th><?php echo _("Talker Alias"); ?></th>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<th><?php echo _("DSTAR-ID"); ?></th>
|
||||
<th><?php echo _("Target"); ?></th>
|
||||
<th><?php echo _("Source"); ?></th>
|
||||
<th><?php echo _("TX-Time"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="txline">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function doXMLHTTPRequest(scriptname, elem) {
|
||||
var xmlhttp;
|
||||
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||
xmlhttp=new XMLHttpRequest();
|
||||
} else {// code for IE6, IE5
|
||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
xmlhttp.onreadystatechange=function() {
|
||||
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||
document.getElementById(elem).innerHTML=xmlhttp.responseText;
|
||||
}
|
||||
}
|
||||
xmlhttp.open("GET",scriptname,true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
|
||||
function refreshMode() {
|
||||
doXMLHTTPRequest("ajax.php?section=mode","mode");
|
||||
}
|
||||
|
||||
function refreshDstarLink() {
|
||||
doXMLHTTPRequest("ajax.php?section=dstarlink","dstarlink");
|
||||
}
|
||||
|
||||
function refreshYSFLink() {
|
||||
doXMLHTTPRequest("ajax.php?section=ysflink","ysflink");
|
||||
}
|
||||
|
||||
function refreshDMR1Link() {
|
||||
doXMLHTTPRequest("ajax.php?section=dmr1link","dmr1link");
|
||||
}
|
||||
|
||||
function refreshDMR2Link() {
|
||||
doXMLHTTPRequest("ajax.php?section=dmr2link","dmr2link");
|
||||
}
|
||||
|
||||
var transmitting = false;
|
||||
function loadXMLDoc() {
|
||||
var xmlhttp;
|
||||
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
|
||||
xmlhttp=new XMLHttpRequest();
|
||||
} else {// code for IE6, IE5
|
||||
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
xmlhttp.onreadystatechange=function() {
|
||||
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
|
||||
document.getElementById("txline").innerHTML=xmlhttp.responseText;
|
||||
}
|
||||
}
|
||||
xmlhttp.open("GET","txinfo.php",true);
|
||||
xmlhttp.send();
|
||||
|
||||
var timeout = window.setTimeout("loadXMLDoc()", 1000);
|
||||
refreshMode();
|
||||
<?php
|
||||
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
|
||||
?>
|
||||
refreshDstarLink();
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (getEnabled("System Fusion", $mmdvmconfigs) == 1) {
|
||||
?>refreshYSFLink();
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
|
||||
?>refreshDMR1Link();
|
||||
refreshDMR2Link();
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
}
|
||||
loadXMLDoc();
|
||||
</script>
|
||||
Executable
+95
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
?>
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading"><?php echo _("YSFGateway-Infos"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
|
||||
<div class="panel-body">
|
||||
<!-- Tabelle -->
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td><span class="badge <?php
|
||||
if (isProcessRunning("YSFGateway")) {
|
||||
echo "badge-success";
|
||||
?>"><?php echo _("YSFGateway Process is running"); ?></span></td><?php
|
||||
} else {
|
||||
echo "badge-danger\" title=\"YSFGateway is down!";
|
||||
?>"><?php echo _("YSFGateway Process is down!"); ?></span></td><?php
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<!-- Standard-Panel-Inhalt -->
|
||||
<div class="panel-heading"><?php echo _("YSFReflectors reported active"); ?><span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span></div>
|
||||
<div class="panel-body">
|
||||
<!-- Tabelle -->
|
||||
<div class="table-responsive">
|
||||
<table id="ysfGateways" class="table ysfGateways table-condensed table-striped table-hover">
|
||||
|
||||
<?php
|
||||
|
||||
if (count($activeYSFReflectors) > 0) {
|
||||
?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo _("No."); ?></th>
|
||||
<th><?php echo _("Name"); ?></th>
|
||||
<th><?php echo _("Description"); ?></th>
|
||||
<th><?php echo _("ID"); ?></th>
|
||||
<th><?php echo _("Connections"); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$counter = 1;
|
||||
foreach ($activeYSFReflectors as $reflector) {
|
||||
echo "<tr>";
|
||||
echo "<td>$counter</td>";
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
if ($i == 0 && defined("ENABLEYSFREFLECTORSWITCHING")) {
|
||||
echo"<td><a href=\"scripts/switchysfreflector.php?reflector=$reflector[$i]\" title=\"Click to connect to\">$reflector[$i]</a>";
|
||||
$i++;
|
||||
if ($reflector[$i] !=="") {
|
||||
if (startsWith($reflector[$i],"http"))
|
||||
echo ' <a target="_new" href="'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
|
||||
else
|
||||
echo ' <a target="_new" href="http://'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
|
||||
}
|
||||
echo"</td>";
|
||||
} else {
|
||||
if ($i == 0) {
|
||||
echo"<td>$reflector[$i]";
|
||||
$i++;
|
||||
if ($reflector[$i] !=="") {
|
||||
if (startsWith($reflector[$i],"http"))
|
||||
echo ' <a target="_new" href="'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
|
||||
else
|
||||
echo ' <a target="_new" href="http://'.$reflector[$i].'"><img src="images/dashboard.png" /></a>';
|
||||
}
|
||||
echo"</td>";
|
||||
} else {
|
||||
echo"<td>$reflector[$i]</td>";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$counter++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var ysfGatewaysT = $('#ysfGateways').dataTable( {
|
||||
"language": <?php echo DATATABLESTRANSLATION; ?>,
|
||||
"aaSorting": [[0,'asc']]
|
||||
} );
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user