This commit is contained in:
parent
2e224eea7c
commit
f038fcdb0d
7 changed files with 75 additions and 9 deletions
|
@ -340,9 +340,9 @@ function getHeardList($logLines, $onlyLast) {
|
||||||
if ( strlen($callsign) < 11 ) {
|
if ( strlen($callsign) < 11 ) {
|
||||||
$name = "";
|
$name = "";
|
||||||
if (defined("ENABLEXTDLOOKUP")) {
|
if (defined("ENABLEXTDLOOKUP")) {
|
||||||
array_push($heardList, array($timestamp, $mode, $callsign, $name, $id, $target, $source, $duration, $loss, $ber));
|
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $name, $id, $target, $source, $duration, $loss, $ber));
|
||||||
} else {
|
} else {
|
||||||
array_push($heardList, array($timestamp, $mode, $callsign, $id, $target, $source, $duration, $loss, $ber));
|
array_push($heardList, array(convertTimezone($timestamp), $mode, $callsign, $id, $target, $source, $duration, $loss, $ber));
|
||||||
}
|
}
|
||||||
$duration = "";
|
$duration = "";
|
||||||
$loss ="";
|
$loss ="";
|
||||||
|
|
|
@ -9,7 +9,7 @@ $totalLH = count($lastHeard);
|
||||||
<table id="lastHeard" class="table table-condensed table-striped table-hover">
|
<table id="lastHeard" class="table table-condensed table-striped table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Time (UTC)</th>
|
<th>Time (<?php echo TIMEZONE;?>)</th>
|
||||||
<th>Mode</th>
|
<th>Mode</th>
|
||||||
<th>Callsign</th>
|
<th>Callsign</th>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -9,7 +9,7 @@ $totalLH = count($lastHeard);
|
||||||
<table id="localTx" class="table table-condensed table-striped table-hover">
|
<table id="localTx" class="table table-condensed table-striped table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Time (UTC)</th>
|
<th>Time (<?php echo TIMEZONE;?>)</th>
|
||||||
<th>Mode</th>
|
<th>Mode</th>
|
||||||
<th>Callsign</th>
|
<th>Callsign</th>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -106,4 +106,10 @@ function showLapTime($func) {
|
||||||
?><script>console.log('<?php echo $func . ": ". getLapTime(); ?> sec.');</script><?php
|
?><script>console.log('<?php echo $func . ": ". getLapTime(); ?> sec.');</script><?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function convertTimezone($timestamp) {
|
||||||
|
$date = new DateTime($timestamp);
|
||||||
|
$date->setTimezone(new DateTimeZone(TIMEZONE));
|
||||||
|
return $date->format('Y-m-d H:i:s');
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -98,9 +98,11 @@ if (defined("ENABLEYSFGATEWAY")) {
|
||||||
?>
|
?>
|
||||||
<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");
|
||||||
echo "MMDVMHost-Dashboard V ".VERSION." | Last Reload $datum, $uhrzeit";
|
$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 = microtime();
|
||||||
$time = explode(' ', $time);
|
$time = explode(' ', $time);
|
||||||
$time = $time[1] + $time[0];
|
$time = $time[1] + $time[0];
|
||||||
|
|
58
setup.php
58
setup.php
|
@ -123,6 +123,64 @@ include "include/tools.php";
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Global Configuration</h2>
|
<h2>Global Configuration</h2>
|
||||||
|
<?php
|
||||||
|
function get_tz_options($selectedzone, $label, $desc = '') {
|
||||||
|
echo '<div class="input-group">';
|
||||||
|
echo '<span class="input-group-addon" id="TIMEZONE" style="width: 300px">Timezone</span>';
|
||||||
|
echo '<div class="input"><select name="TIMEZONE">';
|
||||||
|
function timezonechoice($selectedzone) {
|
||||||
|
$all = timezone_identifiers_list();
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
foreach($all AS $zone) {
|
||||||
|
$zone = explode('/',$zone);
|
||||||
|
$zonen[$i]['continent'] = isset($zone[0]) ? $zone[0] : '';
|
||||||
|
$zonen[$i]['city'] = isset($zone[1]) ? $zone[1] : '';
|
||||||
|
$zonen[$i]['subcity'] = isset($zone[2]) ? $zone[2] : '';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
asort($zonen);
|
||||||
|
$structure = '';
|
||||||
|
foreach($zonen AS $zone) {
|
||||||
|
extract($zone);
|
||||||
|
// if($continent == 'Africa' || $continent == 'America' || $continent == 'Antarctica' || $continent == 'Arctic' || $continent == 'Asia' || $continent == 'Atlantic' || $continent == 'Australia' || $continent == 'Europe' || $continent == 'Indian' || $continent == 'Pacific') {
|
||||||
|
if(!isset($selectcontinent)) {
|
||||||
|
$structure .= '<optgroup label="'.$continent.'">'; // continent
|
||||||
|
} elseif($selectcontinent != $continent) {
|
||||||
|
$structure .= '</optgroup><optgroup label="'.$continent.'">'; // continent
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($city) != ''){
|
||||||
|
if (!empty($subcity) != ''){
|
||||||
|
$city = $city . '/'. $subcity;
|
||||||
|
}
|
||||||
|
if ($continent != "UTC") {
|
||||||
|
$structure .= "<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected "':'')." value=\"".($continent.'/'.$city)."\">".str_replace('_',' ',$city)."</option>"; //Timezone
|
||||||
|
} else {
|
||||||
|
$structure .= "<option ".(("UTC"==$selectedzone)?'selected="selected "':'')." value=\"UTC\">UTC</option>"; //Timezone
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!empty($subcity) != ''){
|
||||||
|
$city = $city . '/'. $subcity;
|
||||||
|
}
|
||||||
|
$structure .= "<option ".(($continent==$selectedzone)?'selected="selected "':'')." value=\"".$continent."\">".$continent."</option>"; //Timezone
|
||||||
|
}
|
||||||
|
|
||||||
|
$selectcontinent = $continent;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
$structure .= '</optgroup>';
|
||||||
|
return $structure;
|
||||||
|
}
|
||||||
|
echo timezonechoice($selectedzone);
|
||||||
|
echo '</select>';
|
||||||
|
echo '</input>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
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">
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
define("VERSION", "20161103-2");
|
define("VERSION", "20161103-3");
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue