Ver Mensaje Individual
  #12 (permalink)  
Antiguo 02/05/2011, 15:28
Avatar de saraivaruas
saraivaruas
 
Fecha de Ingreso: octubre-2010
Ubicación: Chile
Mensajes: 133
Antigüedad: 13 años, 6 meses
Puntos: 10
Respuesta: Aporte sistema de mensajeria interna con usuarios conectados

aQUI TENDREMOS NUESTRO BUZON DE SALIDA

leer_mensajes3.php

Código PHP:
Ver original
  1. <?php
  2. require("config.php");
  3. $nickUsuarioL= $_SESSION['nick'];
  4. $accion= $_POST['accion'];
  5.  
  6.   //conexion a la BD MYSQL
  7. if($accion == "borrar"){
  8.  
  9. require("config.php");
  10.  
  11. $SQLborrar = "DELETE FROM mensajes WHERE msgid IN(".implode(', ', $_POST['mens']).")";  
  12. mysql_query($SQLborrar);
  13.  
  14. echo "<font face=\"Tahoma\" size=\"2\"><b>Mensaje Borrado</b>";
  15.  
  16. } else {
  17.  
  18. $sql= mysql_query("SELECT * FROM mensajes WHERE de = '".mysql_real_escape_string($nickUsuarioL)."' ORDER by msgid DESC"); //aki esta la var del sistema de JLMM
  19.  
  20. while ($row = mysql_fetch_array($sql) ){
  21.  
  22. $asunte = $row['asunto'];
  23. $resto = substr("$asunte", 0, 40);
  24. $aydi = $row['msgid'];
  25.  
  26. ?><body bgcolor="#C0C000">
  27. <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post" name="2">
  28. <table width="395" border="1" cellpadding="0" cellspacing="0" bordercolor="#498551" bgcolor="#C0C000">
  29. <tr>
  30. <td bgcolor="#C0C000" width="45">
  31.   <div align="center"><font face="Tahoma" size="1">
  32.     <input type="checkbox" name="mens[]" value="<?php echo $aydi; ?>">
  33.   </font></div></td>
  34. <td width="89" bgcolor="#C0C000"><font face="Tahoma" color="black" size="1">
  35. <center><i><?php echo $row["para"]; ?></i></center>
  36. </font></td>
  37. <td width="109" bgcolor=#C0C000>
  38.   <div align="center"><a href="http:leer_mensajes4.php<?php echo '?id= '.$row['msgid'] . ''; ?>" target="_parent">
  39.     <font face="Tahoma" color="black" size="1"><u><?php echo "$resto.."; ?></u></font></a></div></td>
  40. <td bgcolor="#C0C000" width="142"><div align="center"><font face="Tahoma" color="black" size="1"><?php echo $row["fecha"]; ?></font></div></td>
  41. </tr>
  42. </table>
  43. <?php
  44. }
  45. ?>
  46. <br>
  47. </form>
  48.  
  49. <?php
  50. }
  51. ?>