Ver Mensaje Individual
  #6 (permalink)  
Antiguo 11/11/2009, 13:44
mhax
 
Fecha de Ingreso: agosto-2009
Ubicación: Cartagena, Colombia
Mensajes: 516
Antigüedad: 14 años, 8 meses
Puntos: 13
Respuesta: Problema con include

Codigo del archivo principal
Código php:
Ver original
  1. <html>
  2.     <head>
  3.         <title>Busqueda de Correspondencia</title>
  4.         <script type="text/javascript" src="script/Documento.js"></script>        
  5.     </head>
  6.     <body>
  7.         <?php
  8.         include '../Persistencia/PCorrespondencia.php';
  9.         include '../Logica/Correspondencia.php';
  10.         $tipo = $_GET['tipo'];
  11.  
  12.         if($tipo == "rem") {
  13.             ?>
  14.         <table>
  15.             <tr>
  16.                 <td>Remitente</td>
  17.                 <td>
  18.                     <select id="remitente" onchange="Limpiar()">
  19.                         <option value="0">--</option>
  20.                             <?php
  21.                             $pcor = new PCorrespondencia();
  22.                             $l = $pcor->getDest_Remi();
  23.                             if(count($l)==0) {
  24.                                 ?>
  25.                         <option>No Existe ningun Remitente</option>
  26.                             <?php
  27.                             }
  28.                             else {
  29.                                 for($i=0;$i<count($l);$i++) {
  30.                                     $cor = new Correspondencia();
  31.                                     $cor = $l[$i];
  32.                                     $value = $cor->getRemitente();
  33.                                     echo "<option value='$value'>";
  34.                                     echo $value;
  35.                                     echo "</option>";
  36.                                     ?>
  37.                                 <?php
  38.                                 }
  39.                             }
  40.                             ?>
  41.                     </select>
  42.                 </td>
  43.             </tr>
  44.             <tr>
  45.                 <td><input type="button" value="Buscar" onclick="MostrarResulCorres('remitente')"></td>
  46.             </tr>
  47.         </table>
  48.         <?php
  49.         }
  50.         if($tipo == "des") {
  51.             ?>
  52.         <table>
  53.             <tr>
  54.                 <td>Destinatario</td>
  55.                 <td>
  56.                     <select id="destinatario" onchange="Limpiar()">
  57.                         <option value="0">--</option>
  58.                             <?php
  59.                             $pcor = new PCorrespondencia();
  60.                             $l = $pcor->getDest_Remi();
  61.                             if(count($l)==0) {
  62.                                 ?>
  63.                         <option>No Existe ningun Destinatario</option>
  64.                             <?php
  65.                             }
  66.                             else {
  67.                                 for($i=0;$i<count($l);$i++) {
  68.                                     $cor = new Correspondencia();
  69.                                     $cor = $l[$i];
  70.                                     $value = $cor->getDestinatario();
  71.                                     echo "<option value=".$value.">";
  72.                                     echo $value;
  73.                                     echo "</option>";
  74.                                     ?>
  75.  
  76.                                 <?php
  77.                                 }
  78.                             }
  79.                             ?>
  80.                     </select>
  81.                 </td>
  82.             </tr>
  83.             <tr>
  84.                 <td><input type="button" value="Buscar" onclick="MostrarResulCorres('destinatario')"></td>
  85.             </tr>
  86.         </table>
  87.         <?php
  88.         }
  89.         if($tipo == "tip") {
  90.             ?>
  91.         <table>
  92.             <tr>
  93.                 <td>Tipo</td>
  94.                 <td><select id="tipo">
  95.                         <option value="0">--</option>
  96.                         <option value="fax">Fax</option>
  97.                         <option value="carta">Carta</option>
  98.                         <option value="otro">Otra</option>
  99.                     </select>
  100.             </tr>
  101.             <tr>
  102.                 <td><input type="button" value="Buscar" onclick="MostrarResulCorres('tipo')"></td>
  103.             </tr>
  104.         </table>
  105.         <?php
  106.         }
  107.         if($tipo == "fec") {
  108.          [B] include '../../V/formularios/Fecha.html';[/B]
  109.         }
  110.         ?>
  111.         <br><hr>
  112.         <div id="resul_busqueda"></div>
  113.     </body>
  114. </html>