33 lines
762 B
PHP
Executable File
33 lines
762 B
PHP
Executable File
<?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);
|
|
|
|
$ligne = getUserId($user_id);
|
|
$user_name = $ligne[0]['user_name'];
|
|
|
|
$salt = md5($sn.$fingerData[0]['finger_data'].$device[0]['vc'].$time.$user_id.$device[0]['vkey']);
|
|
|
|
if (strtoupper($vStamp) == strtoupper($salt))
|
|
{
|
|
$succes = "1";
|
|
updateJeton($user_id, $succes);
|
|
}
|
|
else
|
|
{
|
|
$msg = "Paramètres invalides.. / Parameter invalid..";
|
|
echo "flexcode/messages.php?msg=$msg";
|
|
}
|
|
}
|
|
|
|
?>
|