Merge pull request #19 from ayasystems/master

Add new feature... Button toolbar
This commit is contained in:
Kim - DG9VH 2016-06-26 18:50:46 +02:00 committed by GitHub
commit f5c7bed224
12 changed files with 407 additions and 42 deletions

View file

@ -11,6 +11,8 @@ It relies on MMDVMHost by G4KLX (see https://github.com/g4klx/MMDVMHost). At
this place a big thank you to Jonathan for his great work he did with this this place a big thank you to Jonathan for his great work he did with this
software. software.
Based on G4KLX code, mod by EA4GKQ
Required are Required are
============ ============
* Webserver like * Webserver like
@ -41,6 +43,14 @@ At the moment there are several information-sections shown:
* Today's last 10 local transmissions: * Today's last 10 local transmissions:
For better debugging/calibrating etc. the last 10 local transmissions (RF-side of the repeater) are listed. For better debugging/calibrating etc. the last 10 local transmissions (RF-side of the repeater) are listed.
New features by EA4GKQ
======================
* Buttons toolbar
* LastHeard table are sorted
* Some mods to improve mobile experience
Contact Contact
======= =======
Feel free to contact the author via email: dg9vh@darc.de Feel free to contact the author via email: dg9vh[@]darc.de
Feel free to contact the mod author via email: ea4gkq[@]ure.es

View file

@ -227,7 +227,7 @@ function getHeardList($logLines) {
$target = substr($logLine, strpos($logLine, "to") + 3); $target = substr($logLine, strpos($logLine, "to") + 3);
$source = "RF"; $source = "RF";
if (strpos($logLine,"network") > 0 ) { if (strpos($logLine,"network") > 0 ) {
$source = "Network"; $source = "Net";
} }
switch ($mode) { switch ($mode) {

View file

@ -1,10 +1,13 @@
<?php <?php
$totalLH = count($lastHeard);
?> ?>
<div class="panel panel-default"> <div class="panel panel-default">
<!-- Standard-Panel-Inhalt --> <!-- Standard-Panel-Inhalt -->
<div class="panel-heading">Last Heard List of today's <?php echo LHLINES; ?> callsigns.</div> <div class="panel-heading">Last Heard List of today's <?php echo $totalLH; ?> callsigns.</div>
<!-- Tabelle --> <!-- Tabelle -->
<table class="table"> <div class="table-responsive">
<table id="lastHeard" class="table table-condensed table-striped table-hover">
<thead>
<tr> <tr>
<th>Time (UTC)</th> <th>Time (UTC)</th>
<th>Mode</th> <th>Mode</th>
@ -16,28 +19,37 @@
<th>Loss</th> <th>Loss</th>
<th>BER</th> <th>BER</th>
</tr> </tr>
</thead>
<tbody>
<?php <?php
for ($i = 0; ($i < LHLINES) AND ($i < count($lastHeard)); $i++) { for ($i = 0; ($i < $totalLH); $i++) {
$listElem = $lastHeard[$i]; $listElem = $lastHeard[$i];
echo"<tr>"; echo"<tr>";
echo"<td>$listElem[0]</td>"; echo"<td nowrap>$listElem[0]</td>";
echo"<td>$listElem[1]</td>"; echo"<td nowrap>$listElem[1]</td>";
echo"<td>$listElem[2]</td>"; echo"<td nowrap>$listElem[2]</td>";
echo"<td>$listElem[3]</td>"; echo"<td nowrap>$listElem[3]</td>";
echo"<td>$listElem[4]</td>"; echo"<td nowrap>$listElem[4]</td>";
echo"<td>$listElem[5]</td>"; if ($listElem[5] == "RF"){
echo "<td nowrap><span class=\"label label-success\">RF</span></td>";
}else{
echo"<td nowrap>$listElem[5]</td>";
}
if ($listElem[6] == null) { if ($listElem[6] == null) {
echo'<td colspan="3">transmitting</td>'; echo'<td nowrap>transmitting</td><td></td><td></td>';
} else if ($listElem[6] == "SMS") { } else if ($listElem[6] == "SMS") {
echo'<td colspan="3">sending or receiving SMS</td>'; echo'<td nowrap>sending or receiving SMS</td><td></td><td></td>';
} else { } else {
echo"<td>$listElem[6]</td>"; echo"<td nowrap>$listElem[6]</td>";
echo"<td>$listElem[7]</td>"; echo"<td nowrap>$listElem[7]</td>";
echo"<td>$listElem[8]</td>"; echo"<td nowrap>$listElem[8]</td>";
} }
echo"</tr>\n"; echo"</tr>\n";
} }
?> ?>
</tbody>
</table> </table>
</div>
</div> </div>

View file

@ -6,9 +6,11 @@ $localTXList = getHeardList($reverseLogLinesMMDVM);
?> ?>
<div class="panel panel-default"> <div class="panel panel-default">
<!-- Standard-Panel-Inhalt --> <!-- Standard-Panel-Inhalt -->
<div class="panel-heading">Today's last 10 local transmissions.</div> <div class="panel-heading">Today's last 20 local transmissions.</div>
<!-- Tabelle --> <!-- Tabelle -->
<table class="table"> <div class="table-responsive">
<table id="localTx" class="table table-condensed table-striped table-hover">
<thead>
<tr> <tr>
<th>Time (UTC)</th> <th>Time (UTC)</th>
<th>Mode</th> <th>Mode</th>
@ -20,35 +22,38 @@ $localTXList = getHeardList($reverseLogLinesMMDVM);
<th>Loss</th> <th>Loss</th>
<th>BER</th> <th>BER</th>
</tr> </tr>
</thead>
<tbody>
<?php <?php
$counter = 0; $counter = 0;
for ($i = 0; $i < count($localTXList); $i++) { for ($i = 0; $i < count($localTXList); $i++) {
$listElem = $localTXList[$i]; $listElem = $localTXList[$i];
if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF")) { if ($listElem[5] == "RF" && ($listElem[1]=="D-Star" || startsWith($listElem[1], "DMR") || $listElem[1]=="YSF")) {
echo"<tr>"; echo"<tr>";
echo"<td>$listElem[0]</td>"; echo"<td nowrap>$listElem[0]</td>";
echo"<td>$listElem[1]</td>"; echo"<td nowrap>$listElem[1]</td>";
echo"<td>$listElem[2]</td>"; echo"<td nowrap>$listElem[2]</td>";
echo"<td>$listElem[3]</td>"; echo"<td nowrap>$listElem[3]</td>";
echo"<td>$listElem[4]</td>"; echo"<td nowrap>$listElem[4]</td>";
echo"<td>$listElem[5]</td>"; echo"<td nowrap>$listElem[5]</td>";
if ($listElem[6] == null) { if ($listElem[6] == null) {
echo'<td colspan="3">transmitting</td>'; echo'<td nowrap>in TX</td><td></td><td></td>';
} else if ($listElem[6] == "SMS") { } else if ($listElem[6] == "SMS") {
echo'<td colspan="3">sending or receiving SMS</td>'; echo'<td nowrap>sending or receiving SMS</td><td></td><td></td>';
} else { } else {
echo"<td>$listElem[6]</td>"; echo"<td nowrap>$listElem[6]</td>";
echo"<td>$listElem[7]</td>"; echo"<td nowrap>$listElem[7]</td>";
echo"<td>$listElem[8]</td>"; echo"<td nowrap>$listElem[8]</td>";
} }
echo"</tr>\n"; echo"</tr>\n";
$counter++; $counter++;
if ($counter == 10) {
break;
}
} }
} }
?> ?>
</tbody>
</table> </table>
</div>
</div> </div>

View file

@ -3,6 +3,7 @@
<div class="panel-heading">Repeater Info</div> <div class="panel-heading">Repeater Info</div>
<!-- Tabelle --> <!-- Tabelle -->
<div class="table-responsive">
<table class="table"> <table class="table">
<tr> <tr>
<th>Actual Mode</th> <th>Actual Mode</th>
@ -81,4 +82,5 @@
</td> </td>
</tr> </tr>
</table> </table>
</div>
</div> </div>

View file

@ -94,6 +94,7 @@
<!-- 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">
<table class="table"> <table class="table">
<tbody> <tbody>
<tr> <tr>
@ -131,4 +132,5 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>

View file

@ -13,15 +13,21 @@ include "include/functions.php";
<html lang="de"> <html lang="de">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=0.6,maximum-scale=1, user-scalable=yes">
<!--<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">-->
<meta http-equiv="refresh" content="<?php echo REFRESHAFTER?>"> <meta http-equiv="refresh" content="<?php echo REFRESHAFTER?>">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
<!-- Das neueste kompilierte und minimierte CSS --> <!-- Das neueste kompilierte und minimierte CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!-- Optionales Theme --> <!-- Optionales Theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
<!-- Das neueste kompilierte und minimierte JavaScript --> <!-- Das neueste kompilierte und minimierte JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css"></style>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
<title><?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH</title> <title><?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH</title>
</head> </head>
<body> <body>
@ -35,6 +41,11 @@ include "include/functions.php";
?>:</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>
</div> </div>
<button onclick="window.location.href='./scripts/log.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>&nbsp;View Log</button>
<button onclick="window.location.href='./scripts/rebootmmdvm.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>&nbsp;Reboot MMDVMHost</button>
<button onclick="window.location.href='./scripts/reboot.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-repeat" aria-hidden="true"></span>&nbsp;Reboot System</button>
<button onclick="window.location.href='./scripts/halt.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span>&nbsp;ShutDown System</button>
<?php <?php
checkSetup(); checkSetup();
// Here you can feel free to disable info-sections by commenting out with // before include // Here you can feel free to disable info-sections by commenting out with // before include
@ -60,5 +71,16 @@ $total_time = round(($finish - $start), 4);
echo '<!--Page generated in '.$total_time.' seconds.-->'; echo '<!--Page generated in '.$total_time.' seconds.-->';
?> | 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>
$(document).ready(function(){
var lastHeardT = $('#lastHeard').dataTable( {
"aaSorting": [[0,'desc']]
} );
var localTxT = $('#localTx').dataTable( {
"aaSorting": [[0,'desc']]
} );
});
</script>
</body> </body>
</html> </html>

65
scripts/halt.php Normal file
View file

@ -0,0 +1,65 @@
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
// do not touch this includes!!! Never ever!!!
include "../config/config.php";
include "../include/tools.php";
include "../include/functions.php";
?>
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=extend-to-zoom, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- Das neueste kompilierte und minimierte CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!-- Optionales Theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
<!-- Das neueste kompilierte und minimierte JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<title><?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH</title>
</head>
<body>
<div class="page-header">
<h1><small>MMDVM-Dashboard by DG9VH for <?php
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
echo "Repeater";
} else {
echo "Hotspot";
}
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
<button onclick="window.location.href='../index.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>&nbsp;Home</button>
</script>
</div>
<?php
checkSetup();
include "../include/sysinfo.php";
exec(HALTSYS. ' > /dev/null 2>&1 &');
?>
<div class="alert alert-info" role="alert">Exceuteing <b><?php echo HALTSYS ?></b><br>Halt in progress...bye</div>
<div class="panel panel-info">
<?php
$datum = date("d-m-Y");
$uhrzeit = date("H:i:s");
echo "Last Update $datum, $uhrzeit";
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '<!--Page generated in '.$total_time.' seconds.-->';
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
</div>
</body>
</html>

105
scripts/log.php Normal file
View file

@ -0,0 +1,105 @@
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
// do not touch this includes!!! Never ever!!!
include "../config/config.php";
include "../include/tools.php";
include "../include/functions.php";
$fileName = MMDVMLOGPATH. "/MMDVM-".date(Y)."-".date(m)."-".date(d).".log";
?>
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=800px,initial-scale=0.4,maximum-scale=0.6">
<!--<meta http-equiv="refresh" content="<?php echo REFRESHAFTER?>">-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- Das neueste kompilierte und minimierte CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!-- Optionales Theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
<!-- Das neueste kompilierte und minimierte JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<title><?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH</title>
</head>
<body>
<div class="page-header">
<h1><small>MMDVM-Dashboard by DG9VH for <?php
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
echo "Repeater";
} else {
echo "Hotspot";
}
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
<button onclick="window.location.href='../index.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>&nbsp;Home</button>
<button onclick="window.location.href='./rebootmmdvm.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>&nbsp;Reboot MMDVMHost</button>
<button onclick="window.location.href='./reboot.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-repeat" aria-hidden="true"></span>&nbsp;Reboot System</button>
<button onclick="window.location.href='./halt.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-off" aria-hidden="true"></span>&nbsp;ShutDown System</button>
</script>
</div>
<div class="panel panel-log">
<div class="panel-heading">
<span class="label label-info">Fichero log <?php echo $fileName ?></span>
</div>
<div class="table-responsive">
<table class="table table-condensed">
<tr>Log file</tr>
<?php
/*
$fileOutput = file_get_contents($fileName, FILE_USE_INCLUDE_PATH);
var_dump($fileOutput);
*/
$file = new SplFileObject($fileName);
// Loop until we reach the end of the file.
while (!$file->eof()) {
// Echo one line from the file.
echo"<tr>";
echo "<td>";
echo $file->fgets();
echo "</td>";
echo"</tr>\n";
}
// Unset the file to call __destruct(), closing the file handle.
$file = null;
?>
</table>
</div>
<A NAME="TheEnd">
</div>
<div class="panel panel-info">
<?php
$datum = date("d-m-Y");
$uhrzeit = date("H:i:s");
echo "Last Update $datum, $uhrzeit";
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '<!--Page generated in '.$total_time.' seconds.-->';
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
</div>
<script>
window.location.hash = '#TheEnd';
</script>
</body>
</html>

