diff --git a/ahh b/ahh new file mode 100644 index 0000000..00d4023 --- /dev/null +++ b/ahh @@ -0,0 +1,12 @@ + + +

Welcome !

+ +Logout diff --git a/includes/.htaccess b/includes/.htaccess new file mode 100644 index 0000000..3418e55 --- /dev/null +++ b/includes/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/includes/config.php b/includes/config.php new file mode 100644 index 0000000..e591f73 --- /dev/null +++ b/includes/config.php @@ -0,0 +1,13 @@ +connect_error) { + die("Connection failed: " . $conn->connect_error); +} + +session_start(); diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..24ab2d3 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,11 @@ +# Turn on rewrite engine +RewriteEngine On + +# If the request is NOT a real file… +RewriteCond %{REQUEST_FILENAME} !-f + +# …and NOT a real folder… +RewriteCond %{REQUEST_FILENAME} !-d + +# Rewrite /something → something.php +RewriteRule ^(.+)$ $1.php [L,QSA] diff --git a/public/assets/css/style.css b/public/assets/css/style.css new file mode 100644 index 0000000..a9f3693 --- /dev/null +++ b/public/assets/css/style.css @@ -0,0 +1,136 @@ +body, html{ + font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; + margin:0; + background: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.03), transparent 5%), + linear-gradient(180deg, #000 0%, #071827 100%), + var(--bg); + color:var(--muted); + -webkit-font-smoothing:antialiased; + -moz-osx-font-smoothing:grayscale; + padding:24px; + display:flex; + align-items:center; + justify-content:center; + height:100%; + overflow: hidden; +} + +:root{ + --bg:#071827; + --card:#071827; + --accent:#ffd54a; + --muted:#cfe8d6; + --glass: rgba(255,255,255,0.04); + --shadow: 0 6px 18px rgba(2,8,3,0.6); + --glass-2: rgba(0,0,0,0.35); +} + +.container{ + width:100%; + max-width:980px; + background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); + border-radius:16px; + padding:20px; + box-shadow:var(--shadow); + backdrop-filter: blur(6px); +} + +.card{ + background:rgba(255,255,255,0.05); + padding:28px; + border-radius:16px; + width:320px; + box-shadow:0 8px 30px rgba(0,0,0,0.5); + backdrop-filter:blur(8px); +} + +h2{ + margin-top:0; + text-align:center +} + +label{ + display:block; + margin:10px 0 4px; + font-size:14px +} + +input{ + width:100%; + padding:10px; + border-radius:8px; + border:0; + margin-bottom:10px; + background:#ffffff12; + color:white; +} + +button{ + width:100%; + padding:10px; + border-radius:8px; + border:0; + cursor:pointer; + background:linear-gradient(90deg,#ffd54a); + color:black; + font-weight:600; + margin-top:10px; +} + +.note{ + text-align:center; + margin-top:10px; + font-size:14px +} + +a{ + color:#4ade80; + text-decoration:none +} + +.logo{ + font-size: 96px; + display:flex; + align-items:center; + justify-content:center; +} + +.header{ + display:flex; + gap:16px; + align-items:center; + margin-bottom:14px +} + +table{ + width:100%; + border-collapse:collapse; + font-size:14px +} + +thead th{ + font-size:12px; + text-align:left; + padding:8px 10px; + color:var(--muted); + opacity:0.9 +} + +tbody td{ + padding:10px; + border-top:1px dashed rgba(255,255,255,0.03) +} + +.panel{ + background:var(--card); + padding:16px; + border-radius:12px; + border:1px solid var(--glass-2) +} + +footer{ + margin-top:14px; + font-size:12px; + color:rgba(255,255,255,0.45); + text-align:center +} diff --git a/public/board.php b/public/board.php new file mode 100644 index 0000000..bf10ca7 --- /dev/null +++ b/public/board.php @@ -0,0 +1,46 @@ + + + + + + Hit and Run — Leaderboard + + + +
+
+ +
+

Hit Or Run — Leaderboard

+

Daftar pemain terbaik dari meja Hit Or Run. Tema: felt table, kartu, dan nuansa kasino.

+
+
+ +
+
+

Top Players

+
+ + + + + + + + + + + + + + + +
#PlayerEarnings
1Tepen100
+
+
+
+ + +
+ + diff --git a/public/logout.php b/public/logout.php new file mode 100644 index 0000000..7649023 --- /dev/null +++ b/public/logout.php @@ -0,0 +1,5 @@ +prepare("SELECT id, username, password FROM users WHERE username = ?"); + $stmt->bind_param("s", $username); + $stmt->execute(); + + $result = $stmt->get_result(); + + if ($result->num_rows === 1) { + $user = $result->fetch_assoc(); + + if (password_verify($password, $user["password"])) { + $_SESSION["username"] = $user["username"]; + header("Location: home.php"); + exit; + } else { + $error = "Wrong Username or Password."; + } + } else { + $error = "Username not found."; + } + } +?> + + + + + + + Hit or Run — Sign In + + + +
+ +

Hit or Run

+ + $error

"; ?> + +
+ + + + + + + +
+ +
Belum punya akun? Sign Up!
+
+ + \ No newline at end of file diff --git a/public/signup.php b/public/signup.php new file mode 100644 index 0000000..6cb6559 --- /dev/null +++ b/public/signup.php @@ -0,0 +1,48 @@ +prepare("INSERT INTO users (username, password) VALUES (?, ?)"); + $stmt->bind_param("ss", $username, $password); + + if ($stmt->execute()) { + echo "Account created! Login here"; + exit; + } else { + echo "Username already exists."; + } + } +?> + + + + + + + Hit or Run — Sign Up + + + +
+ +

Hit or Run

+ + $error

"; ?> + +
+ + + + + + + +
+ +
Sudah punya akun? Sign In!
+
+ + \ No newline at end of file