Codigo del archivo principal
Código php:
Ver original<html>
<head>
<title>Busqueda de Correspondencia</title>
<script type="text/javascript" src="script/Documento.js"></script>
</head>
<body>
<?php
include '../Persistencia/PCorrespondencia.php';
include '../Logica/Correspondencia.php';
$tipo = $_GET['tipo'];
if($tipo == "rem") {
?>
<table>
<tr>
<td>Remitente</td>
<td>
<select id="remitente" onchange="Limpiar()">
<option value="0">--</option>
<?php
$pcor = new PCorrespondencia();
$l = $pcor->getDest_Remi();
?>
<option>No Existe ningun Remitente</option>
<?php
}
else {
for($i=0;$i<count($l);$i++) { $cor = new Correspondencia();
$cor = $l[$i];
$value = $cor->getRemitente();
echo "<option value='$value'>";
echo $value;
echo "</option>";
?>
<?php
}
}
?>
</select>
</td>
</tr>
<tr>
<td><input type="button" value="Buscar" onclick="MostrarResulCorres('remitente')"></td>
</tr>
</table>
<?php
}
if($tipo == "des") {
?>
<table>
<tr>
<td>Destinatario</td>
<td>
<select id="destinatario" onchange="Limpiar()">
<option value="0">--</option>
<?php
$pcor = new PCorrespondencia();
$l = $pcor->getDest_Remi();
?>
<option>No Existe ningun Destinatario</option>
<?php
}
else {
for($i=0;$i<count($l);$i++) { $cor = new Correspondencia();
$cor = $l[$i];
$value = $cor->getDestinatario();
echo "<option value=".$value.">";
echo $value;
echo "</option>";
?>
<?php
}
}
?>
</select>
</td>
</tr>
<tr>
<td><input type="button" value="Buscar" onclick="MostrarResulCorres('destinatario')"></td>
</tr>
</table>
<?php
}
if($tipo == "tip") {
?>
<table>
<tr>
<td>Tipo</td>
<td><select id="tipo">
<option value="0">--</option>
<option value="fax">Fax</option>
<option value="carta">Carta</option>
<option value="otro">Otra</option>
</select>
</tr>
<tr>
<td><input type="button" value="Buscar" onclick="MostrarResulCorres('tipo')"></td>
</tr>
</table>
<?php
}
if($tipo == "fec") {
[B] include '../../V/formularios/Fecha.html';[/B]
}
?>
<br><hr>
<div id="resul_busqueda"></div>
</body>
</html>