diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..2ba986f
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,15 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "chrome",
+ "request": "launch",
+ "name": "Launch Chrome against localhost",
+ "url": "http://localhost:8080",
+ "webRoot": "${workspaceFolder}"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Config.php b/Config.php
new file mode 100644
index 0000000..867a243
--- /dev/null
+++ b/Config.php
@@ -0,0 +1,12 @@
+connect_error) {
+ die("Koneksi gagal: " . mysqli_connect_error());
+}
+?>
diff --git a/Leaderboard.html b/Leaderboard.html
new file mode 100644
index 0000000..494faa5
--- /dev/null
+++ b/Leaderboard.html
@@ -0,0 +1,178 @@
+
+
+
+
+ Leaderboard
+
+
+
+
+
+
+
+
+
+
+
+🏆 Leaderboard
+ Top skor dari semua pemain
+
+
+
+ Filter:
+
+
+
+
+
+
+
+
+ 🎮
+
Total Game Dimainkan
+ 0
+
+
+
+
+
+ ⭐
+
Skor Tertinggi
+ 0
+
+
+
+
+
+
+
diff --git a/auth.php b/auth.php
new file mode 100644
index 0000000..40f6f6d
--- /dev/null
+++ b/auth.php
@@ -0,0 +1,97 @@
+alert('Semua data wajib diisi!'); window.location='index.html';";
+ exit;
+ }
+
+ // Cek Format Email (Biar gak ngawur)
+ if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
+ echo "";
+ exit;
+ }
+
+ // Cek Panjang Password (Minimal 6)
+ if (strlen($password) < 6) {
+ echo "";
+ exit;
+ }
+
+ // Cek Kesamaan Password
+ if ($password !== $confirm) {
+ echo "";
+ exit;
+ }
+
+ // --- 2. CEK DUPLIKAT DI DATABASE ---
+ $stmt = mysqli_prepare($conn, "SELECT id FROM users WHERE username = ? OR email = ?");
+ mysqli_stmt_bind_param($stmt, "ss", $username, $email);
+ mysqli_stmt_execute($stmt);
+ mysqli_stmt_store_result($stmt);
+
+ if (mysqli_stmt_num_rows($stmt) > 0) {
+ echo "";
+ exit;
+ }
+ mysqli_stmt_close($stmt);
+
+ // --- 3. SIMPAN DATA ---
+ $hashed_password = password_hash($password, PASSWORD_DEFAULT);
+ $stmtInsert = mysqli_prepare($conn, "INSERT INTO users (username, email, password) VALUES (?, ?, ?)");
+ mysqli_stmt_bind_param($stmtInsert, "sss", $username, $email, $hashed_password);
+
+ if (mysqli_stmt_execute($stmtInsert)) {
+ echo "";
+ } else {
+ echo "Error: " . mysqli_error($conn);
+ }
+ mysqli_stmt_close($stmtInsert);
+
+}
+
+// ==========================================
+// BAGIAN 2: LOGIKA LOGIN
+// ==========================================
+else if (isset($_POST['btn-login'])) {
+
+ $username = $_POST['username'];
+ $password = $_POST['password'];
+
+ $stmt = mysqli_prepare($conn, "SELECT * FROM users WHERE username=?");
+ mysqli_stmt_bind_param($stmt, "s", $username);
+ mysqli_stmt_execute($stmt);
+
+ $result = mysqli_stmt_get_result($stmt);
+ $row = mysqli_fetch_assoc($result);
+
+ // JIKA GAGAL
+ if (!$row || !password_verify($password, $row['password'])) {
+ // Kirim sinyal error ke HTML (Kotak Merah)
+ header("Location: index.html?error=gagal");
+ exit;
+ }
+
+ // JIKA SUKSES
+ $_SESSION['username'] = $row['username'];
+ $_SESSION['login'] = true;
+
+ header("Location: mainboard.html");
+ exit;
+}
+?>
\ No newline at end of file
diff --git a/home.html b/home.html
index 0cc82c2..b654c07 100644
--- a/home.html
+++ b/home.html
@@ -4,7 +4,155 @@
Login Memory Cards
-
+
@@ -35,5 +183,15 @@
-
+