/
TestScreenTop.html
183 lines (158 loc) · 4.23 KB
/
TestScreenTop.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
<html>
<script language="javascript">
var upSec=0;
var upMin=0;
var upHour=0;
var downSec=0;
var isTrialUser=1;
var avaMins;
if (isTrialUser==1)
avaMins=15;
else
avaMins=20;
var testType=1;
var strTestType="1";
var limitMins = 20;
var boughtMins= 600;
var strBoughtMins= "600";
var downHour=Math.floor(avaMins/60);
var downMin=(avaMins % 60);
var now=new Date();
var startSec=now.getSeconds();
var startMin=now.getMinutes();
var startHour=now.getHours();
function go()
{
if ((isBlank(strTestType)) || (isBlank(strBoughtMins)))
{
alert("The current Session established with ExamsOnline.com timed out. Please close your browser and log back in again.");
//parent.location.href="../Login/LogoutUser.asp";
parent.close();
parent.opener.location="../Login/LogoutUser.asp";
}
else
{
checkTime(upHour,upMin);
upSec++;
if(upSec>=60)
{
upSec=0;
upMin++;
}
if(upMin>=60)
{
upMin=0;
upHour++;
}
startSec++;
if(startSec>=60)
{
startSec=0;
startMin++;
}
if(startMin>=60)
{
startMin=0;
startHour++;
}
if (testType==1)
{
downSec--;
if(downSec<=-1)
{
downSec=59;
downMin--;
}
if(downMin<=-1)
{
downMin=59;
downHour--;
}
}
upTime=(upHour>=10 ? upHour : "0" +upHour)+":";
upTime+=(upMin>=10 ? upMin : "0" + upMin)+":";
upTime+=(upSec>=10 ? upSec : "0" + upSec);
//startTime=(startHour>=10 ? startHour: "0"+startHour)+":";
//startTime+=(startMin>=10 ? startMin: "0"+startMin)+":";
//startTime+=(startSec>=10 ? startSec:"0"+ startSec);
document.clock.countUp.value=upTime;
//document.clock.currentTime.value=startTime;
if (testType==1)
{
downTime=(downHour>=10 ? downHour: "0"+downHour)+":";
downTime+=(downMin>=10 ? downMin: "0"+downMin)+":";
downTime+=(downSec>=10 ? downSec: "0"+downSec);
document.clock.countDown.value=downTime;
}
setTimeout("go()",1000);
}
}
function checkTime(usedHour, usedMin)
{
var usedMins=usedHour*60 + usedMin;
if (testType==1)
{
if (boughtMins<=limitMins)
{
if (usedMins>=boughtMins)
{
alert("You will now need to buy time to continue to use ExamsOnline.");
//parent.location.href="../ECommerce/BuyTime.asp";
parent.close();
parent.opener.location="../ECommerce/BuyTime.asp";
}
}
else
{
if (usedMins>=limitMins)
{
alert("Your have run out of time. The test will now end.");
//parent.location.href="../practice/Result.asp";
parent.close();
parent.opener.location="../practice/Result.asp";
}
}
}
else
{
if (usedMins>=boughtMins)
{
alert("You will now need to buy time to continue to use ExamsOnline.");
//parent.location.href="../ECommerce/BuyTime.asp";
parent.close();
parent.opener.location="../ECommerce/BuyTime.asp";
}
}
}
function isBlank (InString)
{
if (InString==null) return (!false)
if (InString.length!=0)
return (!true);
else
return (!false);
}
</script>
<head>
<meta http-equiv="expires" content="12/15/2003 1:40:04 AM">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Exam Top Screen</title>
<base target="_self">
<link rel="stylesheet" type="text/css" href="../Styles/Master.css">
<meta name="Microsoft Border" content="none">
</head>
<body onload="go()" bgcolor="#CC9900" text="#FFFFFF">
<form name="clock">
<table valign="top" border="0" cellpadding="2" width="100%" cellspacing="0" bordercolor="#CC9900">
<!--<tr> <td align="center" valign="top"><strong>Introduction to Oracle 9i: SQL</strong></td> </tr>-->
<tr>
<td align="center" valign="bottom" bgcolor="#CC9900"><font face="Arial"><small>Test Time:</small>
<input type="text" name="countUp" value="00:00:00" size="9"> <small>Time
Available: </small><input type="text" name="countDown" size="9"></font></td>
</tr>
<!-- <tr> <td valign=top width="15%" ><small><small>Current Time </small></small></td> <td valign=top width="15%"><small><input type="text" name="currentTime" size="9"></small></td> </tr> -->
</table>
</form>
</body>
</html>