64
scripts/reboot.php Normal file
View file

@ -0,0 +1,64 @@
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
// do not touch this includes!!! Never ever!!!
include "../config/config.php";
include "../include/tools.php";
include "../include/functions.php";
?>
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- Das neueste kompilierte und minimierte CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!-- Optionales Theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
<!-- Das neueste kompilierte und minimierte JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<title><?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH</title>
</head>
<body>
<div class="page-header">
<h1><small>MMDVM-Dashboard by DG9VH for <?php
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
echo "Repeater";
} else {
echo "Hotspot";
}
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
<button onclick="window.location.href='../index.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>&nbsp;Home</button>
</script>
</div>
<?php
checkSetup();
exec('sleep 5s && '. REBOOTSYS . ' > /dev/null 2>&1 &');
?>
<div class="alert alert-info" role="alert">Exceuteing <b><?php echo 'sleep 5s && '. REBOOTSYS . ' > /dev/null 2>&1 &'?></b><br>Reboot system in progress</div>
<div class="panel panel-info">
<?php
$datum = date("d-m-Y");
$uhrzeit = date("H:i:s");
echo "Last Update $datum, $uhrzeit";
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '<!--Page generated in '.$total_time.' seconds.-->';
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
</div>
</body>
</html>

66
scripts/rebootmmdvm.php Normal file
View file

