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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
<meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="javascript/functions.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/spinningwheel.css" type="text/css" media="all" />
<script type="text/javascript" src="javascript/spinningwheel-min.js?v=1.4"></script>
<title>Title of your page</title>
<meta content="keyword1,keyword2,keyword3" name="keywords" />
<meta content="Description of your page" name="description" />
<script type="text/javascript">
function updateOrientation() {
switch(window.orientation) {
case 0:
orient = "portrait";
break;
case -90:
orient = "landscape";
break;
case 90:
orient = "landscape";
break;
case 180:
orient = "portrait";
break;
}
document.body.setAttribute("orient", orient);
window.scrollTo(0, 1);
}
function sendForm(formid) {
var frm;
frm = document.getElementById(formid);
frm.submit();
}
function openSelectDate(timer_year,timer_month,timer_day) {
var now = new Date();
if ( timer_year == null ) {
var now_year = now.getFullYear();
var now_month = now.getMonth()+1;
var now_day = now.getDate();
}
else
{
var now_year = timer_year;
var now_month = timer_month;
var now_day = timer_day;
}
var layer = 'layer_date';
var days = { };
var years = { };
var months = { 1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' };
for( var i = 1; i < 32; i += 1 ) {
days[i] = i;
}
for( i = now.getFullYear(); i < now.getFullYear()+5; i += 1 ) {
years[i] = i;
}
SpinningWheel.addSlot(days, 'right', now_day);
SpinningWheel.addSlot(months, '', now_month);
SpinningWheel.addSlot(years, 'right', now_year );
SpinningWheel.setCancelAction(cancel_date);
SpinningWheel.setDoneAction(done_date);
SpinningWheel.open();
}
function done_date() {
var results = SpinningWheel.getSelectedValues();
document.getElementById('layer_date').innerHTML = results.values.join('-');
document.timer.timer_date.value = results.keys.join('-');
}
function cancel_date() {
}
function openSelectTime(layer,timer_hour,timer_minute) {
if ( timer_hour == null ) {
var now = new Date();
var now_hour = now.getHours();
var now_minute = now.getMinutes()+1;
}
else
{
var now_hour = timer_hour;
var now_minute = timer_minute;
}
var hours = { };
var minutes = { };
for( var i = 00; i < 24; i += 1 ) {
hours[i] = i;
}
for( var i = 00; i < 60; i += 1 ) {
minutes[i] = i;
}
SpinningWheel.addSlot(hours, 'right', now_hour);
SpinningWheel.addSlot({ separator: 'h' }, 'readonly shrink');
SpinningWheel.addSlot(minutes, '', now_minute);
SpinningWheel.setCancelAction( function() {} );
SpinningWheel.setDoneAction(function () {var results = SpinningWheel.getSelectedValues(); document.getElementById(layer).innerHTML = results.values.join('');if ( layer == 'layer_starttime' ) { var forminput = 'timer_starttime'; } else { var forminput = 'timer_endtime'; }; eval ("document.timer." + forminput + ".value = results.keys.join('')"); });
SpinningWheel.open();
}
</script>
</head>
<body onorientationchange="updateOrientation();" onload="updateOrientation();">
<div id="topbar" class="transparent">
<div id="leftnav">
<a href="javascript:sendForm('getback')">Back</a></div>
<div id="rightnav">
<a href="index.php"><img alt="home" src="images/home.png" /></a></div>
<div id="title">
iStream
</div>
</div>
<div id="content"> <span class="graytitle">Edit Timer</span>
<form name="timer" id="timer" method="post" action="index.php">
<ul class="pageitem">
<li class="textbox"><span class="header">Recording name</span></li>
<li class="bigfield">
<input type="text" placeholder="Enter recording name" name="timer_name" value="Two Lovers" />
</li>
</ul>
<ul class="pageitem">
<li class="textbox"><span class="header">Channel</span></li>
<li class="select">
<select name="timer_chan">
<option value="1">TF1</option>
<option value="2">France 2</option>
<option value="3">France 3</option>
<option value="4">France 4</option>
<option value="5">France 5</option>
<option value="6" selected>M6</option>
</select>
<span class="arrow"></span></li>
</ul>
<ul class="pageitem">
<li class="textbox"><span class="header">Date</span></li>
<li class="menu"><a class="noeffect" href="javascript:openSelectDate(2010,3,24)">
<span class="name" id="layer_date">24-Mar-2010</span><span class="arrow"></span></a></li>
</ul>
<ul class="pageitem">
<li class="textbox"><span class="header">Start time</span></li>
<li class="menu"><a class="noeffect" href="javascript:openSelectTime('layer_starttime',22,15)">
<span class="name" id="layer_starttime">22h15</span><span class="arrow"></span></a></li>
</ul>
<ul class="pageitem">
<li class="textbox"><span class="header">End time</span></li>
<li class="menu"><a class="noeffect" href="javascript:openSelectTime('layer_endtime',23,45)">
<span class="name" id="layer_endtime">23h45</span><span class="arrow"></span></a></li>
</ul>
<input name="action" type="hidden" id="action" value="edittimer"/>
<input name="timer_id" type="hidden" id="timer_id" value="2" />
<input name="timer_date" type="hidden" id="timer_date" value="" />
<input name="timer_starttime" type="hidden" id="timer_starttime" value="" />
<input name="timer_endtime" type="hidden" id="timer_endtime" value="" />
<ul class="pageitem">
<li class="button">
<input name="Submit" type="submit" value="Submit" /></li>
</ul>
</form>
<form name="deltimer" id="deltimer" method="post" action="index.php"><input name="action" type="hidden" id="action" value="deletetimer" /><input name="timer_id" type="hidden" id="timer_id" value="2" />
<input name="timer_id" type="hidden" id="timer_id" value="2" />
<ul class="pageitem">
<li class="button">
<input name="Submit" type="submit" value="Delete" /></li>
</ul>
</form>
</div>
<div id="footer">
iStreamdev 2010
</div>
<form name="getback" id="getback" method="post" action="index.php"><input name="action" type="hidden" id="action" value="timers" /></form>
</body>
</html>
|