-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprocess_verification.php
46 lines (29 loc) · 970 Bytes
/
process_verification.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
<?php
if (isset($_POST['VerPas']) && !empty($_POST['VerPas'])) {
include 'include/global.php';
include 'include/function.php';
$data = explode(";",$_POST['VerPas']);
$user_id = $data[0];
$vStamp = $data[1];
$time = $data[2];
$sn = $data[3];
$fingerData = getUserFinger($user_id);
$device = getDeviceBySn($sn);
$sql1 = "SELECT * FROM user WHERE user_id='".$user_id."'";
$result1 = mysql_query($sql1);
$data = mysql_fetch_array($result1);
$user_name = $data['user_name'];
$salt = md5($sn.$fingerData[0]['finger_data'].$device[0]['vc'].$time.$user_id.$device[0]['vkey']);
if (strtoupper($vStamp) == strtoupper($salt)) {
$log = createLog($user_name, $time, $sn);
if ($log == 1) {
echo $base_path."messages.php?user_name=$user_name&time=$time";
} else {
echo $base_path."messages.php?msg=$log";
}
} else {
$msg = "Parameter invalid..";
echo $base_path."messages.php?msg=$msg";
}
}
?>