MMDVMHost-Dashboard/index.php

150 lines
6 KiB
PHP
Raw Normal View History

2016-04-30 15:38:12 +02:00
<?php
//session_start();
/*
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;*/
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
2016-05-10 21:50:33 +02:00
// do not touch this includes!!! Never ever!!!
2016-04-30 15:38:12 +02:00
include "config/config.php";
2016-04-30 19:33:41 +02:00
include "include/tools.php";
startStopwatch();
showLapTime("Start of page");
2016-04-30 15:38:12 +02:00
include "include/functions.php";
include "include/init.php";
include "version.php";
2016-04-30 15:38:12 +02:00
?>
<!doctype html>
2016-07-13 15:07:23 +02:00
<html lang="en">
2016-04-30 15:38:12 +02:00
<head>
<meta charset="utf-8">
2016-06-24 18:59:05 +02:00
<meta name="viewport" content="width=device-width, initial-scale=0.6,maximum-scale=1, user-scalable=yes">
<!-- CSS for tooltip display -->
<link rel="stylesheet" href="css/tooltip.css">
2016-06-23 21:17:09 +02:00
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
2016-04-30 15:38:12 +02:00
<!-- Das neueste kompilierte und minimierte CSS -->
2016-09-15 20:30:41 +02:00
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
2016-04-30 15:38:12 +02:00
<!-- Optionales Theme -->
2016-09-15 20:30:41 +02:00
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap-theme.min.css">
2016-04-30 15:38:12 +02:00
<!-- Das neueste kompilierte und minimierte JavaScript -->
2016-09-15 20:30:41 +02:00
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/latest/js/bootstrap.min.js"></script>
2016-07-13 15:07:23 +02:00
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css">
2016-06-24 23:12:23 +02:00
<script type="text/javascript" src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
2017-01-10 15:04:51 +01:00
<style>
.nowrap {
white-space:nowrap
}
</style>
2016-05-09 22:39:47 +02:00
<title><?php echo getCallsign($mmdvmconfigs) ?> - MMDVM-Dashboard by DG9VH</title>
2016-04-30 15:38:12 +02:00
</head>
<body>
<div class="page-header" style="position:relative;">
<h1><small>MMDVM-Dashboard by DG9VH for <?php
if (getConfigItem("General", "Duplex", $mmdvmconfigs) == "1") {
2017-01-10 15:04:51 +01:00
echo "Repeater";
} else {
2017-01-10 15:04:51 +01:00
echo "Hotspot";
}
?>:</small> <?php echo getCallsign($mmdvmconfigs) ?></h1>
<h4>MMDVMHost by G4KLX Version: <?php echo getMMDVMHostVersion() ?><br>Firmware: <?php echo getFirmwareVersion() ?>
<?php
if (strlen(getDMRNetwork()) > 0 ) {
2017-01-10 15:04:51 +01:00
echo "<br>DMR-Network: ".getDMRNetwork();
}
?></h4>
<?php
$logourl = "";
if (getDMRNetwork() == "BrandMeister") {
2017-01-10 15:04:51 +01:00
if (constant('BRANDMEISTERLOGO') !== NULL) {
2016-11-07 08:26:56 +01:00
$logourl = BRANDMEISTERLOGO;
2016-11-07 11:26:29 +01:00
}
}
if (getDMRNetwork() == "DMRplus") {
2017-01-10 15:04:51 +01:00
if (constant('DMRPLUSLOGO') !== NULL) {
$logourl = DMRPLUSLOGO;
2016-11-07 11:26:29 +01:00
}
}
2016-11-07 11:26:29 +01:00
if ($logourl == "") {
2017-01-10 15:04:51 +01:00
$logourl = LOGO;
}
if ($logourl !== "") {
?>
<div id="Logo" style="position:absolute;top:-43px;right:10px;"><img src="<?php echo $logourl ?>" width="250px" style="width:250px; border-radius:10px;box-shadow:2px 2px 2px #808080; padding:1px;background:#FFFFFF;border:1px solid #808080;" border="0" hspace="10" vspace="10" align="absmiddle"></div>
2016-10-26 09:46:15 +02:00
<?php
}
?>
2016-04-30 15:38:12 +02:00
</div>
<?php
if (defined("ENABLEMANAGEMENT")) {
?>
2016-06-24 21:12:11 +02:00
<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>
2016-04-30 15:38:12 +02:00
<?php
}
if (defined("ENABLENETWORKSWITCHING")) {
?>
<button onclick="window.location.href='./scripts/switchnetwork.php?network=DMRPLUS'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span>&nbsp;DMRplus</button>
<button onclick="window.location.href='./scripts/switchnetwork.php?network=BRANDMEISTER'" type="button" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-fire" aria-hidden="true"></span>&nbsp;BrandMeister</button>
<?php
}
checkSetup();
2016-05-10 21:50:33 +02:00
// Here you can feel free to disable info-sections by commenting out with // before include
include "include/txinfo.php";
showLapTime("txinfo");
2016-10-12 18:54:11 +02:00
include "include/sysinfo_ajax.php";
showLapTime("sysinfo");
2016-06-28 16:31:59 +02:00
include "include/disk.php";
showLapTime("disk");
2016-05-02 10:19:08 +02:00
include "include/repeaterinfo.php";
showLapTime("repeaterinfo");
2016-05-09 22:39:47 +02:00
include "include/modes.php";
showLapTime("modes");
include "include/lh_ajax.php";
showLapTime("lh_ajax");
include "include/localtx_ajax.php";
showLapTime("localtx_ajax");
2016-06-11 22:38:54 +02:00
if (defined("ENABLEYSFGATEWAY")) {
2017-01-10 15:04:51 +01:00
include "include/ysfgatewayinfo.php";
showLapTime("ysfgatewayinfo");
}
2016-04-30 15:38:12 +02:00
?>
2017-01-10 15:04:51 +01:00
<div class="panel panel-info">
2016-04-30 15:38:12 +02:00
<?php
//$datum = date("Y-m-d");
//$uhrzeit = date("H:i:s");
$lastReload = new DateTime();
$lastReload->setTimezone(new DateTimeZone(TIMEZONE));
echo "MMDVMHost-Dashboard V ".VERSION." | Last Reload ".$lastReload->format('Y-m-d, H:i:s')." (".TIMEZONE.")";
/*$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);*/
2016-10-26 09:46:15 +02:00
echo '<!--Page generated in '.getLapTime().' seconds.-->';
?> |
<?php
if (!isset($_GET['stoprefresh'])) {
2017-01-10 15:04:51 +01:00
echo '<a href="?stoprefresh">stop refreshing</a>';
} else {
2017-01-10 15:04:51 +01:00
echo '<a href=".">start refreshing</a>';
}
?>
2017-01-08 23:18:36 +01:00
| 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>
2017-01-10 15:04:51 +01:00
</div>
<noscript>
For full functionality of this site it is necessary to enable JavaScript.
Here are the <a href="http://www.enable-javascript.com/" target="_blank">
instructions how to enable JavaScript in your web browser</a>.
</noscript>
2016-04-30 15:38:12 +02:00
</body>
</html>
<?php
2017-01-10 15:04:51 +01:00
showLapTime("End of Page");
2016-10-26 09:46:15 +02:00
?>