コード例 #1
0
<!DOCTYPE html>
<?php 
include_once '/DAL/Connection.php';
include_once '/BLL/ClaseMateriaBLL.php';
include_once '/DTO/ClaseMateria.php';
$materiaBLL = new MateriaBLL();
if (isset($_REQUEST["task"])) {
    $task = $_REQUEST["task"];
} else {
    $task = "mostrar";
}
switch ($task) {
    case "insertar":
        if (isset($_REQUEST["pcodmat"])) {
            $codmat = $_REQUEST["pcodmat"];
        }
        if (isset($_REQUEST["pnommat"])) {
            $nommat = $_REQUEST["pnommat"];
        }
        if (isset($_REQUEST["psemmat"])) {
            $semmat = $_REQUEST["psemmat"];
        }
        if (isset($_REQUEST["pcosmat"])) {
            $cosmat = $_REQUEST["pcosmat"];
        }
        $materiaBLL->insert($codmat, $nommat, $semmat, $cosmat);
        break;
    case "actualizar":
        if (isset($_REQUEST["pcodmat"])) {
            $codmat = $_REQUEST["pcodmat"];
        }
コード例 #2
0
<?php
include_once './cad/DAL/Connection.php';
include_once './cad/BLL/ClaseAulaMateriaBLL.php';
include_once './cad/DTO/ClaseAulaMateria.php';
include_once './cad/BLL/ClaseAulaBLL.php';
include_once './cad/DTO/ClaseAula.php';
include_once './cad/BLL/ClaseMateriaBLL.php';
include_once './cad/DTO/ClaseMateria.php';

$aulaBLL = new AulaBLL();
$materiaBLL = new MateriaBLL();
$aulaMateriaBLL = new AulaMateriaBLL();

$listaAulas = $aulaBLL->selectAll();
$listaMaterias = $materiaBLL->selectAll();
?>
<!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="index.php">
            <input type="hidden" name="task" value="insertar"/>
            <div>
コード例 #3
0
<?php
include_once './cad/DAL/Connection.php';
include_once './cad/BLL/ClaseAulaMateriaBLL.php';
include_once './cad/DTO/ClaseAulaMateria.php';
include_once './cad/BLL/ClaseAulaBLL.php';
include_once './cad/DTO/ClaseAula.php';
include_once './cad/BLL/ClaseMateriaBLL.php';
include_once './cad/DTO/ClaseMateria.php';

$aulaMateriaBLL = new AulaMateriaBLL();
$aulaBLL = new AulaBLL();
$materiaBLL = new MateriaBLL();
if (isset($_REQUEST["task"])) {
    $task = $_REQUEST["task"];
} else {
    $task = "mostrar";
}
switch ($task) {
    case "insertar":
        if (isset($_REQUEST["idMateria"])) {
            $idMateria = $_REQUEST["idMateria"];
        }
        if (isset($_REQUEST["idAula"])) {
            $idAula = $_REQUEST["idAula"];
        }
        if (isset($_REQUEST["hora"])) {
            $hora = $_REQUEST["hora"];
        }
        if (isset($_REQUEST["dia"])) {
            $dia = $_REQUEST["dia"];
        }
コード例 #4
0
<?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>
コード例 #5
0
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Practico Uno</title>
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<script type='text/javascript' src='js/bootstrap.min.js'></script>
	<link rel="stylesheet" href="css/style.css">

</head>
<body>
	<?php 
include_once "./BLL/MateriaBLL.php";
$materiaBLL = new MateriaBLL();
/*Ejecucion*/
if (isset($_REQUEST["task"])) {
    if ($_REQUEST["task"] == "eliminar") {
        $materiaBLL->delete($_REQUEST["id"]);
    } else {
        $id = $_REQUEST["idMateria"];
        $codigo = $_REQUEST["txtCodigo"];
        $nombre = $_REQUEST["txtNombre"];
        $semestre = $_REQUEST["txtSemestre"];
        $costo = $_REQUEST["dbCosto"];
        $materiaBLL->update($id, $codigo, $nombre, $semestre, $costo);
    }
} else {
    if (isset($_REQUEST["txtCodigo"])) {
        $codigo = $_REQUEST["txtCodigo"];
        $nombre = $_REQUEST["txtNombre"];
        $semestre = $_REQUEST["txtSemestre"];