@ -0,0 +1,66 @@
<?php
//ea4gkq
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
// do not touch this includes!!! Never ever!!!
include "../config/config.php";
include "../include/tools.php";
include "../include/functions.php";
?>
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- Das neueste kompilierte und minimierte CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<!-- Optionales Theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
<!-- Das neueste kompilierte und minimierte JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<title><?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH</title>
</head>
<body>
<div class="page-header">
<h1><small>MMDVM-Dashboard by DG9VH for <?php
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
echo "Repeater";
} else {
echo "Hotspot";
}
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?></h4>
<button onclick="window.location.href='../index.php'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-home" aria-hidden="true"></span>&nbsp;Home</button>
</script>
</div>
<?php
checkSetup();
include "../include/sysinfo.php";
exec( REBOOTMMDVM );
?>
<div class="alert alert-info" role="alert">Exceuteing <b><?php echo REBOOTMMDVM ?></b><br>Reboot MMDVMHost service in progress</div>
<div class="panel panel-info">
<?php
$datum = date("d-m-Y");
$uhrzeit = date("H:i:s");
echo "Last Update $datum, $uhrzeit";
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '<!--Page generated in '.$total_time.' seconds.-->';
?> | get your own at: <a href="https://github.com/dg9vh/MMDVMHost-Dashboard">https://github.com/dg9vh/MMDVMHost-Dashboard</a>
</div>
</body>
</html>

