-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess_verification.php
49 lines (31 loc) · 1.13 KB
/
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
47
48
49
<?php
if (isset($_POST['VerPas']) && !empty($_POST['VerPas'])) {
include 'include/global.php';
include 'include/function.php';
$data = explode(";",$_POST['VerPas']);
$pemilih_id = $data[0];
$vStamp = $data[1];
$time = $data[2];
$sn = $data[3];
$fingerData = getUserFinger($pemilih_id);
$device = getDeviceBySn($sn);
$sql1 = "SELECT * FROM pemilih WHERE pemilih_id='".$pemilih_id."'";
$result1 = mysqli_query($GLOBALS["___mysqli_ston"], $sql1);
$data = mysqli_fetch_array($result1);
$pemilih_id = $data['pemilih_id'];
$salt = md5($sn.$fingerData[0]['finger_data'].$device[0]['vc'].$time.$pemilih_id.$device[0]['vkey']);
if (strtoupper($vStamp) == strtoupper($salt)) {
$log = createLog($pemilih_id, $time, $sn);
if ($log == 1) {
// echo $base_path."messages.php?pemilih_id=$pemilih_id&time=$time";
echo $base_path."voting_login_act2.php?username=$pemilih_id";
// header("location:voting_login3.php?username=$pemilih_id");
} else {
echo $base_path."messages.php?msg=$log";
}
} else {
$msg = "Parameter invalid..";
echo $base_path."messages.php?msg=$msg";
}
}
?>