-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
399 lines (325 loc) · 19.5 KB
/
index.html
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home</title>
<meta name="generator" content="Serif WebPlus X8 (16,0,1,21)">
<meta name="viewport" content="width=900">
<link rel="stylesheet" type="text/css" href="wpscripts/wpstyles.css">
<style type="text/css">
.OBJ-1 { visibility:hidden; }
@font-face { font-family: 'Segoe UI'; src: url('wpscripts/wp9aa9fb06.ttf'); }
.OBJ-2,.OBJ-2:link,.OBJ-2:visited { background-image:url('wpimages/wpe20d4d52_06.png');background-repeat:no-repeat;background-position:0px 0px;text-decoration:none;display:block;position:absolute; }
.OBJ-2:hover { background-position:0px -192px; }
.OBJ-2:active,a:link.OBJ-2.Activated,a:link.OBJ-2.Down,a:visited.OBJ-2.Activated,a:visited.OBJ-2.Down,.OBJ-2.Activated,.OBJ-2.Down { background-position:0px -96px; }
.OBJ-2.Disabled,a:link.OBJ-2.Disabled,a:visited.OBJ-2.Disabled,a:hover.OBJ-2.Disabled,a:active.OBJ-2.Disabled { background-position:0px -288px; }
.OBJ-2:focus { outline-style:none; }
button.OBJ-2 { background-color:transparent;border:none 0px;padding:0;display:inline-block;cursor:pointer; }
button.OBJ-2:disabled { pointer-events:none; }
.OBJ-2.Inline { display:inline-block;position:relative;line-height:normal; }
.OBJ-2 span,.OBJ-2:link span,.OBJ-2:visited span { color:#ffffff;font-family:"Segoe UI",sans-serif;font-weight:normal;text-decoration:none;text-align:center;text-transform:none;font-style:normal;left:5px;top:20px;width:249px;height:35px;line-height:35px;font-size:26px;display:block;position:absolute;cursor:pointer; }
.OBJ-2:hover span { color:#000000; }
.OBJ-2:active span,a:link.OBJ-2.Activated span,a:link.OBJ-2.Down span,a:visited.OBJ-2.Activated span,a:visited.OBJ-2.Down span,.OBJ-2.Activated span,.OBJ-2.Down span { color:#000000; }
.OBJ-3 { line-height:96px; }
.OBJ-4,.OBJ-4:link,.OBJ-4:visited { background-image:url('wpimages/wpb5d9f8a3_06.png');background-repeat:no-repeat;background-position:0px 0px;text-decoration:none;display:block;position:absolute; }
.OBJ-4:hover { background-position:0px -192px; }
.OBJ-4:active,a:link.OBJ-4.Activated,a:link.OBJ-4.Down,a:visited.OBJ-4.Activated,a:visited.OBJ-4.Down,.OBJ-4.Activated,.OBJ-4.Down { background-position:0px -96px; }
.OBJ-4.Disabled,a:link.OBJ-4.Disabled,a:visited.OBJ-4.Disabled,a:hover.OBJ-4.Disabled,a:active.OBJ-4.Disabled { background-position:0px -288px; }
.OBJ-4:focus { outline-style:none; }
button.OBJ-4 { background-color:transparent;border:none 0px;padding:0;display:inline-block;cursor:pointer; }
button.OBJ-4:disabled { pointer-events:none; }
.OBJ-4.Inline { display:inline-block;position:relative;line-height:normal; }
.OBJ-4 span,.OBJ-4:link span,.OBJ-4:visited span { color:#ffffff;font-family:"Segoe UI",sans-serif;font-weight:normal;text-decoration:none;text-align:center;text-transform:none;font-style:normal;left:5px;top:20px;width:249px;height:35px;line-height:35px;font-size:26px;display:block;position:absolute;cursor:pointer; }
.OBJ-4:hover span { color:#000000; }
.OBJ-4:active span,a:link.OBJ-4.Activated span,a:link.OBJ-4.Down span,a:visited.OBJ-4.Activated span,a:visited.OBJ-4.Down span,.OBJ-4.Activated span,.OBJ-4.Down span { color:#000000; }
.OBJ-5,.OBJ-5:link,.OBJ-5:visited { background-image:url('wpimages/wp10ccd5ad_06.png');background-repeat:no-repeat;background-position:0px 0px;text-decoration:none;display:block;position:absolute; }
.OBJ-5:hover { background-position:0px -148px; }
.OBJ-5:active,a:link.OBJ-5.Activated,a:link.OBJ-5.Down,a:visited.OBJ-5.Activated,a:visited.OBJ-5.Down,.OBJ-5.Activated,.OBJ-5.Down { background-position:0px -74px; }
.OBJ-5.Disabled,a:link.OBJ-5.Disabled,a:visited.OBJ-5.Disabled,a:hover.OBJ-5.Disabled,a:active.OBJ-5.Disabled { background-position:0px -222px; }
.OBJ-5:focus { outline-style:none; }
button.OBJ-5 { background-color:transparent;border:none 0px;padding:0;display:inline-block;cursor:pointer; }
button.OBJ-5:disabled { pointer-events:none; }
.OBJ-5.Inline { display:inline-block;position:relative;line-height:normal; }
.OBJ-5 span,.OBJ-5:link span,.OBJ-5:visited span { color:#ffffff;font-family:"Segoe UI",sans-serif;font-weight:normal;text-decoration:none;text-align:center;text-transform:none;font-style:normal;left:4px;top:16px;width:168px;height:27px;line-height:27px;font-size:20px;display:block;position:absolute;cursor:pointer; }
.OBJ-5:hover span { color:#000000; }
.OBJ-5:active span,a:link.OBJ-5.Activated span,a:link.OBJ-5.Down span,a:visited.OBJ-5.Activated span,a:visited.OBJ-5.Down span,.OBJ-5.Activated span,.OBJ-5.Down span { color:#000000; }
.OBJ-6 { line-height:74px; }
.OBJ-7,.OBJ-7:link,.OBJ-7:visited { background-image:url('wpimages/wp04edeac4_06.png');background-repeat:no-repeat;background-position:0px 0px;text-decoration:none;display:block;position:absolute; }
.OBJ-7:hover { background-position:0px -152px; }
.OBJ-7:active,a:link.OBJ-7.Activated,a:link.OBJ-7.Down,a:visited.OBJ-7.Activated,a:visited.OBJ-7.Down,.OBJ-7.Activated,.OBJ-7.Down { background-position:0px -76px; }
.OBJ-7.Disabled,a:link.OBJ-7.Disabled,a:visited.OBJ-7.Disabled,a:hover.OBJ-7.Disabled,a:active.OBJ-7.Disabled { background-position:0px -228px; }
.OBJ-7:focus { outline-style:none; }
button.OBJ-7 { background-color:transparent;border:none 0px;padding:0;display:inline-block;cursor:pointer; }
button.OBJ-7:disabled { pointer-events:none; }
.OBJ-7.Inline { display:inline-block;position:relative;line-height:normal; }
.OBJ-7 span,.OBJ-7:link span,.OBJ-7:visited span { color:#ffffff;font-family:"Segoe UI",sans-serif;font-weight:normal;text-decoration:none;text-align:center;text-transform:none;font-style:normal;left:4px;top:16px;width:153px;height:28px;line-height:28px;font-size:21px;display:block;position:absolute;cursor:pointer; }
.OBJ-7:hover span { color:#000000; }
.OBJ-7:active span,a:link.OBJ-7.Activated span,a:link.OBJ-7.Down span,a:visited.OBJ-7.Activated span,a:visited.OBJ-7.Down span,.OBJ-7.Activated span,.OBJ-7.Down span { color:#000000; }
.OBJ-8 { line-height:76px; }
.C-1 { line-height:18.00px;font-family:"Verdana", sans-serif;font-style:normal;font-weight:700;color:#000000;background-color:transparent;text-decoration:none;font-variant:normal;font-size:16.0px;vertical-align:0; }
.C-2 { line-height:18.00px;font-family:"Verdana", sans-serif;font-style:normal;font-weight:700;color:#008000;background-color:transparent;text-decoration:none;font-variant:normal;font-size:16.0px;vertical-align:0; }
.OBJ-9 { visibility:hidden;line-height:76px; }
.OBJ-10 { border:1px solid #000000;border-radius:2px / 2px;background-color:#f0f0f0;background:#f0f0f0;visibility:hidden; }
.OBJ-11 { border:1px solid #000000;border-radius:2px / 2px;background-color:#ffffff;background:#ffffff;visibility:hidden; }
.C-3 { line-height:18.00px;font-family:"Verdana", sans-serif;font-style:normal;font-weight:700;color:#ff0000;background-color:transparent;text-decoration:none;font-variant:normal;font-size:16.0px;vertical-align:0; }
</style>
<script type="text/javascript" src="wpscripts/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a.ActiveButton").bind({ mousedown:function(){if ( $(this).attr('disabled') === undefined ) $(this).addClass('Activated');}, mouseleave:function(){ if ( $(this).attr('disabled') === undefined ) $(this).removeClass('Activated');}, mouseup:function(){ if ( $(this).attr('disabled') === undefined ) $(this).removeClass('Activated');}});
$('#btnAdd').click( function(){javascript:addTime();});
$('#btnRemove').click( function(){javascript:removeTime();});
$('#btn_2').click( function(){javascript:payNow();});
$('#btnNext').click( function(){javascript:showPayScreen();});
$('#btnBack').click( function(){javascript:showEditScreen();});
$('#btnEnroll').click( function(){javascript:enroll();});
});
</script>
<script>
var seconds = 0, hours = 0, minutes = 0;
var maxtime = 7200; //max parking limit = 2 hrs (7200 in seconds)
var mintime = 600; //min parking time = 10 mins (600 in seconds)
var count = mintime; //seconds (set initial time to this)
var counter; //countdown timer
var checker; //variable to keep 'checking' if user added time
var mobile; //mobile phone number
$('#timerframe').css("visibility", "visible");
function addTime() {
if(count < maxtime)
count += 600; //add 10 mins
else
showMessage("MAX. LIMIT REACHED!");
reloadTimerView();
reloadAmountDue();
}
function removeTime() {
if(count > mintime)
count -= 600; //remove 10 mins
else
showMessage("MIN. LIMIT = 10 MIN.");
reloadTimerView();
reloadAmountDue();
}
function reloadAmountDue() {
var due;
due = (count/250)*0.75;
if(count > 1800) {
due = (due)*(0.65/0.75); //discount if parking >30 min.
}
$("#amtdue").html("<span class='C-3'>Amt. Due: <br> $" + due.toFixed(2) + "</span>");
}
function reloadTimerView() {
seconds = count % 60;
minutes = Math.floor(count / 60);
hours = Math.floor(minutes / 60);
minutes %= 60;
hours %= 60;
document.getElementById("timer").innerHTML = getTimeString(); // watch for spelling
}
function start() {
counter = setInterval(timer, 1000); //run it every 1 second
checker = setInterval(checkAddedTime, 5000); //run every 5 seconds (check if user added any time)
}
function timer() {
count = count - 1;
if(count == 300) { //DO NOT USE </> - will run every sec!
sendReminder();
}
if (count == -1) { //DO NOT USE </> - will run every sec!
clearInterval(counter);
clearInterval(checker); //timer expired; user can't add time
return;
}
reloadTimerView(); //do the math and reformat/reload timer
}
function showMessage(msg) {
document.getElementById('message').innerHTML = "<p class='Artistic-Body P-1'><span class='C-1'>" + msg + "</span></p>";
}
function getTimeString() {
return getTwoDigits(hours) + ":" + getTwoDigits(minutes) + ":" + getTwoDigits(seconds);
}
function getTwoDigits(num) {
if(num < 10) {
return "0" + num.toString();
}
return num.toString();
}
function payNow() {
$('#timer').css("visibility", "visible");
$('#timerframe').css("visibility", "visible");
$('#imgswipe').css("visibility", "hidden");
$('#btnAdd').css("visibility", "hidden");
$('#btnRemove').css("visibility", "hidden");
$('#btnBack').css("visibility", "hidden");
$('#btnNext').css("visibility", "hidden");
$('#amtdue').css("visibility", "hidden");
start(); //start timer
showMessage("Thank you! Enter Cell Phone # (Optional)");
$('input[type=button]').css('visibility','visible');
$('#btnEnroll').css('visibility','visible');
$('#txtmobile').css('visibility','visible');
}
function showPayScreen() {
$('#timer').css("visibility", "hidden");
$('#timerframe').css("visibility", "hidden");
$('#imgswipe').css("visibility", "visible");
$('#btnAdd').css("visibility", "hidden");
$('#btnRemove').css("visibility", "hidden");
$('#btnBack').css("visibility", "visible");
$('#btnNext').css("visibility", "hidden");
showMessage("PLEASE SWIPE / TOUCH (NFC) CARD NOW ...");
}
function showEditScreen() {
$('#timer').css("visibility", "visible");
$('#timerframe').css("visibility", "visible");
$('#imgswipe').css("visibility", "hidden");
$('#btnAdd').css("visibility", "visible");
$('#btnRemove').css("visibility", "visible");
$('#btnBack').css("visibility", "hidden");
$('#btnNext').css("visibility", "visible");
showMessage('LIMIT 2 HOURS MAX.');
}
//Enroll cell phone number for text alerts
function enroll() {
if( $('#txtmobile').val().length < 10) {
showMessage('Enter valid cell phone #!');
} else {
mobile = $('#txtmobile').val();
showMessage('Done! Thank you!');
$('input[type=button]').css('visibility','hidden');
$('#btnEnroll').css('visibility','hidden');
$('#txtmobile').css('visibility','hidden');
sendText(mobile, 0);
} //else
}
function keyIn(digit) {
if(digit < 0) {
$('#txtmobile').val( $('#txtmobile').val().substring(0,$('#txtmobile').val().length -1) );
} else {
$('#txtmobile').val( $('#txtmobile').val() + digit);
}
}
/*
send text to mobile phone via backend
msgcode 0 = initial enrollment
msgcode 1 = reminder
*/
function sendText(to, msgcode) {
var url="text.php?to="+to+"&key=cs338&msg="+msgcode;
$.ajax({
'url': url,
'type': 'GET'
});
} //sendText function
/*
check if user added any time...
*/
function checkAddedTime() {
var url = "addme.txt";
$.ajax({
'url': url,
'type': 'GET',
'success': function(data) {
if(data.trim() != "" && data.trim() != "0") {
count += (parseInt(data)*60); //convert to seconds
resetAddedTime();
}
} //function
});
}
function resetAddedTime() {
var url = "add.php?time=0";
$.ajax({
'url': url,
'type': 'GET'
});
}
function sendReminder() {
sendText(mobile,1);
}
function parkOut() {
count = 0;
$('#spotlight').css('visibility','hidden');
alert("SIMULATOR: Parked out successfully!");
}
</script>
</head>
<body style="height:800px;background:#ffffff;">
<div id="divMain" style="background:transparent;margin-left:auto;margin-right:auto;position:relative;width:900px;height:800px;">
<img src="wpimages/wp2ec2a02f_06.png" alt="" width="900" height="800" style="position:absolute;left:0px;top:0px;width:900px;height:800px;">
<img alt="" src="wpimages/wp027c85e4_06.png" id="timerframe" class="OBJ-1" style="position:absolute;left:225px;top:91px;width:523px;height:144px;">
<div id="btnAdd" class="OBJ-3" style="position:absolute;left:487px;top:244px;width:258px;height:96px;">
<button type="button" class="OBJ-2 ActiveButton" style="width:258px;height:96px;">
<span>+ 10 MIN.</span>
</button>
</div>
<img alt="SPOT IN USE" src="wpimages/wpc92114a0_06.png" style="position:absolute;left:643px;top:33px;width:89px;height:25px;">
<img alt="" src="wpimages/wp6fedbff4_06.png" style="position:absolute;left:448px;top:9px;width:76px;height:71px;">
<img src="wpimages/wp0cb7e6c6_06.png" alt="" width="567" height="80" style="position:absolute;left:202px;top:518px;width:567px;height:80px;">
<img alt="" src="wpimages/wpbfed5c5f_06.png" id="spotlight" style="position:absolute;left:740px;top:30px;width:31px;height:28px;">
<img src="wpimages/wp139b55bb_06.png" alt="" width="571" height="48" style="position:absolute;left:201px;top:468px;width:571px;height:48px;">
<img src="wpimages/wpe9ccf630_06.png" alt="" width="112" height="437" style="position:absolute;left:775px;top:25px;width:112px;height:437px;">
<div id="btnRemove" class="OBJ-3" style="position:absolute;left:229px;top:242px;width:258px;height:96px;">
<button type="button" class="OBJ-4 ActiveButton" style="width:258px;height:96px;">
<span>- 10 MIN.</span>
</button>
</div>
<img src="wpimages/wpb6ff9d33_06.png" alt="" width="175" height="614" style="position:absolute;left:0px;top:99px;width:175px;height:614px;">
<div id="btn_2" class="OBJ-6" style="position:absolute;left:0px;top:207px;width:175px;height:74px;">
<button type="button" class="OBJ-5 ActiveButton" style="width:175px;height:74px;">
<span>Simulate Swipe</span>
</button>
</div>
<a href="index.html" id="btn_10" class="OBJ-5 ActiveButton OBJ-6" style="position:absolute;left:0px;top:273px;width:175px;height:74px;">
<span>Park IN</span>
</a>
<a href="javascript:parkOut();" target="_blank" id="btn_11" class="OBJ-5 ActiveButton OBJ-6" style="position:absolute;left:0px;top:333px;width:175px;height:74px;">
<span>Park OUT</span>
</a>
<a href="javascript:sendReminder();" target="_blank" id="btn_12" class="OBJ-5 ActiveButton OBJ-6" style="position:absolute;left:0px;top:454px;width:175px;height:74px;">
<span>Text (Remind)</span>
</a>
<div id="timer" style="position:absolute;left:240px;top:120px;width:491px;height:85px;text-align: center; font-family: 'Verdana'; font-size: 5em;">
00:10:00
</div>
<div id="btnNext" class="OBJ-8" style="position:absolute;left:495px;top:383px;width:161px;height:76px;">
<button type="button" class="OBJ-7 ActiveButton" style="width:161px;height:76px;">
<span>Next ></span>
</button>
</div>
<div id="message" style="position:absolute;left:401px;top:341px;width:336px;height:59px;overflow:hidden;">
<p class="Artistic-Body"><span class="C-1">LIMIT<span class="C-2"> 2 HOURS MAX.</span></span></p>
</div>
<div id="btnBack" class="OBJ-9" style="position:absolute;left:325px;top:383px;width:161px;height:76px;">
<button type="button" class="OBJ-7 ActiveButton" style="width:161px;height:76px;">
<span>< Back</span>
</button>
</div>
<div id="imgswipe" style="position:absolute;left:317px;top:121px;width:222px;height:187px; text-align: center; visibility: hidden;">
<img src="images/swipe.gif" style="width:300px; height:auto; text-align:center;">
</div>
<input id="btn0" name="btn0" class="OBJ-10" type="button" value="0" onclick="keyIn(0);" style="position:absolute;left:280px;top:358px;width:42px;height:22px;">
<input id="btn1" name="btn0" class="OBJ-10" type="button" value="1" onclick="keyIn(1);" style="position:absolute;left:228px;top:253px;width:42px;height:22px;">
<input id="btn2" name="btn0" class="OBJ-10" type="button" value="2" onclick="keyIn(2);" style="position:absolute;left:279px;top:253px;width:42px;height:22px;">
<input id="btn3" name="btn0" class="OBJ-10" type="button" value="3" onclick="keyIn(3);" style="position:absolute;left:331px;top:253px;width:42px;height:22px;">
<input id="btn4" name="btn0" class="OBJ-10" type="button" value="4" onclick="keyIn(4);" style="position:absolute;left:228px;top:290px;width:42px;height:22px;">
<input id="btn5" name="btn0" class="OBJ-10" type="button" value="5" onclick="keyIn(5);" style="position:absolute;left:281px;top:290px;width:42px;height:22px;">
<input id="btn6" name="btn0" class="OBJ-10" type="button" value="6" onclick="keyIn(6);" style="position:absolute;left:333px;top:290px;width:42px;height:22px;">
<input id="btn7" name="btn0" class="OBJ-10" type="button" value="7" onclick="keyIn(7);" style="position:absolute;left:228px;top:327px;width:42px;height:22px;">
<input id="btn8" name="btn0" class="OBJ-10" type="button" value="8" onclick="keyIn(8);" style="position:absolute;left:280px;top:327px;width:42px;height:22px;">
<input id="btn9" name="btn0" class="OBJ-10" type="button" value="9" onclick="keyIn(9);" style="position:absolute;left:333px;top:327px;width:42px;height:22px;">
<input id="btnBackspace" name="btn0" class="OBJ-10" type="button" value="<" onclick="keyIn(-1);" style="position:absolute;left:228px;top:358px;width:42px;height:22px;">
<div id="btnEnroll" class="OBJ-9" style="position:absolute;left:406px;top:383px;width:161px;height:76px;">
<button type="button" class="OBJ-7 ActiveButton" style="width:161px;height:76px;">
<span>Enroll ></span>
</button>
</div>
<!--Preamble for Form Edit Box edit_1-->
<input id="txtmobile" name="txtmobile" class="OBJ-11" maxlength="32" readonly="" placeholder="<Cell Phone Number>" style="position:absolute;left:400px;top:307px;width:202px;height:22px;">
<!--Postamble for Form Edit Box edit_1-->
<div id="amtdue" style="position:absolute;left:669px;top:370px;width:103px;height:74px;overflow:hidden;">
<p class="Body"><span class="C-3">Amt. Due:<br>$1.80</span></p>
</div>
</div>
</body>
</html>