Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="UTF-8">
- <title>MIS AVISOS</title>
- <LINK REL="stylesheet" TYPE="text/css" HREF="estilo.css">
- <style type="text/css">
- table{
- padding-left:90px;
- }
- ul{
- padding: 10px;
- }
- </style>
- <script type="text/javascript">
- function descripcion(id_aviso){
- window.location.href = 'descripcion.php?id_aviso=' + id_aviso;
- }
- </script>
- </head>
- </head>
- <body>
- <?php
- session_start();
- ?>
- <H1 align= "center">MIS AVISOS</H1>
- <br>
- <br>
- <div id="navcontainer" >
- <ul class="navbar">
- <li><a href="f-registrar_avisos.php"> Ingresar aviso </a></li>
- <li><a href="f-elimina_aviso.php"> Eliminar aviso </a></li>
- <li><a href="#"> Modificar aviso </a></li>
- <li><a href="f-upload.php">Subir imagen</a></li>
- <li><a href="index.php">Regresar al Index</a></li>
- </ul>
- </div>
- <?php
- include("conexion.php");
- ?>
- <table width="100%" border="0" align="center">
- <tr>
- <td>Id Aviso</td>
- <td>Id Usuario</td>
- <td>Titulo</td>
- <td>Categoria</td>
- <td>Precio</td>
- <td>Foto</td>
- <td>Fecha</td>
- <td>Estado</td>
- </tr>
- <?php
- $mensaje=$_SESSION["nom"];
- $sql = "SELECT * FROM avisos join usuarios where avisos.id_usuario = usuarios.id_usuario and usuarios.login='$mensaje'";
- $res = mysql_query($sql);
- $nrows = mysql_num_rows($res);
- while($row = mysql_fetch_assoc($res)){ ?>
- <tr bgcolor="#FFFFFF">
- <!-- <td align="center">
- <a href="#" onClick="javascript:eliminar(<?php echo $row["id_aviso"]; ?>);">
- <img src="imagenes/trash.jpg">
- </a></td> -->
- <td align="center"><?php echo $row["id_aviso"]; ?></td>
- <td align="center"><?php echo $row["id_usuario"]; ?></td>
- <td align="center"><?php echo $row["titulo"]; ?></td>
- <td align="center"><?php echo $row["categoria"]; ?></td>
- <td align="center"><?php echo $row["precio"]; ?></td>
- <td align="center " >
- <a href="#" onClick="javascript:descripcion(<?php echo $row["id_aviso"]; ?>);">
- <img src="imagenes/<?php echo $row["foto_inicial"]; ?>" width="100px"></td>
- <td align="center"><?php echo $row["fecha"]; ?></td>
- <td align="center"><?php echo $row["estado"]; ?></td>
- </tr>
- <?php }?>
- </table>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement