<?php
include_once './cad/DAL/Connection.php';
include_once './cad/BLL/ClaseMateriaBLL.php';
include_once './cad/DTO/ClaseMateria.php';

$materiaBLL = new MateriaBLL();

$id = $_REQUEST["id"];
$objMateria = $materiaBLL->select($id);
$semestre = $objMateria->getSemestre();
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>        
        <form method="POST" action="indexMateria.php">
            <input type="hidden" name="task" value="actualizar"/>
            <input type="hidden" name="id" value="<?php
            echo $objMateria->getId();
            ?>"/>
            <div>
                <label>C&oacute;digo</label>
            </div>
                    <th>
                        Hora
                    </th>
                    <th>
                        D&iacute;a
                    </th>
                </tr>
            </thead>
            <tbody>
                <?php
                //  $personaBLL->insert("Juan", "Perez", 55);

                $listaAulasMaterias = $aulaMateriaBLL->selectAll();
                foreach ($listaAulasMaterias as $objAulaMateria) {
                    $objAula = $aulaBLL->select($objAulaMateria->getIdAula());
                    $objMateria = $materiaBLL->select($objAulaMateria->getIdMateria());
                    ?>
                    <tr>
                        <td>
                            <?php
                            echo $objAulaMateria->getId();
                            ?>
                        </td>
                        <td>
                            <?php
                            echo $objMateria->getNombre();
                            ?>
                        </td>
                        <td>
                            <?php
                            echo $objAula->getNumeroDeAula();