|
33 | 33 | </style> |
34 | 34 | </head> |
35 | 35 | <body> |
36 | | -<iframe src="datetimenow.html" id="fristFrame" style="visibility: hidden;"></iframe> |
| 36 | +<iframe src="datetimenow.html" id="firstFrame" style="visibility: hidden;"></iframe> |
37 | 37 | <iframe src="datetimenow.html" id="secondFrame" style="visibility: visible;"></iframe> |
38 | 38 | <script type="text/javascript"> |
39 | 39 | var urls = []; |
40 | 40 | <?php |
41 | | - $steuerungsinfos = file("./files/slideshow.txt"); |
| 41 | + $slideshow = file("./files/slideshow.txt"); |
42 | 42 | $outputSize = 0; |
43 | 43 | $delay = 14 / 2 * 1000; |
44 | 44 |
|
45 | | - for ($i = 0; $i < count($steuerungsinfos); $i++) { |
46 | | - if (!(substr($steuerungsinfos[$i], 0, 1) === "#")) { |
47 | | - $enhancedUrl = trim($steuerungsinfos[$i]); |
| 45 | + for ($i = 0; $i < count($slideshow); $i++) { |
| 46 | + if (!(substr($slideshow[$i], 0, 1) === "#")) { |
| 47 | + $enhancedUrl = trim($slideshow[$i]); |
48 | 48 | if (!(substr($enhancedUrl, 0, 4) === "http")) { |
49 | 49 | $enhancedUrl = "./files/" . $enhancedUrl; |
50 | 50 | } |
51 | 51 | echo "urls[" . $outputSize . "] = '" . $enhancedUrl . "';\r\n"; |
52 | 52 | $outputSize++; |
53 | | - } else if (substr($steuerungsinfos[$i], 0, 35) === "# setting-transition-delay=") { |
54 | | - $delayvalue = substr($steuerungsinfos[$i], 35); |
| 53 | + } else if (substr($slideshow[$i], 0, 35) === "# setting-transition-delay=") { |
| 54 | + $delayvalue = substr($slideshow[$i], 35); |
55 | 55 | $delay = $delayvalue / 2 * 1000; |
56 | 56 | } |
57 | 57 | } |
58 | 58 | echo "var delay = " . $delay . ";\r\n"; |
59 | 59 | ?> |
60 | | - var urlaktuell = 0; |
61 | | - setTimeout("loadIntoFristFrame()", 1000); |
| 60 | + var urlnow = 0; |
| 61 | + setTimeout("loadIntoFirstFrame()", 1000); |
62 | 62 |
|
63 | | - function loadIntoFristFrame() { |
64 | | - document.getElementById('fristFrame').src = urls[urlaktuell]; |
65 | | - urlaktuell++; |
66 | | - if (urlaktuell === urls.length) { |
67 | | - urlaktuell = 0; |
| 63 | + function loadIntoFirstFrame() { |
| 64 | + document.getElementById('firstFrame').src = urls[urlnow]; |
| 65 | + urlnow++; |
| 66 | + if (urlnow === urls.length) { |
| 67 | + urlnow = 0; |
68 | 68 | } |
69 | 69 | setTimeout("switchToFirstFrame()", delay); |
70 | 70 | } |
71 | 71 |
|
72 | 72 | function switchToFirstFrame() { |
73 | | - document.getElementById('fristFrame').style.visibility = 'visible'; |
| 73 | + document.getElementById('firstFrame').style.visibility = 'visible'; |
74 | 74 | document.getElementById('secondFrame').style.visibility = 'hidden'; |
75 | 75 | setTimeout("loadIntoSecondFrame()", delay); |
76 | 76 | } |
77 | 77 |
|
78 | 78 | function loadIntoSecondFrame() { |
79 | | - document.getElementById('secondFrame').src = urls[urlaktuell]; |
80 | | - urlaktuell++; |
81 | | - if (urlaktuell === urls.length) { |
82 | | - urlaktuell = 0; |
| 79 | + document.getElementById('secondFrame').src = urls[urlnow]; |
| 80 | + urlnow++; |
| 81 | + if (urlnow === urls.length) { |
| 82 | + urlnow = 0; |
83 | 83 | } |
84 | 84 | setTimeout("switchToSecondFrame()", delay); |
85 | 85 | } |
86 | 86 |
|
87 | 87 | function switchToSecondFrame() { |
88 | | - document.getElementById('fristFrame').style.visibility = 'hidden'; |
| 88 | + document.getElementById('firstFrame').style.visibility = 'hidden'; |
89 | 89 | document.getElementById('secondFrame').style.visibility = 'visible'; |
90 | | - setTimeout("loadIntoFristFrame()", delay); |
| 90 | + setTimeout("loadIntoFirstFrame()", delay); |
91 | 91 | } |
92 | 92 | </script> |
93 | 93 | </body> |
|
0 commit comments