<?php
include 'db_connection.php';
include 'header.php';
?>

<!DOCTYPE html>
<html>
<head>
    <title>Timetable Generator</title>
    <style>
        body {
            font-family: Arial;
            background: #f4f6f9;
        }

        .container {
            width: 80%;
            margin: auto;
            padding: 20px;
        }

        .card {
            background: #fff;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }

        h2 {
            margin-bottom: 15px;
        }

        .btn {
            padding: 12px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
        }

        .btn-generate {
            background: #28a745;
            color: white;
        }

        .btn-reset {
            background: #dc3545;
            color: white;
        }

        .alert {
            padding: 10px;
            margin-top: 10px;
            border-radius: 5px;
        }

        .success {
            background: #d4edda;
            color: #155724;
        }

        .error {
            background: #f8d7da;
            color: #721c24;
        }
    </style>
</head>
<body>

<div class="container">

    <div class="card">

        <h2>📅 Timetable Control Panel</h2>

        <!-- Generate Button -->
        <form method="POST" action="generate_timetable.php">
            <button class="btn btn-generate" type="submit">
                🚀 Generate Timetable
            </button>
        </form>

        <br>

        <!-- Reset Button -->
        <form method="POST" action="reset_timetable.php">
            <button class="btn btn-reset" type="submit">
                🧹 Reset Timetable
            </button>
        </form>

    </div>

</div>

</body>
</html>