<?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 demo_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}"; } }
<?php if (isset($_POST['VerPas']) && !empty($_POST['VerPas'])) { include 'include/global.php'; include 'include/function.php'; $data = explode(";", $_POST['VerPas']); $stud_id = $data[0]; $vStamp = $data[1]; $time = $data[2]; $sn = $data[3]; $fingerData = getUserFinger($stud_id); $device = getDeviceBySn($sn); $sql1 = "SELECT * FROM student_tbl WHERE stud_id='" . $stud_id . "'"; $result1 = mysql_query($sql1); $data = mysql_fetch_array($result1); $stud_fname = $data['stud_fname']; $salt = md5($sn . $fingerData[0]['finger_data'] . $device[0]['vc'] . $time . $stud_id . $device[0]['vkey']); if (strtoupper($vStamp) == strtoupper($salt)) { $log = createLog($stud_fname, $time, $sn); if ($log == 1) { echo $base_path . "messages.php?stud_fname={$stud_fname}&time={$time}"; } else { echo $base_path . "messages.php?msg={$log}"; } } else { $msg = "Parameter invalid.."; echo $base_path . "messages.php?msg={$msg}"; } }
<?php if (isset($_GET['stud_id']) && !empty($_GET['stud_id'])) { include 'include/global.php'; include 'include/function.php'; $stud_id = $_GET['stud_id']; $finger = getUserFinger($stud_id); echo "{$stud_id};" . $finger[0]['finger_data'] . ";SecurityKey;" . $time_limit_ver . ";" . $base_path . "process_verification.php;" . $base_path . "getac.php" . ";extraParams"; }
<?php if (isset($_GET['user_id']) && !empty($_GET['user_id'])) { include 'include/global.php'; include 'include/function.php'; $user_id = $_GET['user_id']; $finger = getUserFinger($user_id); echo "{$user_id};" . $finger[0]['finger_data'] . ";SecurityKey;" . $time_limit_ver . ";" . $base_path . "process_verification.php;" . $base_path . "getac.php" . ";extraParams"; }
<div class="row"> <div class="col-md-12"> <button type="button" class="btn btn-success" onclick="load('<?php echo $base_path; ?> user.php?action=create')">Add</button> </div> </div> <br> <?php $user = getUser(); if (count($user) > 0) { echo "<div class='row'>" . "<div class='col-md-12'>" . "<table class='table table-bordered table-hover'>" . "<thead>" . "<tr>" . "<th class='col-md-4'>User ID</th>" . "<th class='col-md-4'>Username</th>" . "<th class='col-md-2'>Template</th>" . "<th class='col-md-2'>Action</th>" . "</tr>" . "</thead>" . "<tbody>"; foreach ($user as $row) { $finger = getUserFinger($row['user_id']); $register = ''; $verification = ''; $url_register = base64_encode($base_path . "register.php?user_id=" . $row['user_id']); $url_verification = base64_encode($base_path . "verification.php?user_id=" . $row['user_id']); if (count($finger) == 0) { $register = "<a href='finspot:FingerspotReg;{$url_register}' class='btn btn-xs btn-primary' onclick=\"user_register('" . $row['user_id'] . "','" . $row['user_name'] . "')\">Register</a>"; } else { $verification = "<a href='finspot:FingerspotVer;{$url_verification}' class='btn btn-xs btn-success'>Login</a>"; } echo "<tr>" . "<td>" . $row['user_id'] . "</td>" . "<td>" . $row['user_name'] . "</td>" . "<td><code id='user_finger_" . $row['user_id'] . "'>" . count($finger) . "</code></td>" . "<td>" . "<button type='button' class='btn btn-xs btn-danger' onclick=\"user_delete('" . $row['user_id'] . "','" . $row['user_name'] . "')\">Delete</button>" . " " . "{$register}" . "{$verification}" . "</td>" . "</tr>"; } echo "</tbody>" . "</table>" . "</div>" . "</div>"; } else { echo 'User Empty'; }
<?php include 'include/global.php'; include 'include/function.php'; if (isset($_GET['action']) && $_GET['action'] == 'index') { $user = getUser(); if (count($user) > 0) { echo "<div class='row'>" . "<div class='col-md-12'>" . "<table class='table table-bordered table-hover'>" . "<thead>" . "<tr>" . "<th class='col-md-4'>User ID</th>" . "<th class='col-md-4'>Username</th>" . "<th class='col-md-2'>Template</th>" . "<th class='col-md-2'>Action</th>" . "</tr>" . "</thead>" . "<tbody>"; foreach ($user as $row) { $finger = getUserFinger($row['stud_id']); $register = ''; $verification = ''; $url_register = base64_encode($base_path . "register.php?stud_id=" . $row['stud_id']); $url_verification = base64_encode($base_path . "verification.php?stud_id=" . $row['stud_id']); if (count($finger) == 0) { $register = "<a href='finspot:FingerspotReg;{$url_register}' class='btn btn-xs btn-primary' onclick=\"user_register('" . $row['stud_id'] . "','" . $row['stud_fname'] . "')\">Register</a>"; } else { $verification = "<a href='finspot:FingerspotVer;{$url_verification}' class='btn btn-xs btn-success'>Login</a>"; } echo "<tr>" . "<td>" . $row['stud_id'] . "</td>" . "<td>" . $row['stud_fname'] . "</td>" . "<td><code id='user_finger_" . $row['stud_id'] . "'>" . count($finger) . "</code></td>" . "<td>" . "{$register}" . "{$verification}" . "</td>" . "</tr>"; } echo "</tbody>"; echo "</table>"; echo "</div>"; echo "</div>"; } } elseif (isset($_GET['action']) && $_GET['action'] == 'checkreg') { $sql1 = "SELECT count(finger_id) as ct FROM stud_thumb WHERE stud_id=" . $_GET['stud_id']; $result1 = mysql_query($sql1); $data1 = mysql_fetch_array($result1); if (intval($data1['ct']) > intval($_GET['current'])) {