Advertisement
Guest User

codifo

a guest
Nov 23rd, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>MIS AVISOS</title>
  5. <LINK REL="stylesheet" TYPE="text/css" HREF="estilo.css">
  6. <style type="text/css">
  7. table{
  8. padding-left:90px;
  9. }
  10. ul{
  11. padding: 10px;
  12. }
  13.  
  14. </style>
  15.  
  16. <script type="text/javascript">
  17.  
  18. function descripcion(id_aviso){
  19.  
  20. window.location.href = 'descripcion.php?id_aviso=' + id_aviso;
  21.  
  22. }
  23. </script>
  24.  
  25. </head>
  26.  
  27.  
  28. </head>
  29.  
  30.  
  31.  
  32. <body>
  33. <?php
  34. session_start();
  35. ?>
  36.  
  37. <H1 align= "center">MIS AVISOS</H1>
  38. <br>
  39. <br>
  40. <div id="navcontainer" >
  41. <ul class="navbar">
  42. <li><a href="f-registrar_avisos.php"> Ingresar aviso </a></li>
  43. <li><a href="f-elimina_aviso.php"> Eliminar aviso </a></li>
  44. <li><a href="#"> Modificar aviso </a></li>
  45. <li><a href="f-upload.php">Subir imagen</a></li>
  46. <li><a href="index.php">Regresar al Index</a></li>
  47.  
  48. </ul>
  49. </div>
  50.  
  51. <?php
  52. include("conexion.php");
  53. ?>
  54. <table width="100%" border="0" align="center">
  55. <tr>
  56. <td>Id Aviso</td>
  57. <td>Id Usuario</td>
  58. <td>Titulo</td>
  59. <td>Categoria</td>
  60. <td>Precio</td>
  61. <td>Foto</td>
  62. <td>Fecha</td>
  63. <td>Estado</td>
  64.  
  65. </tr>
  66.  
  67.  
  68.  
  69. <?php
  70.  
  71. $mensaje=$_SESSION["nom"];
  72.  
  73. $sql = "SELECT * FROM avisos join usuarios where avisos.id_usuario = usuarios.id_usuario and usuarios.login='$mensaje'";
  74. $res = mysql_query($sql);
  75. $nrows = mysql_num_rows($res);
  76.  
  77.  
  78.  
  79. while($row = mysql_fetch_assoc($res)){ ?>
  80. <tr bgcolor="#FFFFFF">
  81. <!-- <td align="center">
  82. <a href="#" onClick="javascript:eliminar(<?php echo $row["id_aviso"]; ?>);">
  83. <img src="imagenes/trash.jpg">
  84. </a></td> -->
  85. <td align="center"><?php echo $row["id_aviso"]; ?></td>
  86. <td align="center"><?php echo $row["id_usuario"]; ?></td>
  87. <td align="center"><?php echo $row["titulo"]; ?></td>
  88. <td align="center"><?php echo $row["categoria"]; ?></td>
  89. <td align="center"><?php echo $row["precio"]; ?></td>
  90.  
  91. <td align="center " >
  92. <a href="#" onClick="javascript:descripcion(<?php echo $row["id_aviso"]; ?>);">
  93.  
  94. <img src="imagenes/<?php echo $row["foto_inicial"]; ?>" width="100px"></td>
  95. <td align="center"><?php echo $row["fecha"]; ?></td>
  96. <td align="center"><?php echo $row["estado"]; ?></td>
  97. </tr>
  98.  
  99. <?php }?>
  100.  
  101.  
  102. </table>
  103. </form>
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. </body>
  113. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement