<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin Panel</title>
    <link rel="stylesheet" href="...css/adminstyles.css"> <!-- Make sure this path is correct -->
</head>
<body>
    <div class="container">
        <div class="sidebar">
            <h2>Admin Menu</h2>
            <ul>
                <li><a href="?page=add_student">Add Student</a></li>
                <li><a href="?page=create_question">Create Question</a></li>
                <li><a href="?page=assign_question">Assign Question</a></li>
            </ul>
        </div>
        <div class="main-content">
            <h1>Admin Panel</h1>
            <div class="content">
                <?php
                if (isset($_GET['page'])) {
                    $page = $_GET['page'];
                    $allowed_pages = ['add_student', 'create_question', 'assign_question'];

                    if (in_array($page, $allowed_pages)) {
                        include($page . '.php');
                    } else {
                        echo "<p>Page not found.</p>";
                    }
                } else {
                    echo "<p>Welcome to the Admin Panel. Please select an action from the left menu.</p>";
                }
                ?>
            </div>
        </div>
    </div>
</body>
</html>
