/
form.php
470 lines (449 loc) · 18.3 KB
/
form.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
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
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<?php
require __DIR__.'/./vendor/autoload.php';
require './config.php';
require_once './helpers/session.php';
require './helpers/boot.php';
require_once './helpers/User.php';
require './helpers/functions.php';
require './helpers/Level.php';
$session = new Session();
if(!$session->getLoggedin()){
header("Location: index.php");
}
$user = User::find($session->getUsername());
if(isset($_POST['level'])){
$level = new Level;
$level->user_id = $session->getUsername();
$level->level = $_POST['level'];
$level->save();
header("Location: index.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Form</title>
<link href="./static/css/awe.css" rel="stylesheet">
<link href="./static/css/player.css" rel="stylesheet">
<style>
b{
font-size: 18px;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h1> Questionnaire</h1>
<form id="myform" method="post" action="form.php">
<table class="table table-striped">
<tr>
<th>Items</th>
<td>Rarely</td>
<td>Sometimes</td>
<td>Frequently</td>
<td>Mostly</td>
<td>Always</td>
</tr>
<tr>
<td colspan="6"><b>Social Relationship And Reciprocity</b></td>
</tr>
<tr>
<td>1. Has Poor Eye Contact</td>
<th><input type="radio" name="r1" value="1"></th>
<th><input type="radio" name="r1" value="2"></th>
<th><input type="radio" name="r1" value="3"></th>
<th><input type="radio" name="r1" value="4"></th>
<th><input type="radio" name="r1" value="5"></th>
</tr>
<tr>
<td>2. Lacks Social Smile</td>
<th><input type="radio" name="r2" value="1"></th>
<th><input type="radio" name="r2" value="2"></th>
<th><input type="radio" name="r2" value="3"></th>
<th><input type="radio" name="r2" value="4"></th>
<th><input type="radio" name="r2" value="5"></th>
</tr>
<tr>
<td>3. Remains Aloof</td>
<th><input type="radio" name="r3" value="1"></th>
<th><input type="radio" name="r3" value="2"></th>
<th><input type="radio" name="r3" value="3"></th>
<th><input type="radio" name="r3" value="4"></th>
<th><input type="radio" name="r3" value="5"></th>
</tr>
<tr>
<td>4. Does Not Reach Out To Others</td>
<th><input type="radio" name="r4" value="1"></th>
<th><input type="radio" name="r4" value="2"></th>
<th><input type="radio" name="r4" value="3"></th>
<th><input type="radio" name="r4" value="4"></th>
<th><input type="radio" name="r4" value="5"></th>
</tr>
<tr>
<td>5. Unable To Relate To People</td>
<th><input type="radio" name="r5" value="1"></th>
<th><input type="radio" name="r5" value="2"></th>
<th><input type="radio" name="r5" value="3"></th>
<th><input type="radio" name="r5" value="4"></th>
<th><input type="radio" name="r5" value="5"></th>
</tr>
<tr>
<td>6. Unable To Respond To Socio/Environmental Cues</td>
<th><input type="radio" name="r6" value="1"></th>
<th><input type="radio" name="r6" value="2"></th>
<th><input type="radio" name="r6" value="3"></th>
<th><input type="radio" name="r6" value="4"></th>
<th><input type="radio" name="r6" value="5"></th>
</tr>
<tr>
<td>7. Engages In Solitary And Repetative Play Activities</td>
<th><input type="radio" name="r7" value="1"></th>
<th><input type="radio" name="r7" value="2"></th>
<th><input type="radio" name="r7" value="3"></th>
<th><input type="radio" name="r7" value="4"></th>
<th><input type="radio" name="r7" value="5"></th>
</tr>
<tr>
<td>8. Unable To Take Turns In Social Interactions</td>
<th><input type="radio" name="r8" value="1"></th>
<th><input type="radio" name="r8" value="2"></th>
<th><input type="radio" name="r8" value="3"></th>
<th><input type="radio" name="r8" value="4"></th>
<th><input type="radio" name="r8" value="5"></th>
</tr>
<tr>
<td>9. Does Not Maintain Peer Relationship</td>
<th><input type="radio" name="r9" value="1"></th>
<th><input type="radio" name="r9" value="2"></th>
<th><input type="radio" name="r9" value="3"></th>
<th><input type="radio" name="r9" value="4"></th>
<th><input type="radio" name="r9" value="5"></th>
</tr>
<tr>
<td colspan="6"><b>Emotional Responsiveness</b></td>
</tr>
<tr>
<td>10. Shows Inappropriate Imotional Response</td>
<th><input type="radio" name="r10" value="1"></th>
<th><input type="radio" name="r10" value="2"></th>
<th><input type="radio" name="r10" value="3"></th>
<th><input type="radio" name="r10" value="4"></th>
<th><input type="radio" name="r10" value="5"></th>
</tr>
<tr>
<td>11. Shows Exaggerated Emotions</td>
<th><input type="radio" name="r11" value="1"></th>
<th><input type="radio" name="r11" value="2"></th>
<th><input type="radio" name="r11" value="3"></th>
<th><input type="radio" name="r11" value="4"></th>
<th><input type="radio" name="r11" value="5"></th>
</tr>
<tr>
<td>12. Engages In Self Stimulating Emotions</td>
<th><input type="radio" name="r12" value="1"></th>
<th><input type="radio" name="r12" value="2"></th>
<th><input type="radio" name="r12" value="3"></th>
<th><input type="radio" name="r12" value="4"></th>
<th><input type="radio" name="r12" value="5"></th>
</tr>
<tr>
<td>13. Lacks Fear Of Danger</td>
<th><input type="radio" name="r13" value="1"></th>
<th><input type="radio" name="r13" value="2"></th>
<th><input type="radio" name="r13" value="3"></th>
<th><input type="radio" name="r13" value="4"></th>
<th><input type="radio" name="r13" value="5"></th>
</tr>
<tr>
<td>14. Exited Or Agitated For No Apparent Reason</td>
<th><input type="radio" name="r14" value="1"></th>
<th><input type="radio" name="r14" value="2"></th>
<th><input type="radio" name="r14" value="3"></th>
<th><input type="radio" name="r14" value="4"></th>
<th><input type="radio" name="r14" value="5"></th>
</tr>
<tr>
<td colspan="6"><b>Speech-Language And Communication</b></td>
</tr>
<tr>
<td>15. Acquired Speech And Lost It</td>
<th><input type="radio" name="r15" value="1"></th>
<th><input type="radio" name="r15" value="2"></th>
<th><input type="radio" name="r15" value="3"></th>
<th><input type="radio" name="r15" value="4"></th>
<th><input type="radio" name="r15" value="5"></th>
</tr>
<tr>
<td>16. Has Difficulty In Using Non-Verbal Language Or Gestures To Communicate</td>
<th><input type="radio" name="r16" value="1"></th>
<th><input type="radio" name="r16" value="2"></th>
<th><input type="radio" name="r16" value="3"></th>
<th><input type="radio" name="r16" value="4"></th>
<th><input type="radio" name="r16" value="5"></th>
</tr>
<tr>
<td>17. Engages In Steriotyped Or Repitative Use Of Language</td>
<th><input type="radio" name="r17" value="1"></th>
<th><input type="radio" name="r17" value="2"></th>
<th><input type="radio" name="r17" value="3"></th>
<th><input type="radio" name="r17" value="4"></th>
<th><input type="radio" name="r17" value="5"></th>
</tr>
<tr>
<td>18. Engages In Echolalic Speech</td>
<th><input type="radio" name="r18" value="1"></th>
<th><input type="radio" name="r18" value="2"></th>
<th><input type="radio" name="r18" value="3"></th>
<th><input type="radio" name="r18" value="4"></th>
<th><input type="radio" name="r18" value="5"></th>
</tr>
<tr>
<td>19. Produces Infantile Squeals Or Unusual Noises </td>
<th><input type="radio" name="r19" value="1"></th>
<th><input type="radio" name="r19" value="2"></th>
<th><input type="radio" name="r19" value="3"></th>
<th><input type="radio" name="r19" value="4"></th>
<th><input type="radio" name="r19" value="5"></th>
</tr>
<tr>
<td>20. Unable To Initiate Or Sustain Conversation With Others</td>
<th><input type="radio" name="r20" value="1"></th>
<th><input type="radio" name="r20" value="2"></th>
<th><input type="radio" name="r20" value="3"></th>
<th><input type="radio" name="r20" value="4"></th>
<th><input type="radio" name="r20" value="5"></th>
</tr>
<tr>
<td>21. Uses Jargon Or Meaningless Words</td>
<th><input type="radio" name="r21" value="1"></th>
<th><input type="radio" name="r21" value="2"></th>
<th><input type="radio" name="r21" value="3"></th>
<th><input type="radio" name="r21" value="4"></th>
<th><input type="radio" name="r21" value="5"></th>
</tr>
<tr>
<td>22. Uses Pronoun Reversals</td>
<th><input type="radio" name="r22" value="1"></th>
<th><input type="radio" name="r22" value="2"></th>
<th><input type="radio" name="r22" value="3"></th>
<th><input type="radio" name="r22" value="4"></th>
<th><input type="radio" name="r22" value="5"></th>
</tr>
<tr>
<td>23. Unable To Grasp Pragmatics Of Communication</td>
<th><input type="radio" name="r23" value="1"></th>
<th><input type="radio" name="r23" value="2"></th>
<th><input type="radio" name="r23" value="3"></th>
<th><input type="radio" name="r23" value="4"></th>
<th><input type="radio" name="r23" value="5"></th>
</tr>
<tr>
<td colspan="6"><b>Behaviour Patterns</b></td>
</tr>
<tr>
<td>24. Engages In Steriotyped And Repetative Motor Mannerism</td>
<th><input type="radio" name="r24" value="1"></th>
<th><input type="radio" name="r24" value="2"></th>
<th><input type="radio" name="r24" value="3"></th>
<th><input type="radio" name="r24" value="4"></th>
<th><input type="radio" name="r24" value="5"></th>
</tr>
<tr>
<td>25. Shows Attachment To Inanimate Objects</td>
<th><input type="radio" name="r25" value="1"></th>
<th><input type="radio" name="r25" value="2"></th>
<th><input type="radio" name="r25" value="3"></th>
<th><input type="radio" name="r25" value="4"></th>
<th><input type="radio" name="r25" value="5"></th>
</tr>
<tr>
<td>26. Shows Hyper Activity Or Restlessness</td>
<th><input type="radio" name="r26" value="1"></th>
<th><input type="radio" name="r26" value="2"></th>
<th><input type="radio" name="r26" value="3"></th>
<th><input type="radio" name="r26" value="4"></th>
<th><input type="radio" name="r26" value="5"></th>
</tr>
<tr>
<td>27. Exhibis Aggressive Behaviour</td>
<th><input type="radio" name="r27" value="1"></th>
<th><input type="radio" name="r27" value="2"></th>
<th><input type="radio" name="r27" value="3"></th>
<th><input type="radio" name="r27" value="4"></th>
<th><input type="radio" name="r27" value="5"></th>
</tr>
<tr>
<td>28. Throws Temper Tantrums</td>
<th><input type="radio" name="r28" value="1"></th>
<th><input type="radio" name="r28" value="2"></th>
<th><input type="radio" name="r28" value="3"></th>
<th><input type="radio" name="r28" value="4"></th>
<th><input type="radio" name="r28" value="5"></th>
</tr>
<tr>
<td>29. Engages In Self Injurious Behaviour</td>
<th><input type="radio" name="r29" value="1"></th>
<th><input type="radio" name="r29" value="2"></th>
<th><input type="radio" name="r29" value="3"></th>
<th><input type="radio" name="r29" value="4"></th>
<th><input type="radio" name="r29" value="5"></th>
</tr>
<tr>
<td>30. Insists On Sameness</td>
<th><input type="radio" name="r30" value="1"></th>
<th><input type="radio" name="r30" value="2"></th>
<th><input type="radio" name="r30" value="3"></th>
<th><input type="radio" name="r30" value="4"></th>
<th><input type="radio" name="r30" value="5"></th>
</tr>
<tr>
<td colspan="6"><b>Sensory Aspects</b></td>
</tr>
<tr>
<td>31. Unusually Sensitive To Sensory Stimuli</td>
<th><input type="radio" name="r31" value="1"></th>
<th><input type="radio" name="r31" value="2"></th>
<th><input type="radio" name="r31" value="3"></th>
<th><input type="radio" name="r31" value="4"></th>
<th><input type="radio" name="r31" value="5"></th>
</tr>
<tr>
<td>32. Stares Into Space For Long Period Of Time</td>
<th><input type="radio" name="r32" value="1"></th>
<th><input type="radio" name="r32" value="2"></th>
<th><input type="radio" name="r32" value="3"></th>
<th><input type="radio" name="r32" value="4"></th>
<th><input type="radio" name="r32" value="5"></th>
</tr>
<tr>
<td>33. Has Difficulty In Tracking Objects</td>
<th><input type="radio" name="r33" value="1"></th>
<th><input type="radio" name="r33" value="2"></th>
<th><input type="radio" name="r33" value="3"></th>
<th><input type="radio" name="r33" value="4"></th>
<th><input type="radio" name="r33" value="5"></th>
</tr>
<tr>
<td>34. Has Unusual Vision</td>
<th><input type="radio" name="r34" value="1"></th>
<th><input type="radio" name="r34" value="2"></th>
<th><input type="radio" name="r34" value="3"></th>
<th><input type="radio" name="r34" value="4"></th>
<th><input type="radio" name="r34" value="5"></th>
</tr>
<tr>
<td>35. Insensitive To Pain</td>
<th><input type="radio" name="r35" value="1"></th>
<th><input type="radio" name="r35" value="2"></th>
<th><input type="radio" name="r35" value="3"></th>
<th><input type="radio" name="r35" value="4"></th>
<th><input type="radio" name="r35" value="5"></th>
</tr>
<tr>
<td>36. Responds To Objects/People Unusually By Smelling,Touching Or Tasting</td>
<th><input type="radio" name="r36" value="1"></th>
<th><input type="radio" name="r36" value="2"></th>
<th><input type="radio" name="r36" value="3"></th>
<th><input type="radio" name="r36" value="4"></th>
<th><input type="radio" name="r36" value="5"></th>
</tr>
<tr>
<td colspan="6"><b>Cognitive Component</b></td>
</tr>
<tr>
<td>37. Inconsistent Attention And Concentration</td>
<th><input type="radio" name="r37" value="1"></th>
<th><input type="radio" name="r37" value="2"></th>
<th><input type="radio" name="r37" value="3"></th>
<th><input type="radio" name="r37" value="4"></th>
<th><input type="radio" name="r37" value="5"></th>
</tr>
<tr>
<td>38. Shows Delay In Responding</td>
<th><input type="radio" name="r38" value="1"></th>
<th><input type="radio" name="r38" value="2"></th>
<th><input type="radio" name="r38" value="3"></th>
<th><input type="radio" name="r38" value="4"></th>
<th><input type="radio" name="r38" value="5"></th>
</tr>
<tr>
<td>39. Has Unusual Memory Of Somekind</td>
<th><input type="radio" name="r39" value="1"></th>
<th><input type="radio" name="r39" value="2"></th>
<th><input type="radio" name="r39" value="3"></th>
<th><input type="radio" name="r39" value="4"></th>
<th><input type="radio" name="r39" value="5"></th>
</tr>
<tr>
<td>40. Has Savant Ability</td>
<th><input type="radio" name="r40" value="1"></th>
<th><input type="radio" name="r40" value="2"></th>
<th><input type="radio" name="r40" value="3"></th>
<th><input type="radio" name="r40" value="4"></th>
<th><input type="radio" name="r40" value="5"></th>
</tr>
</table>
<div class="form-group">
<input type="submit" class="btn btn-success" name="submit" value="submit">
</div>
</form>
</div>
</div>
</div>
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Autism Level</h4>
</div>
<div class="modal-body">
<p id="level"></p>
<form action="form.php" method="POST">
<input id="flevel" type="hidden" name="level" value="0" />
<div class="form-group">
<input type="submit" class="btn btn-default" value="Save"/>
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="./static/js/jquery.min.js"></script>
<script type="text/javascript" src="./static/js/bootstrap.min.js"></script>
<script type="text/javascript">
var $l = $("#flevel");
$("#myform").submit(function(){
$inputs = $('input:radio:checked');
var s = 0;
$inputs.each(function(index){
s += 1.0*$($inputs[index]).val();
});
var t = "";
var $p = $("#level");
var lev;
if(s>153){
t = "Severe Autism";
lev = 4;
}else if(s>107){
t = "Moderate Autism";
lev = 3;
}else if(s>70){
t = "Mild Autism";
lev = 2;
}else{
t = "No Autism";
lev = 1;
}
$p.html(t);
console.log($l);
$l.val(lev);
$('.modal').modal('show');
return false;
})
</script>
</body>
</html>