-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckin.php
More file actions
73 lines (66 loc) · 2.65 KB
/
checkin.php
File metadata and controls
73 lines (66 loc) · 2.65 KB
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
<?php
session_start();
include('assets/shared/connect.php');
date_default_timezone_set('Asia/Manila');
include("assets/php/processes/checkin.php");
if (isset($_GET["logout"]) && $_GET["logout"] === "true") {
session_destroy();
header("Location: login.php");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GymBoost</title>
<link rel="icon" href="assets/img/logo/officialLogo.png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/styles.css" rel="stylesheet" />
</head>
<body onload="document.getElementById('rfid').focus()">
<div class="container">
<div class="row">
<div class="col-12">
<div class="d-flex justify-content-center align-items-center vh-100">
<div class="text-center">
<a href="?logout=true">
<img src="assets/img/logo/officialLogo.png" alt="GymBoost" width="150">
</a>
<div class="heading mb-3" style="font-size: 3.5rem">RFID CHECK-IN</div>
<form method="POST" autocomplete="off">
<div class="input-wrapper m-auto" style="width:400px; max-width:100%">
<input type="text" id="rfid" name="rfid" class="form-control text-center my-4"
style="border-color: var(--primaryColor); border-width: 3px; box-shadow:none; font-size: 25px; width: 400px; max-width: 100%;"
placeholder="Scan RFID..." autofocus>
</div>
</form>
<?php if ($message): ?>
<div id="alertBox"
class="alert <?php echo $success ? 'alert-success' : 'alert-danger' ?> mt-4 fs-4"
role="alert" style="max-width: 100%; word-wrap: break-word;">
<?php echo $message ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</body>
<script>
const rfidInput = document.getElementById("rfid");
setInterval(() => {
if (document.activeElement !== rfidInput) {
rfidInput.focus();
}
}, 1000);
setTimeout(() => {
const alert = document.getElementById("alertBox");
if (alert) {
alert.classList.add('fade');
setTimeout(() => alert.remove(), 600);
}
}, 8000);
</script>
</html>