2016-10-07 21:24:26 +02:00
|
|
|
<?php
|
|
|
|
$totalLH = count($lastHeard);
|
|
|
|
?>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<!-- Standard-Panel-Inhalt -->
|
|
|
|
<div class="panel-heading">Last Heard List of today's <?php echo $totalLH; ?> callsigns.</div>
|
|
|
|
<!-- Tabelle -->
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table id="lastHeard" class="table table-condensed table-striped table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Time (UTC)</th>
|
|
|
|
<th>Mode</th>
|
|
|
|
<th>Callsign</th>
|
|
|
|
<?php
|
|
|
|
if (defined("ENABLEXTDLOOKUP")) {
|
|
|
|
?>
|
|
|
|
<th>Name</th>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<th>DSTAR-ID</th>
|
|
|
|
<th>Target</th>
|
|
|
|
<th>Source</th>
|
|
|
|
<th>Dur (s)</th>
|
|
|
|
<th>Loss</th>
|
|
|
|
<th>BER</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-10-12 22:31:36 +02:00
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
var lastHeardT = $('#lastHeard').dataTable( {
|
|
|
|
"aaSorting": [[0,'desc']],
|
|
|
|
"ajax": '<?php
|
|
|
|
$protocol = "http";
|
|
|
|
if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443)
|
|
|
|
$protocol = "https";
|
|
|
|
echo $protocol."://";
|
|
|
|
$base_dir = __DIR__;// Absolute path to your installation, ex: /var/www/mywebsite
|
|
|
|
$base_dir = substr($basedir,0,strpos($basedir,"include"));
|
|
|
|
$doc_root = preg_replace("!${_SERVER['SCRIPT_NAME']}$!", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www
|
|
|
|
echo $_SERVER['HTTP_HOST'].preg_replace("!^${doc_root}!", '', $base_dir) ?>/ajax.php?section=lastHeard',
|
|
|
|
"deferRender": true
|
|
|
|
} );
|
2016-10-07 21:24:26 +02:00
|
|
|
|
2016-10-12 22:31:36 +02:00
|
|
|
<?php
|
|
|
|
if (!isset($_GET['stoprefresh'])) {
|
|
|
|
?>
|
|
|
|
setInterval( function () {
|
|
|
|
lastHeardT.api().ajax.reload( );
|
|
|
|
}, <?php echo REFRESHAFTER * 1000 ?> );
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
});
|
|
|
|
</script>
|