forked from BE-PROJECTS2018/GroupNo45-Pantomath-bo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
238 lines (190 loc) · 10.6 KB
/
index.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
<?php
if(isset($_GET["error"])){
$error = $_GET["error"];
if($error == "true"){
echo '<script type="text/javascript">
alert("Error Occur: It looks Like you have already registered!");
</script>';
}else{
echo '<script type="text/javascript">
alert("Login to continue..");
</script>';
}
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="New Intelligent System">
<title>Pantomath'Bo</title>
<link rel="stylesheet" href="./css/mainstyle.css" >
<link rel="stylesheet" href="./css/fontawesome.css" >
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/registration/registration.css">
<!-- js -->
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script type="text/javascript" src="./js/webcam/webcam.min.js"></script>
<!--[if lte IE 8]>
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/grids-responsive-min.css">
<!--<![endif]-->
<!--[if lte IE 8]>
<link rel="stylesheet" href="css/layouts/blog-old-ie.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="css/layouts/blog.css">
<!--<![endif]-->
</head>
<body>
<div id="layout" class="pure-g">
<div class="sidebar pure-u-1 pure-u-md-1-4">
<div class="header">
<h1 class="brand-title">Pantomath 'Bo</h1>
<h2 class="brand-tagline">Discover Cross Model Behavior Analysis</h2>
<hr>
<h3>New Generation Intelligent System</h3>
<br>
<p class="copyright">Designed by <a href="#" target="_blank" title="Colorlib">Pantomath Team</a></p>
</nav>
</div>
</div>
<div class="content pure-u-1 pure-u-md-3-4">
<div>
<!-- A wrapper for all the blog posts -->
<div class="posts">
<h1 class="content-subhead">Welcome to Online Interview</h1>
<section>
<div class="container" id="register">
<form id="contact" action="./register.php" method="post" enctype="multipart/form-data">
<h3>Candidate Registration</h3>
<h4 style="float:right">One Step toward success ...</h4>
<fieldset>
<div id="results">Your captured image will appear here...</div>
<div id="my_camera"></div>
<div id="cam_btn">
<input type=button value="Take Snapshot" onClick="take_snapshot()">
<input type="button" value="Done" onClick="photo_done()">
</div>
</fieldset>
<fieldset>
<input name="fname" placeholder="First Name" type="text" tabindex="1" required autofocus>
</fieldset>
<fieldset>
<input name="lname" placeholder="Last Name" type="text" tabindex="2" required autofocus>
</fieldset>
<fieldset>
<input name ="age" placeholder="Age" type="Number" tabindex="3" required min=18 autofocus>
</fieldset>
<fieldset>
<input name="college" placeholder="College" type="text" tabindex="4" required autofocus>
</fieldset>
<fieldset>
<input name="degree" placeholder="Degree" type="text" tabindex="5" required autofocus>
</fieldset>
<fieldset>
<input name="stream" placeholder="Stream" type="text" tabindex="5" required autofocus>
</fieldset>
<fieldset>
<input name="experience" placeholder="Experience(years)" type="number" tabindex="5" required autofocus>
</fieldset>
<fieldset>
<input name="email" placeholder="Email Address" type="email" tabindex="6" required>
</fieldset>
<fieldset>
<input name="phone" placeholder="Phone Number" type="tel" tabindex="7" required autofocus="">
</fieldset>
<fieldset>
<button style="display:block;width:120px; height:30px;" onclick="document.getElementById('getFile').click()">Upload Resume</button>
<i id="fileName">Nothing selected</i>
<input name="file" type="file" id="getFile" style="display:none;padding:2px;" accept=".pdf" tabindex="5" required autofocus>
</fieldset>
<input type="hidden" name="image_data" value="" id="image_data"/>
<fieldset>
<button name="submit" type="submit" id="contact-submit" data-submit="...Sending">Submit</button>
</fieldset>
<h6>Already Registered <a href="#" id="login-trigger">Login</a></h6>
</form>
</div>
<div class="container" id ="login">
<form id="contact" action="./login.php" method="post">
<h3>Candidate Login</h3>
<h4 style="float:right">One Step toward success ...</h4>
<fieldset>
<input name="email" placeholder="Email Address" type="email" tabindex="6" required>
</fieldset>
<fieldset>
<button name="submit" type="submit" id="contact-submit" data-submit="...Sending">Submit</button>
</fieldset>
<h6>New Candidate <a href="#" id = "register-trigger">Register</a></h6>
</form>
</div>
<script>
var click=0;
$(document).ready(function(){
$("#register").hide();
$("#fileName").hide();
$("#register-photo").hide();
$("#login-trigger").click(function(){
$("#register").hide();
$("#register-photo").hide();
$("#login").show();
Webcam.reset();
});
$("#register-trigger").click(function(){
$("#login").hide();
$("#register").show();
$("#register-photo").show();
//<!-- Configure a few settings and attach camera -->
Webcam.set({
width: 320,
height: 240,
image_format: 'jpeg',
jpeg_quality: 90
});
Webcam.attach( '#my_camera' );
});
$('input[type="file"]').change(function(e){
var fileName = e.target.files[0].name;
$("#fileName").show();
$("#fileName").html(fileName);
//alert('The file "' + fileName + '" has been selected.');
});
});
//<!-- Code to handle taking the snapshot and displaying it locally -->
var img_data = "";
function take_snapshot() {
click++;
// take snapshot and get image data
Webcam.snap( function(data_uri) {
// display results in page
document.getElementById('results').innerHTML =
'<h6>Here is your image:</h6>' +
'<img src="'+data_uri+'"/>';
img_data=data_uri;
} );
}
function photo_done(){
if(click>0){
$("#my_camera").remove();
$("#cam_btn").remove();
document.getElementById('results').innerHTML =
'<img src="'+img_data+'"/>';
Webcam.reset();
$("#image_data").val(""+img_data);
}else{
alert("Please Capture Image");
}
}
</script>
</section>
</div>
</div>
</div>
</div>
</body>
</html>