<?php
    include "../backend/connection.php";
    $configure = new DefaultDatabase();
    $conf = $configure->connect();

    $materials = mysqli_query($conf, "SELECT * FROM reports");

?>
<div class="school-container">
    <h2>JETS REPORTS NAMAGEMENT</h2>
    <table id="schoolsTable">
        <thead>
            <tr>
                <th>Participant Name</th>
                <th>Category</th>
                <th>School</th>
                <th>Level</th>
                <th>Report</th>
            </tr>
        </thead>
        <tbody>
            <!-- Dummy data -->
            <?php
                while($material = mysqli_fetch_array($materials))
                {
            ?>
            <tr>
                <td><?php echo $material["full_name"] ?></td>
                <td><?php echo $material["category"] ?></td>
                <td><?php echo $material["school"] ?></td>
                <td><?php echo $material["section_name"] ?></td>
                <td><a href="<?php echo $material["location"] ?>" style="text-decoration: none; color:black; text-align:center;"><img src="../images/icon.PNG" width="50"> <br> Read Report</a></td>
            </tr>
            <?php
                }
            ?>
        </tbody>
    </table>
</div>
