MMDVMHost-Dashboard/include/txinfo.php

115 lines
2.9 KiB
PHP
Raw Normal View History

2017-01-10 15:05:55 +01:00
<div class="panel panel-default">
<!-- Standard-Panel-Inhalt -->
<div class="panel-heading"><?php echo _("Currently TXing"); ?><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="currtx" class="table curTx 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
}
2017-02-13 22:31:27 +01:00
if (defined("TALKERALIAS")) {
2017-01-10 15:05:55 +01:00
?>
<th><?php echo _("Talker Alias"); ?></th>
2017-02-13 22:31:27 +01:00
<?php
}
?>
<th><?php echo _("DSTAR-ID"); ?></th>
<th><?php echo _("Target"); ?></th>
<th><?php echo _("Source"); ?></th>
<th><?php echo _("TX-Time"); ?></th>
2017-01-10 15:05:55 +01:00
</tr>
</thead>
<tbody id="txline">
</tbody>
</table>
</div>
</div>
2017-03-02 16:56:46 +01:00
</div>
2017-01-10 15:05:55 +01:00
<script>
function doXMLHTTPRequest(scriptname, elem) {
var xmlhttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
document.getElementById(elem).innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET",scriptname,true);
xmlhttp.send();
}
function refreshMode() {
doXMLHTTPRequest("ajax.php?section=mode","mode");
}
2017-05-07 14:21:21 +02:00
function refreshDstarLink() {
doXMLHTTPRequest("ajax.php?section=dstarlink","dstarlink");
}
function refreshYSFLink() {
doXMLHTTPRequest("ajax.php?section=ysflink","ysflink");
}
function refreshDMR1Link() {
doXMLHTTPRequest("ajax.php?section=dmr1link","dmr1link");
}
function refreshDMR2Link() {
doXMLHTTPRequest("ajax.php?section=dmr2link","dmr2link");
}
2017-01-10 15:05:55 +01:00
var transmitting = false;
function loadXMLDoc() {
var xmlhttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
document.getElementById("txline").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","txinfo.php",true);
xmlhttp.send();
var timeout = window.setTimeout("loadXMLDoc()", 1000);
refreshMode();
2017-05-07 14:21:21 +02:00
<?php
if (getEnabled("D-Star", $mmdvmconfigs) == 1) {
?>
refreshDstarLink();
<?php
}
?>
<?php
if (getEnabled("System Fusion", $mmdvmconfigs) == 1) {
?>refreshYSFLink();
<?php
}
?>
<?php
if (getEnabled("DMR", $mmdvmconfigs) == 1) {
?>refreshDMR1Link();
refreshDMR2Link();
<?php
}
?>
2017-01-10 15:05:55 +01:00
}
loadXMLDoc();
</script>