mirror of
https://github.com/DigitalDevices/octonet.git
synced 2023-10-10 11:36:52 +00:00
added octoserve
This commit is contained in:
BIN
octoserve/var/www/BannerDD.jpg
Normal file
BIN
octoserve/var/www/BannerDD.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
670
octoserve/var/www/SCIFDataBase.xml
Normal file
670
octoserve/var/www/SCIFDataBase.xml
Normal file
@@ -0,0 +1,670 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- (c)2012 Digital Devices GmbH. All rights reserved -->
|
||||
<!-- $Id: SCIFDataBase.xml 590 2014-12-11 13:07:00Z manfred $ -->
|
||||
<SCIFDataBase xmlns="http://schemas.DigitalDevices.de/SCIFDataBase">
|
||||
<OutdoorUnit Name="IDLP-40UNIDQ+S" Manufacturer="Inverto" Type="LNB">
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
<UBSlot Frequency="1210"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLQ-QUDL41-UNI2L-OPP" Manufacturer="Inverto" Type="LNB">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLB-QUDL41-UNI1L-1PP" Manufacturer="Inverto" Type="LNB">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLP-USS200-CU010-8PP" Manufacturer="Inverto" Type="Switch">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLP-USS111-CU010-8PP" Manufacturer="Inverto" Type="Switch">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="IDLP-UST101-CU010-4PP" Manufacturer="Inverto" Type="Switch">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="TechniRouter 5/1x8" Manufacturer="TechniSat" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="TechniRouter 9/1x8" Manufacturer="TechniSat" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="TechniRouter 5/2x4" Manufacturer="TechniSat" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="TechniRouter 9/2x4" Manufacturer="TechniSat" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="TechniRouter Mini 2/1x2" Manufacturer="TechniSat" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXR 1581/2581" Manufacturer="Kathrein" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXR 1981/2981" Manufacturer="Kathrein" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXR 1541/2541" Manufacturer="Kathrein" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXR 1542/2542" Manufacturer="Kathrein" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXR 1942/2942" Manufacturer="Kathrein" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXU 908" Manufacturer="Kathrein" Type="Switch" PinProtected="true">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="UAS 481" Manufacturer="Kathrein" Type="LNB">
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXR 501" Manufacturer="Kathrein" Type="Switch">
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXR 551" Manufacturer="Kathrein" Type="Switch">
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="EXR 552" Manufacturer="Kathrein" Type="Switch">
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DY 64 1810/2410" Manufacturer="Wisi" Type="Switch">
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
<UBSlot Frequency="1892"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DY 68 1810/2410" Manufacturer="Wisi" Type="Switch">
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
<UBSlot Frequency="1892"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="OC 05" Manufacturer="Wisi" Type="LNB">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DUR-Line VDU583NT" Manufacturer="Dura-Sat" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DUR-Line VDU563NT" Manufacturer="Dura-Sat" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DUR-Line VDU543NT" Manufacturer="Dura-Sat" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="UCP3" Manufacturer="Dura-Sat" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DUR-Line UCP18" Manufacturer="Dura-Sat" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="Dur-Line LNB" Manufacturer="Dura-Sat" Type="LNB">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SMUC 58-NT/DC" Manufacturer="Resch" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SMUC 98-NT/DC" Manufacturer="Resch" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUM 514 K" Manufacturer="DCT DELTA" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUM 516 K" Manufacturer="DCT DELTA" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUM 518" Manufacturer="DCT DELTA" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUM 918" Manufacturer="DCT DELTA" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUM 928" Manufacturer="DCT DELTA" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DELEinkSUM518" Manufacturer="Profiline" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DELEinkSUM918" Manufacturer="Profiline" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DELEinkSUM928" Manufacturer="Profiline" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SCRQD" Manufacturer="E-Tronix" Type="LNB">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="LNB UNIC" Manufacturer="Radix" Type="LNB">
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
<UBSlot Frequency="1210"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="TMU 518" Manufacturer="Hirschmann" Type="Switch">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="KR 5-1-8 UNI" Manufacturer="Kreiling" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="MS8/1(8)PIN-4" Manufacturer="EMP Centauri" Type="Switch">
|
||||
<UBSlot Frequency="1080"/>
|
||||
<UBSlot Frequency="1176"/>
|
||||
<UBSlot Frequency="1237"/>
|
||||
<UBSlot Frequency="1413"/>
|
||||
<UBSlot Frequency="1555"/>
|
||||
<UBSlot Frequency="1668"/>
|
||||
<UBSlot Frequency="1842"/>
|
||||
<UBSlot Frequency="1960"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="P.200-P" Manufacturer="EMP Centauri" Type="Switch">
|
||||
<UBSlot Frequency="1080"/>
|
||||
<UBSlot Frequency="1176"/>
|
||||
<UBSlot Frequency="1237"/>
|
||||
<UBSlot Frequency="1413"/>
|
||||
<UBSlot Frequency="1555"/>
|
||||
<UBSlot Frequency="1668"/>
|
||||
<UBSlot Frequency="1842"/>
|
||||
<UBSlot Frequency="1960"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SMUC 58-NT" Manufacturer="Switch Master" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SMUC 58-DC" Manufacturer="Switch Master" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SMUC 98-NT" Manufacturer="Switch Master" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SMUC 98-DC" Manufacturer="Switch Master" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="DPA 51" Manufacturer="SMART electronic" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SES 56-09" Manufacturer="Axing" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SES 556-09/-19" Manufacturer="Axing" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="MSU 518 NG/K" Manufacturer="Preisner" Type="Switch">
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
<UBSlot Frequency="1892"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SAM 81 KT" Manufacturer="Arcon" Type="Switch">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SDUC 502/902" Manufacturer="Grundig SAT Systems" Type="Switch">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS 5581/33 NF (8x1 Mode)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1068"/>
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS 5581/33 NF (3x3 Mode, Output 1)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1068"/>
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS 5581/33 NF (3x3 Mode, Output 2)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS 5581/33 NF (3x3 Mode, Output 3)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS 5581/33 NF Legacy (8x1 Mode)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="974"/>
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS 5581/33 NF Legacy (3x3 Mode, Output 1)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="974"/>
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS 5581/33 NF Legacy (3x3 Mode, Output 2)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SUS 5581/33 NF Legacy (3x3 Mode, Output 3)" Manufacturer="Spaun" Type="Switch">
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SAS 3NT" Manufacturer="SAS 3NT" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="SPS1008-3NT" Manufacturer="STG Kommunikation" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPSxxxx-3A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPSxxxx-6A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPSxxxx-8A/T/TN" Manufacturer="Jultec" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JPSxxxx-12AN/TN " Manufacturer="Jultec" Type="Switch" Protocol="EN50607">
|
||||
<UBSlot Frequency="974"/>
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
<UBSlot Frequency="1892"/>
|
||||
<UBSlot Frequency="1994"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JRS0502-2+4T" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JRS0504-2A/T" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="JRS0904-2A/T" Manufacturer="Jultec" Type="Switch">
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="GT-S3SCR4" Manufacturer="GT-SAT" Type="LNB">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="GT-S2SCR4" Manufacturer="GT-SAT" Type="LNB">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="GT-S1SCR4" Manufacturer="GT-SAT" Type="LNB">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="GT-DLNB1T" Manufacturer="GT-SAT" Type="LNB" Protocol="EN50607">
|
||||
<UBSlot Frequency="975"/>
|
||||
<UBSlot Frequency="1025"/>
|
||||
<UBSlot Frequency="1075"/>
|
||||
<UBSlot Frequency="1125"/>
|
||||
<UBSlot Frequency="1175"/>
|
||||
<UBSlot Frequency="1225"/>
|
||||
<UBSlot Frequency="1275"/>
|
||||
<UBSlot Frequency="1325"/>
|
||||
<UBSlot Frequency="1375"/>
|
||||
<UBSlot Frequency="1425"/>
|
||||
<UBSlot Frequency="1475"/>
|
||||
<UBSlot Frequency="1525"/>
|
||||
<UBSlot Frequency="1575"/>
|
||||
<UBSlot Frequency="1625"/>
|
||||
<UBSlot Frequency="1675"/>
|
||||
<UBSlot Frequency="1725"/>
|
||||
<UBSlot Frequency="1775"/>
|
||||
<UBSlot Frequency="1825"/>
|
||||
<UBSlot Frequency="1875"/>
|
||||
<UBSlot Frequency="1925"/>
|
||||
<UBSlot Frequency="1975"/>
|
||||
<UBSlot Frequency="2025"/>
|
||||
<UBSlot Frequency="2075"/>
|
||||
<UBSlot Frequency="2125"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="4 Slots (1680,1420,2040,1210)">
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
<UBSlot Frequency="1210"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="4 Slots (1210,1420,1680,2040)">
|
||||
<UBSlot Frequency="1210"/>
|
||||
<UBSlot Frequency="1420"/>
|
||||
<UBSlot Frequency="1680"/>
|
||||
<UBSlot Frequency="2040"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="4 Slots (1284,1400,1516,1632)">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="8 Slots (1284,1400,1516,...)">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="8 Slots (1284,1400,1516,...) Pin protected" PinProtected="true">
|
||||
<UBSlot Frequency="1284"/>
|
||||
<UBSlot Frequency="1400"/>
|
||||
<UBSlot Frequency="1516"/>
|
||||
<UBSlot Frequency="1632"/>
|
||||
<UBSlot Frequency="1748"/>
|
||||
<UBSlot Frequency="1864"/>
|
||||
<UBSlot Frequency="1980"/>
|
||||
<UBSlot Frequency="2096"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="8 Slots (1076,1178,1280,...)">
|
||||
<UBSlot Frequency="1076"/>
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
</OutdoorUnit>
|
||||
<OutdoorUnit Name="8 Slots (1178,1280,1382...)">
|
||||
<UBSlot Frequency="1178"/>
|
||||
<UBSlot Frequency="1280"/>
|
||||
<UBSlot Frequency="1382"/>
|
||||
<UBSlot Frequency="1484"/>
|
||||
<UBSlot Frequency="1586"/>
|
||||
<UBSlot Frequency="1688"/>
|
||||
<UBSlot Frequency="1790"/>
|
||||
<UBSlot Frequency="1892"/>
|
||||
</OutdoorUnit>
|
||||
</SCIFDataBase>
|
55
octoserve/var/www/beta.html
Normal file
55
octoserve/var/www/beta.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!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 -->
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<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 cellpadding="2px" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="beta.lua" method="get">
|
||||
<input type="hidden" name="set" value="beta" >
|
||||
<input type="submit" value="Select Beta Update Server">
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="beta.lua" method="get">
|
||||
<input type="hidden" name="set" value="std" >
|
||||
<input type="submit" value="Select Standard Update Server">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
31
octoserve/var/www/beta.lua
Normal file
31
octoserve/var/www/beta.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
function http_print(s)
|
||||
if s then
|
||||
io.stdout:write(tostring(s).."\r\n")
|
||||
else
|
||||
io.stdout:write("\r\n")
|
||||
end
|
||||
end
|
||||
|
||||
local userver = "download.digital-devices.de/download/linux"
|
||||
|
||||
if query == "set=beta" then
|
||||
local file = io.open("/config/updateserver","w")
|
||||
if file then
|
||||
file:write(userver.."/beta/".."\n")
|
||||
file:close()
|
||||
end
|
||||
elseif query == "set=std" then
|
||||
os.remove("/config/updateserver")
|
||||
os.execute("rm -f /config/octonet.*.img")
|
||||
os.execute("rm -f /config/octonet.*.sha")
|
||||
end
|
||||
|
||||
http_print(proto.." 303")
|
||||
http_print("Location: http://"..host.."/update.html")
|
||||
http_print("")
|
367
octoserve/var/www/browsertv.html
Normal file
367
octoserve/var/www/browsertv.html
Normal file
@@ -0,0 +1,367 @@
|
||||
<!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="/systeminfo.lua"></script>
|
||||
<script type="text/javascript">Octoserve = false;</script>
|
||||
<script type="text/javascript" src="/octoserve/serverinfo.js"></script>
|
||||
<script type="text/javascript" src="/btvchannels.lua"></script>
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
var VLCPluginValid = false;
|
||||
var VLCPlugin;
|
||||
var RTSPLink = false;
|
||||
|
||||
if( browserType == "Netscape" )
|
||||
{
|
||||
if( browserPlatform == "ipad" )
|
||||
{
|
||||
RTSPLink = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
for(var i = 0; i < navigator.plugins.length; i++ )
|
||||
{
|
||||
var t = navigator.plugins[i].name + " " + navigator.plugins[i].version;
|
||||
|
||||
if( navigator.plugins[i].name == "VLC Web Plugin" )
|
||||
{
|
||||
VLCPlugin = navigator.plugins[i];
|
||||
if( browserPlatform == "win" )
|
||||
{
|
||||
if( navigator.plugins[i].version >= "2.0.6.0" ) VLCPluginValid = true;
|
||||
}
|
||||
else if( browserPlatform == "linux" )
|
||||
{
|
||||
VLCPluginValid = true;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var CurTracks = new Array();
|
||||
|
||||
var SelectedSource = 0;
|
||||
var SelectedChannel = 0;
|
||||
var SourceList = new Array();
|
||||
|
||||
function PlayEvent()
|
||||
{
|
||||
// var vlc = document.getElementById("vlcplayer");
|
||||
// var vlc = getVLC("vlcplayer");
|
||||
var vlc = vlcplayer;
|
||||
var options = new Array();
|
||||
var t = "rtsp://"+host+"/"+this.PlayRequest;
|
||||
vlc.playlist.clear();
|
||||
var id = vlc.playlist.add(t, this.PlayName, options);
|
||||
vlc.playlist.playItem(id);
|
||||
CurTracks = this.PlayTracks;
|
||||
|
||||
document.getElementById("nowplaying").firstChild.nodeValue = this.PlayName;
|
||||
document.getElementById("ac0").disabled = CurTracks.length < 1;
|
||||
document.getElementById("ac1").disabled = CurTracks.length < 2;
|
||||
document.getElementById("ac2").disabled = CurTracks.length < 3;
|
||||
document.getElementById("ac3").disabled = CurTracks.length < 4;
|
||||
}
|
||||
|
||||
function SetAudioChannel(ac)
|
||||
{
|
||||
var vlc = vlcplayer;
|
||||
if( ac < CurTracks.length ) vlc.audio.track = CurTracks[ac];
|
||||
}
|
||||
|
||||
function MuteAudio()
|
||||
{
|
||||
var vlc = vlcplayer;
|
||||
vlc.audio.mute = !vlc.audio.mute;
|
||||
}
|
||||
|
||||
|
||||
function AddRow(table,name,request,tracks)
|
||||
{
|
||||
var row = document.createElement("tr");
|
||||
|
||||
var col = document.createElement("td");
|
||||
var txt = document.createTextNode(name);
|
||||
col.appendChild(txt);
|
||||
row.appendChild(col);
|
||||
|
||||
col = document.createElement("td");
|
||||
if( RTSPLink )
|
||||
{
|
||||
var t = "rtsp://"+host+"/"+request;
|
||||
var a = document.createElement("a");
|
||||
a.setAttribute("href",t);
|
||||
a.appendChild(document.createTextNode("Play"));
|
||||
col.appendChild(a);
|
||||
}
|
||||
else
|
||||
{
|
||||
var form = document.createElement("form");
|
||||
form.setAttribute("action", "");
|
||||
|
||||
var field = document.createElement("input");
|
||||
field.setAttribute("type", "button");
|
||||
field.setAttribute("value", "Play");
|
||||
//field.setAttribute("onclick", "Play("+name+","+request+")");
|
||||
//field.onclick = "Play("+name+","+request+")";
|
||||
field.PlayName = name;
|
||||
field.PlayRequest = request;
|
||||
field.PlayTracks = tracks;
|
||||
field.addEventListener("click",PlayEvent);
|
||||
form.appendChild(field);
|
||||
|
||||
col.appendChild(form);
|
||||
}
|
||||
row.appendChild(col);
|
||||
|
||||
table.appendChild(row);
|
||||
}
|
||||
|
||||
function NameCompare(a,b)
|
||||
{
|
||||
if( a.name.toUpperCase() < b.name.toUpperCase() ) return -1;
|
||||
if( a.name.toUpperCase() > b.name.toUpperCase() ) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
if( !RTSPLink )
|
||||
{
|
||||
document.getElementById("Play").style.display = "none";
|
||||
}
|
||||
if( VLCPluginValid || RTSPLink )
|
||||
{
|
||||
var hasCable = false;
|
||||
var hasSat = false;
|
||||
|
||||
for(var i = 0; i < Octoserve.TunerList.length; i++ )
|
||||
{
|
||||
if( Octoserve.TunerList[i] )
|
||||
{
|
||||
if( Octoserve.TunerList[i].Desc.indexOf("C/T") >= 0 ) hasCable = true;
|
||||
if( Octoserve.TunerList[i].Desc.indexOf("C/C2") >= 0 ) hasCable = true;
|
||||
if( Octoserve.TunerList[i].Desc.indexOf("S/S2") >= 0 ) hasSat = true;
|
||||
}
|
||||
}
|
||||
|
||||
document.Source.Select.length = 0;
|
||||
var index = 0
|
||||
if( hasSat )
|
||||
{
|
||||
SourceListSat.sort(NameCompare);
|
||||
for(var i = 0; i < SourceListSat.length; i++ )
|
||||
{
|
||||
SourceList[index] = SourceListSat[i];
|
||||
document.Source.Select.options[index] = new Option(SourceListSat[i].name,index, false, true);
|
||||
index = index + 1;
|
||||
}
|
||||
}
|
||||
|
||||
if( hasCable )
|
||||
{
|
||||
SourceListCable.sort(NameCompare);
|
||||
for(var i = 0; i < SourceListCable.length; i++ )
|
||||
{
|
||||
SourceList[index] = SourceListCable[i];
|
||||
document.Source.Select.options[index] = new Option(SourceListCable[i].name,index, false, true);
|
||||
index = index + 1;
|
||||
}
|
||||
}
|
||||
|
||||
for(var i = 0; i < SourceList.length; i++ )
|
||||
{
|
||||
SourceList[i].ChannelList.sort(NameCompare);
|
||||
}
|
||||
|
||||
|
||||
document.Source.Select.selectedIndex = 0;
|
||||
SetSource(0);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("channeltable").style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function CreatePlugin()
|
||||
{
|
||||
document.getElementById("ControlPlugin").style.display = "none";
|
||||
if( browserType == "Netscape" )
|
||||
{
|
||||
if( RTSPLink )
|
||||
{
|
||||
document.write('NOTE: Requires VLC App or similar with RTSP support');
|
||||
return;
|
||||
}
|
||||
else if( VLCPlugin && !VLCPluginValid )
|
||||
{
|
||||
document.write("Invalid VLC Plugin found: "+ VLCPlugin.version + "<br/>" + browserPlatform + "<br/>");
|
||||
document.write('Check for new Version on <a href="http://www.videolan.org">VLC Mediaplayer</a>');
|
||||
return;
|
||||
}
|
||||
|
||||
if( VLCPluginValid )
|
||||
{
|
||||
document.getElementById("ControlPlugin").style.display = "block";
|
||||
document.write('<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" width="640" height="480" id="vlcplayer">');
|
||||
document.write('</embed>');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( browserPlatform == "win" || browserPlatform == "linux" )
|
||||
{
|
||||
document.write('Install <a href="http://www.videolan.org">VLC Mediaplayer</a> for in Browser TV');
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (browserType == "MSIE" )
|
||||
{
|
||||
document.write('Install <a href="http://www.mozilla.org">Firefox</a> and <a href="http://www.videolan.org">VLC Mediaplayer</a> for in Browser TV: ');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function SetSource(SourceIndex)
|
||||
{
|
||||
SelectedSource = SourceIndex;
|
||||
document.Channel.Select.length = 0;
|
||||
var i = -1;
|
||||
for( j = 0; j < SourceList[SourceIndex].ChannelList.length; j++ )
|
||||
{
|
||||
document.Channel.Select.options[j] = new Option(SourceList[SourceIndex].ChannelList[j].name,j, false, true);
|
||||
if( i < 0 && SourceList[SourceIndex].ChannelList[j].name.toUpperCase() >= "DAS ERSTE" ) i = j;
|
||||
}
|
||||
if( i < 0 ) i = 0;
|
||||
document.Channel.Select.selectedIndex = i;
|
||||
SetChannel(i);
|
||||
}
|
||||
|
||||
function SetChannel(ChannelIndex)
|
||||
{
|
||||
SelectedChannel = ChannelIndex;
|
||||
var a = document.getElementById("Play");
|
||||
if( RTSPLink )
|
||||
{
|
||||
var t = "rtsp://"+host+"/"+SourceList[SelectedSource].ChannelList[ChannelIndex].request;
|
||||
a.href = t;
|
||||
}
|
||||
else
|
||||
{
|
||||
var t = "rtsp://"+host+"/"+SourceList[SelectedSource].ChannelList[ChannelIndex].request;
|
||||
var vlc = vlcplayer;
|
||||
var options = new Array();
|
||||
vlc.playlist.clear();
|
||||
var id = vlc.playlist.add(t, SourceList[SelectedSource].ChannelList[ChannelIndex].name, options);
|
||||
vlc.playlist.playItem(id);
|
||||
CurTracks = SourceList[SelectedSource].ChannelList[ChannelIndex].tracks;
|
||||
|
||||
document.getElementById("nowplaying").firstChild.nodeValue = SourceList[SelectedSource].ChannelList[ChannelIndex].name;
|
||||
document.getElementById("ac0").disabled = CurTracks.length < 1;
|
||||
document.getElementById("ac1").disabled = CurTracks.length < 2;
|
||||
document.getElementById("ac2").disabled = CurTracks.length < 3;
|
||||
document.getElementById("ac3").disabled = CurTracks.length < 4;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</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 cellpadding="2px" align="center">
|
||||
<tr><td>
|
||||
<div id="ControlPlugin">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><div align="left" id="nowplaying"> </div></td>
|
||||
<td><div align="right">
|
||||
<form action="">
|
||||
Audio:
|
||||
<input id="ac0" type="Button" Value="1" onclick="SetAudioChannel(0)"/>
|
||||
<input id="ac1" type="Button" Value="2" onclick="SetAudioChannel(1)"/>
|
||||
<input id="ac2" type="Button" Value="3" onclick="SetAudioChannel(2)"/>
|
||||
<input id="ac3" type="Button" Value="4" onclick="SetAudioChannel(3)"/>
|
||||
<input type="Button" Value="Mute" onclick="MuteAudio()"/>
|
||||
</form>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td></tr>
|
||||
|
||||
|
||||
<tr><td>
|
||||
<script type="text/javascript">CreatePlugin();</script></td>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<div id="channeltable">
|
||||
<table cellpadding="2px" align="center">
|
||||
<tr>
|
||||
<td>Source</td>
|
||||
<td>
|
||||
<form name="Source" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSource(document.Source.Select.selectedIndex)" >
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Channel</td>
|
||||
<td>
|
||||
<form name="Channel" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetChannel(document.Channel.Select.selectedIndex)">
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<div id="playlink" align="center" >
|
||||
<a id="Play" href="">Play</a>
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
129
octoserve/var/www/btvchannels.lua
Normal file
129
octoserve/var/www/btvchannels.lua
Normal file
@@ -0,0 +1,129 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local db = require("DataBase")
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
print(proto.." 200")
|
||||
--print("Pragma: no-cache")
|
||||
print("Content-Type: application/x-javascript")
|
||||
print("")
|
||||
|
||||
local SourceList = {}
|
||||
|
||||
for _,f in ipairs(db.SourceList) do
|
||||
f.ChannelList = {}
|
||||
SourceList[f.refid] = f
|
||||
print("// " .. f.refid .. " " .. f.title )
|
||||
end
|
||||
|
||||
for _,c in ipairs(db.ChannelList) do
|
||||
local f = SourceList[c.refid]
|
||||
if f then
|
||||
table.insert(f.ChannelList,c)
|
||||
-- print("// " .. c.refid .. " " .. c.title .. " " .. c.request .. " " .. c.tracks )
|
||||
end
|
||||
end
|
||||
|
||||
local isat = 0
|
||||
local icable = 0
|
||||
local iter = 0
|
||||
local ichannel = 0
|
||||
|
||||
print("var SourceListSat = new Array();")
|
||||
print("var SourceListCable = new Array();")
|
||||
print("var SourceListTer = new Array();")
|
||||
|
||||
for _,f in pairs(SourceList) do
|
||||
if f.system == "dvbs" or f.system == "dvbs2" then
|
||||
print("")
|
||||
print(string.format("SourceListSat[%d] = new Object();",isat))
|
||||
print(string.format("SourceListSat[%d].name = '%s';",isat,f.title))
|
||||
print(string.format("SourceListSat[%d].ChannelList = new Array();",isat))
|
||||
|
||||
ichannel = 0
|
||||
for _,c in ipairs(f.ChannelList) do
|
||||
print("")
|
||||
print(string.format("SourceListSat[%d].ChannelList[%d] = new Object();",isat,ichannel))
|
||||
print(string.format("SourceListSat[%d].ChannelList[%d].name = '%s';",isat,ichannel,string.gsub(c.title,"'","\\'")))
|
||||
print(string.format("SourceListSat[%d].ChannelList[%d].request = '?src=%s&%s';",isat,ichannel,f.src,c.request))
|
||||
print(string.format("SourceListSat[%d].ChannelList[%d].tracks = new Array(%s);",isat,ichannel,c.tracks))
|
||||
ichannel = ichannel + 1
|
||||
end
|
||||
isat = isat + 1
|
||||
end
|
||||
if f.system == "dvbc" or f.system == "dvbc2" then
|
||||
print("")
|
||||
print(string.format("SourceListCable[%d] = new Object();",icable))
|
||||
print(string.format("SourceListCable[%d].name = '%s';",icable,f.title))
|
||||
print(string.format("SourceListCable[%d].ChannelList = new Array();",icable))
|
||||
|
||||
ichannel = 0
|
||||
for _,c in ipairs(f.ChannelList) do
|
||||
print("")
|
||||
print(string.format("SourceListCable[%d].ChannelList[%d] = new Object();",icable,ichannel))
|
||||
print(string.format("SourceListCable[%d].ChannelList[%d].name = '%s';",icable,ichannel,string.gsub(c.title,"'","\\'")))
|
||||
print(string.format("SourceListCable[%d].ChannelList[%d].request = '?%s';",icable,ichannel,c.request))
|
||||
print(string.format("SourceListCable[%d].ChannelList[%d].tracks = new Array(%s);",icable,ichannel,c.tracks))
|
||||
ichannel = ichannel + 1
|
||||
end
|
||||
icable = icable + 1
|
||||
end
|
||||
end
|
||||
|
||||
-- var ChannelListSat = new Array();
|
||||
|
||||
-- ChannelListSat[0] = new Object();
|
||||
-- ChannelListSat[0].name = "Astra 19E: Das Erste HD";
|
||||
-- ChannelListSat[0].request = "?src=1&freq=11494&pol=h&msys=dvbs&sr=22000&pids=0,5100,5101,5102,5103,5106,5104,5105";
|
||||
-- ChannelListSat[0].tracks = new Array( 5102, 5103, 5106 );
|
||||
|
||||
-- ChannelListSat[1] = new Object();
|
||||
-- ChannelListSat[1].name = "Astra 19E: ZDF HD";
|
||||
-- ChannelListSat[1].request = "?src=1&freq=11362&pol=h&msys=dvbs&sr=22000&pids=0,6100,6110,6120,6121,6122,6123,6131,6130";
|
||||
-- ChannelListSat[1].tracks = new Array( 6120, 6121, 6123, 6122 );
|
||||
|
||||
-- ChannelListSat[2] = new Object();
|
||||
-- ChannelListSat[2].name = "Eutelsat 9E: TF1 HD Suisse";
|
||||
-- ChannelListSat[2].request = "?src=1&freq=12034&pol=v&msys=dvbs&sr=27500&pids=0,800,810,820,821,822,850,814,815";
|
||||
-- ChannelListSat[2].tracks = new Array( 820, 821, 822 );
|
||||
|
||||
-- ChannelListSat[3] = new Object();
|
||||
-- ChannelListSat[3].name = "Eutelsat 9E: FTV HD Europe";
|
||||
-- ChannelListSat[3].request = "?src=1&freq=11881&pol=v&msys=dvbs&sr=27500&pids=0,1001,2001,3001,4001";
|
||||
-- ChannelListSat[3].tracks = new Array( 3001, 4001 );
|
||||
|
||||
|
||||
-- var ChannelListCable = new Array();
|
||||
|
||||
-- ChannelListCable[0] = new Object();
|
||||
-- ChannelListCable[0].name = "KabelBW: Das Erste HD";
|
||||
-- ChannelListCable[0].request = "?freq=362&msys=dvbc&sr=6900&mtype=256qam&pids=0,6000,6010,6020,6021,6030,6022,6031";
|
||||
-- ChannelListCable[0].tracks = new Array( 6020, 6021, 6022 );
|
||||
|
||||
-- ChannelListCable[1] = new Object();
|
||||
-- ChannelListCable[1].name = "KabelBW: ZDF HD";
|
||||
-- ChannelListCable[1].request = "?freq=370&msys=dvbc&sr=6900&mtype=256qam&pids=0,6100,6110,6120,6121,6123,6130,6122,6131";
|
||||
-- ChannelListCable[1].tracks = new Array( 6120, 6121, 6123, 6122 );
|
||||
|
||||
-- ChannelListCable[2] = new Object();
|
||||
-- ChannelListCable[2].name = "UnityMedia: Das Erste HD";
|
||||
-- ChannelListCable[2].request = "?freq=418&msys=dvbc&sr=6900&mtype=256qam&pids=0,6000,6010,6020,6021,6030,6022,6031";
|
||||
-- ChannelListCable[2].tracks = new Array( 6020, 6021, 6022 );
|
||||
|
||||
-- ChannelListCable[3] = new Object();
|
||||
-- ChannelListCable[3].name = "UnityMedia: ZDF HD";
|
||||
-- ChannelListCable[3].request = "?freq=394&msys=dvbc&sr=6900&mtype=256qam&pids=0,0,6100,6110,6120,6121,6123,6130,6122,6131";
|
||||
-- ChannelListCable[3].tracks = new Array( 6120, 6121, 6123, 6122 );
|
||||
|
||||
-- ChannelListCable[4] = new Object();
|
||||
-- ChannelListCable[4].name = "KDG: Das Erste HD";
|
||||
-- ChannelListCable[4].request = "?freq=330&msys=dvbc&sr=6900&mtype=256qam&pids=0,5100,5101,5102,5103,5105,5104";
|
||||
-- ChannelListCable[4].tracks = new Array( 5102, 5103 );
|
||||
|
||||
-- ChannelListCable[5] = new Object();
|
||||
-- ChannelListCable[5].name = "KDG: ZDF HD";
|
||||
-- ChannelListCable[5].request = "?freq=450&msys=dvbc&sr=6900&mtype=256qam&pids=0,6100,6110,6120,6121,6130,6123,6131";
|
||||
-- ChannelListCable[5].tracks = new Array( 6120, 6121, 6123 );
|
96
octoserve/var/www/channellists.html
Normal file
96
octoserve/var/www/channellists.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!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 -->
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<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 cellpadding="2px" align="center">
|
||||
<tr>
|
||||
<td>System Channel Database</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="dlchannels.lua" method="get">
|
||||
<input type="submit" value="Download tar.gz" >
|
||||
<input type="hidden" name="select" value="system" >
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="dlchannels.lua" method="get">
|
||||
<input type="submit" value="Download zip" disabled >
|
||||
<input type="hidden" name="select" value="system" >
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>User Channel Database</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="dlchannels.lua" method="get">
|
||||
<input type="submit" value="Download tar.gz">
|
||||
<input type="hidden" name="select" value="user" >
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="dlchannels.lua" method="get">
|
||||
<input type="submit" value="Download zip" disabled >
|
||||
<input type="hidden" name="select" value="user" >
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="delchannels.lua" method="get">
|
||||
<input type="submit" value="Delete">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<form action="uplchannels.lua" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="filename" value="*.gz" size="30" accept="application/zip,application/gzip">
|
||||
<input type="submit" value="Upload">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
32
octoserve/var/www/delchannels.lua
Normal file
32
octoserve/var/www/delchannels.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
if arg[1] then
|
||||
query = arg[1]
|
||||
if query == "get" then query = "" end
|
||||
proto = "HTTP/1.0"
|
||||
host = "local"
|
||||
end
|
||||
|
||||
function SendError(err,desc)
|
||||
io.stdout:write(proto.." "..err.."\r\n")
|
||||
io.stdout:write("\r\n")
|
||||
local file = io.open("e404.html")
|
||||
if file then
|
||||
local tmp = file:read("*a")
|
||||
tmp = string.gsub(tmp,"404 Not Found",err .. " " .. desc)
|
||||
io.stdout:write(tmp)
|
||||
file:close()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
os.execute("rm -rf /config/channels")
|
||||
|
||||
io.stdout:write(proto.." 303".."\r\n")
|
||||
io.stdout:write("Location: http://"..host.."/reboot.html".."\r\n")
|
||||
io.stdout:write("\r\n")
|
||||
|
66
octoserve/var/www/dlchannels.lua
Normal file
66
octoserve/var/www/dlchannels.lua
Normal file
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
if arg[1] then
|
||||
query = arg[1]
|
||||
if query == "get" then query = "" end
|
||||
proto = "HTTP/1.0"
|
||||
host = "local"
|
||||
end
|
||||
|
||||
function SendError(err,desc)
|
||||
io.stdout:write(proto.." "..err.."\r\n")
|
||||
io.stdout:write("\r\n")
|
||||
local file = io.open("e404.html")
|
||||
if file then
|
||||
local tmp = file:read("*a")
|
||||
tmp = string.gsub(tmp,"404 Not Found",err .. " " .. desc)
|
||||
io.stdout:write(tmp)
|
||||
file:close()
|
||||
end
|
||||
end
|
||||
|
||||
local path = nil
|
||||
local tmp = "/var/tmp/xxxx"
|
||||
|
||||
if string.match(query,"select=user") then
|
||||
local file = io.open("/config/channels/sourcelist.csv")
|
||||
if file then
|
||||
path = "/config/channels"
|
||||
file:close()
|
||||
else
|
||||
path = "/var/channels"
|
||||
end
|
||||
elseif string.match(query,"select=system") then
|
||||
path = "/var/channels"
|
||||
else
|
||||
SendError("404","channel list not found")
|
||||
return
|
||||
end
|
||||
|
||||
local gz = nil
|
||||
|
||||
os.execute("cd ".. path .. ";tar -cf " .. tmp .. ".tar" .. " *.csv *.txt");
|
||||
|
||||
local p = io.popen("gzip -c " .. tmp .. ".tar")
|
||||
if p then
|
||||
gz = p:read("*a")
|
||||
p:close()
|
||||
end
|
||||
|
||||
if gz then
|
||||
io.stdout:write(proto.." 200" .."\r\n")
|
||||
io.stdout:write("Pragma: no-cache".."\r\n")
|
||||
io.stdout:write("Content-Type: application/gzip".."\r\n")
|
||||
io.stdout:write('Content-Disposition: filename="channels.tar.gz"'.."\r\n")
|
||||
io.stdout:write(string.format("Content-Length: %d",#gz).."\r\n")
|
||||
io.stdout:write("\r\n")
|
||||
io.stdout:write(gz)
|
||||
else
|
||||
SendError("500","internal error")
|
||||
end
|
||||
|
||||
|
165
octoserve/var/www/doupdate.html
Normal file
165
octoserve/var/www/doupdate.html
Normal file
@@ -0,0 +1,165 @@
|
||||
<!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">
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
CheckDone = false;
|
||||
DownloadDone = false;
|
||||
VerifyDone = false;
|
||||
UpdateError = false;
|
||||
WaitCounter = 30;
|
||||
UpdateInfo = "";
|
||||
|
||||
function FWVersion(fwdate)
|
||||
{
|
||||
// Jahr, Monat, Tag, Stunden, Minuten
|
||||
// date = new Date("20"+fwdate.substr(0,2),fwdate.substr(2,2)-1,fwdate.substr(4,2),fwdate.substr(6,2),fwdate.substr(8,2),"0");
|
||||
date = new Date(1);
|
||||
date.setUTCDate(fwdate.substr(4,2));
|
||||
date.setUTCFullYear("20"+fwdate.substr(0,2));
|
||||
date.setUTCMonth(fwdate.substr(2,2)-1);
|
||||
date.setUTCHours(fwdate.substr(6,2));
|
||||
date.setUTCMinutes(fwdate.substr(8,2));
|
||||
|
||||
ds = date.toGMTString();
|
||||
|
||||
return ds.substring(5,ds.length-7);
|
||||
|
||||
}
|
||||
|
||||
function CheckUpdateStatus()
|
||||
{
|
||||
script = document.getElementById("script1");
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
head.removeChild(script);
|
||||
newscript = document.createElement('script');
|
||||
newscript.id = "script1";
|
||||
newscript.type = "text/javascript";
|
||||
newscript.src = "/update.lua?updatestatus";
|
||||
head.appendChild(newscript);
|
||||
|
||||
if( UpdateError )
|
||||
{
|
||||
document.getElementById("UpdateButton").disabled = false;
|
||||
document.getElementById("UpdateButton").value = "Continue";
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = UpdateInfo;
|
||||
}
|
||||
else if( VerifyDone )
|
||||
{
|
||||
document.getElementById("UpdateButton").disabled = false;
|
||||
document.getElementById("UpdateButton").value = "Reboot";
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = "";
|
||||
}
|
||||
else if( DownloadDone )
|
||||
{
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = "***** Verifying ******";
|
||||
DownloadDone = false;
|
||||
window.setTimeout(CheckUpdateStatus,250);
|
||||
}
|
||||
else if( CheckDone )
|
||||
{
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = "***** Downloading ******";
|
||||
CheckDone = false;
|
||||
window.setTimeout(CheckUpdateStatus,250);
|
||||
}
|
||||
else
|
||||
window.setTimeout(CheckUpdateStatus,250);
|
||||
}
|
||||
|
||||
function DoUpdate()
|
||||
{
|
||||
CheckDone = false;
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = "***** Checking ******";
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
newscript = document.createElement('script');
|
||||
newscript.id = "script1";
|
||||
newscript.type = "text/javascript";
|
||||
newscript.src = "/update.lua?update";
|
||||
head.appendChild(newscript);
|
||||
window.setTimeout(CheckUpdateStatus,250);
|
||||
}
|
||||
|
||||
function Reboot()
|
||||
{
|
||||
document.getElementById("UpdateButton").disabled = true;
|
||||
if( UpdateError )
|
||||
{
|
||||
location.replace('/index.html');
|
||||
}
|
||||
else
|
||||
{
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
newscript = document.createElement('script');
|
||||
newscript.id = "script2";
|
||||
newscript.type = "text/javascript";
|
||||
newscript.src = "/reboot.lua?sjiwjsiowjs";
|
||||
head.appendChild(newscript);
|
||||
WaitCounter = 70;
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = WaitCounter;
|
||||
window.setTimeout(Wait,1000);
|
||||
}
|
||||
}
|
||||
|
||||
function Wait()
|
||||
{
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = WaitCounter;
|
||||
if( WaitCounter == 0 )
|
||||
{
|
||||
location.replace('/index.html');
|
||||
}
|
||||
else
|
||||
{
|
||||
WaitCounter = WaitCounter - 1;
|
||||
window.setTimeout(Wait,1000);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="DoUpdate()">
|
||||
|
||||
|
||||
<table class="maintable" align="center">
|
||||
<colgroup>
|
||||
<col width="182px"/>
|
||||
<col width="728px"/>
|
||||
</colgroup>
|
||||
<tr><td class="maintd" colspan="2">
|
||||
<img src="/BannerDD.jpg" alt="DD" width="910" height="130" />
|
||||
</td></tr>
|
||||
<tr><td class="maintd" colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td class="maintd"></td>
|
||||
<td class="content">
|
||||
<div>
|
||||
<!-- Begin Content -->
|
||||
<h1 align="center">DO NOT TURN THE DEVICE OFF</h1>
|
||||
<table class="table" align="center">
|
||||
<tr>
|
||||
<td id="updatestatus"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="UpdateButton" type="Button" value="Continue" disabled="true" onclick="Reboot()" />
|
||||
</form>
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
41
octoserve/var/www/e404.html
Normal file
41
octoserve/var/www/e404.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!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 -->
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<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 -->
|
||||
<H1>404 Not Found</H1>
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
131
octoserve/var/www/index.html
Normal file
131
octoserve/var/www/index.html
Normal file
@@ -0,0 +1,131 @@
|
||||
<!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="/systeminfo.lua"></script>
|
||||
<script type="text/javascript">Octoserve = false;</script>
|
||||
<script type="text/javascript" src="/octoserve/serverinfo.js"></script>
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
function FWVersion(fwdate)
|
||||
{
|
||||
if( fwdate.length > 0 )
|
||||
{
|
||||
// Jahr, Monat, Tag, Stunden, Minuten
|
||||
// date = new Date("20"+fwdate.substr(0,2),fwdate.substr(2,2)-1,fwdate.substr(4,2),fwdate.substr(6,2),fwdate.substr(8,2),"0");
|
||||
|
||||
var date = new Date(1);
|
||||
date.setUTCDate(fwdate.substr(4,2));
|
||||
date.setUTCFullYear("20"+fwdate.substr(0,2));
|
||||
date.setUTCMonth(fwdate.substr(2,2)-1);
|
||||
date.setUTCHours(fwdate.substr(6,2));
|
||||
date.setUTCMinutes(fwdate.substr(8,2));
|
||||
|
||||
var ds = date.toGMTString();
|
||||
|
||||
return (ds.substring(5,ds.length-7));
|
||||
}
|
||||
return ("?");
|
||||
}
|
||||
|
||||
function AddRow(table,td)
|
||||
{
|
||||
var row = document.createElement("tr");
|
||||
for(var i = 0; i < td.length; i++ )
|
||||
{
|
||||
var col = document.createElement("td");
|
||||
var txt = document.createTextNode(td[i]);
|
||||
col.appendChild(txt);
|
||||
row.appendChild(col);
|
||||
}
|
||||
table.appendChild(row);
|
||||
}
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
var infotable = document.getElementById("infotable");
|
||||
var tunertable = document.getElementById("tunertable");
|
||||
|
||||
AddRow(infotable, new Array("FW Date",FWVersion(fwdate)) );
|
||||
AddRow(infotable, new Array("MAC",Octoserve.MAC) );
|
||||
AddRow(infotable, new Array("Linux",linuxver) );
|
||||
if( Octoserve )
|
||||
AddRow(infotable, new Array("SAT>IP Server",Octoserve.Version) );
|
||||
else
|
||||
AddRow(infotable, new Array("SAT>IP Server","ERROR") );
|
||||
|
||||
AddRow(infotable, new Array("FPGA",fpgatype+"-"+fpgaver) );
|
||||
|
||||
if( Octoserve )
|
||||
{
|
||||
AddRow(infotable, new Array("Boot ID",Octoserve.BootID) );
|
||||
AddRow(infotable, new Array("Device ID",Octoserve.DeviceID) );
|
||||
for(var i = 0; i < Octoserve.TunerList.length; i++ )
|
||||
{
|
||||
if( Octoserve.TunerList[i] )
|
||||
AddRow(tunertable, new Array("Tuner " + (i+1)," ",Octoserve.TunerList[i].Desc) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</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 cellpadding="2px" align="center" width="100%">
|
||||
<colgroup>
|
||||
<col width="50%">
|
||||
<col width="50%">
|
||||
</colgroup>
|
||||
<tr><td colspan="2">
|
||||
<h1 align="center">OctopusNet
|
||||
<script type="text/javascript">
|
||||
if( Octoserve )
|
||||
document.write(Octoserve.Version);
|
||||
if( beta )
|
||||
document.write(" BETA");
|
||||
</script>
|
||||
</h1>
|
||||
</td></tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table id="infotable" cellpadding="2px" align="center">
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<table id="tunertable" cellpadding="2px" align="center">
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
4996
octoserve/var/www/licenses.html
Normal file
4996
octoserve/var/www/licenses.html
Normal file
File diff suppressed because it is too large
Load Diff
381
octoserve/var/www/lnbsettings.html
Normal file
381
octoserve/var/www/lnbsettings.html
Normal file
@@ -0,0 +1,381 @@
|
||||
<!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=iso-8859-1" />
|
||||
<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="/lnbsettings.lua"></script>
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
function SaveSettings()
|
||||
{
|
||||
var Mode = document.getElementById("ModeButton").checked;
|
||||
|
||||
var form = document.createElement("form");
|
||||
form.setAttribute("method", "post");
|
||||
form.setAttribute("action", "/lnbsettings.lua?set");
|
||||
|
||||
var field = document.createElement("input");
|
||||
field.setAttribute("type", "hidden");
|
||||
field.setAttribute("name", "auto");
|
||||
field.setAttribute("value", Mode ? "0" : "1");
|
||||
form.appendChild(field);
|
||||
|
||||
if( Mode )
|
||||
{
|
||||
var table = document.getElementById("LNBTable");
|
||||
var Rows = table.getElementsByTagName("tr");
|
||||
|
||||
for(var i = 1; i < Rows.length; i++)
|
||||
{
|
||||
var Cols = Rows[i].getElementsByTagName("td");
|
||||
|
||||
field = document.createElement("input");
|
||||
field.setAttribute("type", "hidden");
|
||||
field.setAttribute("name", "LNB");
|
||||
|
||||
var value = i.toString();
|
||||
for( var j = 1; j < 6; j++ )
|
||||
{
|
||||
var curValue = Cols[j].firstChild.nodeValue;
|
||||
if( curValue == "-" ) curValue = "0";
|
||||
value = value + "." + curValue;
|
||||
}
|
||||
field.setAttribute("value", value);
|
||||
form.appendChild(field);
|
||||
}
|
||||
}
|
||||
document.body.appendChild(form); // really needed?
|
||||
form.submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
function CreateRow(LNB,Tuner,Source,LOF1,LOF2,LOFS)
|
||||
{
|
||||
var row = document.createElement("tr");
|
||||
|
||||
var col;
|
||||
var txt;
|
||||
|
||||
col = document.createElement("td");
|
||||
txt = document.createTextNode(LNB+1);
|
||||
col.appendChild(txt);
|
||||
row.appendChild(col);
|
||||
|
||||
col = document.createElement("td");
|
||||
txt = document.createTextNode(Tuner > 0 ? Tuner : "-");
|
||||
col.appendChild(txt);
|
||||
row.appendChild(col);
|
||||
|
||||
col = document.createElement("td");
|
||||
txt = document.createTextNode(Source > 0 ? Source : "-");
|
||||
col.appendChild(txt);
|
||||
row.appendChild(col);
|
||||
|
||||
col = document.createElement("td");
|
||||
txt = document.createTextNode(LOF1 > 0 ? LOF1 : "?");
|
||||
col.appendChild(txt);
|
||||
row.appendChild(col);
|
||||
|
||||
col = document.createElement("td");
|
||||
txt = document.createTextNode(LOF2 > 0 ? LOF2 : "-");
|
||||
col.appendChild(txt);
|
||||
row.appendChild(col);
|
||||
|
||||
col = document.createElement("td");
|
||||
txt = document.createTextNode(LOFS > 0 ? LOFS : "-");
|
||||
col.appendChild(txt);
|
||||
row.appendChild(col);
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
function InsertRow(Tuner,Source,LOF1,LOF2,LOFS)
|
||||
{
|
||||
var table = document.getElementById("LNBTable");
|
||||
|
||||
var Rows = table.getElementsByTagName("tr");
|
||||
|
||||
var LNB = 0;
|
||||
var Replace = false;
|
||||
var curRow = null;
|
||||
|
||||
for(var i = 1; i < Rows.length; i++)
|
||||
{
|
||||
var Cols = Rows[i].getElementsByTagName("td");
|
||||
|
||||
var curTuner = Cols[1].firstChild.nodeValue;
|
||||
var curSource = Cols[2].firstChild.nodeValue;
|
||||
|
||||
if( curTuner == "-" ) curTuner = 0;
|
||||
if( curSource == "-" ) curSource = 0;
|
||||
|
||||
if( curTuner == Tuner && curSource == Source )
|
||||
{
|
||||
Cols[3].firstChild.nodeValue = LOF1 > 0 ? LOF1 : "?";
|
||||
Cols[4].firstChild.nodeValue = LOF2 > 0 ? LOF2 : "-";
|
||||
Cols[5].firstChild.nodeValue = LOFS > 0 ? LOFS : "-";
|
||||
return false;
|
||||
}
|
||||
|
||||
if( (Tuner == curTuner && curSource > Source ) || curTuner > Tuner )
|
||||
{
|
||||
curRow = Rows[i];
|
||||
break;
|
||||
}
|
||||
|
||||
LNB = LNB + 1;
|
||||
}
|
||||
|
||||
var newRow = CreateRow(LNB,Tuner,Source,LOF1,LOF2,LOFS);
|
||||
if( curRow == null )
|
||||
table.appendChild(newRow);
|
||||
else
|
||||
{
|
||||
for( var i = LNB + 1; i < Rows.length; i++ )
|
||||
{
|
||||
Rows[i].getElementsByTagName("td")[0].firstChild.nodeValue = i + 1;
|
||||
}
|
||||
table.insertBefore(newRow,curRow);
|
||||
}
|
||||
}
|
||||
|
||||
function ClearLNB()
|
||||
{
|
||||
document.getElementById("SetButton").disabled = false;
|
||||
|
||||
var table = document.getElementById("LNBTable");
|
||||
|
||||
while( true )
|
||||
{
|
||||
var Rows = table.getElementsByTagName("tr");
|
||||
if( Rows.length <= 1 ) break;
|
||||
table.removeChild(Rows[1]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function AddLNB()
|
||||
{
|
||||
document.getElementById("SetButton").disabled = false;
|
||||
|
||||
var Tuner = document.getElementById("Tuner").value;
|
||||
var Source = document.getElementById("Source").value;
|
||||
var LOF1 = document.getElementById("LOF1").value;
|
||||
var LOF2 = document.getElementById("LOF2").value;
|
||||
var LOFS = document.getElementById("LOFS").value;
|
||||
|
||||
if( Tuner == "" ) Tuner = 0;
|
||||
else Tuner = parseInt(Tuner);
|
||||
|
||||
if( Source == "" ) Source = 0;
|
||||
else Source = parseInt(Source);
|
||||
|
||||
LOF1 = parseInt(LOF1);
|
||||
|
||||
if( LOF2 == "" ) LOF2 = 0;
|
||||
else LOF2 = parseInt(LOF2);
|
||||
|
||||
if( LOFS == "" ) LOFS = 0;
|
||||
else LOFS = parseInt(LOFS);
|
||||
|
||||
if( isNaN(Tuner) || isNaN(Source) || isNaN(LOF1) || isNaN(LOF2) || isNaN(LOFS) ) return; // Error
|
||||
|
||||
if( Tuner > 0 && Source == 0 ) return; // Error
|
||||
|
||||
if( Tuner > 8 || Source > 4 ) return;
|
||||
|
||||
InsertRow(Tuner,Source,LOF1,LOF2,LOFS);
|
||||
}
|
||||
|
||||
function ChangeMode()
|
||||
{
|
||||
var t = document.getElementById("SetButton");
|
||||
document.getElementById("SetButton").disabled = false;
|
||||
if( document.getElementById("ModeButton").checked )
|
||||
{
|
||||
document.getElementById("AutoSetting").style.display = "none";
|
||||
document.getElementById("ManualSetting").style.display = "block";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("AutoSetting").style.display = "block";
|
||||
document.getElementById("ManualSetting").style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
document.getElementById("SetButton").disabled = true;
|
||||
|
||||
if( LNBList.length > 0 )
|
||||
{
|
||||
document.getElementById("ModeButton").checked = true;
|
||||
document.getElementById("AutoSetting").style.display = "none";
|
||||
document.getElementById("ManualSetting").style.display = "block";
|
||||
|
||||
var table = document.getElementById("LNBTable");
|
||||
for(var i = 0; i < LNBList.length; i++ )
|
||||
{
|
||||
var Row = CreateRow(i,LNBList[i].Tuner,LNBList[i].Source,LNBList[i].LOF1,LNBList[i].LOF2,LNBList[i].LOFS);
|
||||
table.appendChild(Row);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("ModeButton").checked = false;
|
||||
document.getElementById("AutoSetting").style.display = "block";
|
||||
document.getElementById("ManualSetting").style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
</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 class="tableleft" align="center" cellspacing="2px">
|
||||
<tr>
|
||||
<td>Enable manual LNB configuration</td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="ModeButton" type="checkbox" value="Check" checked="false" onclick="ChangeMode()" />
|
||||
</form>
|
||||
</td>
|
||||
<tr>
|
||||
<tr><td colspan="2" align="right">
|
||||
<div style="width: 300px">
|
||||
<form action="">
|
||||
<input type="Button" value="Cancel" onclick="location.replace('index.html')" >
|
||||
<input id="SetButton" type="Button" value="Set" onclick="SaveSettings()" >
|
||||
</form>
|
||||
</div>
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
<div id="AutoSetting" style="margin:20px; clear:both">
|
||||
<h3>Automatic LNB Selection</h3>
|
||||
<li><b>Ku Band:</b> Universal LNB</li>
|
||||
<!--
|
||||
<li><b>C Band:</b> Standard LNB with LOF = 5150 MHz</li>
|
||||
<li><b>Ka Band:</b> Soarsat LNB with LOF = 21200 MHz</li>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<div id="ManualSetting" style="margin:20px; clear:both">
|
||||
<h3>Manual LNB Selection</h3>
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td>Tuner </td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="Tuner" type="text" value="" maxlength="2" onclick=""/>
|
||||
</form>
|
||||
</td>
|
||||
<td> (empty for all)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Source </td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="Source" type="text" value="" maxlength="1" onclick=""/>
|
||||
</form>
|
||||
</td>
|
||||
<td> (empty for all)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LOF low </td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="LOF1" type="text" value="9750" maxlength="5" align="right" onclick=""/>
|
||||
</form>
|
||||
</td>
|
||||
<td> MHz</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LOF high </td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="LOF2" type="text" value="10600" maxlength="5" onclick=""/>
|
||||
</form>
|
||||
</td>
|
||||
<td> MHz (empty for unused)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LOF switch </td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="LOFS" type="text" value="11700" maxlength="5" onclick=""/>
|
||||
</form>
|
||||
</td>
|
||||
<td> MHz (empty for unused)</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" align="right">
|
||||
<form action="">
|
||||
<input id="ClearButton" type="Button" value="Clear" onclick="ClearLNB()" >
|
||||
<input id="AddButton" type="Button" value="Add" onclick="AddLNB()" >
|
||||
</form>
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="60px"/>
|
||||
<col width="70px"/>
|
||||
<col width="70px"/>
|
||||
<col width="100px"/>
|
||||
<col width="100px"/>
|
||||
<col width="100px"/>
|
||||
<col width="110px"/>
|
||||
</colgroup>
|
||||
<tbody id="LNBTable">
|
||||
<tr>
|
||||
<th>LNB</th>
|
||||
<th>Tuner</th>
|
||||
<th>Source</th>
|
||||
<th>LOF low</th>
|
||||
<th>LOF high</th>
|
||||
<th>LOF switch</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<!---
|
||||
<form action="">
|
||||
<input id="UpdateButton" type="Button" value="Test" onclick="DoPost(Test)" />
|
||||
</form>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
185
octoserve/var/www/lnbsettings.lua
Normal file
185
octoserve/var/www/lnbsettings.lua
Normal file
@@ -0,0 +1,185 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
function SaveOctoserveConf(Section,Values)
|
||||
local ConfStart = ""
|
||||
local f = io.open("/config/octoserve.conf","r")
|
||||
local line
|
||||
if f then
|
||||
while true do
|
||||
while true do
|
||||
line = f:read()
|
||||
if not line then break end
|
||||
if string.match(line,"^%["..Section.."%]") then break end
|
||||
ConfStart = ConfStart .. line .. "\n"
|
||||
end
|
||||
while true do
|
||||
line = f:read()
|
||||
if not line then break end
|
||||
if not string.match(line,"^%["..Section.."%]") then
|
||||
if string.match(line,"^%[%w+%]") then
|
||||
ConfStart = ConfStart .. line .. "\n"
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if not line then break end
|
||||
end
|
||||
f:close()
|
||||
os.remove("/config/octoserve.bak")
|
||||
os.rename("/config/octoserve.conf","/config/octoserve.bak")
|
||||
end
|
||||
|
||||
f = io.open("/config/octoserve.conf","w")
|
||||
if ConfStart then
|
||||
f:write(ConfStart)
|
||||
end
|
||||
f:write(Values)
|
||||
f:close()
|
||||
end
|
||||
|
||||
function LoadOctoserveConf(Section)
|
||||
local f = io.open("/config/octoserve.conf","r")
|
||||
local line
|
||||
local Sections = {}
|
||||
local curSection = {}
|
||||
if f then
|
||||
while true do
|
||||
while true do
|
||||
line = f:read()
|
||||
if not line then break end
|
||||
if string.match(line,"^%["..Section.."%]") then
|
||||
break
|
||||
end
|
||||
end
|
||||
while true do
|
||||
line = f:read()
|
||||
if not line then break end
|
||||
if string.match(line,"^%["..Section.."%]") then
|
||||
if #curSection > 0 then
|
||||
table.insert(Sections,curSection)
|
||||
curSection = {}
|
||||
end
|
||||
else
|
||||
if string.match(line,"^%[%w+%]") then
|
||||
break
|
||||
else
|
||||
if #line > 0 and not string.match(line,"^%#") then
|
||||
table.insert(curSection,line)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if #curSection > 0 then
|
||||
table.insert(Sections,curSection)
|
||||
curSection = {}
|
||||
end
|
||||
if not line then break end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
return Sections
|
||||
end
|
||||
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
if arg[1] then
|
||||
query = arg[1]
|
||||
if query == "get" then query = "" end
|
||||
proto = "HTTP/1.0"
|
||||
host = "local"
|
||||
end
|
||||
|
||||
if query ~= "" then
|
||||
local nextloc = "wait.html?5"
|
||||
local params = io.stdin:read("*a")
|
||||
local p,v
|
||||
local auto = false
|
||||
local conf = ""
|
||||
|
||||
-- print(proto.." 200")
|
||||
-- print("Pragma: no-cache")
|
||||
-- print("Content-Type: text/plain")
|
||||
-- print("")
|
||||
|
||||
print(proto.." 303")
|
||||
print("Location: http://"..host.."/"..nextloc)
|
||||
print("")
|
||||
|
||||
for p,v in string.gmatch(params,"(%a+)=([0123456789%.]+)") do
|
||||
print(p,v)
|
||||
if p == "auto" and p == "1" then
|
||||
auto = true
|
||||
break
|
||||
end
|
||||
if p == "LNB" then
|
||||
local lnb,tuner,source,lof1,lof2,lofs = string.match(v,"(%d+)%.(%d+)%.(%d+)%.(%d+)%.(%d+)%.(%d+)")
|
||||
|
||||
conf = conf .. "[LNB]\n"
|
||||
conf = conf .. "#\n# LNB " .. lnb .. " Setting\n#\n"
|
||||
if tuner > "0" then conf = conf .. string.format("Tuner=%d\n",tuner) end
|
||||
if source > "0" then conf = conf .. string.format("Source=%d\n",source) end
|
||||
conf = conf .. string.format("LOF1=%d\n",lof1)
|
||||
if lof2 > "0" then conf = conf .. string.format("LOF2=%d\n",lof2) end
|
||||
if lofs > "0" then conf = conf .. string.format("LOFS=%d\n",lofs) end
|
||||
conf = conf .. "\n"
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
SaveOctoserveConf("LNB",conf)
|
||||
os.execute("/etc/init.d/S99octo restartoctoserve&")
|
||||
else
|
||||
|
||||
print(proto.." 200")
|
||||
print("Pragma: no-cache")
|
||||
print("Content-Type: application/x-javascript")
|
||||
print("")
|
||||
|
||||
print("LNBList = new Array();")
|
||||
|
||||
local i,lnb
|
||||
local Conf = LoadOctoserveConf("LNB")
|
||||
|
||||
i = 0
|
||||
for _,lnb in pairs(Conf) do
|
||||
local Tuner = 0
|
||||
local Source = 0
|
||||
local LOF1 = 0
|
||||
local LOF2 = 0
|
||||
local LOFS = 0
|
||||
|
||||
for _,line in pairs(lnb) do
|
||||
local n,v = string.match(line,"%s-(%w+)%s-=%s-(%d+)")
|
||||
if n == "Tuner" then Tuner = v end
|
||||
if n == "Source" then Source = v end
|
||||
if n == "LOF1" then LOF1 = v end
|
||||
if n == "LOF2" then LOF2 = v end
|
||||
if n == "LOFS" then LOFS = v end
|
||||
print("// " .. n .. " = " .. v);
|
||||
end
|
||||
|
||||
print(string.format("LNBList[%d] = new Object();" ,i))
|
||||
print(string.format("LNBList[%d].Tuner = %d;" ,i,Tuner ))
|
||||
print(string.format("LNBList[%d].Source = %d;" ,i,Source))
|
||||
print(string.format("LNBList[%d].LOF1 = %d;" ,i,LOF1 ))
|
||||
print(string.format("LNBList[%d].LOF2 = %d;" ,i,LOF2 ))
|
||||
print(string.format("LNBList[%d].LOFS = %d;" ,i,LOFS ))
|
||||
|
||||
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
-- print("LNBList[0] = new Object();")
|
||||
-- print("LNBList[0].Tuner = 0;")
|
||||
-- print("LNBList[0].Source = 0;")
|
||||
-- print("LNBList[0].LOF1 = 9750;")
|
||||
-- print("LNBList[0].LOF2 = 10600;")
|
||||
-- print("LNBList[0].LOFS = 11700;")
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
25
octoserve/var/www/ltest.lua
Normal file
25
octoserve/var/www/ltest.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
-- HTTP header
|
||||
print [[
|
||||
Content-Type: text/plain
|
||||
Set-Cookie: foo=bar
|
||||
Set-Cookie: wonder=always
|
||||
|
||||
]]
|
||||
|
||||
-- body of page
|
||||
|
||||
-- find all environment variables using bash and a temporary file
|
||||
|
||||
fname = os.tmpname ()
|
||||
os.execute ("/bin/sh -c set > " .. fname)
|
||||
f = io.open (fname, "r") -- open it
|
||||
s = f:read ("*a") -- read all of it
|
||||
print (s)
|
||||
f:close () -- close it
|
||||
os.remove (fname)
|
||||
|
||||
print("")
|
||||
params = io.stdin:read("*a")
|
||||
print(params)
|
107
octoserve/var/www/mclist.lua
Normal file
107
octoserve/var/www/mclist.lua
Normal file
@@ -0,0 +1,107 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
local method = os.getenv("REQUEST_METHOD")
|
||||
local clength = os.getenv("CONTENT_LENGTH")
|
||||
local ctype = os.getenv("CONTENT_TYPE")
|
||||
|
||||
function http_print(s)
|
||||
if s then
|
||||
io.stdout:write(tostring(s).."\r\n")
|
||||
else
|
||||
io.stdout:write("\r\n")
|
||||
end
|
||||
end
|
||||
|
||||
function GetDevID()
|
||||
local devid = nil
|
||||
local tmp = io.open("/config/device.id")
|
||||
if tmp then
|
||||
devid = tonumber(tmp:read())
|
||||
tmp:close()
|
||||
end
|
||||
return devid
|
||||
end
|
||||
|
||||
function ReadList()
|
||||
local list = {}
|
||||
local devid = GetDevID()
|
||||
if not devid then return nil end
|
||||
local file = io.open("/config/mcsetup.csv","r")
|
||||
if file then
|
||||
local line = file:read()
|
||||
if line then
|
||||
line = string.gsub(line,'"','')
|
||||
if line:match("TITLE,REQUEST,PIDS,LANPORTS") then
|
||||
local i = 1
|
||||
while i < 13 do
|
||||
line = file:read()
|
||||
if not line then break end
|
||||
if DebugFlag then print(line) end
|
||||
local title,request,pids,lanports = line:match('%"(.*)%",%"(.*)%",%"P(%a-[%d%:]-)%",%"L(%a-[%d%:]-)%"')
|
||||
if not title then
|
||||
title,request,pids = line:match('%"(.*)%",%"(.*)%",%"P(%a-[%d%:]-)%"')
|
||||
end
|
||||
if not title or not request or not pids then
|
||||
break
|
||||
end
|
||||
if pids == "" then break end
|
||||
if lanports then
|
||||
if lanports == "" then lanports = nil end
|
||||
end
|
||||
|
||||
table.insert(list, { title = title, ip = "239."..devid..".2."..i, port = "6670", lanports = lanports } )
|
||||
i = i + 1
|
||||
end
|
||||
elseif line:match("TITLE,REQUEST,PIDS,PROTO,IP,PORT,TTL,LANPORTS") then
|
||||
while true do
|
||||
line = file:read()
|
||||
if not line then break end
|
||||
if DebugFlag then print(line) end
|
||||
local title,request,pids,proto,ip,port,ttl,lanports = line:match('%"(.*)%",%"(.*)%",%"P(%a-[%d%:]-)%",%"(%u%u%u)%",%"(%d*%.%d*%.%d*%.%d*)%",(%d*),(%d*),%"L(%a-[%d%:]-)%"')
|
||||
if not title then
|
||||
title,request,pids,proto,ip,port,ttl = line:match('%"(.*)%",%"(.*)%",%"P(%a-[%d%:]-)%",%"(%u%u%u)%",%"(%d*%.%d*%.%d*%.%d*)%",(%d*),(%d*)')
|
||||
end
|
||||
if not title or not request or not pids then
|
||||
break
|
||||
end
|
||||
if pids == "" then break end
|
||||
if proto ~= "UDP" and proto ~= "RTP" then break end
|
||||
|
||||
pids = string.gsub(pids,":",",")
|
||||
if lanports then
|
||||
lanports = string.gsub(lanports,":",",")
|
||||
if lanports == "" then lanports = nil end
|
||||
if lanports == "all" then lanports = "1,2,3,4,5" end
|
||||
end
|
||||
local url
|
||||
table.insert(list,{ title = title, proto = proto, ip = ip, port = port,lanports = lanports })
|
||||
end
|
||||
end
|
||||
end
|
||||
file:close()
|
||||
end
|
||||
|
||||
return list
|
||||
end
|
||||
|
||||
local mclist = ReadList()
|
||||
|
||||
|
||||
http_print("HTTP/1.1 200")
|
||||
http_print("Pragma: no-cache")
|
||||
http_print("Content-Type: application/x-javascript")
|
||||
http_print()
|
||||
|
||||
http_print('Multicast = new Array();')
|
||||
local i,entry
|
||||
for i,entry in ipairs(mclist) do
|
||||
http_print(string.format("Multicast[%d] = new Object();",i-1))
|
||||
http_print(string.format("Multicast[%d].Title = '%s';",i-1,entry.title:gsub("'","\\'")))
|
||||
http_print(string.format("Multicast[%d].Dest = '%s:%s';",i-1,entry.ip,entry.port))
|
||||
if entry.lanports then
|
||||
http_print(string.format("Multicast[%d].LanPorts = '%s';",i-1,entry.lanports:gsub(":"," ")))
|
||||
end
|
||||
end
|
104
octoserve/var/www/menu.js
Normal file
104
octoserve/var/www/menu.js
Normal file
@@ -0,0 +1,104 @@
|
||||
|
||||
//
|
||||
|
||||
MenuItems = new Array();
|
||||
|
||||
MenuItems[0] = new Object();
|
||||
MenuItems[0].Text = "Home";
|
||||
MenuItems[0].Link = "index.html";
|
||||
|
||||
MenuItems[1] = new Object();
|
||||
MenuItems[1].Text = "Browser TV";
|
||||
MenuItems[1].Link = "browsertv.html";
|
||||
|
||||
MenuItems[2] = new Object();
|
||||
MenuItems[2].Text = "Stream Status";
|
||||
MenuItems[2].Link = "streamstatus.html";
|
||||
|
||||
MenuItems[3] = new Object();
|
||||
MenuItems[3].Text = "Tuner Status";
|
||||
MenuItems[3].Link = "tunerstatus.html";
|
||||
|
||||
MenuItems[4] = new Object();
|
||||
MenuItems[4].Text = "Unicable Settings";
|
||||
MenuItems[4].Link = "scif.html";
|
||||
|
||||
MenuItems[5] = new Object();
|
||||
MenuItems[5].Text = "LNB Settings";
|
||||
MenuItems[5].Link = "lnbsettings.html";
|
||||
|
||||
MenuItems[6] = new Object();
|
||||
MenuItems[6].Text = "System Settings";
|
||||
MenuItems[6].Link = "system.html";
|
||||
|
||||
MenuItems[7] = new Object();
|
||||
MenuItems[7].Text = "Multicast Setup";
|
||||
MenuItems[7].Link = "multicast.html";
|
||||
|
||||
MenuItems[8] = new Object();
|
||||
MenuItems[8].Text = "Channel Lists";
|
||||
MenuItems[8].Link = "channellists.html";
|
||||
|
||||
MenuItems[9] = new Object();
|
||||
MenuItems[9].Text = "Update";
|
||||
MenuItems[9].Link = "update.html";
|
||||
|
||||
MenuItems[10] = new Object();
|
||||
MenuItems[10].Text = "Reboot";
|
||||
MenuItems[10].Link = "reboot.html";
|
||||
|
||||
MenuItems[11] = new Object();
|
||||
MenuItems[11].Text = "Licenses";
|
||||
MenuItems[11].Link = "licenses.html";
|
||||
|
||||
// add additional items here
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Don't touch
|
||||
|
||||
function CreateMenu()
|
||||
{
|
||||
document.write('<table class="menutable" align="center">');
|
||||
for(i = 0; i < MenuItems.length; i++ )
|
||||
{
|
||||
if( document.URL.indexOf(MenuItems[i].Link) < 0 )
|
||||
document.write('<tr><td><a href="/'+MenuItems[i].Link+'">'+MenuItems[i].Text+'</a></td></tr>');
|
||||
else
|
||||
document.write('<tr><td class="menucur">'+MenuItems[i].Text+'</td></tr>');
|
||||
}
|
||||
document.write('</table>');
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
var browserType = "unk";
|
||||
var browserLanguage = "en";
|
||||
var browserPlatform = "unk";
|
||||
|
||||
if( navigator.appVersion.indexOf("MSIE") >= 0 )
|
||||
browserType = "MSIE";
|
||||
else
|
||||
browserType = "Netscape";
|
||||
|
||||
if( browserType == "MSIE" )
|
||||
browserLanguage = navigator.browserLanguage.substr(0,2);
|
||||
else if( browserType == "Netscape" )
|
||||
{
|
||||
var nplat = navigator.platform.toLowerCase();
|
||||
browserLanguage = navigator.language.substr(0,2);
|
||||
if( nplat.indexOf("win") == 0 )
|
||||
browserPlatform = "win";
|
||||
else if( nplat.indexOf("linux") >= 0 )
|
||||
browserPlatform = "linux";
|
||||
else if( nplat.indexOf("ipad") >= 0 )
|
||||
browserPlatform = "ipad";
|
||||
}
|
||||
|
||||
// document.write(navigator.appName);
|
||||
// document.write(navigator.appVersion);
|
||||
// document.write(navigator.browserLanguage);
|
||||
// document.write(navigator.language);
|
||||
// document.write(navigator.platform);
|
||||
// document.write(navigator.mimeTypes.length);
|
||||
// document.write(navigator.plugins.length);
|
||||
// document.write(window.ActiveXObject ? "AX" : "no AX");
|
160
octoserve/var/www/multicast.html
Normal file
160
octoserve/var/www/multicast.html
Normal file
@@ -0,0 +1,160 @@
|
||||
<!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="/mclist.lua"></script>
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
if( Multicast.length == 0 )
|
||||
{
|
||||
document.getElementById("dlcurrent").disabled = true;
|
||||
document.getElementById("dlm3u").disabled = true;
|
||||
document.getElementById("MulticastTable").style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function WriteMCTable()
|
||||
{
|
||||
if( Multicast.length > 0 )
|
||||
{
|
||||
for(var i = 0; i < Multicast.length; i = i + 1)
|
||||
{
|
||||
document.write('<tr>')
|
||||
document.write('<td>'+(i+1)+'</td>')
|
||||
document.write('<td>'+Multicast[i].Title+'</td>')
|
||||
document.write('<td>'+Multicast[i].Dest+'</td>')
|
||||
if( Multicast[i].LanPorts )
|
||||
document.write('<td>'+Multicast[i].LanPorts+'</td>')
|
||||
else
|
||||
document.write('<td> </td>')
|
||||
document.write('</tr>')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</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 -->
|
||||
<h1 align="center">Static Multicast Setup</h1>
|
||||
<div id="MulticastTable">
|
||||
<table cellpadding="2px" align="center" width="80%">
|
||||
<tr>
|
||||
<th>Stream</th>
|
||||
<th>Title</th>
|
||||
<th>Destination</th>
|
||||
<th>Lan-Ports</th>
|
||||
</tr>
|
||||
<script type="text/javascript">WriteMCTable();</script>
|
||||
</table>
|
||||
<p/>
|
||||
</div>
|
||||
|
||||
<table cellpadding="2px" align="center" width="80%">
|
||||
<tr>
|
||||
<td>
|
||||
Current Settings
|
||||
</td>
|
||||
<td>
|
||||
<form action="multicast.lua" method="get">
|
||||
<input id="dlcurrent" type="submit" value="Download" ></input>
|
||||
<input type="hidden" name="select" value="current" ></input>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
M3U List
|
||||
</td>
|
||||
<td>
|
||||
<form action="multicast.lua" method="get">
|
||||
<input id="dlm3u" type="submit" value="Download" ></input>
|
||||
<input type="hidden" name="select" value="m3u" ></input>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Samples
|
||||
</td>
|
||||
<td>
|
||||
<form action="multicast.lua" method="get">
|
||||
<select name="name" size="1" style="width: 300px">
|
||||
<option value="astra19e">Astra 19.2</option>
|
||||
<option value="kabelbw">Kabel BW</option>
|
||||
<option value="unitymedia">Unity Media</option>
|
||||
</select>
|
||||
<input type="hidden" name="select" value="sample" ></input>
|
||||
<input type="submit" value="Download" ></input>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Select Sample
|
||||
</td>
|
||||
<td>
|
||||
<form action="multicast.lua" method="get">
|
||||
<select name="name" size="1" style="width: 300px">
|
||||
<option value="astra19e">Astra 19.2</option>
|
||||
<option value="kabelbw">Kabel BW</option>
|
||||
<option value="unitymedia">Unity Media</option>
|
||||
</select>
|
||||
<input type="hidden" name="select" value="copy" ></input>
|
||||
<input type="submit" value="Select & Enable" ></input>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td colspan="2">
|
||||
<form action="multicast.lua" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="filename" value="*.csv" size="30" accept="text/csv">
|
||||
<input type="submit" value="Upload & Enable">
|
||||
</form>
|
||||
</td>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<form action="multicast.lua" method="get">
|
||||
<input type="submit" value="Disable" ></input>
|
||||
<input type="hidden" name="select" value="disable" ></input>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
224
octoserve/var/www/multicast.lua
Normal file
224
octoserve/var/www/multicast.lua
Normal file
@@ -0,0 +1,224 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
local method = os.getenv("REQUEST_METHOD")
|
||||
local clength = os.getenv("CONTENT_LENGTH")
|
||||
local ctype = os.getenv("CONTENT_TYPE")
|
||||
|
||||
function http_print(s)
|
||||
if s then
|
||||
io.stdout:write(tostring(s).."\r\n")
|
||||
else
|
||||
io.stdout:write("\r\n")
|
||||
end
|
||||
end
|
||||
|
||||
if #arg> 0 then
|
||||
method="GET"
|
||||
query="select=m3u"
|
||||
proto = "HTTP/1.0"
|
||||
end
|
||||
|
||||
function SendError(err,desc)
|
||||
http_print(proto.." "..err)
|
||||
http_print()
|
||||
local file = io.open("e404.html")
|
||||
if file then
|
||||
local tmp = file:read("*a")
|
||||
tmp = string.gsub(tmp,"404 Not Found",err .. " " .. desc)
|
||||
http_print(tmp)
|
||||
file:close()
|
||||
end
|
||||
end
|
||||
|
||||
function GetDevID()
|
||||
local devid = nil
|
||||
local tmp = io.open("/config/device.id")
|
||||
if tmp then
|
||||
devid = tonumber(tmp:read())
|
||||
tmp:close()
|
||||
end
|
||||
return devid
|
||||
end
|
||||
|
||||
function CreateM3U()
|
||||
local m3u = nil
|
||||
local devid = GetDevID()
|
||||
if not devid then return nil end
|
||||
local file = io.open("/config/mcsetup.csv","r")
|
||||
if file then
|
||||
local line = file:read()
|
||||
if line then
|
||||
line = string.gsub(line,'"','')
|
||||
if string.match(line,"TITLE,REQUEST,PIDS,LANPORTS") then
|
||||
local i = 1
|
||||
m3u = "#EXTM3U".."\n"
|
||||
while i < 13 do
|
||||
line = file:read()
|
||||
if not line then break end
|
||||
if DebugFlag then print(line) end
|
||||
local title,request,pids,lanports = string.match(line,'%"(.*)%",%"(.*)%",%"P(%a-[%d%:]-)%",%"L(%a-[%d%:]-)%"')
|
||||
if not title then
|
||||
title,request,pids = string.match(line,'%"(.*)%",%"(.*)%",%"P(%a-[%d%:]-)%"')
|
||||
end
|
||||
if not title or not request or not pids then
|
||||
break
|
||||
end
|
||||
if pids == "" then break end
|
||||
|
||||
m3u = m3u .. "#EXTINF:0,"..title.."\n"
|
||||
.. "rtp://239."..devid..".2."..i..":6670\n"
|
||||
i = i + 1
|
||||
end
|
||||
elseif line:match("TITLE,REQUEST,PIDS,PROTO,IP,PORT,TTL,LANPORTS") then
|
||||
local i = 1
|
||||
m3u = "#EXTM3U".."\n"
|
||||
while i < 13 do
|
||||
line = file:read()
|
||||
if not line then break end
|
||||
if DebugFlag then print(line) end
|
||||
local title,request,pids,proto,ip,port,ttl,lanports = line:match('%"(.*)%",%"(.*)%",%"P(%a-[%d%:]-)%",%"(%u%u%u)%",%"(%d*%.%d*%.%d*%.%d*)%",(%d*),(%d*),%"L(%a-[%d%:]-)%"')
|
||||
if not title then
|
||||
title,request,pids,proto,ip,port,ttl = line:match('%"(.*)%",%"(.*)%",%"P(%a-[%d%:]-)%",%"(%u%u%u)%",%"(%d*%.%d*%.%d*%.%d*)%",(%d*),(%d*)')
|
||||
end
|
||||
if not title or not request or not pids then
|
||||
break
|
||||
end
|
||||
|
||||
if pids == "" then break end
|
||||
if proto ~= "UDP" and proto ~= "RTP" then break end
|
||||
if proto == "UDP" then ip = "@"..ip end
|
||||
|
||||
m3u = m3u .. "#EXTINF:0,"..title.."\n"
|
||||
.. proto:lower() .. "://"..ip..":"..port.."\n"
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
file:close()
|
||||
end
|
||||
|
||||
return m3u
|
||||
end
|
||||
|
||||
if method == "GET" then
|
||||
local path = nil
|
||||
local disposition = nil
|
||||
local subtype="csv"
|
||||
|
||||
if string.match(query,"select=sample") then
|
||||
local name = string.match(query,"name=(%w+)")
|
||||
if name then
|
||||
path = "/var/mcsetup/"..name..".csv"
|
||||
disposition = name..".csv"
|
||||
else
|
||||
SendError("404","Request Error")
|
||||
return
|
||||
end
|
||||
elseif string.match(query,"select=current") then
|
||||
path = "/config/mcsetup.csv"
|
||||
disposition = "mcsetup.csv"
|
||||
elseif string.match(query,"select=m3u") then
|
||||
path = "m3u"
|
||||
disposition = "mclist.m3u"
|
||||
subtype = "m3u"
|
||||
elseif string.match(query,"select=copy") then
|
||||
local name = string.match(query,"name=(%w+)")
|
||||
if name then
|
||||
path = "/var/mcsetup/"..name..".csv"
|
||||
disposition = "copy"
|
||||
else
|
||||
SendError("404","Request Error")
|
||||
return
|
||||
end
|
||||
elseif string.match(query,"select=disable") then
|
||||
disposition = "disable"
|
||||
end
|
||||
|
||||
if disposition == "disable" then
|
||||
os.remove("/config/mcsetup.csv")
|
||||
os.execute('echo "1" >/tmp/mc.tmp;mv -f /tmp/mc.tmp /tmp/mc.signal');
|
||||
http_print(proto.." 303")
|
||||
http_print("Location: http://"..host.."/multicast.html")
|
||||
http_print("")
|
||||
return
|
||||
end
|
||||
|
||||
if disposition == "copy" then
|
||||
os.execute("cp "..path.." /config/mcsetup.csv")
|
||||
os.execute('echo "1" >/tmp/mc.tmp;mv -f /tmp/mc.tmp /tmp/mc.signal');
|
||||
http_print(proto.." 303")
|
||||
http_print("Location: http://"..host.."/multicast.html")
|
||||
http_print()
|
||||
return
|
||||
end
|
||||
|
||||
local data = nil
|
||||
if path == "m3u" then
|
||||
data = CreateM3U()
|
||||
else
|
||||
local tmp = io.open(path,"r")
|
||||
if tmp then
|
||||
data = tmp:read("*a")
|
||||
tmp:close()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if data then
|
||||
http_print(proto.." 200" )
|
||||
http_print("Pragma: no-cache")
|
||||
http_print("Content-Type: text/"..subtype)
|
||||
http_print('Content-Disposition: filename="'..disposition..'"')
|
||||
http_print(string.format("Content-Length: %d",#data))
|
||||
http_print()
|
||||
http_print(data)
|
||||
else
|
||||
SendError("404",disposition.." not found")
|
||||
end
|
||||
|
||||
elseif method == "POST" and clength and ctype then
|
||||
|
||||
if not string.match(ctype,"multipart/form%-data") then
|
||||
SendError("404","??")
|
||||
return
|
||||
end
|
||||
|
||||
local boundary = string.match(ctype,"boundary=(.*)")
|
||||
if not boundary then
|
||||
SendError("404","???")
|
||||
return
|
||||
end
|
||||
|
||||
while true do
|
||||
local line = io.stdin:read()
|
||||
line = string.gsub(line,"\r","")
|
||||
if line == "" then break end
|
||||
end
|
||||
|
||||
data = io.stdin:read(16384)
|
||||
data = string.sub(data,1,#data - #boundary - 4)
|
||||
if data:match("^\239\187\191") then data = data:sub(4) end
|
||||
|
||||
data = string.gsub(data,"\r\n","\n") -- Windows -> Unix
|
||||
data = string.gsub(data,"\r","\n") -- MAC -> Unix
|
||||
|
||||
-- if data:match("^TITLE,REQUEST,PIDS,PROTO,IP,PORT,TTL,LANPORTS") then
|
||||
if data:match("^TITLE,REQUEST,PIDS,LANPORTS") or data:match("^TITLE,REQUEST,PIDS,PROTO,IP,PORT,TTL,LANPORTS") then
|
||||
file = io.open("/config/mcsetup.csv","w")
|
||||
if file then
|
||||
file:write(data)
|
||||
file:close()
|
||||
os.execute('echo "1" >/tmp/mc.tmp;mv -f /tmp/mc.tmp /tmp/mc.signal');
|
||||
end
|
||||
end
|
||||
|
||||
http_print(proto.." 303")
|
||||
http_print("Location: http://"..host.."/multicast.html")
|
||||
http_print()
|
||||
|
||||
else
|
||||
SendError("500","What")
|
||||
end
|
129
octoserve/var/www/reboot.html
Normal file
129
octoserve/var/www/reboot.html
Normal file
@@ -0,0 +1,129 @@
|
||||
<!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 -->
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
function DisableButtons()
|
||||
{
|
||||
document.getElementById("RebootButton").disabled = true;
|
||||
document.getElementById("RestartOctoButton").disabled = true;
|
||||
document.getElementById("RestartDMSButton").disabled = true;
|
||||
}
|
||||
|
||||
function Reboot()
|
||||
{
|
||||
DisableButtons();
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
newscript = document.createElement('script');
|
||||
newscript.id = "script2";
|
||||
newscript.type = "text/javascript";
|
||||
newscript.src = "/reboot.lua?sjiwjsiowjs";
|
||||
head.appendChild(newscript);
|
||||
WaitCounter = 20;
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = WaitCounter;
|
||||
window.setTimeout(Wait,1000);
|
||||
}
|
||||
|
||||
function RestartOcto()
|
||||
{
|
||||
DisableButtons();
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
newscript = document.createElement('script');
|
||||
newscript.id = "script2";
|
||||
newscript.type = "text/javascript";
|
||||
newscript.src = "/reboot.lua?restart_octo";
|
||||
head.appendChild(newscript);
|
||||
WaitCounter = 4;
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = WaitCounter;
|
||||
window.setTimeout(Wait,1000);
|
||||
}
|
||||
|
||||
function RestartDMS()
|
||||
{
|
||||
DisableButtons();
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
newscript = document.createElement('script');
|
||||
newscript.id = "script2";
|
||||
newscript.type = "text/javascript";
|
||||
newscript.src = "/reboot.lua?restart_dms";
|
||||
head.appendChild(newscript);
|
||||
WaitCounter = 4;
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = WaitCounter;
|
||||
window.setTimeout(Wait,1000);
|
||||
}
|
||||
|
||||
function Wait()
|
||||
{
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = WaitCounter;
|
||||
if( WaitCounter == 0 )
|
||||
{
|
||||
location.replace('/index.html');
|
||||
}
|
||||
else
|
||||
{
|
||||
WaitCounter = WaitCounter - 1;
|
||||
window.setTimeout(Wait,1000);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<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 class="table" align="center">
|
||||
<tr>
|
||||
<td id="updatestatus"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="RebootButton" type="Button" value="Reboot" onclick="Reboot()" />
|
||||
</form>
|
||||
</td>
|
||||
<tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="RestartOctoButton" type="Button" value="Restart Server" onclick="RestartOcto()" />
|
||||
</form>
|
||||
</td>
|
||||
<tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="RestartDMSButton" type="Button" value="Restart DMS" onclick="RestartDMS()" />
|
||||
</form>
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
34
octoserve/var/www/reboot.lua
Normal file
34
octoserve/var/www/reboot.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
|
||||
print("HTTP/1.0 200 ")
|
||||
print("Pragma: no-cache")
|
||||
print("Content-Type: application/x-javascript")
|
||||
print("")
|
||||
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
if( query == "sjiwjsiowjs" ) then
|
||||
print("Rebooting = true")
|
||||
local uImage = io.open("/boot/uImage")
|
||||
if( uImage ) then
|
||||
uImage:close()
|
||||
else
|
||||
-- Cleanup server home
|
||||
os.execute("rm -rf /var/www/*")
|
||||
os.execute("rm -rf /var/dms/*")
|
||||
os.execute("rm -rf /var/channels/*")
|
||||
end
|
||||
|
||||
os.execute("/etc/init.d/S99octo stop")
|
||||
os.execute("sync")
|
||||
os.execute("reboot")
|
||||
elseif( query == "restart_octo" ) then
|
||||
print("Rebooting = true")
|
||||
os.execute("/etc/init.d/S99octo restartoctonet")
|
||||
elseif( query == "restart_dms" ) then
|
||||
print("Rebooting = true")
|
||||
os.execute("/etc/init.d/S92dms restart")
|
||||
else
|
||||
print("Rebooting = false")
|
||||
end
|
305
octoserve/var/www/scif.html
Normal file
305
octoserve/var/www/scif.html
Normal file
@@ -0,0 +1,305 @@
|
||||
<!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">
|
||||
|
||||
SCIFEnabled = false;
|
||||
SelectedManufacturer = 0;
|
||||
SelectedUnit = 0;
|
||||
TunerList = new Array();
|
||||
|
||||
function SetManufacturer(ManuIndex)
|
||||
{
|
||||
if( SCIFEnabled ) document.getElementById("SetButton").disabled = false;
|
||||
|
||||
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);
|
||||
}
|
||||
SetUnit(ManufacturerList[ManuIndex].UnitList.length-1);
|
||||
|
||||
}
|
||||
|
||||
function SetUnit(UnitIndex)
|
||||
{
|
||||
if( SCIFEnabled ) document.getElementById("SetButton").disabled = false;
|
||||
|
||||
SelectedUnit = UnitIndex;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SetSlot(Tuner,SlotIndex)
|
||||
{
|
||||
if( SCIFEnabled ) document.getElementById("SetButton").disabled = false;
|
||||
}
|
||||
|
||||
function SaveSettings()
|
||||
{
|
||||
if( SCIFEnabled )
|
||||
{
|
||||
param = 'Manufacturer='+SelectedManufacturer+'&Unit='+SelectedUnit+'&Type=1';
|
||||
for( i = 0; i < TunerList.length; i++ )
|
||||
{
|
||||
param += '&Tuner'+(i+1)+'=';
|
||||
CurUnit = ManufacturerList[SelectedManufacturer].UnitList[SelectedUnit];
|
||||
SelectedFrequency = TunerList[i].Select.selectedIndex;
|
||||
if( SelectedFrequency > 0 )
|
||||
param += SelectedFrequency + ',' + CurUnit.Frequencies[SelectedFrequency-1];
|
||||
else
|
||||
param += '0';
|
||||
}
|
||||
|
||||
location.replace('/scifsettings.lua?'+param);
|
||||
}
|
||||
else
|
||||
{
|
||||
location.replace('/scifsettings.lua?reset');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function SetEnable()
|
||||
{
|
||||
SCIFEnabled = document.getElementById("EnableButton").checked;
|
||||
document.getElementById("SetButton").disabled = false;
|
||||
}
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
SCIFEnabled = false;
|
||||
|
||||
TunerList[0] = document.Tuner1;
|
||||
TunerList[1] = document.Tuner2;
|
||||
TunerList[2] = document.Tuner3;
|
||||
TunerList[3] = document.Tuner4;
|
||||
TunerList[4] = document.Tuner5;
|
||||
TunerList[5] = document.Tuner6;
|
||||
TunerList[6] = document.Tuner7;
|
||||
TunerList[7] = document.Tuner8;
|
||||
|
||||
document.Manufacturer.Select.length = 0;
|
||||
for( i = 0; i < ManufacturerList.length ; i++ )
|
||||
{
|
||||
ManuName = ManufacturerList[i].Name;
|
||||
if( ManuName == '' ) ManuName = "-----------------";
|
||||
document.Manufacturer.Select.options[i] = new Option(ManuName,i, false, true);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
</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="">
|
||||
<input id="EnableButton" type="checkbox" value="Check" checked="false" onclick="SetEnable()">
|
||||
Enable Unicable (EN 50494)
|
||||
</input>
|
||||
</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>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 1</td>
|
||||
<td>
|
||||
<form name="Tuner1" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(1,document.Tuner1.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 2</td>
|
||||
<td>
|
||||
<form name="Tuner2" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(2,document.Tuner2.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 3</td>
|
||||
<td>
|
||||
<form name="Tuner3" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(3,document.Tuner3.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 4</td>
|
||||
<td>
|
||||
<form name="Tuner4" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(4,document.Tuner4.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 5</td>
|
||||
<td>
|
||||
<form name="Tuner5" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(5,document.Tuner5.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 6</td>
|
||||
<td>
|
||||
<form name="Tuner6" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(6,document.Tuner6.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 7</td>
|
||||
<td>
|
||||
<form name="Tuner7" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(7,document.Tuner7.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tuner 8</td>
|
||||
<td>
|
||||
<form name="Tuner8" action="">
|
||||
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(8,document.Tuner8.Select.selectedIndex)">
|
||||
<option>----</option>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan="2" align="right">
|
||||
<div style="width: 300px">
|
||||
<form name="SetUnicable" action="">
|
||||
<input type="Button" value="Cancel" onclick="location.replace('index.html')" >
|
||||
<input id="SetButton" type="Button" value="Set" onclick="SaveSettings()" >
|
||||
</form>
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
85
octoserve/var/www/scifdb.lua
Normal file
85
octoserve/var/www/scifdb.lua
Normal file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local SLAXML = require 'slaxdom'
|
||||
local SCIFDataBase = io.open('SCIFDataBase.xml'):read("*a")
|
||||
-- SLAXML:parse(SCIFDataBase,{stripWhitespace=true})
|
||||
local dom = SLAXML:dom(SCIFDataBase,{ simple=false,stripWhitespace=true })
|
||||
|
||||
local child
|
||||
local unit
|
||||
|
||||
local i
|
||||
local j
|
||||
local k
|
||||
local l
|
||||
local Frequency
|
||||
|
||||
local ManufacturerList = {}
|
||||
local ManufacturerArray = {}
|
||||
local ManufacturerCount = 0
|
||||
|
||||
for i,child in ipairs(dom.kids) do
|
||||
print (i,child.name)
|
||||
if child.name == "SCIFDataBase" then
|
||||
for j,unit in ipairs(child.kids) do
|
||||
if unit.name == "OutdoorUnit" then
|
||||
local Name = unit.attr["Name"];
|
||||
local Manufacturer = unit.attr["Manufacturer"];
|
||||
local Type = unit.attr["Type"];
|
||||
local Protocol = unit.attr["Protocol"];
|
||||
if not Protocol then Protocol = "" end
|
||||
if not Manufacturer then Manufacturer = "" end
|
||||
if not Type then Type = "LNB" end
|
||||
-- print ( " ",Name,Manufacturer,Type)
|
||||
local CurManu = ManufacturerList[Manufacturer]
|
||||
if not CurManu then
|
||||
CurManu = { UnitList = {}, UnitCount = 0, Name = Manufacturer }
|
||||
ManufacturerCount = ManufacturerCount + 1
|
||||
ManufacturerList[Manufacturer] = CurManu
|
||||
ManufacturerArray[ManufacturerCount] = CurManu
|
||||
end
|
||||
CurManu.UnitCount = CurManu.UnitCount + 1
|
||||
local CurUnit = { Name = Name, Type = Type, Frequencies = {} }
|
||||
CurManu.UnitList[CurManu.UnitCount] = CurUnit
|
||||
local fcount = 0
|
||||
for k,Frequency in ipairs(unit.kids) do
|
||||
if Frequency.name == "UBSlot" then
|
||||
fcount = fcount + 1
|
||||
CurUnit.Frequencies[fcount] = Frequency.attr["Frequency"]
|
||||
|
||||
-- print(" -------------------------", Frequency.type, Frequency.name, Frequency.attr["Frequency"])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- print(ManufacturerCount)
|
||||
|
||||
print("HTTP/1.1 200 ")
|
||||
print("Pragma: no-cache")
|
||||
print("Content-Type: application/x-javascript")
|
||||
print("")
|
||||
|
||||
print("ManufacturerList = new Array();")
|
||||
|
||||
for i,CurManu in ipairs(ManufacturerArray) do
|
||||
print("")
|
||||
print(string.format("ManufacturerList[%d] = new Object();",i-1))
|
||||
print(string.format("ManufacturerList[%d].Name = \"%s\";",i-1,CurManu.Name))
|
||||
print(string.format("ManufacturerList[%d].UnitList = new Array();",i-1))
|
||||
|
||||
for j,CurUnit in ipairs(CurManu.UnitList) do
|
||||
print("")
|
||||
print(string.format("ManufacturerList[%d].UnitList[%d] = new Object();",i-1,j-1))
|
||||
print(string.format("ManufacturerList[%d].UnitList[%d].Name = \"%s\";",i-1,j-1,CurUnit.Name))
|
||||
print(string.format("ManufacturerList[%d].UnitList[%d].Frequencies = new Array();",i-1,j-1))
|
||||
for k,Frequency in ipairs(CurUnit.Frequencies) do
|
||||
print(string.format("ManufacturerList[%d].UnitList[%d].Frequencies[%d] = %d;",i-1,j-1,k-1,Frequency))
|
||||
end
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
end
|
||||
print("")
|
137
octoserve/var/www/scifsettings.lua
Normal file
137
octoserve/var/www/scifsettings.lua
Normal file
@@ -0,0 +1,137 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
function SaveOctoserveConf(Section,Values)
|
||||
local ConfStart = ""
|
||||
local ConfEnd = ""
|
||||
local f = io.open("/config/octoserve.conf","r")
|
||||
if f then
|
||||
while true do
|
||||
line = f:read()
|
||||
if not line then break end
|
||||
if string.match(line,"^%["..Section.."%]") then break end
|
||||
ConfStart = ConfStart .. line .. "\n"
|
||||
end
|
||||
while true do
|
||||
line = f:read()
|
||||
if not line then break end
|
||||
if string.match(line,"^%[%w+%]") then
|
||||
ConfEnd = ConfEnd .. line .. "\n"
|
||||
break
|
||||
end
|
||||
end
|
||||
while true do
|
||||
line = f:read()
|
||||
if not line then break end
|
||||
ConfEnd = ConfEnd .. line .. "\n"
|
||||
end
|
||||
f:close()
|
||||
os.remove("/config/octoserve.bak")
|
||||
os.rename("/config/octoserve.conf","/config/octoserve.bak")
|
||||
end
|
||||
|
||||
f = io.open("/config/octoserve.conf","w")
|
||||
if ConfStart then
|
||||
f:write(ConfStart)
|
||||
end
|
||||
f:write("["..Section.."]\n")
|
||||
f:write(Values)
|
||||
if ConfEnd then
|
||||
f:write(ConfEnd)
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
|
||||
function LoadOctoserveConf(Section)
|
||||
local f = io.open("/config/octoserve.conf","r")
|
||||
local Values = {}
|
||||
local line
|
||||
if f then
|
||||
while true do
|
||||
line = f:read()
|
||||
if not line then break end
|
||||
if string.match(line,"^%["..Section.."%]") then break end
|
||||
end
|
||||
while true do
|
||||
line = f:read()
|
||||
if not line then break end
|
||||
if string.match(line,"^%[%w+%]") then break end
|
||||
if not string.match(line,"^%#") then
|
||||
table.insert(Values,line)
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
return(Values)
|
||||
end
|
||||
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
if query ~= "" then
|
||||
|
||||
print(proto.." 303")
|
||||
print("Location: http://"..host.."/wait.html?5")
|
||||
print("")
|
||||
|
||||
-- print(string.format("Set Unicable %s", query ))
|
||||
|
||||
local Values = ""
|
||||
|
||||
Values = Values.."# SCIF Settings\n"
|
||||
Values = Values.."# Manufacturer = nn : Index to selected manaufacturer (only used in config webpage)\n"
|
||||
Values = Values.."# Unit = nn : Index to selected unit (only used in config webpage)\n"
|
||||
Values = Values.."# Type = nn : Type of unit: 1: EN 50494, 2: TS 50607\n"
|
||||
Values = Values.."# TunerN = Slot,Frequency[,Pin] Slot = 1..nn, Frequency = 950..2150, Pin = 0-255\n"
|
||||
Values = Values.."# Slot = 0 (no SCIF)\n"
|
||||
Values = Values.."# Slot = 1..8 for EN 50494, 1..32 for TS 50607\n"
|
||||
|
||||
if query ~= "reset" then
|
||||
local params = {}
|
||||
for w in string.gmatch(query,"(%u%w+%=%d+%,?%d*%,?%d*)") do
|
||||
table.insert(params,w)
|
||||
end
|
||||
|
||||
-- TODO: More validation
|
||||
for _,v in ipairs(params) do
|
||||
Values = Values..v.."\n"
|
||||
end
|
||||
else
|
||||
Values = Values.."Type=0\n"
|
||||
Values = Values.."Tuner1=0\n"
|
||||
Values = Values.."Tuner2=0\n"
|
||||
Values = Values.."Tuner3=0\n"
|
||||
Values = Values.."Tuner4=0\n"
|
||||
Values = Values.."Tuner5=0\n"
|
||||
Values = Values.."Tuner6=0\n"
|
||||
Values = Values.."Tuner7=0\n"
|
||||
Values = Values.."Tuner8=0\n"
|
||||
end
|
||||
|
||||
SaveOctoserveConf("scif",Values)
|
||||
os.execute("/etc/init.d/S99octo restartoctoserve&")
|
||||
else
|
||||
print(proto.." 200")
|
||||
print("Pragma: no-cache")
|
||||
print("Content-Type: application/x-javascript")
|
||||
print("")
|
||||
|
||||
Values = LoadOctoserveConf("scif")
|
||||
|
||||
print("Tuner = new Array();")
|
||||
for _,v in pairs(Values) do
|
||||
name,i,v1,v2,v3 = string.match(v,"(%a+)(%d-)%=(%d+)%,?(%d*)%,?(%d*)")
|
||||
|
||||
if name == "Tuner" then
|
||||
print(string.format("Tuner[%d] = new Object();",i-1))
|
||||
print(string.format("Tuner[%d].Slot = %d;",i-1,v1))
|
||||
if v2 == "" then v2 = 0 end
|
||||
print(string.format("Tuner[%d].Freq = %d;",i-1,v2))
|
||||
if v3 == "" then v3 = -1 end
|
||||
print(string.format("Tuner[%d].Pin = %d;",i-1,v3))
|
||||
else
|
||||
print( name .. " = " .. v1 .. ";" )
|
||||
end
|
||||
end
|
||||
end
|
49
octoserve/var/www/slaxdom.lua
Normal file
49
octoserve/var/www/slaxdom.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
-- Optional parser that creates a flat DOM from parsing
|
||||
local SLAXML = require 'slaxml'
|
||||
function SLAXML:dom(xml,opts)
|
||||
if not opts then opts={} end
|
||||
local rich = not opts.simple
|
||||
local push, pop = table.insert, table.remove
|
||||
local stack = {}
|
||||
local doc = { type="document", name="#doc", kids={} }
|
||||
local current = doc
|
||||
local builder = SLAXML:parser{
|
||||
startElement = function(name,nsURI)
|
||||
local el = { type="element", name=name, kids={}, el=rich and {} or nil, attr={}, nsURI=nsURI, parent=rich and current or nil }
|
||||
if current==doc then
|
||||
if doc.root then error(("Encountered element '%s' when the document already has a root '%s' element"):format(name,doc.root.name)) end
|
||||
doc.root = el
|
||||
end
|
||||
push(current.kids,el)
|
||||
if current.el then push(current.el,el) end
|
||||
current = el
|
||||
push(stack,el)
|
||||
end,
|
||||
attribute = function(name,value,nsURI)
|
||||
if not current or current.type~="element" then error(("Encountered an attribute %s=%s but I wasn't inside an element"):format(name,value)) end
|
||||
local attr = {type='attribute',name=name,nsURI=nsURI,value=value,parent=rich and current or nil}
|
||||
if rich then current.attr[name] = value end
|
||||
push(current.attr,attr)
|
||||
end,
|
||||
closeElement = function(name)
|
||||
if current.name~=name or current.type~="element" then error(("Received a close element notification for '%s' but was inside a '%s' %s"):format(name,current.name,current.type)) end
|
||||
pop(stack)
|
||||
current = stack[#stack]
|
||||
end,
|
||||
text = function(value)
|
||||
if current.type~='document' then
|
||||
if current.type~="element" then error(("Received a text notification '%s' but was inside a %s"):format(value,current.type)) end
|
||||
push(current.kids,{type='text',name='#text',value=value,parent=rich and current or nil})
|
||||
end
|
||||
end,
|
||||
comment = function(value)
|
||||
push(current.kids,{type='comment',name='#comment',value=value,parent=rich and current or nil})
|
||||
end,
|
||||
pi = function(name,value)
|
||||
push(current.kids,{type='pi',name=name,value=value,parent=rich and current or nil})
|
||||
end
|
||||
}
|
||||
builder:parse(xml,opts)
|
||||
return doc
|
||||
end
|
||||
return SLAXML
|
219
octoserve/var/www/slaxml.lua
Normal file
219
octoserve/var/www/slaxml.lua
Normal file
@@ -0,0 +1,219 @@
|
||||
--[=====================================================================[
|
||||
v0.5.1 Copyright © 2013 Gavin Kistner <!@phrogz.net>; MIT Licensed
|
||||
See http://github.com/Phrogz/SLAXML for details.
|
||||
--]=====================================================================]
|
||||
local SLAXML = {
|
||||
VERSION = "0.5.1",
|
||||
_call = {
|
||||
pi = function(target,content)
|
||||
print(string.format("<?%s %s?>",target,content))
|
||||
end,
|
||||
comment = function(content)
|
||||
print(string.format("<!-- %s -->",content))
|
||||
end,
|
||||
startElement = function(name,nsURI)
|
||||
print(string.format("<%s%s>",name,nsURI and (" ("..nsURI..")") or ""))
|
||||
end,
|
||||
attribute = function(name,value,nsURI)
|
||||
print(string.format(" %s=%q%s",name,value,nsURI and (" ("..nsURI..")") or ""))
|
||||
end,
|
||||
text = function(text)
|
||||
print(string.format(" text: %q",text))
|
||||
end,
|
||||
closeElement = function(name,nsURI)
|
||||
print(string.format("</%s>",name))
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
function SLAXML:parser(callbacks)
|
||||
return { _call=callbacks or self._call, parse=SLAXML.parse }
|
||||
end
|
||||
|
||||
function SLAXML:parse(xml,options)
|
||||
if not options then options = { stripWhitespace=false } end
|
||||
|
||||
-- Cache references for maximum speed
|
||||
local find, sub, gsub, char, push, pop = string.find, string.sub, string.gsub, string.char, table.insert, table.remove
|
||||
local first, last, match1, match2, match3, pos2, nsURI
|
||||
local pos = 1
|
||||
local state = "text"
|
||||
local textStart = 1
|
||||
local currentElement={}
|
||||
local currentAttributes={}
|
||||
local currentAttributeCt
|
||||
local nsStack = {}
|
||||
|
||||
local entityMap = { ["lt"]="<", ["gt"]=">", ["amp"]="&", ["quot"]='"', ["apos"]="'" }
|
||||
local entitySwap = function(orig,n,s) return entityMap[s] or n=="#" and char(s) or orig end
|
||||
local function unescape(str) return gsub( str, '(&(#?)([%d%a]+);)', entitySwap ) end
|
||||
|
||||
local function finishText()
|
||||
if first>textStart and self._call.text then
|
||||
local text = sub(xml,textStart,first-1)
|
||||
if options.stripWhitespace then
|
||||
text = gsub(text,'^%s+','')
|
||||
text = gsub(text,'%s+$','')
|
||||
if #text==0 then text=nil end
|
||||
end
|
||||
if text then self._call.text(unescape(text)) end
|
||||
end
|
||||
end
|
||||
|
||||
local function findPI()
|
||||
first, last, match1, match2 = find( xml, '^<%?([:%a_][:%w_.-]*) ?(.-)%?>', pos )
|
||||
if first then
|
||||
finishText()
|
||||
if self._call.pi then self._call.pi(match1,match2) end
|
||||
pos = last+1
|
||||
textStart = pos
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function findComment()
|
||||
first, last, match1 = find( xml, '^<!%-%-(.-)%-%->', pos )
|
||||
if first then
|
||||
finishText()
|
||||
if self._call.comment then self._call.comment(match1) end
|
||||
pos = last+1
|
||||
textStart = pos
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function nsForPrefix(prefix)
|
||||
for i=#nsStack,1,-1 do if nsStack[i][prefix] then return nsStack[i][prefix] end end
|
||||
error(("Cannot find namespace for prefix %s"):format(prefix))
|
||||
end
|
||||
|
||||
local function startElement()
|
||||
first, last, match1 = find( xml, '^<([%a_][%w_.-]*)', pos )
|
||||
if first then
|
||||
currentElement[2] = nil
|
||||
finishText()
|
||||
pos = last+1
|
||||
first,last,match2 = find(xml, '^:([%a_][%w_.-]*)', pos )
|
||||
if first then
|
||||
currentElement[1] = match2
|
||||
currentElement[2] = nsForPrefix(match1)
|
||||
match1 = match2
|
||||
pos = last+1
|
||||
else
|
||||
currentElement[1] = match1
|
||||
for i=#nsStack,1,-1 do if nsStack[i]['!'] then currentElement[2] = nsStack[i]['!']; break end end
|
||||
end
|
||||
currentAttributeCt = 0
|
||||
push(nsStack,{})
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function findAttribute()
|
||||
first, last, match1 = find( xml, '^%s+([:%a_][:%w_.-]*)%s*=%s*', pos )
|
||||
if first then
|
||||
pos2 = last+1
|
||||
first, last, match2 = find( xml, '^"([^<"]*)"', pos2 ) -- FIXME: disallow non-entity ampersands
|
||||
if first then
|
||||
pos = last+1
|
||||
match2 = unescape(match2)
|
||||
else
|
||||
first, last, match2 = find( xml, "^'([^<']*)'", pos2 ) -- FIXME: disallow non-entity ampersands
|
||||
if first then
|
||||
pos = last+1
|
||||
match2 = unescape(match2)
|
||||
end
|
||||
end
|
||||
end
|
||||
if match1 and match2 then
|
||||
local currentAttribute = {match1,match2}
|
||||
local prefix,name = string.match(match1,'^([^:]+):([^:]+)$')
|
||||
if prefix then
|
||||
if prefix=='xmlns' then
|
||||
nsStack[#nsStack][name] = match2
|
||||
else
|
||||
currentAttribute[1] = name
|
||||
currentAttribute[3] = nsForPrefix(prefix)
|
||||
end
|
||||
else
|
||||
if match1=='xmlns' then
|
||||
nsStack[#nsStack]['!'] = match2
|
||||
currentElement[2] = match2
|
||||
end
|
||||
end
|
||||
currentAttributeCt = currentAttributeCt + 1
|
||||
currentAttributes[currentAttributeCt] = currentAttribute
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function findCDATA()
|
||||
first, last, match1 = find( xml, '^<!%[CDATA%[(.-)%]%]>', pos )
|
||||
if first then
|
||||
finishText()
|
||||
if self._call.text then self._call.text(match1) end
|
||||
pos = last+1
|
||||
textStart = pos
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function closeElement()
|
||||
first, last, match1 = find( xml, '^%s*(/?)>', pos )
|
||||
if first then
|
||||
state = "text"
|
||||
pos = last+1
|
||||
textStart = pos
|
||||
|
||||
if self._call.startElement then self._call.startElement(unpack(currentElement)) end
|
||||
if self._call.attribute then
|
||||
for i=1,currentAttributeCt do self._call.attribute(unpack(currentAttributes[i])) end end
|
||||
|
||||
if match1=="/" then
|
||||
pop(nsStack)
|
||||
if self._call.closeElement then self._call.closeElement(unpack(currentElement)) end
|
||||
end
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function findElementClose()
|
||||
first, last, match1, match2 = find( xml, '^</([%a_][%w_.-]*)%s*>', pos )
|
||||
if first then
|
||||
nsURI = nil
|
||||
for i=#nsStack,1,-1 do if nsStack[i]['!'] then nsURI = nsStack[i]['!']; break end end
|
||||
else
|
||||
first, last, match2, match1 = find( xml, '^</([%a_][%w_.-]*):([%a_][%w_.-]*)%s*>', pos )
|
||||
if first then nsURI = nsForPrefix(match2) end
|
||||
end
|
||||
if first then
|
||||
finishText()
|
||||
if self._call.closeElement then self._call.closeElement(match1,nsURI) end
|
||||
pos = last+1
|
||||
textStart = pos
|
||||
pop(nsStack)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
while pos<#xml do
|
||||
if state=="text" then
|
||||
if not (findPI() or findComment() or findCDATA() or findElementClose()) then
|
||||
if startElement() then
|
||||
state = "attributes"
|
||||
else
|
||||
first, last = find( xml, '^[^<]+', pos )
|
||||
pos = (first and last or pos) + 1
|
||||
end
|
||||
end
|
||||
elseif state=="attributes" then
|
||||
if not findAttribute() then
|
||||
if not closeElement() then
|
||||
error("Was in an element and couldn't find attributes or the close.")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return SLAXML
|
16
octoserve/var/www/stream.lua
Normal file
16
octoserve/var/www/stream.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
|
||||
print("HTTP/1.0 200\r")
|
||||
print("Content-type: application/sdp\r")
|
||||
print("\r")
|
||||
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
print("v=0\r")
|
||||
print("o=- 2890844526 2890842807 IN IP4 10.0.4.31\r")
|
||||
print("s=RTSP Session\r")
|
||||
print("t=0 0\r")
|
||||
print("m=video 0 RTP/AVP 33\r")
|
||||
print("a=control:stream=1\r")
|
||||
print("a=fmtp:33\r")
|
158
octoserve/var/www/streamstatus.html
Normal file
158
octoserve/var/www/streamstatus.html
Normal file
@@ -0,0 +1,158 @@
|
||||
<!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=iso-8859-1" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<title>OctopusNet</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css">
|
||||
<script type="text/javascript" src="/menu.js"></script>
|
||||
<!-- Add additional scripts and settings here -->
|
||||
<script id=script1 type="text/javascript" src="/octoserve/streamstatus.js"></script>
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
var LastTimeStamp = 0;
|
||||
var LastBytes;
|
||||
|
||||
function Diff(a,b)
|
||||
{
|
||||
if( b < 0 && a > 0 )
|
||||
{
|
||||
return b - a + 4294967296;
|
||||
}
|
||||
else
|
||||
return b - a;
|
||||
}
|
||||
|
||||
function Show()
|
||||
{
|
||||
for(var i = 0; i < StreamList.length ; i++ )
|
||||
{
|
||||
if( StreamList[i].Status == "Active" )
|
||||
{
|
||||
document.getElementById("elStatus"+i).firstChild.nodeValue = "Running";
|
||||
document.getElementById("elInput"+i).firstChild.nodeValue = StreamList[i].Input + 1;
|
||||
document.getElementById("elClient"+i).firstChild.nodeValue = StreamList[i].Client;
|
||||
document.getElementById("elPackets"+i).firstChild.nodeValue = StreamList[i].Packets;
|
||||
var TimeDiff = Diff(LastTimeStamp,TimeStamp);
|
||||
var BytesDiff = Diff(LastBytes[i],StreamList[i].Bytes);
|
||||
if( TimeDiff > 0 && BytesDiff > 0 )
|
||||
{
|
||||
var Speed = 8000 * BytesDiff / TimeDiff;
|
||||
document.getElementById("elSpeed"+i).firstChild.nodeValue = Speed.toFixed(0);
|
||||
LastBytes[i] = StreamList[i].Bytes;
|
||||
}
|
||||
else
|
||||
document.getElementById("elSpeed"+i).firstChild.nodeValue = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("elStatus"+i).firstChild.nodeValue = "Stopped";
|
||||
document.getElementById("elInput"+i).firstChild.nodeValue = "";
|
||||
document.getElementById("elClient"+i).firstChild.nodeValue = "";
|
||||
document.getElementById("elPackets"+i).firstChild.nodeValue = "";
|
||||
document.getElementById("elSpeed"+i).firstChild.nodeValue = "";
|
||||
LastBytes[i] = 0;
|
||||
}
|
||||
}
|
||||
LastTimeStamp = TimeStamp;
|
||||
}
|
||||
|
||||
function renew()
|
||||
{
|
||||
|
||||
script = document.getElementById("script1");
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
head.removeChild(script);
|
||||
newscript = document.createElement('script');
|
||||
newscript.id = "script1";
|
||||
newscript.type = script.type;
|
||||
newscript.src = script.src;
|
||||
head.appendChild(newscript);
|
||||
|
||||
Show();
|
||||
window.setTimeout(renew,1000);
|
||||
}
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
LastBytes = new Array();
|
||||
LastTimeStamp = TimeStamp;
|
||||
for( var i = 0; i < StreamList.length; i++ )
|
||||
{
|
||||
LastBytes[i] = 0;
|
||||
if( StreamList[i].Status == "Active" )
|
||||
{
|
||||
LastBytes[i] = StreamList[i].Bytes;
|
||||
}
|
||||
}
|
||||
|
||||
Show();
|
||||
window.setTimeout(renew,1000);
|
||||
}
|
||||
|
||||
</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="maintd">
|
||||
<div class="content">
|
||||
<!-- Begin Content -->
|
||||
|
||||
<table id="streamstatus" align="center">
|
||||
<colgroup>
|
||||
<col width="80px"/>
|
||||
<col width="80px"/>
|
||||
<col width="80px"/>
|
||||
<col width="100px"/>
|
||||
<col width="130px"/>
|
||||
<col width="170px"/>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>Stream</th>
|
||||
<th>Status</th>
|
||||
<th>Input</th>
|
||||
<th>Client</th>
|
||||
<th>RTP Packets</th>
|
||||
<th>Speed</th>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
for( i = 0; i < StreamList.length ; i++ )
|
||||
{
|
||||
document.write('<tr>');
|
||||
document.write('<td>' + (i+1) + '</td>');
|
||||
document.write('<td id="elStatus'+i+'"> </td>');
|
||||
document.write('<td id="elInput'+i+'"> </td>');
|
||||
document.write('<td id="elClient'+i+'"> </td>');
|
||||
document.write('<td id="elPackets'+i+'"> </td>');
|
||||
document.write('<td id="elSpeed'+i+'"> </td>');
|
||||
document.write('</tr>');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
78
octoserve/var/www/style.css
Normal file
78
octoserve/var/www/style.css
Normal file
@@ -0,0 +1,78 @@
|
||||
body {
|
||||
color:#000000;
|
||||
background-color:#000000;
|
||||
margin:0;
|
||||
font-family:Arial,sans-serif;
|
||||
}
|
||||
|
||||
.maintable {
|
||||
color:#000000;
|
||||
background-color:#FFFFFF;
|
||||
text-align:center;
|
||||
border:0;
|
||||
}
|
||||
|
||||
.maintd {
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
.menutable {
|
||||
color:#000000;
|
||||
background-color:#e0e0e0;
|
||||
text-align:center;
|
||||
border:5px;
|
||||
width:95%;
|
||||
font-size:120%;
|
||||
}
|
||||
|
||||
.menucur {
|
||||
color:#e0e0e0;
|
||||
background-color:#000000;
|
||||
}
|
||||
|
||||
.menutable a:link { text-decoration:none; color:#000000; }
|
||||
.menutable a:visited { text-decoration:none; color:#000000; }
|
||||
|
||||
.content {
|
||||
color:#000000;
|
||||
background-color:#FFFFF0;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
border:5px;
|
||||
font-size:100%;
|
||||
}
|
||||
|
||||
.table {
|
||||
color:#000000;
|
||||
text-align:center;
|
||||
border:1px;
|
||||
}
|
||||
|
||||
.tableleft {
|
||||
color:#000000;
|
||||
float:center;
|
||||
text-align:left;
|
||||
border:1px;
|
||||
}
|
||||
|
||||
#streamstatus {
|
||||
color:#000000;
|
||||
text-align:center;
|
||||
border:1px;
|
||||
width:90%;
|
||||
}
|
||||
|
||||
td#streamstatus {
|
||||
color:#000080;
|
||||
}
|
||||
|
||||
#tunerstatus {
|
||||
color:#000000;
|
||||
text-align:center;
|
||||
border:1px;
|
||||
width:60%;
|
||||
}
|
||||
|
||||
a img {
|
||||
border:none;
|
||||
}
|
168
octoserve/var/www/system.html
Normal file
168
octoserve/var/www/system.html
Normal file
@@ -0,0 +1,168 @@
|
||||
<!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=iso-8859-1" />
|
||||
<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="/systemsettings.lua"></script>
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
function SaveSettings()
|
||||
{
|
||||
param = "";
|
||||
param += "telnet=" + (telnetEnabled?"1":"0");
|
||||
param += "&";
|
||||
param += "vlan=" + (vlanEnabled?"1":"0");
|
||||
param += "&";
|
||||
param += "nodms=" + (nodmsEnabled?"1":"0");
|
||||
param += "&";
|
||||
param += "nodvbt=" + (nodvbtEnabled?"1":"0");
|
||||
param += "&";
|
||||
param += "noswitch=" + (noswitchEnabled?"1":"0");
|
||||
location.replace('/systemsettings.lua?'+param);
|
||||
}
|
||||
|
||||
function ClearSettings()
|
||||
{
|
||||
telnetEnabled = false;
|
||||
vlanEnabled = false;
|
||||
nodmsEnabled = false;
|
||||
nodvbtEnabled = false;
|
||||
noswitchEnabled = false;
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
document.getElementById("QOSButton").checked = vlanEnabled;
|
||||
document.getElementById("TelnetButton").checked = telnetEnabled;
|
||||
document.getElementById("NODMSButton").checked = nodmsEnabled;
|
||||
document.getElementById("NODVBTButton").checked = nodvbtEnabled;
|
||||
document.getElementById("NOSwitchButton").checked = noswitchEnabled;
|
||||
}
|
||||
|
||||
function Change()
|
||||
{
|
||||
vlanEnabled = document.getElementById("QOSButton").checked;
|
||||
telnetEnabled = document.getElementById("TelnetButton").checked;
|
||||
nodmsEnabled = document.getElementById("NODMSButton").checked;
|
||||
nodvbtEnabled = document.getElementById("NODVBTButton").checked;
|
||||
noswitchEnabled = document.getElementById("NOSwitchButton").checked;
|
||||
document.getElementById("SetButton").disabled = false;
|
||||
}
|
||||
|
||||
</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 class="tableleft" align="center" cellspacing="2px">
|
||||
<tr>
|
||||
<td>Layer 2 Quality of Service</td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="QOSButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
|
||||
</form>
|
||||
</td>
|
||||
<td>See note below</td>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td>Telnet</td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="TelnetButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
|
||||
</form>
|
||||
</td>
|
||||
<td>Enable it at your own risk</td>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td>NODMS</td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="NODMSButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
|
||||
</form>
|
||||
</td>
|
||||
<td>Disable DMS announcement.</td>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td>NODVBT</td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="NODVBTButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
|
||||
</form>
|
||||
</td>
|
||||
<td>Disable DVBT announcement.</td>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td>No DVB switch</td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="NOSwitchButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
|
||||
</form>
|
||||
</td>
|
||||
<td>Disable DVB switch emulation on S8.</td>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<div style="width: 300px">
|
||||
<form action="">
|
||||
<input type="Button" value="Cancel" onclick="location.replace('index.html')" >
|
||||
<input type="Button" value="Reset" onclick="ClearSettings()" >
|
||||
<input id="SetButton" type="Button" disabled="true" value="Set" onclick="SaveSettings()" >
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin:20px; clear:both">
|
||||
<h3>Layer 2 Quality of Service</h3>
|
||||
This is defined in the <b>IEEE 802.1Q</b> VLAN standard, and provides QoS in a local network.<br/>
|
||||
For it to work all components in the LAN must either be transparent to it or need to support it.
|
||||
<li><b>hubs:</b> always transparent.</li>
|
||||
<li><b>dumb switches:</b> usually transparent, better ones use it to prioritise the traffic.</li>
|
||||
<li><b>smart switches:</b> depends on setting.</li>
|
||||
<li><b>PCs and the like:</b> newer systems support it by default, for older systems check the LAN adapter settings.</li>
|
||||
<li><b>WLAN access points:</b> depends on firmware and model. OpenWRT based devices usually work.</li>
|
||||
<br>
|
||||
Dies ist im <b>IEEE 802.1Q</b> VLAN Standard definiert und erlaubt QoS im lokalem Netz.<br/>
|
||||
Damit es funktioniert müssen alle Netzwerkkompenenten im LAN entweder transparent sein oder es unterstützen.
|
||||
<li><b>Hubs:</b> sind immer transparent</li>
|
||||
<li><b>Dumb Switches:</b> normalerweise transparent, bessere prioritisieren damit den Datenverkehr</li>
|
||||
<li><b>Smart Switches:</b> hängt von den Einstellungen ab</li>
|
||||
<li><b>PCs und dergleichen:</b> neue Systeme unterstützten es defaultmässig, für ältere in den Einstellungen der Netzwerkarte nachschauen</li>
|
||||
<li><b>WLAN Accesspoints:</b> hängt von Modell und deren Firmware ab. OpenWRT basierte Geräte unterstützen es normalerweise</li>
|
||||
</div>
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
60
octoserve/var/www/systeminfo.lua
Normal file
60
octoserve/var/www/systeminfo.lua
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
function http_print(s)
|
||||
io.stdout:write(s.."\r\n")
|
||||
end
|
||||
|
||||
http_print("HTTP/1.1 200")
|
||||
http_print("Pragma: no-cache")
|
||||
http_print("Content-Type: application/x-javascript")
|
||||
--http_print("Content-Type: text/plain")
|
||||
http_print("")
|
||||
|
||||
local ddtest = io.popen("ddtest reg 0+4","r")
|
||||
local ddo = ddtest:read("*a")
|
||||
ddtest:close()
|
||||
|
||||
local registers = {}
|
||||
for v in string.gmatch(ddo,"%((%-?%d+)%)") do
|
||||
table.insert(registers,v)
|
||||
end
|
||||
|
||||
local tmp = io.popen("uname -r -m","r")
|
||||
local tmp1 = tmp:read()
|
||||
tmp:close()
|
||||
|
||||
-- local uname = string.match(tmp1,"Linux (%.+)")
|
||||
-- http_print(tmp1)
|
||||
-- http_print(uname)
|
||||
local uname = tmp1
|
||||
|
||||
tmp = io.popen("ls /config/*.img","r")
|
||||
local fwimg = tmp:read("*a")
|
||||
tmp:close()
|
||||
|
||||
local images = {}
|
||||
for v in string.gmatch(fwimg,"%.(%d+)%.") do
|
||||
table.insert(images,v)
|
||||
end
|
||||
local fwdate = "";
|
||||
if images[1] then fwdate = images[1] end
|
||||
|
||||
beta = "false"
|
||||
tmp = io.open("/config/updateserver")
|
||||
if tmp then
|
||||
beta = "true"
|
||||
tmp:close()
|
||||
end
|
||||
|
||||
http_print(string.format("var linuxver = \"%s\";",uname))
|
||||
http_print(string.format("var fpgaver = \"%d.%d\";",(registers[1] / 65536) % 65536,registers[1] % 65536))
|
||||
http_print(string.format("var fpgatype = \"%0X\";",registers[3] / 65536))
|
||||
-- http_print(string.format("var fpgaver = \"%d.%d\";",registers[1] >> 16,registers[1] & 0xffff))
|
||||
-- http_print(string.format("var fpgatype = \"%0X\";",registers[3] >> 16))
|
||||
http_print(string.format("var fwdate = \"%s\";",fwdate))
|
||||
http_print(string.format("var host = \"%s\";",host))
|
||||
http_print(string.format("var beta = %s;",beta))
|
130
octoserve/var/www/systemsettings.lua
Normal file
130
octoserve/var/www/systemsettings.lua
Normal file
@@ -0,0 +1,130 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
function SaveOctoserveConf(Section,Values)
|
||||
local ConfStart
|
||||
local ConfEnd
|
||||
local f = io.open("/config/octoserve.conf","r")
|
||||
if f then
|
||||
local CurConf = f:read("*a")
|
||||
f:close()
|
||||
ConfStart,ConfEnd = string.match(CurConf,"(.-)%["..Section.."%].+\n(%[.+)")
|
||||
os.remove("/config/octoserve.bak")
|
||||
os.rename("/config/octoserve.conf","/config/octoserve.bak")
|
||||
end
|
||||
|
||||
f = io.open("/config/octoserve.conf","w")
|
||||
if ConfStart then
|
||||
f:write(ConfStart)
|
||||
end
|
||||
f:write("["..Section.."]\n")
|
||||
f:write(Values)
|
||||
if ConfEnd then
|
||||
f:write(ConfEnd)
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
|
||||
function ReadSetting(name)
|
||||
local enabled = false
|
||||
local tmp = io.open("/config/"..name..".enabled","r")
|
||||
if tmp then
|
||||
enabled = true
|
||||
end
|
||||
return(enabled)
|
||||
end
|
||||
|
||||
function WriteSetting(name,enabled)
|
||||
local wasenabled = false
|
||||
if os.remove("/config/"..name..".enabled") then wasenabled = true end
|
||||
if( enabled ) then
|
||||
local f = io.open("/config/"..name..".enabled","w")
|
||||
if f then
|
||||
f:write("1")
|
||||
f:close()
|
||||
end
|
||||
end
|
||||
return enabled ~= wasenabled
|
||||
end
|
||||
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
|
||||
if arg[1] then
|
||||
query = arg[1]
|
||||
proto = "HTTP/1.0"
|
||||
host = "local"
|
||||
end
|
||||
|
||||
if query ~= "" then
|
||||
os.execute("echo \""..query.."\" >/tmp/query")
|
||||
local params = {}
|
||||
for w in string.gmatch(query,"(%a%w+%=%d+%,?%d*%,?%d*)") do
|
||||
table.insert(params,w)
|
||||
end
|
||||
|
||||
-- TODO: More validation
|
||||
local nextloc = "index.html"
|
||||
local restart = 0;
|
||||
for _,v in ipairs(params) do
|
||||
name,value = string.match(v,"(%w+)%=(%d+)")
|
||||
if( WriteSetting(name,value == "1") ) then
|
||||
if name == "telnet" then
|
||||
os.rename("/etc/securetty","/etc/securetty.bak"); -- temp fix to allow root login on telnet
|
||||
os.execute("/etc/init.d/S91telnet restart")
|
||||
end
|
||||
-- if name == "vlan" then os.execute("/etc/init.d/S99octo restartoctonet&") end
|
||||
-- if name == "nodms" then os.execute("/etc/init.d/S99octo restartoctonet&") end
|
||||
-- if name == "nodvbt" then os.execute("/etc/init.d/S99octo restartoctonet&") end
|
||||
if name == "vlan" then restart = 1 end
|
||||
if name == "nodms" then restart = 1 end
|
||||
if name == "nodvbt" then restart = 1 end
|
||||
if name == "noswitch" then restart = 1 end
|
||||
nextloc = "wait.html?5"
|
||||
end
|
||||
end
|
||||
if restart == 1 then os.execute("/etc/init.d/S99octo restartoctonet&") end
|
||||
print(proto.." 303")
|
||||
print("Location: http://"..host.."/"..nextloc)
|
||||
print("")
|
||||
else
|
||||
|
||||
print(proto.." 200")
|
||||
print("Pragma: no-cache")
|
||||
print("Content-Type: application/x-javascript")
|
||||
print("")
|
||||
|
||||
if ReadSetting("telnet") then
|
||||
print("telnetEnabled = true;")
|
||||
else
|
||||
print("telnetEnabled = false;")
|
||||
end
|
||||
|
||||
if ReadSetting("vlan") then
|
||||
print("vlanEnabled = true;")
|
||||
else
|
||||
print("vlanEnabled = false;")
|
||||
end
|
||||
|
||||
if ReadSetting("nodms") then
|
||||
print("nodmsEnabled = true;")
|
||||
else
|
||||
print("nodmsEnabled = false;")
|
||||
end
|
||||
|
||||
if ReadSetting("nodvbt") then
|
||||
print("nodvbtEnabled = true;")
|
||||
else
|
||||
print("nodvbtEnabled = false;")
|
||||
end
|
||||
|
||||
if ReadSetting("noswitch") then
|
||||
print("noswitchEnabled = true;")
|
||||
else
|
||||
print("noswitchEnabled = false;")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
63
octoserve/var/www/template.html
Normal file
63
octoserve/var/www/template.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!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 -->
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<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 -->
|
||||
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
<p/>
|
||||
bla bla
|
||||
|
||||
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
118
octoserve/var/www/tunerstatus.html
Normal file
118
octoserve/var/www/tunerstatus.html
Normal file
@@ -0,0 +1,118 @@
|
||||
<!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=iso-8859-1" />
|
||||
<title>OctopusNet</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css">
|
||||
<script type="text/javascript" src="/menu.js"></script>
|
||||
<!-- Add additional scripts and settings here -->
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<script id=script1 type="text/javascript" src="/octoserve/tunerstatus.js"></script>
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
function Show()
|
||||
{
|
||||
for( i = 0; i < TunerList.length ; i++ )
|
||||
{
|
||||
if( TunerList[i].Active )
|
||||
{
|
||||
if( TunerList[i].Lock )
|
||||
{
|
||||
document.getElementById("elStatus"+i).firstChild.nodeValue = "Locked";
|
||||
document.getElementById("elStrength"+i).firstChild.nodeValue = TunerList[i].Strength;
|
||||
document.getElementById("elQuality"+i).firstChild.nodeValue = TunerList[i].Quality;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("elStatus"+i).firstChild.nodeValue = "No Signal";
|
||||
document.getElementById("elStrength"+i).firstChild.nodeValue = "";
|
||||
document.getElementById("elQuality"+i).firstChild.nodeValue = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("elStatus"+i).firstChild.nodeValue = "";
|
||||
document.getElementById("elStrength"+i).firstChild.nodeValue = "";
|
||||
document.getElementById("elQuality"+i).firstChild.nodeValue = "";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function renew()
|
||||
{
|
||||
script = document.getElementById("script1");
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
head.removeChild(script);
|
||||
newscript = document.createElement('script');
|
||||
newscript.id = "script1";
|
||||
newscript.type = script.type;
|
||||
newscript.src = script.src;
|
||||
head.appendChild(newscript);
|
||||
|
||||
Show();
|
||||
window.setTimeout(renew,1000);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<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="maintd">
|
||||
<div class="content">
|
||||
<!-- Begin Content -->
|
||||
|
||||
<table id="tunerstatus" align="center">
|
||||
<tr>
|
||||
<th>
|
||||
Tuner
|
||||
</th>
|
||||
<th>
|
||||
Lock
|
||||
</th>
|
||||
<th>
|
||||
Strength
|
||||
</th>
|
||||
<th>
|
||||
Quality
|
||||
</th>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
for( i = 0; i < TunerList.length ; i++ )
|
||||
{
|
||||
document.write('<tr>');
|
||||
document.write('<td>' + (i+1) + '</td>');
|
||||
document.write('<td id="elStatus'+i+'"> </td>');
|
||||
document.write('<td id="elStrength'+i+'"> </td>');
|
||||
document.write('<td id="elQuality'+i+'"> </td>');
|
||||
document.write('</tr>');
|
||||
}
|
||||
|
||||
Show();
|
||||
window.setTimeout(renew,1000);
|
||||
</script>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
136
octoserve/var/www/update.html
Normal file
136
octoserve/var/www/update.html
Normal file
@@ -0,0 +1,136 @@
|
||||
<!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=iso-8859-1" />
|
||||
<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="/systeminfo.lua"></script>
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
isChecking = false;
|
||||
UpdateInfo = "";
|
||||
CheckDone = false;
|
||||
UpdateAvailable = false;
|
||||
|
||||
function FWVersion(fwdate)
|
||||
{
|
||||
if( fwdate.length > 0 )
|
||||
{
|
||||
// Jahr, Monat, Tag, Stunden, Minuten
|
||||
// date = new Date("20"+fwdate.substr(0,2),fwdate.substr(2,2)-1,fwdate.substr(4,2),fwdate.substr(6,2),fwdate.substr(8,2),"0");
|
||||
|
||||
var date = new Date(1);
|
||||
date.setUTCDate(fwdate.substr(4,2));
|
||||
date.setUTCFullYear("20"+fwdate.substr(0,2));
|
||||
date.setUTCMonth(fwdate.substr(2,2)-1);
|
||||
date.setUTCHours(fwdate.substr(6,2));
|
||||
date.setUTCMinutes(fwdate.substr(8,2));
|
||||
|
||||
var ds = date.toGMTString();
|
||||
|
||||
return (ds.substring(5,ds.length-7));
|
||||
}
|
||||
return ("?");
|
||||
}
|
||||
|
||||
|
||||
function CheckUpdateDone()
|
||||
{
|
||||
if( CheckDone )
|
||||
{
|
||||
script = document.getElementById("script1");
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
head.removeChild(script);
|
||||
|
||||
if( UpdateInfo != "" )
|
||||
{
|
||||
document.getElementById("UpdateButton").value = "Update";
|
||||
document.getElementById("updatemsg").firstChild.nodeValue = "New firmware/system package available";
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = "Version: " + FWVersion(UpdateInfo);
|
||||
UpdateAvailable = true;
|
||||
}
|
||||
else
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = "No update available";
|
||||
isChecking = false;
|
||||
document.getElementById("UpdateButton").disabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
window.setTimeout(CheckUpdateDone,100);
|
||||
}
|
||||
}
|
||||
|
||||
function CheckUpdate()
|
||||
{
|
||||
if( !isChecking )
|
||||
{
|
||||
document.getElementById("UpdateButton").disabled = true;
|
||||
isChecking = true;
|
||||
if( UpdateAvailable )
|
||||
{
|
||||
location.replace('/doupdate.html');
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckDone = false;
|
||||
document.getElementById("updatestatus").firstChild.nodeValue = "***** Checking ******";
|
||||
head = document.getElementsByTagName('head')[0];
|
||||
newscript = document.createElement('script');
|
||||
newscript.id = "script1";
|
||||
newscript.type = "text/javascript";
|
||||
newscript.src = "/update.lua?check";
|
||||
head.appendChild(newscript);
|
||||
window.setTimeout(CheckUpdateDone,100);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<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 class="table" align="center">
|
||||
<tr>
|
||||
<td id="updatemsg">Check for firmware/system update:</td>
|
||||
<td>
|
||||
<form action="">
|
||||
<input id="UpdateButton" type="Button" value="Check" onclick="CheckUpdate()" />
|
||||
</form>
|
||||
</td>
|
||||
<tr>
|
||||
|
||||
<tr>
|
||||
<td id="updatestatus"> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
143
octoserve/var/www/update.lua
Normal file
143
octoserve/var/www/update.lua
Normal file
@@ -0,0 +1,143 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local query = ""
|
||||
local DoUpdate = false
|
||||
local DoCheck = false
|
||||
|
||||
if arg[1] then
|
||||
if arg[1] == "doupdate" then
|
||||
DoUpdate = true
|
||||
DoCheck = true
|
||||
else
|
||||
query = arg[1]
|
||||
end
|
||||
else
|
||||
query = os.getenv("QUERY_STRING")
|
||||
end
|
||||
|
||||
if query == "check" then
|
||||
DoCheck = true
|
||||
end
|
||||
|
||||
local userver = "download.digital-devices.de/download/linux"
|
||||
local NewImage = "octonet.0000000000.img"
|
||||
local CurImage = "octonet.0000000000.img"
|
||||
|
||||
if DoCheck then
|
||||
|
||||
local tmp = io.open("/config/updateserver")
|
||||
if tmp then
|
||||
userver = tmp:read()
|
||||
tmp:close()
|
||||
end
|
||||
|
||||
local tmp = io.popen(string.format("wget http://%s/octonet/ -q -O -",userver),"r")
|
||||
local serverdir = tmp:read("*a")
|
||||
tmp:close()
|
||||
|
||||
local tmp = io.popen("ls /config/octonet.*.img","r")
|
||||
local configdir = tmp:read("*a")
|
||||
tmp:close()
|
||||
|
||||
for v in string.gmatch(serverdir,"\"(octonet%.%d+%.img)\"") do
|
||||
if v > NewImage then
|
||||
NewImage = v
|
||||
end
|
||||
end
|
||||
|
||||
for v in string.gmatch(configdir,"(octonet%.%d+%.img)") do
|
||||
if v > CurImage then
|
||||
CurImage = v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if DoUpdate then
|
||||
if NewImage > CurImage then
|
||||
os.execute("echo CheckDone >/tmp/updatestatus")
|
||||
os.remove("/config/tmpimage")
|
||||
local wgetstatus = os.execute(string.format("wget -q -P /config http://%s/octonet/%s -O /config/tmpimage >/dev/null 2>/dev/null",userver,NewImage))
|
||||
if wgetstatus == 0 then
|
||||
local ShaFile = string.gsub(NewImage,".img",".sha")
|
||||
wgetstatus = os.execute(string.format("wget -q -P /config http://%s/octonet/%s -O /config/%s >/dev/null 2>/dev/null",userver,ShaFile,ShaFile))
|
||||
os.execute("echo DownloadDone >/tmp/updatestatus")
|
||||
if wgetstatus == 0 then
|
||||
local tmp = io.popen(string.format("sha256sum /config/tmpimage","r"))
|
||||
local csum1 = tmp:read()
|
||||
tmp:close()
|
||||
local csum2 = io.open(string.format("/config/%s",ShaFile)):read()
|
||||
csum1 = string.match(csum1,"(%x+)")
|
||||
csum2 = string.match(csum2,"(%x+)")
|
||||
if csum1 == csum2 then
|
||||
os.execute("lua /etc/switch/swsetup.lua gb yb");
|
||||
os.rename("/config/tmpimage",string.format("/config/%s",NewImage))
|
||||
os.remove(string.format("/config/%s",CurImage))
|
||||
os.remove(string.format("/config/%s",string.gsub(CurImage,".img",".sha")))
|
||||
os.remove("/boot/uImage")
|
||||
os.execute("echo VerifyDone >/tmp/updatestatus")
|
||||
else
|
||||
print("Error")
|
||||
os.remove("/config/tmpimage")
|
||||
os.remove(string.format("/config/%s",ShaFile))
|
||||
os.execute("echo VerifyError >/tmp/updatestatus")
|
||||
return
|
||||
end
|
||||
else
|
||||
os.remove("/config/tmpimage")
|
||||
os.remove(string.format("/config/%s",ShaFile))
|
||||
os.execute("echo DownloadError >/tmp/updatestatus")
|
||||
end
|
||||
else
|
||||
os.remove("/config/tmpimage")
|
||||
os.execute("echo DownloadError >/tmp/updatestatus")
|
||||
end
|
||||
else
|
||||
os.execute("echo CheckError >/tmp/updatestatus")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
print("HTTP/1.0 200 ")
|
||||
print("Pragma: no-cache")
|
||||
print("Content-Type: application/x-javascript")
|
||||
print("")
|
||||
|
||||
if query == "check" then
|
||||
|
||||
if NewImage > CurImage then
|
||||
print(string.format("UpdateInfo = \"%s\";",string.match(NewImage,"octonet%.(%d+)")))
|
||||
else
|
||||
print("UpdateInfo = \"\";")
|
||||
end
|
||||
print("CheckDone = true;")
|
||||
elseif query == "update" then
|
||||
os.remove("/tmp/updatestatus")
|
||||
print("UpdateStarted = true;")
|
||||
os.execute("lua update.lua doupdate >/dev/null 2>/dev/null &")
|
||||
elseif query == "updatestatus" then
|
||||
local tmp = io.open("/tmp/updatestatus")
|
||||
local updatestatus = ""
|
||||
if tmp then
|
||||
updatestatus = tmp:read()
|
||||
tmp:close()
|
||||
end
|
||||
if updatestatus == "CheckDone" then
|
||||
print("CheckDone = true;")
|
||||
elseif updatestatus == "DownloadDone" then
|
||||
print("DownloadDone = true;")
|
||||
elseif updatestatus == "VerifyDone" then
|
||||
print("VerifyDone = true;")
|
||||
elseif string.match(updatestatus,"(Error)") then
|
||||
print(string.format("UpdateInfo = \'%s\';",updatestatus))
|
||||
print("UpdateError = true;")
|
||||
end
|
||||
else
|
||||
print(string.format("UpdateInfo = \'%s\';",query))
|
||||
print("UpdateError = true;")
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
82
octoserve/var/www/uplchannels.lua
Normal file
82
octoserve/var/www/uplchannels.lua
Normal file
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local host = os.getenv("HTTP_HOST")
|
||||
local proto = os.getenv("SERVER_PROTOCOL")
|
||||
local query = os.getenv("QUERY_STRING")
|
||||
local method = os.getenv("REQUEST_METHOD")
|
||||
local clength = os.getenv("CONTENT_LENGTH")
|
||||
local ctype = os.getenv("CONTENT_TYPE")
|
||||
|
||||
if arg[1] then
|
||||
query = arg[1]
|
||||
if query == "get" then query = "" end
|
||||
proto = "HTTP/1.0"
|
||||
host = "local"
|
||||
end
|
||||
|
||||
function SendError(err,desc)
|
||||
io.stdout:write(proto.." "..err.."\r\n")
|
||||
io.stdout:write("Content-Type: text/html".."\r\n")
|
||||
io.stdout:write("\r\n")
|
||||
local file = io.open("e404.html")
|
||||
if file then
|
||||
local tmp = file:read("*a")
|
||||
tmp = string.gsub(tmp,"404 Not Found",err .. " " .. desc)
|
||||
io.stdout:write(tmp)
|
||||
file:close()
|
||||
end
|
||||
end
|
||||
|
||||
local path = nil
|
||||
local tmp = "/var/tmp/xxxx"
|
||||
|
||||
if method ~= "POST" or not clength or not ctype then
|
||||
SendError("404","?")
|
||||
return
|
||||
end
|
||||
|
||||
if not string.match(ctype,"multipart/form%-data") then
|
||||
SendError("404","??")
|
||||
return
|
||||
end
|
||||
|
||||
local boundary = string.match(ctype,"boundary=(.*)")
|
||||
if not boundary then
|
||||
SendError("404","???")
|
||||
return
|
||||
end
|
||||
|
||||
local filename = nil
|
||||
|
||||
while true do
|
||||
local line = io.stdin:read()
|
||||
line = string.gsub(line,"\r","")
|
||||
if line == "" then break end
|
||||
if not filename then
|
||||
filename = string.match(line,'filename=%"(.*)%"')
|
||||
end
|
||||
end
|
||||
|
||||
data = io.stdin:read("*a")
|
||||
data = string.sub(data,1,#data - #boundary - 4)
|
||||
|
||||
local file = io.open("/tmp/"..filename,"w")
|
||||
if file then
|
||||
file:write(data)
|
||||
file:close()
|
||||
end
|
||||
|
||||
if string.match(filename,"%.tar%.gz$") then
|
||||
os.execute("rm -rf /config/channels;mkdir /config/channels;cd /config/channels;gunzip -c /tmp/"..filename.."|tar -xf -");
|
||||
elseif string.match(filename,"%.zip$") then
|
||||
os.execute("rm -rf /config/channels;mkdir /config/channels;cd /config/channels;unzip -q /tmp/"..filename);
|
||||
end
|
||||
|
||||
os.remove("/tmp/"..filename)
|
||||
|
||||
-- TODO validate
|
||||
|
||||
io.stdout:write(proto.." 303".."\r\n")
|
||||
io.stdout:write("Location: http://"..host.."/reboot.html")
|
||||
io.stdout:write("\r\n")
|
||||
|
61
octoserve/var/www/wait.html
Normal file
61
octoserve/var/www/wait.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!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=iso-8859-1" />
|
||||
<title>OctopusNet</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css">
|
||||
|
||||
<!-- Add page scripts here -->
|
||||
<script type="text/javascript">
|
||||
|
||||
function Wait()
|
||||
{
|
||||
if( WaitCounter == 0 )
|
||||
{
|
||||
location.replace('/index.html');
|
||||
}
|
||||
else
|
||||
{
|
||||
WaitCounter = WaitCounter - 1;
|
||||
document.getElementById("waitcounter").firstChild.nodeValue = WaitCounter;
|
||||
window.setTimeout(Wait,1000);
|
||||
}
|
||||
}
|
||||
|
||||
function OnLoad()
|
||||
{
|
||||
WaitCounter = 5;
|
||||
document.getElementById("waitcounter").firstChild.nodeValue = WaitCounter;
|
||||
window.setTimeout(Wait,1000);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="OnLoad()">
|
||||
|
||||
|
||||
<table class="maintable" align="center">
|
||||
<colgroup>
|
||||
<col width="182px"/>
|
||||
<col width="728px"/>
|
||||
</colgroup>
|
||||
<tr><td class="maintd" colspan="2">
|
||||
<img src="/BannerDD.jpg" alt="DD" width="910" height="130" />
|
||||
</td></tr>
|
||||
<tr><td class="maintd" colspan="2"> </td></tr>
|
||||
<tr>
|
||||
<td class="maintd"></script></td>
|
||||
<td class="content">
|
||||
<div>
|
||||
<!-- Begin Content -->
|
||||
<h1 id="waitcounter" align="center"> </h1>
|
||||
<!-- End Content -->
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2"> </td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user