Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Trabajo 5

viajes
<html>
<head>
<meta charset="UTF-8">
<link href="../css/bootstrap.css" rel="stylesheet" type="text/css"/>
<title>Rutas</title>
</head>
<body>
<?php
include_once './fragmento/Header.php';
include_once '../controlador/Negocio.php';
$obj = new Negocio();
?>

<div class="container">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>RutCod</th>
<th>Ruta</th>
<th>Imagen</th>
<th>Ver</th>
</tr>
</thead>
<tbody>
<?php
foreach ($obj->ListaRutas() as $k => $d) {
echo "<tr><td>$d[0]<td>$d[1] ";
echo "<td><img src='../turismo/$d[1].jpg' width='220px;' height='120px;'>";
?>
<td>
<form action="../controlador/Control.php" method="post">
<input type="hidden" value="<?= $d[0] ?>" name="code" >
<input type="hidden" value="<?= $d[1] ?>" name="picture" >
<input type="hidden" name="accion" value="guardar_ruta">
<button class="btn btn-success">Viajes</button>
</form>
<?php
}
?>
</tbody>
</table>
</div>
</body>
</html>
2) <html>
<head>
<meta charset="UTF-8">
<link href="../css/bootstrap.css" rel="stylesheet" type="text/css"/>
<title>Detalle</title>
</head>
<body>
<?php
include_once './fragmento/Header.php';
include_once '../controlador/Negocio.php';
$obj = new Negocio();
session_start();
?>

<div class="container">
<h3>Ruta : <?= $_SESSION["img"] ?></h3>
<div class="container">
<center>
<img src="../turismo/<?= $_SESSION["img"] ?>.jpg" class="responsive-img">
<br><br>
<a href="PagRuta.php" style="color:black" class="btn">Regresar</a>
</center>
</div>

<table class="table table-striped table-bordered">


<thead>
<tr>
<th>VIAJE</th>
<th>FECHA</th>
<th>HORA</th>
<th>COSTO</th>
<th>PASAJEROS</th>
</tr>
</thead>
<tbody>
<?php
foreach ($obj->ListaViajes($_SESSION["code"]) as $k => $d) {
echo "<tr><td>$d[0]<td>$d[1]<td>$d[2]<td>$d[3] ";
?>
<td>
<form action="../controlador/Control.php" method="post">
<input type="hidden" name="nro" value="<?= $d[0] ?>">
<input type="hidden" name="costo" value="<?= $d[3] ?>">
<input type="hidden" name="accion" value="guardar_pasajero">
<button class="btn btn-success">Ver</button>
</form>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</body>
</html>
3) <html>
<head>
<meta charset="UTF-8">
<link href="../css/bootstrap.css" rel="stylesheet" type="text/css"/>
<title>Pasajero</title>
</head>
<body>
<?php
include_once './fragmento/Header.php';
include_once '../controlador/Negocio.php';
$obj = new Negocio();
session_start();
?>
<div class="container">
<a href="PagDetalleRuta.php" style="color:black">Regresar</a>
<br><br>
<form method="post" action="PagAgregarPasajero.php">
<input type="hidden" name="nro" value="<?= $_SESSION["nro"] ?>">
<input type="hidden" name="costo" value="<?= $_SESSION["costo"] ?>">
<button class="btn btn-primary">Adicionar Pasajeros</button>
</form>
<h3><strong>Lista de Pasajeros en el Viaje Nro <?= $_SESSION["nro"] ?></strong></h3>
<h4>Costo del Viaje S/ <?= $_SESSION["costo"] ?></h4>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>BOLETO</th>
<th>NOMBRE</th>
<th>ASIENTO</th>
<th>PAGO</th>
<th>ANULAR</th>
</tr>
</thead>
<tbody>
<?php
foreach ($obj->ListaPasajeros($_SESSION["nro"]) as $k => $d) {
echo "<tr><td>$d[0]<td>$d[1]<td>$d[2]<td>$d[3] ";
?>
<td>
<form action="../controlador/Control.php" method="post">
<input type="hidden" name="code" value="<?= $d[0] ?>">
<input type="hidden" name="accion" value="eliminar_pasajero">
<button class="btn btn-danger">Anular</button>
</form>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</body>
</html>

Choferes

<html>
<head>
<meta charset="UTF-8">
<link href="../css/bootstrap.css" rel="stylesheet" type="text/css"/>
<title>Chofer</title>
</head>
<body>
<?php
include_once './fragmento/Header.php';
include_once '../controlador/Negocio.php';
$obj = new Negocio();
?>
<div class="container">
<center>
<h3 style="color:blue"><strong>LISTA DE CHOFERES</strong></h3>
</center>
<table style="text-align: center;" class="table table-striped table-bordered">
<tr>
<th>Codigo</th>
<th>Nombre</th>
<th>Fec. Ingreso</th>
<th>Categoria</th>
<th>Foto</th>
<th>Ver</th>
</tr>
</thead>
<?php
foreach ($obj->listaChofer() as $k => $d) {
echo "<tr><td>$d[0]<td>$d[1]<td>$d[2]<td>$d[3] ";
?>
<td>
<img src="../choferes/<?= $d[0] ?>.jpg" width="100px">
</td>
<td>
<form method="post" action="PagViajeChofer.php">
<input type="hidden" name="code" value="<?= $d[0] ?>">
<input type="hidden" name="nome" value="<?= $d[1] ?>">
<button class="btn btn-success">Viajes</button>
</form>
</td>
<?php
}
?>
</table>
</div>
</body>
</html>
<html>
<head>
<meta charset="UTF-8">
<link href="../css/bootstrap.css" rel="stylesheet" type="text/css"/>
<title>Viajes Chofer</title>
</head>
<body>
<?php
include_once './fragmento/Header.php';
include_once '../controlador//Negocio.php';
$obj = new Negocio();

$code = $_POST["code"];
$nome = $_POST["nome"];
?>

<div class="container">
<br>
<a href="PagChoferes.php" class="btn">Regresar</a>
<h3><strong>Viajes realizados por :</strong></h3>
<h4>Chofer : <?= $nome ?></h4>

<table class="table table-striped table-bordered">


<thead>
<tr>
<th>Viaje</th>
<th>Ruta</th>
<th>Fecha</th>
<th>Costo</th>

</tr>
</thead>
<?php
foreach ($obj->listaDetalleChofer($code) as $k => $d) {
echo "<tr><td>$d[0]<td>$d[1]<td>$d[2]<td>$d[3] ";
}
?>
</table>
</div>
</body>
</html>

You might also like