<!DOCTYPE html>
<html>
<head><title>Manage Permissions</title></head>
<body>
    <h2>Manage Role Permissions</h2>
    <form method="POST" action="<?= base_url('admin/manage_permissions') ?>">
        <label>Select Role:</label><br>
        <select name="role_id" required>
            <?php foreach ($roles as $role): ?>
                <option value="<?= $role->id ?>"><?= $role->name ?></option>
            <?php endforeach; ?>
        </select><br><br>

        <label>Sections:</label><br>
        <?php foreach ($sections as $section): ?>
            <input type="checkbox" name="sections[]" value="<?= $section ?>"> <?= ucfirst($section) ?><br>
        <?php endforeach; ?>

        <br><button type="submit">Update Permissions</button>
    </form>
    <a href="<?= base_url('dashboard') ?>">Back to Dashboard</a>
</body>
</html>