MMDVMHost-Dashboard/include/localtx_ajax.php

75 lines
2.3 KiB
PHP
Raw Permalink Normal View History

2017-01-10 15:05:55 +01:00
<?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>
2017-03-02 16:56:46 +01:00
<div class="panel-body">
2017-01-10 15:05:55 +01:00
<!-- Tabelle -->
<div class="table-responsive">
<table id="localTx" class="table localTx table-condensed table-striped table-hover">
2017-01-10 15:05:55 +01:00
<thead>
<tr>
<th><?php echo _("Time"); ?> (<?php echo TIMEZONE;?>)</th>
<th><?php echo _("Mode"); ?></th>
<th><?php echo _("Callsign"); ?></th>
2017-01-10 15:05:55 +01:00
<?php
if (defined("ENABLEXTDLOOKUP")) {
?>
<th><?php echo _("Name"); ?></th>
2017-01-10 15:05:55 +01:00
<?php
}
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
2017-01-10 15:05:55 +01:00
?>
<th><?php echo _("DSTAR-ID"); ?></th>
<?php
}
?>
<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>";
?>
2017-01-10 15:05:55 +01:00
</tr>
</thead>
</table>
</div>
2017-03-02 16:56:46 +01:00
</div>
2017-01-10 15:05:55 +01:00
</div>
<script>
$(document).ready(function(){
var localTxT = $('#localTx').dataTable( {
"language": <?php echo DATATABLESTRANSLATION; ?>,
2017-01-10 15:05:55 +01:00
"aaSorting": [[0,'desc']],
<?php $request = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}/{$_SERVER['REQUEST_URI']}";
2017-01-10 15:05:55 +01:00
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>