105 lines
3.0 KiB
PHP
105 lines
3.0 KiB
PHP
<?php
|
||
session_start();
|
||
|
||
if (!isset($_SESSION['user'])) {
|
||
header("Location: index.php");
|
||
exit();
|
||
}
|
||
|
||
$user = $_SESSION['user'];
|
||
$username = isset($user['username']) ? $user['username'] : 'Player';
|
||
$roleRaw = isset($user['role']) ? $user['role'] : 'player';
|
||
$roleDisplay = ($roleRaw === 'admin') ? 'Administrator' : 'Player';
|
||
$roleIcon = ($roleRaw === 'admin') ? '👑' : '🎮';
|
||
?>
|
||
|
||
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Memory Flip Card Game</title>
|
||
|
||
<link rel="stylesheet" href="assets/mainboard.css">
|
||
</head>
|
||
|
||
<body>
|
||
|
||
<img src="images/fruit1.png" class="fruit f1">
|
||
<img src="images/fruit2.png" class="fruit f2">
|
||
<img src="images/fruit3.png" class="fruit f3">
|
||
<img src="images/fruit4.png" class="fruit f4">
|
||
|
||
<div class="music-container">
|
||
<button id="musicBtn" class="music-btn">🔇</button>
|
||
</div>
|
||
<audio id="bgMusic" loop src="music/music_background.mp3"></audio>
|
||
|
||
<div class="container glass">
|
||
|
||
<header class="header">
|
||
<div class="user-info">
|
||
<h2><?php echo htmlspecialchars($username); ?></h2>
|
||
<p><?php echo $roleIcon . " " . $roleDisplay; ?></p>
|
||
</div>
|
||
|
||
<div class="actions">
|
||
<button class="btn blue" onclick="openCredits()">ℹ️ Credit</button>
|
||
<button id="leaderboardBtn" class="btn gold">🏆 Leaderboard</button>
|
||
<button id="logoutBtn" class="btn gray">🚪 Logout</button>
|
||
</div>
|
||
</header>
|
||
|
||
<div class="title">
|
||
<h1>Memory Flip Card</h1>
|
||
<p>Pilih tingkat kesulitan untuk memulai permainan</p>
|
||
</div>
|
||
|
||
<div class="stage-grid">
|
||
<button class="stage-btn" onclick="selectStage('easy')">
|
||
<span class="icon">😊</span>
|
||
<h3>Easy Mode</h3>
|
||
</button>
|
||
<button class="stage-btn" onclick="selectStage('medium')">
|
||
<span class="icon">🤔</span>
|
||
<h3>Medium Mode</h3>
|
||
</button>
|
||
<button class="stage-btn" onclick="selectStage('hard')">
|
||
<span class="icon">😤</span>
|
||
<h3>Hard Mode</h3>
|
||
</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="creditsOverlay" class="credits-overlay">
|
||
<div class="credits-box">
|
||
<div class="credits-scroll">
|
||
<h2 class="credits-title">CREDITS</h2>
|
||
|
||
<div class="credits-section">
|
||
<p><strong>KELOMPOK 2</strong></p>
|
||
<p>Evelyn Adi Gloria - 5803025026</p>
|
||
<p>Nathan Handoko S - 5803025001</p>
|
||
<p>Yustina Rizky S.P - 5803025041</p>
|
||
</div>
|
||
|
||
<div class="credits-section">
|
||
<p><strong>PROJECT UAS</strong></p>
|
||
<p>MEMORI FLIP CARD</p>
|
||
</div>
|
||
|
||
<div class="credits-section">
|
||
<p><strong>SPECIAL THANKS</strong></p>
|
||
<p>Bu Devi dan Pak Andrew<br>dan teman-teman informatika</p>
|
||
</div>
|
||
|
||
<p>© 2025 UKWMS</p>
|
||
</div>
|
||
</div>
|
||
<button class="close-credits" onclick="closeCredits()">TUTUP</button>
|
||
</div>
|
||
|
||
<script src="assets/mainboard.js"></script>
|
||
|
||
</body>
|
||
</html>
|