-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdisplayMaster.php
176 lines (134 loc) · 3.75 KB
/
displayMaster.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<html>
<?php
include('globalsetup.php');
include('picasaFunctions.php');
setupHeader();
?>
<script language="JavaScript1.2">
var howOftenAdvance = <?php printHowOftenAdvance() ?>; //number often in seconds to rotate
var howOftenUpdate = <?php printHowOftenUpdate() ?>; //number often in seconds to rotate
var current = 0; //start the counter at 0
var ns6 = document.getElementById&&!document.all; //detect netscape 6
// place your images, text, etc in the array elements here
var items = new Array();
<?php
$screen = $_GET["screen"]; //Automatically defaults to 0
//$items = getDisplayDisplayItems();
//printLiveDisplaySection($items, $screen);
?>
function loopAdvance() {
advance();
setTimeout("loopAdvance()",howOftenAdvance);
}
function loopUpdate() {
//update();
//setTimeout("loopUpdate()",howOftenUpdate);
}
// function rotater() {
// document.getElementById("placeholder").innerHTML = items[current];
// current = (current==items.length-1) ? 0 : current + 1;
// setTimeout("rotater()",howOften*1000);
// }
// function rotater() {
// if(document.layers) {
// document.placeholderlayer.document.write(items[current]);
// document.placeholderlayer.document.close();
// }
// if(ns6)document.getElementById("placeholderdiv").innerHTML=items[current]
// if(document.all)
// placeholderdiv.innerHTML=items[current];
//
// current = (current==items.length-1) ? 0 : current + 1; //increment or reset
// setTimeout("rotater()",howOften*1000);
// }
//window.onload= setupChildren() ;
var windowsList = [];
var childW = null;
function launchChildW(num) {
childW = windowsList[num];
if (childW != null) {
childW.window.open();
} else {
wopts = 'width=500,height=500,resizable=1,alwaysRaised=1,scrollbars=0';
childW = window.open('s1.php?screen=' + num, 'childW' + num, wopts);
if (childW != null) {
// childW.document.open()
// childW.document.bgColor = "ccffcc";
// childW.document.write('<br>');
// if (childW.opener == null) {
// childW.opener = self;
// }
windowsList[num] = childW;
} else {
alert("Failed to open child window");
}
}
return childW;
}
function launchChildWindows() {
for (var i = 1; i <= 12; i++)
{
launchChildW(i);
}
}
function update() {
for (var i = 1; i <= 12; i++)
{
if(windowsList[i] != null) {
windowsList[i].location.href = windowsList[i].location.href
}
}
}
function advance() {
for (var i = 1; i <= 12; i++)
{
if(windowsList[i] != null) {
windowsList[i].rotater();
}
}
}
function closeAll(txt) {
for (var i = 1; i <= 12; i++)
{
//Test option
//windowsList[i].document.writeln(txt + "<BR>");
if(windowsList[i] != null) {
windowsList[i].close();
}
}
}
function initLoop() {
loopUpdate();
loopAdvance();
}
</script>
<body id="fullscreenbody">
<form name="buttons"
onSubmit="showMe(document.buttons.writeText.value); return false">
<!--
<input NAME="launchButton" TYPE="button" VALUE="Launch Windows"
onClick="launchChildWindows()">
-->
<input name="imageUpdate" type="button" value="Update All Images"
onclick="update()">
<br/><br/>
<input name="imageAdvance" type="button" value="Next Image"
onclick="advance()">
<br/><br/>
<input name="windowsClose" type="button" value="Close All"
onclick="closeAll()">
<br/><br/>
<input name="windowsClose" type="button" value="Start Loop"
onclick="initLoop()">
<br/><br/>
<?php
for($i = 1; $i <= 12; $i++) {
echo '<input NAME="launchButton" TYPE="button" VALUE="Launch Window ' . $i . '"
onClick="launchChildW(' . $i . ')">
<br/>
';
}
?>
</form>
<layer id="placeholderlayer"></layer><div id="placeholderdiv"></div>
</body>