forked from sai5171/smart-india-hackathon-project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
register.php
831 lines (821 loc) · 41.9 KB
/
register.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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript">
document.addEventListener('contextmenu', event => event.preventDefault());
</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/sweetalert.css">
<link rel="stylesheet" type="text/css" href="css/sweetalert2.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/sweetalert.min.js"></script>
<script type="text/javascript" src="js/sweetalert2.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<link rel="icon" type="image/png" href="images/logo.png">
<title>Register</title>
<style>
</style>
</head>
<body>
<header>
<!-- header -->
<div class="container-fluid" id="heading">
<div class="row">
<div class="col-md-12">
<h6 id="left">Feedback | Sitemap</h6>
<h6 id="right">Skip to main content | Screen Reader Access<span id="scale"> | A- A A+</span></h6>
</div>
</div>
</div>
<!-- logo image -->
<div class="container-fluid" id="logo">
<div class="row">
<div class="col-sm-4">
<img class="site-logo" src="images/icon.png">
</div>
<div class="col-sm-4 col-sm-offset-4" style="margin-top: 25px;">
<button data-toggle="modal" data-target="#squarespaceModal" style="float:right;margin-right: 15px;" class="btn btn-default">Login</button>
<!-- login popup -->
<div class="modal fade" id="squarespaceModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h3 class="modal-title" id="lineModalLabel">Login</h3>
</div>
<div class="modal-body">
<form action="login_s" method="POST">
<div class="form-group">
<label>Email</label>
<input type="email" class="form-control input-sm" id="Email" name="Email" placeholder="Email" autofocus required>
</div>
<div class="form-group">
<label>Password</label>
<input type="Password" minlength="8" maxlength="50" class="form-control input-sm" id="password" name="password" placeholder="Password" required>
</div>
<a onclick="forgot();" style="color:red;float:right;" onMouseOver="this.style.cursor='pointer'">Forgot Password ?</a>
<button type="submit" class="btn btn-success">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
<!-- navigation -->
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2" onclick="myFunction(this)">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar bar1"></span>
<span class="icon-bar bar2"></span>
<span class="icon-bar bar3"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
<ul class="nav navbar-nav">
<li><a href="home">Home</a></li>
<li><a href="about_us">About Us</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Programmes <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Basic Research</a></li>
<li><a href="#">Medical Biotechnology</a></li>
<li><a href="#">Food and Nutrition</a></li>
<li><a href="#">Bioenergy</a></li>
<li><a href="#">Bioresources and Environment</a></li>
<li><a href="#">Agriculture Biotechnology</a></li>
<li><a href="#">Animal Biotechnology</a></li>
<li><a href="#">Aquaculture and Marine Biotechnology</a></li>
<li><a href="#">Theoretical and Computational Biology</a></li>
<li><a href="#">International Collaborations</a></li>
<li><a href="#">Human Resource Development</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Schemes<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Centres Of Excellence and Innovation in Biotechnology</a></li>
<li><a href="#">Research Resources, Service Facilities and Platforms</a></li>
<li><a href="#">Societal Development</a></li>
<li><a href="#">Biotech Parks and Incubators</a></li>
<li><a href="#">Rapid Grant for Young Investigators</a></li>
<li><a href="#">Glue Grant</a></li>
<li><a href="#">Special Programmes-North-East region</a></li>
<li><a href="#">Public Private Partnerships</a></li>
<li><a href="#">Women Scientist Scheme</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Institutions<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="institutes.php">Autonomous Institutions</a></li>
<li><a href="#">Public Sector Undertaking (PSU’s)</a></li>
<li><a href="#">Others</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Policies & Regulations<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Policies</a></li>
<li><a href="#">Regulations</a></li>
</ul>
</li>
</ul>
<!--<ul class="nav navbar-nav navbar-right">
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</ul>-->
</div>
</div>
</nav>
</header>
<section>
<?php
if(isset($_SESSION['message']))
{
if( $_SESSION['message'] == "Aadhar number is already registered." || $_SESSION['message'] == "File too large. File must be less than 150 kilobytes." || $_SESSION['message'] == "Please select an image." || $_SESSION['message'] == "email id is already registered." || $_SESSION['message'] == "Institution registration already done.")
{
echo "<div class='container'>";
echo "<div class='alert alert-danger alert-dismissable'>
<a class='close' data-dismiss='alert' aria-label='close'>×</a>
<strong>".$_SESSION['message']."</strong>
</div>";
echo "</div>";
unset($_SESSION['message']);
}
else if($_SESSION['message'] == "Successfully registered. An activation mail has been send to your email id. Click on the activation link given in the mail to activate your account.")
{
echo "<div class='container'>";
echo "<div class='alert alert-success alert-dismissable'>
<a class='close' data-dismiss='alert' aria-label='close'>×</a>
<strong>".$_SESSION['message']."</strong>
</div>";
echo "</div>";
unset($_SESSION['message']);
}
}
?>
<div class="col-lg-6 col-lg-offset-3">
<div class="well bs-component">
<ul class="nav nav-tabs">
<li class="active"><a href="#student" data-toggle="tab">Student</a></li>
<li><a href="#institution" data-toggle="tab">Institution</a></li>
<li><a href="#lab" data-toggle="tab">Company / Lab</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="student">
<!-- student -->
<br>
<form class="form-horizontal" enctype="multipart/form-data" action="register_student_s" method="POST">
<fieldset>
<legend align="left" style="padding: 0px 0px 10px 0px;">Student Registration</legend>
<!-- name -->
<div class="form-group">
<label class="col-lg-3 control-label">Name</label>
<div class="col-lg-9" id="name">
<div style="float:left;clear:left;width: 100%;">
<div class="input-group" style="padding:0px 0px 10px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<select class="form-control input-sm" id="named" name="named" style="width: 25%;" autofocus required>
<option value="Dr">Dr</option>
<option value="Mr">Mr</option>
<option value="Ms">Ms</option>
</select>
</div>
<div class="input-group" style="padding:0px 0px 10px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<input type="name" class="form-control input-sm" id="namef" name="namef" placeholder="First Name" style="width: 100%;" required>
</div>
<div class="input-group" style="padding:0px 0px 10px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<input type="name" class="form-control input-sm" id="namem" name="namem" placeholder="Middle Name" style="width: 100%;">
</div>
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<input type="name" class="form-control input-sm" id="namel" name="namel" placeholder="Last Name" style="width: 100%;" required>
</div>
</div>
</div>
</div>
<!-- email -->
<div class="form-group">
<label class="col-lg-3 control-label">Email</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-envelope"></i></div>
<input type="email" class="form-control input-sm" id="Email" name="Email" placeholder="Email" required>
</div>
</div>
</div>
<!-- password -->
<div class="form-group">
<label class="col-lg-3 control-label">Password</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-lock"></i></div>
<input type="Password" pattern=".{8,50}" minlength="8" maxlength="50" class="form-control input-sm" id="spassword" name="spassword" placeholder="Password" required>
</div>
</div>
</div>
<!-- passwordr -->
<div class="form-group">
<label class="col-lg-3 control-label">Confirm Password</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-lock"></i></div>
<input type="Password" pattern=".{8,50}" minlength="8" maxlength="50" class="form-control input-sm" id="spasswordr" name="spasswordr" placeholder="Confirm Password" required>
</div>
</div>
</div>
<!-- aadhar -->
<div class="form-group">
<label class="col-lg-3 control-label">Aadhar Number</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-comment"></i></div>
<input type="number" minlength="12" maxlength="12" class="form-control input-sm" id="aadhar" name="aadhar" placeholder="Aadhar Number" required>
</div>
</div>
</div>
<!-- phone -->
<div class="form-group">
<label class="col-lg-3 control-label">Phone Number</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-earphone"></i></div>
<input type="number" minlength="10" maxlength="10" class="form-control input-sm" id="phone" name="phone" placeholder="Phone Number" required>
</div>
</div>
</div>
<!-- gender -->
<div class="form-group">
<label class="col-lg-3 control-label">Gender</label>
<div class="col-lg-9">
<div class="radio">
<label>
<input type="radio" name="sex" value="Male" required>
Male
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="sex" value="Female">
Female
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="sex" value="Transgender">
Transgender
</label>
</div>
</div>
</div>
<!-- nationality -->
<div class="form-group">
<label class="col-lg-3 control-label">Nationality</label>
<div class="col-lg-9">
<select class="form-control input-sm" id="nationality" name="nationality" required>
<option value="Indian">Indian</option>
<option value="Others">Others</option>
</select>
</div>
</div>
<!-- photo -->
<div class="form-group">
<label class="col-lg-3 control-label">Upload Photo</label>
<div class="col-lg-9">
<input type="file" name="file-1" id="file-1" multiple required>
<label class="btn btn-default btn-sm" id="file-1l" for="file-1" style="margin-top: 3px;"><span style="overflow: hidden;">Choose Image</span></label>
</div>
</div>
<!-- register -->
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<input style="margin-top:25px;" class="btn btn-success" type="submit" name="register_btn" id="register_btn" value="Register"/>
</div>
</div>
</fieldset>
</form>
<!-- student end -->
</div>
<div class="tab-pane fade" id="institution">
<!-- institution -->
<br>
<form class="form-horizontal" enctype="multipart/form-data" action="register_institution_s" method="POST">
<fieldset>
<legend align="left" style="padding: 0px 0px 10px 0px;">Institution Details</legend>
<!-- state -->
<div class="form-group">
<label class="col-lg-3 control-label">State</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-globe"></i></div>
<select class="form-control input-sm" id="state" name="state" style="width: 100%;" autofocus required>
<?php
$servername = "127.0.0.1";
$username = "root";
$password = "$@!Sai5171";
$database = "hackindia";
$con = mysqli_connect($servername, $username, $password,$database);
$extract = mysqli_query($con,"select * from state_codes");
echo "<option>Select State</option>";
while($row = mysqli_fetch_array($extract))
{
$name = $row['name'];
$codes = $row['codes'];
echo "<option value='$codes'>$name</option>";
}
?>
</select>
</div>
</div>
</div>
<!-- institution_name -->
<div class="form-group">
<label class="col-lg-3 control-label">Institution Name</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-home"></i></div>
<select class="form-control input-sm" id="institution_name" name="institution_name" style="width: 100%;" disabled required>
<option>Select State First</option>
</select>
</div>
</div>
</div>
<!-- address -->
<div class="form-group">
<label class="col-lg-3 control-label">Address</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-road"></i></div>
<input type="text" class="form-control input-sm" id="address" name="address" placeholder="Address" disabled required>
</div>
</div>
</div>
<br><legend align="left" style="padding: 0px 0px 10px 0px;">Contact Person Details</legend>
<!-- name -->
<div class="form-group">
<label class="col-lg-3 control-label">Name</label>
<div class="col-lg-9" id="name">
<div style="float:left;clear:left;width: 100%;">
<div class="input-group" style="padding:0px 0px 10px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<input type="name" class="form-control input-sm" id="inamef" name="namef" placeholder="First Name" style="width: 100%;" disabled required>
</div>
<div class="input-group" style="padding:0px 0px 10px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<input type="name" class="form-control input-sm" id="inamem" name="namem" placeholder="Middle Name" style="width: 100%;" disabled>
</div>
<div class="input-group" style="padding:0px 0px 10px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<input type="name" class="form-control input-sm" id="inamel" name="namel" placeholder="Last Name" style="width: 100%;" disabled required>
</div>
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-bookmark"></i></div>
<input type="name" class="form-control input-sm" id="inamed" name="named" placeholder="Designation" style="width: 50%;" disabled required>
</div>
</div>
</div>
</div>
<!-- email -->
<div class="form-group">
<label class="col-lg-3 control-label">Email</label>
<div class="col-lg-9">
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-envelope"></i></div>
<input type="email" class="form-control input-sm" id="iEmail" name="Email" placeholder="Email" disabled required>
</div>
</div>
</div>
<!-- phone -->
<div class="form-group">
<label class="col-lg-3 control-label">Contact Number</label>
<div class="col-lg-9">
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-earphone"></i></div>
<input type="number" minlength="10" maxlength="10" class="form-control input-sm" id="iphone" name="phone" placeholder="Contact Number" disabled required>
</div>
</div>
</div>
<!-- photo -->
<div class="form-group">
<label class="col-lg-3 control-label">Upload Photo</label>
<div class="col-lg-9">
<input type="file" name="file-2" id="file-2" multiple required>
<label class="btn btn-default btn-sm" id="file-2l" for="file-2" style="margin-top: 3px;"><span style="overflow: hidden;">Choose Image</span></label>
</div>
</div>
<br><legend align="left" style="padding: 0px 0px 10px 0px;">Password Details</legend>
<!-- password -->
<div class="form-group">
<label class="col-lg-3 control-label">Password</label>
<div class="col-lg-9">
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-lock"></i></div>
<input type="Password" minlength="8" maxlength="50" class="form-control input-sm" id="ipassword" name="ipassword" placeholder="Password" disabled required>
</div>
</div>
</div>
<!-- passwordr -->
<div class="form-group">
<label class="col-lg-3 control-label">Confirm Password</label>
<div class="col-lg-9">
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-lock"></i></div>
<input type="Password" minlength="8" maxlength="50" class="form-control input-sm" id="ipasswordr" name="ipasswordr" placeholder="Confirm Password" disabled required>
</div>
</div>
</div>
<!-- register -->
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<input style="margin-top:25px;" class="btn btn-success" type="submit" name="register_btn" id="iregister_btn" value="Register" disabled/>
</div>
</div>
</fieldset>
</form>
<!-- institution end -->
</div>
<div class="tab-pane fade" id="lab">
<!-- lab -->
<br>
<form class="form-horizontal" enctype="multipart/form-data" action="register_company_lab_s.php" method="POST">
<fieldset>
<legend align="left" style="padding: 0px 0px 10px 0px;">Company / Lab</legend>
<!-- state -->
<div class="form-group">
<label class="col-lg-3 control-label">State</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-globe"></i></div>
<select class="form-control input-sm" name="cstate" style="width: 100%;" autofocus required>
<?php
$servername = "127.0.0.1";
$username = "root";
$password = "$@!Sai5171";
$database = "hackindia";
$con = mysqli_connect($servername, $username, $password,$database);
$extract = mysqli_query($con,"select * from state_codes");
while($row = mysqli_fetch_array($extract))
{
$name = $row['name'];
$codes = $row['codes'];
echo "<option value='$codes'>$name</option>";
}
?>
</select>
</div>
</div>
</div>
<!-- lab_name -->
<div class="form-group">
<label class="col-lg-3 control-label">Company/Lab Name</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-home"></i></div>
<select class="form-control input-sm" id='cname' name="cname" style="width: 100%;" required>
<option>Biocon</option>
<option>Serum Institute of India</option>
<option>Panacea Biotech Ltd</option>
<option>Novo Nordisk</option>
<option>GlaxoSmithKline Pharmaceuticals Ltd.</option>
<option>SIRO Clinpharm</option>
<option>Novozymes, South Asia</option>
<option>Zydus Cadila</option>
<option>Indian Immunologicals</option>
<option>Wockhardt Ltd.</option>
<option>other</option>
</select>
</div>
</div>
</div>
<!-- other -->
<div class="form-group" id="other_lab" style="display:none;">
<label class="col-lg-3 control-label"></label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-home"></i></div>
<input type="text" class="form-control input-sm" name="cother" placeholder="Other">
</div>
</div>
</div>
<!-- url -->
<div class="form-group">
<label class="col-lg-3 control-label">Company/Lab web URL</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-road"></i></div>
<input type="text" class="form-control input-sm" name="curl" placeholder="URL" required>
</div>
</div>
</div>
<!-- address -->
<div class="form-group">
<label class="col-lg-3 control-label">Address</label>
<div class="col-lg-9">
<div class="input-group">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-road"></i></div>
<input type="text" class="form-control input-sm" name="caddress" placeholder="Address" required>
</div>
</div>
</div>
<br><legend align="left" style="padding: 0px 0px 10px 0px;">Contact Person Details</legend>
<!-- name -->
<div class="form-group">
<label class="col-lg-3 control-label">Name</label>
<div class="col-lg-9" id="name">
<div style="float:left;clear:left;width: 100%;">
<div class="input-group" style="padding:0px 0px 10px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<input type="name" class="form-control input-sm" name="cnamef" placeholder="First Name" style="width: 100%;" required>
</div>
<div class="input-group" style="padding:0px 0px 10px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<input type="name" class="form-control input-sm" name="cnamem" placeholder="Middle Name" style="width: 100%;">
</div>
<div class="input-group" style="padding:0px 0px 10px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-user"></i></div>
<input type="name" class="form-control input-sm" name="cnamel" placeholder="Last Name" style="width: 100%;" required>
</div>
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-bookmark"></i></div>
<input type="name" class="form-control input-sm" name="cnamed" placeholder="Designation" style="width: 50%;" required>
</div>
</div>
</div>
</div>
<!-- email -->
<div class="form-group">
<label class="col-lg-3 control-label">Email</label>
<div class="col-lg-9">
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-envelope"></i></div>
<input type="email" class="form-control input-sm" name="cEmail" placeholder="Email" required>
</div>
</div>
</div>
<!-- phone -->
<div class="form-group">
<label class="col-lg-3 control-label">Contact Number</label>
<div class="col-lg-9">
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-earphone"></i></div>
<input type="number" minlength="10" maxlength="10" class="form-control input-sm" name="cphone" placeholder="Contact Number" required>
</div>
</div>
</div>
<!-- photo -->
<div class="form-group">
<label class="col-lg-3 control-label">Upload Photo</label>
<div class="col-lg-9">
<input type="file" name="file-3" id="file-3" multiple required>
<label class="btn btn-default btn-sm" id="file-3l" for="file-3" style="margin-top: 3px;"><span style="overflow: hidden;">Choose Image</span></label>
</div>
</div>
<br><legend align="left" style="padding: 0px 0px 10px 0px;">Password Details</legend>
<!-- password -->
<div class="form-group">
<label class="col-lg-3 control-label">Password</label>
<div class="col-lg-9">
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-lock"></i></div>
<input type="Password" minlength="8" maxlength="50" class="form-control input-sm" id="cpassword" name="cpassword" placeholder="Password" required>
</div>
</div>
</div>
<!-- passwordr -->
<div class="form-group">
<label class="col-lg-3 control-label">Confirm Password</label>
<div class="col-lg-9">
<div class="input-group" style="padding:0px 0px 0px 0px;">
<div class="input-group-addon input-sm"><i class="glyphicon glyphicon-lock"></i></div>
<input type="Password" minlength="8" maxlength="50" class="form-control input-sm" id="cpasswordr" name="cpasswordr" placeholder="Confirm Password" required>
</div>
</div>
</div>
<!-- register -->
<div class="form-group">
<div class="col-lg-9 col-lg-offset-3">
<input style="margin-top:25px;" class="btn btn-success" type="submit" name="register_btn" id="register_btn" value="Register"/>
</div>
</div>
</fieldset>
</form>
<!-- lab end -->
</div>
</div>
</div>
</div>
</section>
<footer>
</footer>
</body>
</html>
<script type="text/javascript">
var spassword = document.getElementById("spassword"), spasswordr = document.getElementById("spasswordr");
function validatePasswords(){
if(spassword.value != spasswordr.value) {
spasswordr.setCustomValidity("Passwords Don't Match");
} else {
spasswordr.setCustomValidity('');
}
}
spassword.onchange = validatePasswords;
spasswordr.onkeyup = validatePasswords;
var cpassword = document.getElementById("cpassword"), cpasswordr = document.getElementById("cpasswordr");
function validatePassword(){
if(cpassword.value != cpasswordr.value) {
cpasswordr.setCustomValidity("Passwords Don't Match");
} else {
cpasswordr.setCustomValidity('');
}
}
cpassword.onchange = validatePassword;
cpasswordr.onkeyup = validatePassword;
var password = document.getElementById("ipassword"), passwordr = document.getElementById("ipasswordr");
function validatePassword(){
if(password.value != passwordr.value) {
passwordr.setCustomValidity("Passwords Don't Match");
} else {
passwordr.setCustomValidity('');
}
}
password.onchange = validatePassword;
passwordr.onkeyup = validatePassword;
$("#file-1").change(function() {
$("#file-1l").css("border","none");
$("#file-1l").css("background-color","#3fb618");
$("#file-1l").css("background-image","url('images/check.svg')");
$("#file-1l").css("background-repeat","no-repeat");
$("#file-1l").css("background-position","center");
$("#file-1l").css("background-size","50px 30px");
});
$("#file-2").change(function() {
$("#file-2l").css("border","none");
$("#file-2l").css("background-color","#3fb618");
$("#file-2l").css("background-image","url('images/check.svg')");
$("#file-2l").css("background-repeat","no-repeat");
$("#file-2l").css("background-position","center");
$("#file-2l").css("background-size","50px 30px");
});
$("#file-3").change(function() {
$("#file-3l").css("border","none");
$("#file-3l").css("background-color","#3fb618");
$("#file-3l").css("background-image","url('images/check.svg')");
$("#file-3l").css("background-repeat","no-repeat");
$("#file-3l").css("background-position","center");
$("#file-3l").css("background-size","50px 30px");
});
if($(document).width()<=500)
$("#scale").hide();
else
$("#scale").show();
$("#aadhar").keyup(function(e) {
var max = 12;
if($("#aadhar").val().length >= max) {
$("#aadhar").val($("#aadhar").val().substr(0, max));
}
});
$("#state").change(function() {
var code = $("#state").val();
$.ajax({
type:"POST",
url:"institution_name",
data: {code:code},
success: function(response)
{
$("#institution_name").html(response);
}
});
});
$("#cname").change(function (){
var temp = $("#cname").val();
if(temp=="other")
{
$("#other_lab").css("display","");
}
});
function forgot()
{
$('.modal').modal('toggle');
swal({
title: 'Submit email to reset your password.',
input: 'email',
showCancelButton: true,
confirmButtonText: 'Submit',
showLoaderOnConfirm: true,
preConfirm: function (email) {
return new Promise(function (resolve, reject) {
var check = "0";
$.ajax({
type : 'post' ,
async : false ,
url : 'forgot_check' ,
data : {email:email} ,
success:function(output) {
check = output;
}
});
if(check=="0") {
resolve();
}
else {
setTimeout(function() {
$.ajax({
type : 'post' ,
async : false ,
url : 'forgot_s' ,
data : {email:email} ,
success:function(output) {
resolve();
}
});
}, 0000)
}
})
},
allowOutsideClick: false
}).then(function (email) {
var check = "0";
$.ajax({
type : 'post' ,
async : false ,
url : 'forgot_check' ,
data : {email:email} ,
success:function(output) {
check = output;
}
});
if(check=="0") {
swal({
type: 'error',
title: 'Your email id is not registered.',
html: 'email: ' + email,
width: 500,
padding: 100,
timer: 5500,
showConfirmButton: false
})
}
else {
swal({
type: 'success',
title: 'Password has been send to',
html: 'email: ' + email,
width: 500,
padding: 100,
timer: 5500,
showConfirmButton: false
})
}
})
}
$("#state").change(function() {
$("#institution_name").removeAttr('disabled');
});
$("#institution_name").change(function (){
$("#address").removeAttr('disabled');
});
$("#address").change(function (){
$("#inamef").removeAttr('disabled');
});
$("#inamef").change(function (){
$("#inamem").removeAttr('disabled');
$("#inamel").removeAttr('disabled');
});
$("#inamel").change(function (){
$("#inamed").removeAttr('disabled');
});
$("#inamed").change(function (){
$("#iEmail").removeAttr('disabled');
});
$("#iEmail").change(function (){
$("#iphone").removeAttr('disabled');
});
$("#iphone").change(function (){
$("#ipassword").removeAttr('disabled');
});
$("#ipassword").change(function (){
$("#ipasswordr").removeAttr('disabled');
});
$("#ipasswordr").change(function (){
$("#iregister_btn").removeAttr('disabled');
});
</script>