-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path1_nfc.php
More file actions
81 lines (66 loc) · 3.26 KB
/
1_nfc.php
File metadata and controls
81 lines (66 loc) · 3.26 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
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="styles/bunito2.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
<title>MEU QPass NFC</title>
</head>
<body>
<?php
setlocale(LC_MONETARY, "pt_BR", "ptb");
session_start();
include 'connection.php';
$cQuery = "SELECT * FROM usuarios";
$changeQuery = mysqli_query($connection, $cQuery);
$reg_user = mysqli_fetch_array($changeQuery);
$_SESSION['passe'] = $reg_user["joinvillePasse"];
$passe = $_SESSION['passe'];
$_SESSION['dinheiro'] = $reg_user["userDinheiro"];
$dinheiro = $_SESSION['dinheiro'];
$numPasse = $dinheiro / $passe;
?>
<!--card para o token-->
<div class="container-fluid mt-4">
<div class=" card text-center">
<div class="card-body">
<h2 class="card-title">QPpass</h2>
<a id="emp" class="card-subtitle mb-2 text-muted">by: ctrl+shift+QUACK</a>
<br>
<br>
<h4>seu saldo:</h4>
<h2 id="calculo"><?php echo 'R$' . number_format($dinheiro, 2, ',', '.'); ?></h2>
<h6 id="passes"><?php echo 'Você tem ', floor($numPasse), ' disponíveis'; ?></h6>
<br>
<a type="button" class="myButton" value="Câmera" href="1_camera.php">Câmera</a>
<input type="button" class="myButton2" value="NFC"></input>
<br>
<div class="qr_cod">
<img class="logo mt-4 mb-4" src="https://imgur.com/NRKGoYl.png" width="50%">
<div class="token mb-3">
<a id="numero">
<script>
function getRandom() {
document.getElementById("numero").innerHTML = (Math.floor(Math.random() * 8889) + 1000);
}
</script>
</a>
</div>
</div>
<a id="dig mb-3">aproxime o seu aparelho do leitor</a>
<br>
<br>
<input type="button" class="gerar" onclick="getRandom()" value="Gerar um código"></input>
<input type="button" class="gerar" onclick="window.location.href = 'concluido.php'" value="Concluído"></input>
</div>
</div>
</div>
<!--fim do card-->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>
</body>
</html>