Prepare to scroll in web interface (mobile version).

This commit is contained in:
Pecusx
2018-05-14 20:26:51 +02:00
committed by GitHub
parent 6446d0b1ad
commit c9afd94c33
2 changed files with 15 additions and 7 deletions
+3 -3
View File
@@ -8,10 +8,10 @@
<script src="jquery-1.12.4.min.js"></script> <script src="jquery-1.12.4.min.js"></script>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$("#wyswietlacz").load("lcd.php"); $("#wyswietlacz").load("lcd.php?scroll=False");
var refreshId = setInterval(function() { var refreshId = setInterval(function() {
$("#wyswietlacz").load("lcd.php"); $("#wyswietlacz").load("lcd.php?scroll=False");
}, 1000); }, 200);
$.ajaxSetup({ cache: false }); $.ajaxSetup({ cache: false });
$("#player").load("player.php"); $("#player").load("player.php");
}); });
+12 -4
View File
@@ -1,8 +1,16 @@
<?php <?php
$line1 = file_get_contents( "/tmp/radiod/line1.txt" ); $msg = $_GET['scroll'];
$line2 = file_get_contents( "/tmp/radiod/line2.txt" ); if ($msg=="True") {
$line3 = file_get_contents( "/tmp/radiod/line3.txt" ); $line1 = file_get_contents( "/tmp/radiod/line1s.txt" );
$line4 = file_get_contents( "/tmp/radiod/line4.txt" ); $line2 = file_get_contents( "/tmp/radiod/line2s.txt" );
$line3 = file_get_contents( "/tmp/radiod/line3s.txt" );
$line4 = file_get_contents( "/tmp/radiod/line4s.txt" );
} else {
$line1 = file_get_contents( "/tmp/radiod/line1.txt" );
$line2 = file_get_contents( "/tmp/radiod/line2.txt" );
$line3 = file_get_contents( "/tmp/radiod/line3.txt" );
$line4 = file_get_contents( "/tmp/radiod/line4.txt" );
}
$line1 = str_replace(" ","&nbsp;",$line1); $line1 = str_replace(" ","&nbsp;",$line1);
$line2 = str_replace(" ","&nbsp;",$line2); $line2 = str_replace(" ","&nbsp;",$line2);
$line3 = str_replace(" ","&nbsp;",$line3); $line3 = str_replace(" ","&nbsp;",$line3);