-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraduatesForm2.php
executable file
·2069 lines (1856 loc) · 92.5 KB
/
graduatesForm2.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
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');
include 'sessionGrad.php';
if (!(isset($_SESSION['login_grad']) && $_SESSION['login_grad'] != '')) {
header("Location: graduatesLogin.php");
}
?>
<?php
$connection = mysqli_connect("localhost", "root", "");
if (!$connection) {
die("Database connection failed: " . mysqli_error());
}
$db_select = mysqli_select_db($connection, "tryit");
if (!$db_select) {
die("Database selection failed: " . mysqli_error());
}
?>
<?php
$result = mysqli_query($connection, "SELECT * FROM geninfo where username = '$login_sessionGrad'");
if ($_SESSION['login_grad'] == "dnscadmin") {
header("Location: graduatesProfile.php");
} else if ($row = mysqli_fetch_array($result)) {
header("location: viewProfile.php");
} else {
?>
<!DOCTYPE html>
<!-- Website template by freewebsitetemplates.com -->
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="dnsc.png" type="image/x-icon" />
<meta name="author" content="Shahrukh Khan">
<meta name="description" content="Login System with Github using OAuth PHP and MySQL">
<meta name="keywords" content="php,mysql,Github,oauth,social logins,thesoftwareguy">
<meta name="title" content="Login System with Github using OAuth PHP and MySQL">
<meta name="viewport" content="user-scalable=0, width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/mobile.css">
<link href="css/styleGrad.css" type="text/css" rel="stylesheet">
<link href="css/styleforGraduate.css" type="text/css" rel="stylesheet">
<title>DNSC - Graduates</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type='text/javascript' src='js/mobile.js'></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="KEYWORDS" CONTENT="">
<meta name="keywords" content="Validation Signup Form Responsive, Login form web template, Sign up Web Templates, Flat Web Templates, Login signup Responsive web template, Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<!-- //for-mobile-apps -->
<link href="css/form.css" rel="stylesheet" type="text/css" media="all" />
<!-- fonts -->
<link href='//fonts.googleapis.com/css?family=Audiowide' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Lato:400,100,100italic,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/mobile.css">
<script type='text/javascript' src='js2/mobile.js'></script>
<!-- //fonts -->
<script type="text/javascript" src="js2/jquery.min.js"></script>
<script type="text/javascript" src="js2/jquery-ui.min.js"></script>
<script type="text/javascript" src="js2/jquery.inputfocus-0.9.min.js"></script>
<script type="text/javascript" src="js2/jquery.main.js"></script>
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500">
<link rel="Stylesheet" href="Datepicker/jquery-ui.css" />
<!-- Bootstrap -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="bootstrap/css/font-awesome.css" rel="stylesheet">
<script src="bootstrap/js/jquery-1.11.1.min.js"></script>
<link rel="stylesheet" href="js3/jquery-ui.css">
<script src="js3/jquery-1.12.4.js"></script>
<script src="js3/jquery-ui.js"></script>
<!-- <link href="css/styleGrad.css" rel="stylesheet"> -->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="bootstrap/html5shiv.js"></script>
<script src="bootstrap/respond.min.js"></script>
<![endif]-->
<!--jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script type="text/javascript">
//Show Modal Loader on Ajax Request
$(document).ready(function() {
$( "#fromDate, #toDate" ).datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'MM yy',
onClose: function(dateText, inst) {
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).datepicker('setDate', new Date(year, month, 1));
},
beforeShow : function(input, inst) {
if ((datestr = $(this).val()).length > 0) {
year = datestr.substring(datestr.length-4, datestr.length);
month = jQuery.inArray(datestr.substring(0, datestr.length-5), $(this).datepicker('option', 'monthNames'));
$(this).datepicker('option', 'defaultDate', new Date(year, month, 1));
$(this).datepicker('setDate', new Date(year, month, 1));
}
var other = this.id == "fromDate" ? "#toDate" : "#fromDate";
var option = this.id == "fromDate" ? "maxDate" : "minDate";
if ((selectedDate = $(other).val()).length > 0) {
year = selectedDate.substring(selectedDate.length-4, selectedDate.length);
month = jQuery.inArray(selectedDate.substring(0, selectedDate.length-5), $(this).datepicker('option', 'monthNames'));
$(this).datepicker( "option", option, new Date(year, month, 1));
}
}
});
});
</script>
<style type="text/css">
.ui-datepicker-calendar {
display: none;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$("#ifNo").hide();
$('#ifYes').hide();
});
</script>
<script type="text/javascript">
function hideEmploy (f, status) {
var box1 = document.getElementById('employ').value;
var dependent = $('#ifNo');
var dependent2 = $('#ifYes');
if (box1 == 'Yes'){
dependent.hide();
dependent2.show();
}
else if (box1 == 'No'){
dependent.show();
dependent2.hide();
}
else{
dependent.hide();
dependent2.hide();
}
checkbox.change(function(e){
dependent.toggle();
dependent2.toggle();
});
}
</script>
<script type="text/javascript">
function copyBilling (f, status) {
var s, i = 0;
var box1 = document.getElementById('same').checked;
var checkbox = $('#checker');
var dependent = $('#dependent-box');
if (box1 == true){
while (s = ['houseNum', '1', '2', '3'][i++]) {f.elements['ss' + s].value = f.elements['s' + s].value};
dependent.hide();
}
else{
document.getElementById("ss1").value= "";
document.getElementById("ss2").value= "";
document.getElementById("ss3").value= "";
document.getElementById("sshouseNum").value= "";
dependent.show();
}
checkbox.change(function(e){
dependent.toggle();
});
}
</script>
<script type="text/javascript">
$(document).ready(function() {
$("#dependent-box2").hide();
});
</script>
<script type="text/javascript">
function hideShowEduc (f, status) {
var box1 = document.getElementById('education').checked;
var dependent = $('#dependent-box2');
var dependent2 = $('#dependent-box3');
if (box1 == true){
dependent.show();
dependent2.hide();
}
else{
document.getElementById("ss1").value= "";
document.getElementById("ss2").value= "";
document.getElementById("ss3").value= "";
document.getElementById("sshouseNum").value= "";
dependent.hide();
dependent2.show();
}
checkbox.change(function(e){
dependent.toggle();
dependent2.toggle();
});
}
</script>
<!--
<script type="text/javascript">
function copyBilling (f, status) {
var s, i = 0;
var box1 = document.getElementById('same').checked;
var checkbox = $('#checker');
var dependent = $('#dependent-box');
if (box1 == true){
while (s = ['houseNumber', '1', '2', '3'][i++]) {f.elements['ss' + s].value = f.elements['s' + s].value};
dependent.hide();
}
else{
document.getElementById("ss1").value= "";
document.getElementById("ss2").value= "";
document.getElementById("ss3").value= "";
document.getElementById("sshouseNumber").value= "";
dependent.show();
}
checkbox.change(function(e){
dependent.toggle();
});
}
</script>
-->
<script type="text/javascript">
function data_copy()
{
var checkbox = $('#checker');
var dependent = $('#dependent-box');
if(document.basicform.copy.checked){
document.basicform.sshouseNum.value=document.basicform.shouseNum.value;
for(i=document.basicform.s1.options.length-1;i>=0;i--)
{
if(document.basicform.s1.options[i].selected)
document.basicform.ss1.options[i].selected=true;
}
for(i=document.basicform.s2.options.length-1;i>=0;i--)
{
if(document.basicform.s2.options[i].selected)
document.basicform.ss2.options[i].selected=true;
}
for(i=document.basicform.s3.options.length-1;i>=0;i--)
{
if(document.basicform.s3.options[i].selected)
document.basicform.ss3.options[i].selected=true;
}
dependent.hide();
}else{
document.basicform.sshouseNum.value="";
document.basicform.ss1.options[0].selected=true;
document.basicform.ss2.options[0].selected=true;
document.basicform.ss3.options[0].selected=true;
dependent.show();
}
checkbox.change(function(e){
dependent.toggle();
});
}
</script>
<script type="text/javascript">
$("input:checkbox").on('click', function() {
// in the handler, 'this' refers to the box clicked on
var $box = $(this);
if ($box.is(":checked")) {
// the name of the box is retrieved using the .attr() method
// as it is assumed and expected to be immutable
var group = "input:checkbox[name='" + $box.attr("name") + "']";
// the checked state of the group/box on the other hand will change
// and the current value is retrieved using .prop() method
$(group).prop("checked", false);
$box.prop("checked", true);
} else {
$box.prop("checked", false);
}
});
</script>
<script type="text/javascript">
function enable_otherreason(status)
{
status=!status;
document.basicform.otherreason.disabled = status;
document.basicform.otherreason.focus();
document.getElementById("otherreason").value= "";
}
function enable_otherstatus(status)
{
status=!status;
document.basicform.otherstatus.disabled = status;
document.basicform.otherstatus.focus();
document.getElementById("otherstatus").value= "";
}
function enable_reasonTwo(status)
{
status=!status;
document.basicform.reasonTwo.disabled = status;
document.basicform.reasonTwo.focus();
document.getElementById("reasonTwo").value= "";
}
function enable_yesReason(status)
{
status=!status;
document.basicform.yesReason.disabled = status;
document.basicform.yesReason.focus();
document.getElementById("yesReason").value= "";
}
</script>
<script>
$(function() {
$("input:checkbox").on('click', function() {
// in the handler, 'this' refers to the box clicked on
var $box = $(this);
if ($box.is(":checked")) {
// the name of the box is retrieved using the .attr() method
// as it is assumed and expected to be immutable
var group = "input:checkbox[name='check[]']";
// the checked state of the group/box on the other hand will change
// and the current value is retrieved using .prop() method
$(group).prop("checked", false);
$box.prop("checked", true);
} else {
$box.prop("checked", false);
}
});
});
</script>
<style type="text/css">
#btn
{
width: 150px;
border:solid 1px black;
padding:10px;
background-color: #2E8B57;
font-size:14px;
}
#btn:hover
{
background:#2E8B57;
color:#00FA9A;
cursor:pointer;
}
</style>
<script type="text/javascript">
function DisableEmployStatus(aList)
{
var x=document.getElementById("otherstatus");
x.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3);
if(x.disabled == true){
document.getElementById("otherstatus").value= "";
}
if (aList.selectedIndex == 4){
otherstatus.focus();
}
}
</script>
<script type="text/javascript">
function DisableNoReason(aList)
{
var x=document.getElementById("reasonOne");
x.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5);
if(x.disabled == true){
document.getElementById("reasonOne").value= "";
}
if (aList.selectedIndex == 6){
reasonOne.focus();
}
}
</script>
<script type="text/javascript">
function DisableNoReason2(aList)
{
var y=document.getElementById("reasonTwo");
x.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4);
if(y.disabled == true){
document.getElementById("reasonTwo").value= "";
}
if (aList.selectedIndex == 5){
reasonTwo.focus();
}
}
</script>
<script type="text/javascript">
function DisableYesReason(aList)
{
var x=document.getElementById("yesReason");
x.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8);
if(x.disabled == true){
document.getElementById("yesReason").value= "";
}
if (aList.selectedIndex == 9){
yesReason.focus();
}
}
</script>
<script type="text/javascript">
function DisableReason(aList)
{
var x=document.getElementById("otherreason");
x.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8 || aList.selectedIndex == 9);
if(x.disabled == true){
document.getElementById("otherreason").value= "";
}
if (aList.selectedIndex == 10){
otherreason.focus();
}
}
</script>
<script type="text/javascript">
function DisableNature(aList)
{
var x=document.getElementById("othernature");
x.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8 || aList.selectedIndex == 9 || aList.selectedIndex == 10);
if(x.disabled == true){
document.getElementById("othernature").value= "";
}
if (aList.selectedIndex == 11){
othernature.focus();
}
}
</script>
<script type="text/javascript">
function DisableNatureWork(aList)
{
var x=document.getElementById("othernaturework");
var x1=document.getElementById("othernaturework1");
var x2=document.getElementById("othernaturework2");
var x3=document.getElementById("othernaturework3");
var x4=document.getElementById("othernaturework4");
var x5=document.getElementById("othernaturework5");
var x6=document.getElementById("othernaturework6");
var x7=document.getElementById("othernaturework7");
var x8=document.getElementById("othernaturework8");
var x9=document.getElementById("othernaturework9");
var x10=document.getElementById("othernaturework10");
x.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x1.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x2.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x3.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x4.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x5.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x6.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x7.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x8.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x9.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
x10.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8); //others
if(x.disabled == true){
document.getElementById("othernaturework").value= "";
}
if(x1.disabled == true){
document.getElementById("othernaturework1").value= "";
}
if(x2.disabled == true){
document.getElementById("othernaturework2").value= "";
}
if(x3.disabled == true){
document.getElementById("othernaturework3").value= "";
}
if(x4.disabled == true){
document.getElementById("othernaturework4").value= "";
}
if(x5.disabled == true){
document.getElementById("othernaturework5").value= "";
}
if(x6.disabled == true){
document.getElementById("othernaturework6").value= "";
}
if(x7.disabled == true){
document.getElementById("othernaturework7").value= "";
}
if(x8.disabled == true){
document.getElementById("othernaturework8").value= "";
}
if(x9.disabled == true){
document.getElementById("othernaturework9").value= "";
}
if(x10.disabled == true){
document.getElementById("othernaturework10").value= "";
}
}
</script>
<script type="text/javascript">
function DisableJob(aList)
{
var x=document.getElementById("firstJob");
x.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5); //others
if(x.disabled == true){
document.getElementById("firstJob").value= "";
}
if (aList.selectedIndex == 6){
firstJob.focus();
}
}
</script>
<script type="text/javascript">
function DisableCountry(aList)
{
var x=document.getElementById("othercountry");
x.disabled=(aList.selectedIndex == 0 || aList.selectedIndex == 1 || aList.selectedIndex == 2 || aList.selectedIndex == 3 || aList.selectedIndex == 4 || aList.selectedIndex == 5 || aList.selectedIndex == 6 || aList.selectedIndex == 7 || aList.selectedIndex == 8 || aList.selectedIndex == 9 || aList.selectedIndex == 10 || aList.selectedIndex == 11 || aList.selectedIndex == 12 || aList.selectedIndex == 13); //others
if(x.disabled == true){
document.getElementById("othercountry").value= "";
}
if (aList.selectedIndex == 14){
othercountry.focus();
}
}
</script>
<script type="text/javascript">
$(document).ready(function(){
var counter = 2;
$("#addButton").click(function () {
if(counter>10){
alert("Only 10 textboxes allow");
return false;
}
var newTextBoxDiv = $(document.createElement('div'))
.attr("id", 'TextBoxDiv' + counter);
newTextBoxDiv.after().html('<table><tr><td><input type="text" id="training" name="mytext1" class="form-control" autocomplete="off"></td><td><input type="text" id="credits" name="mytext1" class="form-control" autocomplete="off"></td><td><input type="text" id="sponsor" name="mytext1" class="form-control" autocomplete="off"></td></tr></table>');
newTextBoxDiv.appendTo("#TextBoxesGroup");
counter++;
});
$("#removeButton").click(function () {
if(counter==1){
alert("No more textbox to remove");
return false;
}
counter--;
$("#TextBoxDiv" + counter).remove();
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
var counter = 2;
$("#addButton2").click(function () {
if(counter>10){
alert("Only 10 textboxes allow");
return false;
}
var newTextBoxDiv = $(document.createElement('div'))
.attr("id", 'TextBoxDiv' + counter);
newTextBoxDiv.after().html('<table><tr><td><input type="text" placeholder="Masteral, Doctoral, etc." style="width: 100%;" id="degree" name="degree" class="form-control" autocomplete="off"></td><td><input type="text" style="width: 100%;" id="college" name="college" class="form-control" autocomplete="off"></td><td><input type="text" style="width: 100%;" id="year" name="year" class="form-control" autocomplete="off"></td><td><input type="text" style="width: 100%;" id="awards" name="awards" class="form-control" autocomplete="off"></td></tr></table>');
newTextBoxDiv.appendTo("#TextBoxesGroup2");
counter++;
});
$("#removeButton2").click(function () {
if(counter==1){
alert("No more textbox to remove");
return false;
}
counter--;
$("#TextBoxDiv" + counter).remove();
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
var counter = 2;
$("#addButton3").click(function () {
if(counter>10){
alert("Only 10 textboxes allow");
return false;
}
var newTextBoxDiv = $(document.createElement('div'))
.attr("id", 'TextBoxDiv' + counter);
newTextBoxDiv.after().html('<table><tr><td><input type="text" style="width: 100%;" id="exam" name="exam" class="form-control" autocomplete="off"></td><td><input required type="date" style="width: 100%;" id="dateExam" name="dateExam" class="form-control" autocomplete="off"></td><td><input type="text" style="width: 100%;" id="rating" name="rating" class="form-control" autocomplete="off"></td></tr></table>');
newTextBoxDiv.appendTo("#TextBoxesGroup3");
counter++;
});
$("#removeButton3").click(function () {
if(counter==1){
alert("No more textbox to remove");
return false;
}
counter--;
$("#TextBoxDiv" + counter).remove();
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
var counter = 2;
$("#addButton5").click(function () {
if(counter>10){
alert("Only 10 textboxes allow");
return false;
}
var newTextBoxDiv = $(document.createElement('div'))
.attr("id", 'TextBoxDiv' + counter);
newTextBoxDiv.after().html('<div class="circle">'+(counter-1)+'</div><table><tr><td><label>DATE EMPLOYED (FROM)</label><input type="month" name="fromDate'+(counter-1)+'" id="fromDate'+(counter-1)+'" required class="form-control"></td><td><label>(TO)</label><input type="month" name="toDate'+(counter-1)+'" id="toDate'+(counter-1)+'" required class="form-control" /></td></tr></table><label>NAME OF COMPANY</label><input type="text" id="company" name="company" required style="width:100%;" class="form-control" autocomplete="off" value=""><label>COMPANY ADDRESS </label><input type="text" required placeholder="" id="cAdd" name="cAdd" class="form-control" autocomplete="off"><label>NATURE OF WORK</label><select required onchange="DisableNatureWork(this)" class="form-control" style="width: 100%; height:50px" id = "workNature'+(counter-1)+'"><option value="">Select below</option><option value="Teacher">Teacher</option><option value="Fishery/Technician">Fishery/Technician</option><option value="Computer Technician">Computer Technician</option><option value="Programmer">Programmer</option><option value="Aquaculturist">Aquaculturist</option><option value="Network Administrator">Network Administrator</option><option value="Marine Biologist">Marine Biologist</option><option value="Food Quality Control/Assurance">Food Quality Control/Assurance</option><option value="Others">Others</option></select><input type="text" placeholder="If others, please specify." id="othernaturework'+(counter-1)+'" name="othernaturework" required class="form-control" autocomplete="off" disabled="true"><br>');
newTextBoxDiv.appendTo("#TextBoxesGroup5");
counter++;
document.getElementById('myText').value = (counter-1);
});
$("#removeButton5").click(function () {
if(counter==0){
counter = 2;
alert("No more textbox to remove");
return false;
}
counter--;
$("#TextBoxDiv" + counter).remove();
document.getElementById('myText').value = (counter-1);
});
document.getElementById('myText').value = (counter-1);
});
</script>
<style type="text/css">
.circle {
width: 60px;
height: 50px;
border-radius: 50%;
font-size: 50px;
color: #fff;
line-height: 50px;
text-align: center;
background: #000;
font-family: century gothic;
}
</style>
</head>
<body>
<div id="header">
<h1 style="font-family: latoregular;"><a href="home.php">SOCIO-ECONOMIC PROFILING & GRADUATE TRACER SURVEY </a></a></h1>
<ul id="navigation">
<li>
<a href="home.php">Home</a>
</li>
<li>
<a href="socioLogin.php">Socio-Economic</a>
<ul>
<li>
<a href="socioLogin.php">Socio Form</a>
</li>
</ul>
</li>
<li class = "current">
<a href="graduatesLogin.php">Graduates</a>
</li>
<li>
<a href="about.php">About</a>
</li>
</ul>
</div>
<style>
ul#stepForm, ul#stepForm li {
margin: 0;
padding: 0;
}
ul#stepForm li {
list-style: none outside none;
}
label{margin-top: 10px;}
.help-inline-error{color:red;}
</style>
<div id="body" style="min-width: 960px; width: 2000px;">
<br><br>
<img src="images/Untitled-1.jpg" width="100%">
<hr>
<h1 style="font-family: latoregular; text-transform: uppercase; color: black; text-align: center;" id = "user" value = "<?php echo $login_sessionGrad; ?>"><?php echo $login_sessionGrad; ?></h1>
<p style="font-family: latoregular; font-weight: bold; text-transform: uppercase; text-align: center; color: #077054;">You have logged in as @<b style="font-family: latoregular; color: #077054;"><?php echo $login_sessionGrad; ?></b>. (<a href = "logoutGrad.php" style="text-decoration: none; color: #077054; font-family: latoregular;">Log out</a>)
<div class="container" style="padding-left: 0px; padding-right: 15px; width: 102%;">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title" style = "font-family: Century Gothic;">DNSC GRADUATE TRACER FORM</h3>
</div>
<div class="panel-body">
<form name="basicform" id="basicform">
<div id="sf1" class="frm">
<fieldset>
<legend style="font-family: Century Gothic;">Step 1 of 4: <b>General Information</b></legend>
<div class="form-group">
<?php
$connection = mysqli_connect("localhost", "root", "");
if (!$connection) {
die("Database connection failed: " . mysqli_error());
}
$db_select = mysqli_select_db($connection, "tryit");
if (!$db_select) {
die("Database selection failed: " . mysqli_error());
}
$result = mysqli_query($connection, "SELECT * FROM graduate WHERE username = '$login_sessionGrad'");
if (!$result) {
die("Database query failed: " . mysqli_error());
}
while ($row = mysqli_fetch_array($result)) {
?>
<table><tr>
<td><label>FIRST NAME <b style = "color: red;">*</b></label><input type="text" style="width: 100%;" id="fname" name="fname" class="form-control" autocomplete="off" value="<?php echo $row['fname']; ?>"></td>
<td><label>MIDDLE NAME <b style = "color: red;">*</b></label><input type="text" style="width: 100%;" id="mname" name="mname" class="form-control" autocomplete="off" value="<?php echo $row['mname']; ?>"></td>
<td><label>LAST NAME <b style = "color: red;">*</b></label><input type="text" style="width: 100%;" id="lname" name="lname" class="form-control" autocomplete="off" value="<?php echo $row['lname']; ?>"></td>
</tr>
</table>
<label>EMAIL ADDRESS <b style = "color: red;">*</b></label>
<input type="text" placeholder="Your Valid Email" id="email" name="email" class="form-control" autocomplete="off" value="<?php echo $row['email']; ?>" readonly>
<?php
}
?>
<label>PERMANENT ADDRESS <b style = "color: red;">*</b></label>
<table>
<tr>
<td>
<strong style="color: black; font-family: century gothic;">Province</strong>
<!--
mysqli_connect('localhost', 'root', '');
mysqli_select_db('tryit');
$sql = "SELECT distinct countryname from student5";
$result = mysqli_query($sql);*/
<input name='s1' id='s1' style='font-family: Century Gothic;' class='form-control'>
while($row = mysqli_fetch_array($result)){
echo "<option value='" . $row['countryname'] . "'>" . $row['countryname'] . "</option>";
}
echo "</select>";
?>
*/-->
<input name='s1' id='s1' class='form-control'>
</td>
<td>
<strong style="color: black; font-family: century gothic">City/Municipality</strong>
<!--
mysqli_connect('localhost', 'root', '');
mysqli_select_db('tryit');
$sql = "SELECT distinct state from student5 order by state";
$result = mysqli_query($sql);
<input name='s2' id='s2' style='font-family: Century Gothic;' class='form-control'>
while($row = mysqli_fetch_array($result)){
echo "<option value='" . $row['state'] . "'>" . $row['state'] . "</option>";
}
echo "</select>";
?> -->
<input name='s2' id='s2' class='form-control'>
</td>
<td>
<strong style="color: black; font-family: century gothic">Barangay</strong>
<!--
mysqli_connect('localhost', 'root', '');
mysqli_select_db('tryit');
$sql = "SELECT distinct city from student5 order by city";
$result = mysqli_query($sql);
echo "<select name='s3' id='s3' style='font-family: Century Gothic;' class='form-control'>";
while($row = mysqli_fetch_array($result)){
echo "<option value='" . $row['city'] . "'>" . $row['city'] . "</option>";
}
echo "</select>";
?> -->
<input name='s3' id='s3' class='form-control'>
</td></tr></table><br>
<strong style="color: black; font-family: century gothic">Lot No. / Blk. No. / Street / Subdivision / Purok</strong>
<div style = "color: #2E8B57; font-size:5px;" id="txtHint2"></div>
<input type="text" class="form-control" placeholder = "Lot No. / Blk. No. / Street / Subdivision / Purok" id = "shouseNum" name="shouseNum">
<label>PRESENT ADDRESS <b style = "color: red;">*</b></label>
<input name="same" id="same" onclick="copyBilling (this.form, this.checked)" type="checkbox">
<!-- <input name="copy" onclick="data_copy()"; type="checkbox" id = "same"> --><b style = "font-family: Century Gothic; color: black;">Same as permanent</b><br><br>
<div id="dependent-box">
<table>
<tr>
<td>
<strong style="color: black; font-family: century gothic">Province</strong>
<!--
mysqli_connect('localhost', 'root', '');
mysqli_select_db('tryit');
$sql = "SELECT distinct countryname from student5";
$result = mysqli_query($sql);
echo "<select name='ss1' id='ss1' style='font-family: Century Gothic;' class='form-control'>";
while($row = mysqli_fetch_array($result)){
echo "<option value='" . $row['countryname'] . "'>" . $row['countryname'] . "</option>";
}
echo "</select>";
?> -->
<input name='ss1' id='ss1' class='form-control'>
</td>
<td>
<strong style="color: black; font-family: century gothic">City/Municipality</strong>
<!--
mysqli_connect('localhost', 'root', '');
mysqli_select_db('tryit');
$sql = "SELECT distinct state from student5 order by state";
$result = mysqli_query($sql);
echo "<select name='ss2' id='ss2' style='font-family: Century Gothic;' class='form-control'>";
while($row = mysqli_fetch_array($result)){
echo "<option value='" . $row['state'] . "'>" . $row['state'] . "</option>";
}
echo "</select>";
?> -->
<input name='ss2' id='ss2' class='form-control'>
</td>
<td>
<strong style="color: black; font-family: century gothic">Barangay</strong>
<!--
mysqli_connect('localhost', 'root', '');
mysqli_select_db('tryit');
$sql = "SELECT distinct city from student5 order by city";
$result = mysqli_query($sql);
echo "<select name='ss3' id='ss3' style='font-family: Century Gothic;' class='form-control'>";
while($row = mysqli_fetch_array($result)){
echo "<option value='" . $row['city'] . "'>" . $row['city'] . "</option>";
}
echo "</select>";
?> -->
<input name='ss3' id='ss3' class='form-control'>
</td></tr></table>
<br>
<strong style="color: black; font-family: century gothic">Lot No. / Blk. No. / Street / Subdivision / Purok</strong>
<input type="text" name="sshouseNum" placeholder = "Lot No. / Blk. No / Street / Subdivision / Purok" id = "sshouseNum" class="form-control">
</div>
<label>GENDER <b style = "color: red;">*</b></label>
<select required class="form-control" id="gender" name="gender">
<option value="">Select below</option>
<option value="Female">Female</option>
<option value="Male">Male</option>
</select>
<label>CIVIL STATUS <b style = "color: red;">*</b></label>
<select required class="form-control" id="status" name="status">
<option value="">Select below</option>
<option value="Single">Single</option>
<option value="Married">Married</option>
<option value="Widow">Widow</option>
<option value="Separated">Separated</option>
</select>
<label>CELLPHONE/TELEPHONE <b style = "color: red;">*</b></label>
<input type="text" placeholder="Contact Number" id="contact" name="contact" class="form-control" maxlength = "11" autocomplete="off">
</div>
<div class="clearfix" style="height: 10px;clear: both;"></div>
<div class="clearfix" style="height: 10px;clear: both;"></div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<button class="btn btn-primary open1" type="button">Next <span class="fa fa-arrow-right"></span></button>
</div>
</div>
</fieldset>
</div>
<div id="sf2" class="frm" style="display: none;">
<fieldset>
<legend style="font-family: Century Gothic;">Step 2 of 4: <b>Educational Background</b></legend>
<input name="education" id="education" onclick="hideShowEduc (this.form, this.checked)" type="checkbox"> I HAVE PURSUED GRADUATE STUDIES.
<h4 style="font-family: Century Gothic; color: black;">EDUCATIONAL ATTAINMENT <b style = "color: red;">*</b></h4>
<div id="dependent-box2">
<div class="form-group">
<table><tr>
<td><label>ADVANCED STUDIES/DEGREE </label></td>
<td><label>COLLEGE OR UNIVERSITY </label></td>
<td><label>SEMESTER AND YEAR </label></td>
<td><label>HONORS/AWARDS RECEIVED </label></td>
</tr></table>
<div id='TextBoxesGroup2'>
<div id="TextBoxDiv1">
</div></div>
<table>
<tr>
<td>
<button type="button" value='Add' id='addButton2' class="form-control" style="width:100%; border: solid black;">Add Education</button></td>
<td>
<button type="button" value='Add' id='removeButton2' class="form-control" style="width:100%; border: solid black;">Remove Education</button></td>
</tr>
</table>
</div>
</div>
<div id="dependent-box3">
<label>COURSE <b style = "color: red;">*</b></label>
<select required class="form-control" id="course" name="course">
<option value="">Select below</option>
<option value="BSIT">Bachelor of Science in Information Technology</option>
<option value="BSEd">Bachelor of Science in Education</option>
<option value="BPA">Bachelor of Public Administration</option>
<option value="BSMB">Bachelor of Science in Marine Biology</option>
<option value="BSFT">Bachelor of Science in Food Technology</option>
<option value="BSFi">Bachelor of Science in FIsheries</option>
<option value="BAT">Bachelor of Agriculture Technology</option>