コード例 #1
0
<?php

include_once './cad/DAL/Connection.php';
include_once './cad/BLL/ClaseAulasBLL.php';
include_once './cad/BLL/ClaseMateriasBLL.php';
include_once './cad/BLL/ClaseRegistrosBLL.php';
include_once './cad/DTO/ClaseAulas.php';
include_once './cad/DTO/ClaseMaterias.php';
include_once './cad/DTO/ClaseRegistros.php';
$aulasBLL = new AulasBLL();
$materiasBLL = new MateriasBLL();
$registrosBLL = new RegistrosBLL();
if (isset($_REQUEST["task"])) {
    $task = $_REQUEST["task"];
} else {
    $task = "mostrar";
}
switch ($task) {
    case "insertar-aula":
        if (isset($_REQUEST["numero"])) {
            $numero = $_REQUEST["numero"];
        }
        $aulasBLL->insert($numero);
        break;
    case "insertar-materia":
        if (isset($_REQUEST["codigo"])) {
            $codigo = $_REQUEST["codigo"];
        }
        if (isset($_REQUEST["nombre"])) {
            $nombre = $_REQUEST["nombre"];
        }
コード例 #2
0
<?php

include_once './cad/DAL/Connection.php';
include_once './cad/BLL/ClaseRegistrosBLL.php';
include_once './cad/BLL/ClaseMateriasBLL.php';
include_once './cad/BLL/ClaseAulasBLL.php';
include_once './cad/DTO/ClaseRegistros.php';
include_once './cad/DTO/ClaseMaterias.php';
include_once './cad/DTO/ClaseAulas.php';
$id = $_REQUEST["id"];
$registrosBLL = new RegistrosBLL();
$materiasBLL = new MateriasBLL();
$aulasBLL = new AulasBLL();
$objRegistro = $registrosBLL->select($id);
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <link rel="stylesheet" type="text/css" href="css/index.css">
        <link rel="stylesheet" type="text/css" href="css/form.css">
        <title>Actualización de Horarios de Materia/Aula</title>
    </head>
    <body>
    <main>
        <h2>Actualización de Horarios de Materia/Aula</h2>
        <form method="POST" action="index.php">
            <input type="hidden" name="task" value="actualizar-registro"/>
            <input type="hidden" name="id" value="<?php 
echo $objRegistro->getNID_Registro();
?>