64 lines
2.1 KiB
PHP
64 lines
2.1 KiB
PHP
<?php
|
|
require "../includes/config.php";
|
|
|
|
if (!isset($_SESSION["data"])) {
|
|
header("Location: signin");
|
|
exit;
|
|
}
|
|
|
|
$stmt = $conn->prepare("SELECT money FROM users WHERE uid = ?");
|
|
$stmt->bind_param("i", $_SESSION['data']['uid']);
|
|
$stmt->execute();
|
|
$result = $stmt->get_result();
|
|
$user = $result->fetch_assoc();
|
|
$stmt->close();
|
|
|
|
$_SESSION['data']['money'] = $user['money'];
|
|
?>
|
|
|
|
<!doctype html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Hit & Run</title>
|
|
<link rel="stylesheet" href="assets/css/style.css">
|
|
</head>
|
|
<body>
|
|
<div class="main-wrapper">
|
|
<div style="padding-right: 32px;">
|
|
<div class="gamename card">
|
|
Hit & Run <br>
|
|
Hit or you Lose.
|
|
</div>
|
|
<div style="padding-top: 32px; display:flex; flex-direction:column; align-items:center;">
|
|
<div class="p16">
|
|
Place your bet here
|
|
</div>
|
|
<div class="num-box">
|
|
<button class="btn minus">-</button>
|
|
<input min="1000" max="<?php echo $_SESSION['data']['money']; ?>"type="number" value="1000" style="margin-bottom: -1px;">
|
|
<button class="btn plus">+</button>
|
|
</div>
|
|
<button class="btn btn-primary" id="playBtn">▶️ MAINKAN</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="userbox">
|
|
<div class="avatar">P</div>
|
|
|
|
<div class="info">
|
|
<div class="name"><?php echo $_SESSION['data']["username"]; ?></div>
|
|
<div class="saldo">Saldo: <span><?php echo $_SESSION['data']["money"]; ?></span></div>
|
|
<div class="status">Status: Masih Pemula Banghh....</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<footer>© 2025 Hit Or Run by Rafael 5803025007, Stephen 5803025009, Biema 5803025018</footer>
|
|
<script src="assets/js/menu.js"></script>
|
|
</html>
|