-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
367 lines (265 loc) · 14.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title>Mcq Demo Exam</title>
</head>
<body style="background-image: url('back.img');background-position: center;
background-repeat: no-repeat;
background-size: cover;
height: 800px;">
<nav class="navbar navbar-expand-lg navbar-light " style="background-color: rgb(142, 226, 226);">
<div class="container-fluid">
<a class="navbar-brand" href="#">Test</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" >PCM-1</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li> -->
<li class="nav-item dropdown">
<!--<a style="background-color:black;color:white;" class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">-->
<!-- Rules And Regulation-->
<!--</a>-->
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#"><strong> correct answer:</strong> +4</a></li>
<li><a class="dropdown-item" href="#"><strong>wrong answer:</strong>-1</a></li>
<li><a class="dropdown-item" href="#"><strong>no answer:</strong>0</a></li>
<li><a class="dropdown-item" href="#"><strong>total marks:</strong>300</a></li>
<li><a class="dropdown-item" href="#"><strong>red:</strong>seen but not answered</a></li>
<li><a class="dropdown-item" href="#"><strong>green:</strong>answered</a></li>
<li><a class="dropdown-item" href="#"><strong>white:</strong>not seen</a></li>
<li><a class="dropdown-item" href="#"><strong>maths:</strong>25 questions</a></li>
<li><a class="dropdown-item" href="#"><strong>physics:</strong>25 questions</a></li>
<li><a class="dropdown-item" href="#"><strong>chemistry:</strong>25 questions</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#"><strong> total time:</strong>3 hours</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<!--<a onclick="toggle(2)" style="background-color:black;color:white;" class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">-->
<!-- syllabus-->
<!--</a>-->
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#"> <strong>maths:</strong> ap,gp,quadratic equation,trigonometry compound angle</a></li>
<li><a class="dropdown-item" href="#"> <strong>physics:</strong> unit and measurement,error,vector,motion,force</a></li>
<li><a class="dropdown-item" href="#"> <strong>chemistry:</strong>redox reaction,mole concept,organic-nomenclature</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">All The Best</a></li>
</ul>
</li>
<!-- <li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li> -->
</ul>
<form class="d-flex">
<!-- <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> -->
<button style="background-color: #66ff99;" type="button">75 questions, 3 hours</button>
</form>
</div>
</div>
</nav>
<div style="background: none;color: azure;" class="card">
<div class="card-header">
<strong>Hey user.</strong>
</div>
<div class="card-body">
<h5 class="card-title">follow the instructions.</h5>
<strong> <p class="card-text">1)At First Read the rules and regulation and read the syllabus preperly.</p>
<p class="card-text">2)a timer will automatically run at the corner of screen.after the time test will be auto submitted.</p>
<p class="card-text">3)don't reload the screen.</p></strong>
<button type="button"style="margin-top:30px" id=reg class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#staticBackdrop">
Register for exams
</button>
</div>
</div>
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">register yourself</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form role="form" method="post" class="row g-3" >
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Name</label>
<input type="text"name="user " Required id="name" class="form-control" id="inputEmail4">
</div>
<div class="col-md-6">
<label for="inputPassword4" name="password" class="form-label">Password</label>
<input type="text" Required class="form-control" id="password" id="inputPassword4">
</div>
<div class="col-md-4">
<label for="inputState" class="form-label">choose combination</label>
<select id="inputState" Required class="form-select">
<option value="" selected>subject combination</option>
<option value="PCM">PCM</option>
<option value="PCMB">PCMB</option>
<option value="PCB">PCB</option>
<option value="PM">PM</option>
<option value="PHYSICS">PHYSICS</option>
<option value="MATH">MATH</option>
<option value="CHEMISTRY">CHEMISTRY</option>
</select>
</div>
<div class="col-md-6">
<label for="inputPassword4" class="form-label">Phone Number</label>
<input type="text" Required name="phone" onblur="phone1()" id="phone" class="form-control" id="inputPassword4">
</div>
<label for="">enter your image</label>
<div class="input-group mb-3">
<input type="file" Required class="form-control" id="inputGroupFile02">
<label class="input-group-text" for="inputGroupFile02">Upload</label>
</div>
<div class="col-12">
<button id="send" name="send" onclick="event.preventDefault();sendotp()" class="btn btn-primary">Register For Exam</button>
<!--<input type="submit" value="Sign in" id="but" name="submit" class="btn btn-primary"/> -->
</div>
<!--<div class="modal-footer">-->
<!-- <button onclick="event.preventDefault();ver()">verify</button> -->
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>-->
<!-- <button name="submit1" class="btn btn-primary" >Register</button> -->
<!-- <input type="submit" value="Sign in" id="but" name="submit" class="btn btn-primary"/> -->
<!--</div>-->
</form>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
<script>
// var a=document.getElementById("show");
// document.getElementById("but").value="register";
// a.style.display="none";
function send1(){
// a.style.visibility="visible";
// a.style.display="block";
var b=document.getElementById("send").disabled="true";
// a.disabled="true";
}
var name,texam;
function sendotp(){
var a=document.getElementById("name").value;
var n=a.length
var a1=document.getElementById("phone").value;
var n4=a1.length
var b=document.getElementById("password").value;
var n1=b.length;
var n2=document.getElementById("inputState").value;
var n3=n2.length;
// alert(n)
// alert(a[0])
if(n==0 || n1==0 || n3==0 || n4==0)
{
alert("enter valid details")
}
else{
//alert("Hii");
name=document.getElementById("name").value;
var password=document.getElementById("password").value;
var phone=document.getElementById("phone").value;
// var x = document.getElementById("mySelect").value;
// texam=document.getElementById("texam").value;
texam = document.getElementById("inputState").value;
// alert(x);
// alert(name);
prob();
// var name=
// img();
// handleFileSelect(evt);
localStorage.setItem("password",password);
// var name=
localStorage.setItem("phone",phone);
var imagename=document.getElementById("inputGroupFile02").value;
localStorage.setItem("imagename",imagename);
// a.style.display="block";
var b=document.getElementById("send").disabled="true";
alert("Registration Successful.Get Ready For Exam.");
window.location.assign("mainpage.php")
}
}
function prob(){
localStorage.setItem("name1",name);
localStorage.setItem("texam",texam);
// alert(texam);
var name2=localStorage.getItem("name1");
// alert(name2);
// alert(name);
}
var imagesObject = [];
function handleFileSelect(evt) {
var files = evt.target.files; // FileList object
// Loop through the FileList and render image files as thumbnails.
for (var i = 0, f; f = files[i]; i++) {
// Only process image files.
if (!f.type.match('image.*')) {
continue;
}
var reader = new FileReader();
// Closure to capture the file information.
reader.onload = function(e) {
displayImgData(e.target.result)
addImage(e.target.result);
};
reader.readAsDataURL(f);
}
}
function loadFromLocalStorage(){
var images = JSON.parse(localStorage.getItem("images"))
if(images && images.length > 0){
imagesObject = images;
// displayNumberOfImgs();
images.forEach(displayImgData);
}
}
function addImage(imgData){
imagesObject.push(imgData);
// displayNumberOfImgs();
localStorage.setItem("images", JSON.stringify(imagesObject));
}
function displayImgData(imgData){
var span = document.createElement('span');
span.innerHTML = '<img class="thumb" src="' + imgData + '"/>';
// document.getElementById('list').insertBefore(span, null);
}
// function displayNumberOfImgs(){
// if(imagesObject.length > 0){
// document.getElementById("state").innerHTML = imagesObject.length + " image" + ((imagesObject.length > 1) ? "s" : "") + " stored in your browser";
// document.getElementById("deleteImgs").style.display = "inline";
// } else {
// document.getElementById("state").innerHTML = "No images stored in your browser.";
// document.getElementById("deleteImgs").style.display = "none";
// }
// }
document.getElementById('inputGroupFile02').addEventListener('change', handleFileSelect, false);
// document.getElementById('deleteImgs').addEventListener("click", deleteImages);
loadFromLocalStorage();
function phone1() {
var a=document.getElementById("phone").value;
var n=a.length;
// alert(n)
// alert(a[0])
if(n!=10 || a[0]==1 || a[0]==3 || a[0]==4 || a[0]==0|| a[0]==4|| a[0]==5)
{
alert("enter valid number")
}
else{
// count1++;
}
}
</script>
</html>