Ver Mensaje Individual
  #6 (permalink)  
Antiguo 28/06/2013, 12:07
angieyalver
 
Fecha de Ingreso: enero-2013
Mensajes: 87
Antigüedad: 11 años, 4 meses
Puntos: 0
Respuesta: mostrar pdf en una pagina

como puedo mostrar esta consulta en un pdf en linea o en web
Código PHP:
Ver original
  1. <?php
  2.     include("mysql.inc.php");
  3.    
  4.     $db = new MySQL();
  5.     $listar= $db ->consulta("SELECT * FROM tbl_temp_files");
  6.  
  7. if($db->num_rows($listar)>0){
  8.     echo"<table class='demoTable'>";
  9.     echo"<caption>LISTA DE ARCHIVOS</caption>";
  10.         echo"<tr>";
  11.             echo "<th width=\"40\">Estado</th>";
  12.             echo "<th>Descripcion</th>";
  13.             echo "<th width=\"70\" align=\"center\">Vista</th>";
  14.             echo "<th align=\"center\">Opciones</th>";
  15.         echo"</tr>";
  16.             while($row=($db->fetch_array($listar))){
  17.                 echo"<tr>";
  18.                     if($row['status']==1){
  19.                         echo"<td align=\"center\"><img src='images/001_18.png' width='20'></td>";
  20.                     }else{
  21.                         echo"<td><img src='images/001_19.png' width='20'></td>";
  22.                     }
  23.                 echo"<td>".$row['descripcion']."</td>";
  24.                     switch ($row['tipo']) {
  25.                         case 'pdf':
  26.                                 echo"<td><a target='_Blank' href='uploads/".$row['nombre']."'><img src='images/pdf.png' width='70' height='70'></a></td>";
  27.                             break;
  28.                         case 'docx':
  29.                                 echo"<td><a target='_Blank' href='uploads/".$row['nombre']."'><img src='images/doc.png' width='70' height='70'></a></td>";
  30.                             break;
  31.                         case 'xlsx':
  32.                                 echo"<td><a target='_Blank' href='uploads/".$row['nombre']."'><img src='images/xls.png' width='70' height='70'></a></td>";
  33.                             break;
  34.                         case 'html':
  35.                                 echo"<td><a target='_Blank' href='uploads/".$row['nombre']."'><img src='images/html.png' width='70' height='70'></a></td>";
  36.                             break;
  37.                         case 'txt':
  38.                                 echo"<td><a target='_Blank' href='uploads/".$row['nombre']."'><img src='images/txt.png' width='70' height='70'></a></td>";
  39.                             break;
  40.                         case 'zip':
  41.                                 echo"<td><a target='_Blank' href='uploads/".$row['nombre']."'><img src='images/zip.png' width='70' height='70'></a></td>";
  42.                             break;
  43.                                
  44.                         default:
  45.                                 echo"<td><a target='_Blank' href='uploads/".$row['nombre']."'><img src='uploads/".$row['nombre']."' width='70' height='70'></a></td>";
  46.                             break;
  47.                     }
  48.                 echo "<td width=\"20\" align=\"center\"><a href=\"libs/borrar_archivo.php?id=".$row['id_files']."\"><img title=\"Borrar\" src=\"images/delete.png\"></a></td>";
  49.                 echo"</tr>";
  50.             }
  51.     echo"</table>";
  52. }else{
  53.     echo"<div id='mensajevacio' align=\"center\">No hay archivos por el momento</div>";
  54. }
  55. ?>