2015-08-05 22:22:06 +02:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>OctopusNet</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/style.css">
|
|
|
|
<script type="text/javascript" src="/menu.js"></script>
|
|
|
|
<!-- Add included scripts here -->
|
|
|
|
<script type="text/javascript" src="/scifdb.lua"></script>
|
|
|
|
<script type="text/javascript" src="/scifsettings.lua"></script>
|
|
|
|
|
|
|
|
<!-- Add page scripts here -->
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
2019-07-29 17:19:08 +02:00
|
|
|
var xmlhttp = new XMLHttpRequest();
|
|
|
|
var url = "/octoserve/tunerstatus.json";
|
|
|
|
|
|
|
|
xmlhttp.onreadystatechange=function()
|
|
|
|
{
|
|
|
|
if (xmlhttp.readyState == 4 )
|
|
|
|
{
|
|
|
|
if( xmlhttp.status == 200 )
|
|
|
|
myFunction(xmlhttp.responseText);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function myFunction(response)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
var tl = JSON.parse(response);
|
|
|
|
for(i= 0; i < tl.TunerList.length; i++ )
|
|
|
|
document.getElementById("trTuner"+i).style.display = "table-row";
|
|
|
|
}
|
|
|
|
catch(err) {}
|
|
|
|
}
|
|
|
|
|
2015-08-05 22:22:06 +02:00
|
|
|
SCIFEnabled = false;
|
|
|
|
SelectedManufacturer = 0;
|
|
|
|
SelectedUnit = 0;
|
|
|
|
TunerList = new Array();
|
|
|
|
|
|
|
|
function SetManufacturer(ManuIndex)
|
|
|
|
{
|
|
|
|
if( SCIFEnabled ) document.getElementById("SetButton").disabled = false;
|
2019-07-29 17:19:08 +02:00
|
|
|
|
2015-08-05 22:22:06 +02:00
|
|
|
SelectedManufacturer = ManuIndex;
|
|
|
|
document.Unit.Select.length = 0;
|
|
|
|
for( j = 0; j < ManufacturerList[ManuIndex].UnitList.length; j++ )
|
|
|
|
{
|
|
|
|
document.Unit.Select.options[j] = new Option(ManufacturerList[ManuIndex].UnitList[j].Name,j, false, true);
|
2019-07-29 17:19:08 +02:00
|
|
|
}
|
2015-08-05 22:22:06 +02:00
|
|
|
SetUnit(ManufacturerList[ManuIndex].UnitList.length-1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function SetUnit(UnitIndex)
|
|
|
|
{
|
|
|
|
if( SCIFEnabled ) document.getElementById("SetButton").disabled = false;
|
|
|
|
|
|
|
|
SelectedUnit = UnitIndex;
|
2019-07-29 17:19:08 +02:00
|
|
|
|
2015-08-05 22:22:06 +02:00
|
|
|
for( i = 0; i < TunerList.length; i++ )
|
|
|
|
{
|
|
|
|
TunerList[i].Select.length = 1;
|
|
|
|
CurUnit = ManufacturerList[SelectedManufacturer].UnitList[UnitIndex];
|
|
|
|
for( j = 0; j < CurUnit.Frequencies.length; j++ )
|
|
|
|
{
|
|
|
|
TunerList[i].Select.options[j+1] = new Option('Slot ' + (j+1) + ': ' + CurUnit.Frequencies[j] + ' MHz',j+1,false,true);
|
|
|
|
}
|
|
|
|
if( i < CurUnit.Frequencies.length )
|
|
|
|
{
|
|
|
|
TunerList[i].Select.options[i+1].selected = true;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
TunerList[i].Select.options[0].selected = true;
|
|
|
|
}
|
2019-07-29 17:19:08 +02:00
|
|
|
}
|
2015-08-05 22:22:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function SetSlot(Tuner,SlotIndex)
|
|
|
|
{
|
|
|
|
if( SCIFEnabled ) document.getElementById("SetButton").disabled = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function SaveSettings()
|
|
|
|
{
|
|
|
|
if( SCIFEnabled )
|
|
|
|
{
|
2015-09-07 02:20:17 +02:00
|
|
|
CurUnit = ManufacturerList[SelectedManufacturer].UnitList[SelectedUnit];
|
2019-07-29 17:19:08 +02:00
|
|
|
Protocol = CurUnit.Protocol == "EN50607" ? '2' : '1';
|
2015-09-07 02:20:17 +02:00
|
|
|
param = 'Manufacturer='+SelectedManufacturer+'&Unit='+SelectedUnit+'&Type='+Protocol;
|
2015-08-05 22:22:06 +02:00
|
|
|
for( i = 0; i < TunerList.length; i++ )
|
|
|
|
{
|
|
|
|
param += '&Tuner'+(i+1)+'=';
|
|
|
|
SelectedFrequency = TunerList[i].Select.selectedIndex;
|
|
|
|
if( SelectedFrequency > 0 )
|
|
|
|
param += SelectedFrequency + ',' + CurUnit.Frequencies[SelectedFrequency-1];
|
|
|
|
else
|
2019-07-29 17:19:08 +02:00
|
|
|
param += '0';
|
2015-08-05 22:22:06 +02:00
|
|
|
}
|
2019-07-29 17:19:08 +02:00
|
|
|
|
2015-08-05 22:22:06 +02:00
|
|
|
location.replace('/scifsettings.lua?'+param);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
location.replace('/scifsettings.lua?reset');
|
|
|
|
}
|
2019-07-29 17:19:08 +02:00
|
|
|
|
2015-08-05 22:22:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function SetEnable()
|
|
|
|
{
|
|
|
|
SCIFEnabled = document.getElementById("EnableButton").checked;
|
|
|
|
document.getElementById("SetButton").disabled = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function OnLoad()
|
|
|
|
{
|
|
|
|
SCIFEnabled = false;
|
|
|
|
|
2019-07-29 17:19:08 +02:00
|
|
|
for( i = 0; i < 12 ; i++ )
|
|
|
|
{
|
|
|
|
TunerList[i] = document.getElementById("formTuner"+i);
|
|
|
|
}
|
2015-08-05 22:22:06 +02:00
|
|
|
|
|
|
|
document.Manufacturer.Select.length = 0;
|
|
|
|
for( i = 0; i < ManufacturerList.length ; i++ )
|
2019-07-29 17:19:08 +02:00
|
|
|
{
|
2015-08-05 22:22:06 +02:00
|
|
|
ManuName = ManufacturerList[i].Name;
|
|
|
|
if( ManuName == '' ) ManuName = "-----------------";
|
2019-07-29 17:19:08 +02:00
|
|
|
document.Manufacturer.Select.options[i] = new Option(ManuName,i, false, true);
|
2015-08-05 22:22:06 +02:00
|
|
|
}
|
2019-07-29 17:19:08 +02:00
|
|
|
|
2015-08-05 22:22:06 +02:00
|
|
|
for( i = 0; i < Tuner.length; i++ )
|
|
|
|
{
|
|
|
|
if( Tuner[i].Slot > 0 ) SCIFEnabled = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( SCIFEnabled )
|
|
|
|
{
|
|
|
|
document.Manufacturer.Select.selectedIndex = Manufacturer;
|
|
|
|
SetManufacturer(Manufacturer);
|
|
|
|
document.Unit.Select.selectedIndex = Unit;
|
|
|
|
SetUnit(Unit);
|
|
|
|
for( i = 0; i < Tuner.length; i++ )
|
|
|
|
{
|
|
|
|
if( i < TunerList.length )
|
|
|
|
{
|
|
|
|
TunerList[i].Select.selectedIndex = Tuner[i].Slot;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
document.Manufacturer.Select.selectedIndex = document.Manufacturer.Select.length - 1;
|
|
|
|
SetManufacturer(document.Manufacturer.Select.length - 1);
|
|
|
|
}
|
|
|
|
document.getElementById("EnableButton").checked = SCIFEnabled;
|
|
|
|
document.getElementById("SetButton").disabled = true;
|
|
|
|
|
2019-07-29 17:19:08 +02:00
|
|
|
xmlhttp.open("GET", url, true);
|
|
|
|
xmlhttp.send();
|
2015-08-05 22:22:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body onload="OnLoad()">
|
|
|
|
|
|
|
|
<table class="maintable" align="center">
|
|
|
|
<colgroup>
|
|
|
|
<col width="182px"/>
|
|
|
|
<col width="728px"/>
|
|
|
|
</colgroup>
|
|
|
|
<tr><td class="maintd" colspan="2">
|
|
|
|
<a href="http://www.digitaldevices.de"><img src="/BannerDD.jpg" alt="DD" width="910" height="130" /></a>
|
|
|
|
</td></tr>
|
|
|
|
<tr><td class="maintd" colspan="2"> </td></tr>
|
|
|
|
<tr>
|
|
|
|
<td class="maintd"><script type="text/javascript">CreateMenu();</script></td>
|
|
|
|
<td class="content">
|
|
|
|
<div>
|
|
|
|
<!-- Begin Content -->
|
|
|
|
<table align="center">
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
|
|
|
<td>
|
|
|
|
<form action="">
|
2019-07-29 17:19:08 +02:00
|
|
|
<input id="EnableButton" type="checkbox" value="Check" checked="false" onclick="SetEnable()">
|
2016-06-28 20:34:36 +02:00
|
|
|
Enable Unicable (EN 50494 / EN 50607)
|
2015-08-05 22:22:06 +02:00
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Manufacturer</td>
|
|
|
|
<td>
|
|
|
|
<form name="Manufacturer" action="">
|
|
|
|
<select name="Select" size="1" style="width: 300px" onchange="SetManufacturer(document.Manufacturer.Select.selectedIndex)" >
|
|
|
|
<option>----</option>
|
|
|
|
</select>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Unit</td>
|
|
|
|
<td>
|
|
|
|
<form name="Unit" action="">
|
|
|
|
<select name="Select" size="1" style="width: 300px" onchange="SetUnit(document.Unit.Select.selectedIndex)">
|
|
|
|
<option>----</option>
|
|
|
|
</select>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2019-07-29 17:19:08 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
for( var i = 0; i < 12 ; i++ )
|
|
|
|
{
|
|
|
|
// document.write('<tr id="trTuner'+i+'">');
|
|
|
|
document.write('<tr id="trTuner'+i+'" style="display:none">');
|
|
|
|
document.write('<td>Tuner ' + (i+1) + '</td>');
|
|
|
|
document.write('<td>');
|
|
|
|
document.write('<form name="Tuner'+(i+1)+'" id="formTuner'+i+'" action="">');
|
|
|
|
document.write('<select name="Select" size="1" style="width: 300px" onchange="SetSlot(1,document.Tuner' +(i+1)+'.Select.selectedIndex)">');
|
|
|
|
document.write('</option>----</option>');
|
|
|
|
document.write('</select>');
|
|
|
|
document.write('</form>');
|
|
|
|
document.write('</td>');
|
|
|
|
document.write('</tr>');
|
|
|
|
}
|
|
|
|
</script>
|
2015-08-05 22:22:06 +02:00
|
|
|
|
|
|
|
<tr><td colspan="2" align="right">
|
|
|
|
<div style="width: 300px">
|
2015-12-07 15:05:09 +01:00
|
|
|
<form name="SetSCIF" action="">
|
2015-08-05 22:22:06 +02:00
|
|
|
<input type="Button" value="Cancel" onclick="location.replace('index.html')" >
|
|
|
|
<input id="SetButton" type="Button" value="Set" onclick="SaveSettings()" >
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
2019-07-29 17:19:08 +02:00
|
|
|
|
2015-08-05 22:22:06 +02:00
|
|
|
<!-- End Content -->
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr><td colspan="2"> </td></tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|