View file

@ -130,6 +130,18 @@ include "include/tools.php";
<span class="input-group-addon" id="LHLINES" style="width: 300px">Last heard list lines:</span> <span class="input-group-addon" id="LHLINES" style="width: 300px">Last heard list lines:</span>
<input type="text" name="LHLINES" class="form-control" placeholder="20" aria-describedby="LHLINES" required data-fv-notempty-message="Value is required"> <input type="text" name="LHLINES" class="form-control" placeholder="20" aria-describedby="LHLINES" required data-fv-notempty-message="Value is required">
</div> </div>
<div class="input-group">
<span class="input-group-addon" id="REBOOTMMDVM" style="width: 300px">Reboot MMDVMHost command:</span>
<input type="text" name="REBOOTMMDVM" class="form-control" placeholder="sudo systemctl restart mmdvmhost.service" aria-describedby="REBOOTMMDVM">
</div>
<div class="input-group">
<span class="input-group-addon" id="REBOOTSYS" style="width: 300px">Reboot system command:</span>
<input type="text" name="REBOOTSYS" class="form-control" placeholder="sudo reboot" aria-describedby="REBOOTSYS">
</div>
<div class="input-group">
<span class="input-group-addon" id="HALTSYS" style="width: 300px">Halt system command:</span>
<input type="text" name="HALTSYS" class="form-control" placeholder="sudo halt" aria-describedby="HALTSYS">
</div>
<div class="input-group"> <div class="input-group">
<span class="input-group-btn"> <span class="input-group-btn">
<button class="btn btn-default" type="submit" form="config">Save configuration</button> <button class="btn btn-default" type="submit" form="config">Save configuration</button>