Compare commits
No commits in common. "df3f478734d0e45991942d5f7253b0d91fc3665f" and "e30ef4a0194314471e23f04cf881f154a20dbd6a" have entirely different histories.
df3f478734
...
e30ef4a019
@ -26,10 +26,7 @@
|
||||
<h1 style="color: red" id="gameover-title">YOU DIED</h1>
|
||||
<p id="gameover-score">Score: 0</p>
|
||||
<button id="ulangi" class="modegame">Main lagi?</button>
|
||||
<a href="http://localhost/uas_sem_1/index.php">
|
||||
<button id="keluar" class="">Keluar?</button>
|
||||
</a>
|
||||
|
||||
<button id="keluar" class="modegame">Keluar?</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gameover" class="gameover"></div>
|
||||
|
||||
47
home.html
Normal file
47
home.html
Normal file
@ -0,0 +1,47 @@
|
||||
<html>
|
||||
<style>
|
||||
body {
|
||||
background-image: url();
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin-top: 10%;
|
||||
font-size: 85px;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 5px;
|
||||
border: 2px solid; /* Nanti dihapus */
|
||||
border-radius: 7pt; /* Nanti dihapus */
|
||||
width: 70%;
|
||||
justify-self: center;
|
||||
background-image: url();
|
||||
}
|
||||
|
||||
#button {
|
||||
font-size: 35px;
|
||||
margin-top: 5%;
|
||||
width: 50%;
|
||||
margin-bottom: 5%;
|
||||
border: 1px solid;
|
||||
border-radius: 3pt;
|
||||
padding: 2px;
|
||||
justify-self: center;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<h1>EAT THAT APPLE</h1>
|
||||
<div class="container">
|
||||
<a href="game.html">
|
||||
<div id="button">Play Game</div>
|
||||
</a>
|
||||
|
||||
<div id="button">Leaderboard</div>
|
||||
<div id="button">Logout</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script></script>
|
||||
</html>
|
||||
55
index.php
55
index.php
@ -8,65 +8,18 @@ if(!isset($_SESSION['users'])) {
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="id">
|
||||
<style>
|
||||
body {
|
||||
background-image: url();
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin-top: 10%;
|
||||
font-size: 85px;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 5px;
|
||||
border: 2px solid; /* Nanti dihapus */
|
||||
border-radius: 7pt; /* Nanti dihapus */
|
||||
width: 70%;
|
||||
justify-self: center;
|
||||
background-image: url();
|
||||
}
|
||||
|
||||
#button {
|
||||
font-size: 35px;
|
||||
margin-top: 5%;
|
||||
width: 50%;
|
||||
margin-bottom: 5%;
|
||||
border: 1px solid;
|
||||
border-radius: 3pt;
|
||||
padding: 2px;
|
||||
justify-self: center;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Halaman ke-1</title>
|
||||
</head>
|
||||
<body style='text-align:center'>
|
||||
<h1>EAT THAT APPLE</h1>
|
||||
<!-- <a href="index.php">Home</a>
|
||||
<a href="logout.php">Logout</a> -->
|
||||
<h1>Halaman ke-1</h1>
|
||||
<a href="index.php">Home</a>
|
||||
<a href="logout.php">Logout</a>
|
||||
<hr>
|
||||
|
||||
<h3>Selamat datang, <?php echo $_SESSION['users']['nama'] ?></h3>
|
||||
<br>
|
||||
|
||||
<!-- <h1>EAT THAT APPLE</h1> -->
|
||||
<div class="container">
|
||||
<a href="game.html">
|
||||
<div id="button">Play Game</div>
|
||||
</a>
|
||||
<a href="http://localhost/uas_sem_1/leaderboard.php">
|
||||
<div id="button">Leaderboard</div>
|
||||
</a>
|
||||
<a href="http://localhost/uas_sem_1/logout.php">
|
||||
<div id="button">Logout</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
Halaman ini akan tampil setelah user login.
|
||||
</body>
|
||||
</html>
|
||||
10
login.php
10
login.php
@ -12,7 +12,7 @@ if(isset($_POST['username'])) {
|
||||
$data = mysqli_fetch_array($query);
|
||||
$_SESSION['users'] = $data;
|
||||
$_SESSION['username'] = $data = ['username'];
|
||||
echo '<script>location.href="index.php";</script>';
|
||||
echo '<script>alert("Selamat datang, '.$data['nama'].'"); location.href="index.php";</script>';
|
||||
} else {
|
||||
echo '<script>alert("Username atau Password tidak sesuai");</script>';
|
||||
}
|
||||
@ -37,12 +37,12 @@ if(isset($_POST['username'])) {
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
<td><input type="text" name="username" placeholder="Username" style="border: none"></td>
|
||||
<td>Username</td>
|
||||
<td><input type="text" name="username"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="password" name="password" placeholder="Password" style="border: none"></td>
|
||||
<td>Password</td>
|
||||
<td><input type="password" name="password"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user