<?php
require 'config.php';
?>
<!doctype html>
<html lang="id">
<head>
  <meta charset="utf-8">
  <title>Dashboard</title>
</head>
<body>
<?php if (is_logged_in()): ?>
    <?php if (is_admin()): ?>
        <h2>Dashboard role Admin</h2>
    <?php else: ?>
        <h2>Dashboard role User</h2>
    <?php endif; ?>

    <p><a href="logout.php">Logout</a></p>

<?php else: ?>
    <h2>Selamat datang di Dashboard</h2>
    <p>Anda belum login.</p>
    <a href="login.php">Login</a> | <a href="register.php">Register</a>
<?php endif; ?>
</body>
</html>
