Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/05/2011, 14:50
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

el codigo para la selecion del los datos del usuario s que queremos enviar los mensajes internos...

Ahi va :

conecfot.php

Código PHP:
Ver original
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>Usuarios en linea ahora</title>
  5. <meta name="description" content="Easiest jQuery Tooltip Ever">
  6. <script src="jquery.js" type="text/javascript"></script>
  7. <script src="main.js" type="text/javascript"></script>
  8. </meta>
  9.  
  10.  
  11. <style>
  12. body {
  13.     margin:0;
  14.     padding:0px;
  15.     background:#fff;
  16.     font:80% Arial, Helvetica, sans-serif;
  17.     color:#555;
  18.     line-height:180%;
  19.     background-color: #004000;
  20.    
  21. }
  22.  
  23. h1{
  24.     font-size:180%;
  25.     font-weight:normal;
  26.     color:#555;
  27. }
  28. h2{
  29.     clear:both;
  30.     font-size:160%;
  31.     font-weight:normal;
  32.     color:#555;
  33.     margin:0;
  34.     padding:.5em 0;
  35. }
  36. a{
  37.     text-decoration:none;
  38.     color:#f30;
  39.     font-family: Comic Sans MS;
  40. }
  41. p{
  42.     clear:both;
  43.     margin:0;
  44.     padding:.5em 0;
  45. }
  46. pre{
  47.     display:block;
  48.     font:100% "Courier New", Courier, monospace;
  49.     padding:10px;
  50.     border:1px solid #bae2f0;
  51.     background:#e3f4f9;
  52.     margin:.5em 0;
  53.     overflow:auto;
  54.     width:800px;
  55.    
  56. }
  57.  
  58. img{border:none;}
  59. ul,li{
  60.     margin:0;
  61.     padding:0;
  62. }
  63. li{
  64.     list-style:none;
  65.     float:left;
  66.     display:inline;
  67.     margin-right:0px;
  68. }
  69.  
  70.  
  71.  
  72. /*  */
  73.  
  74. #screenshot{
  75.     position: absolute;
  76.     z-index:1;
  77.     border:1px solid #ccc;
  78.     background:#333;
  79.     padding:5px;
  80.     display:none;
  81.     color:#fff;
  82.     }
  83.  
  84. /*  */
  85. body,td,th {
  86.     font-family: Comic Sans MS;
  87.     color: #000000;
  88.     font-size: 12px;
  89. }
  90. a:link {
  91.     color: #0000FF;
  92. }
  93. a:visited {
  94.     color: #0000FF;
  95. }
  96. </style>
  97. </head>
  98. <body>
  99. <table border="0" align="center" bgcolor="#C0C000">
  100.   <tr>
  101.     <td valign="top">
  102. <?php echo "<table width=\"470\" cellspacing=\"1\" cellpadding=\"1\">";
  103. echo "<tr>";
  104. echo "<td rowspan=\"2\" width=\"80\"style='border:1px solid #808080' >";
  105.             echo '<b> Total de usuarios conectados</b>'; require ("Usuarios/total_usuarios_conectados.php");//veremos la cantidad de usuarios on line en este momento
  106.             echo "</td>";
  107.             echo "</tr>";
  108.             echo "</table >";  
  109.             ?>
  110. <?php
  111. // selecionaremos los datos que necesitamos y inprimiremos solo los logueados
  112. //los que tengan como valor el "si" que significa que estan logueados en este momento.
  113.  
  114. $result=mysql_query("select * from usuarios  where  conectado='si' order by id asc ");
  115. $cadena="";
  116. while($row=mysql_fetch_array($result))
  117. {
  118. $cadena=$cadena.
  119. '<a href= "/enviar_mensajes.php?usuario='.$row['nick'] .'&mail= '. $row['mail'] .'"
  120.  class="screenshot"
  121.  rel=" http://www.esquinadosamba.cl/Usuarios1/imagenes/thumbnails/'. $row[imagen]. '
  122.  "title="Envie un mensaje a<br> '.$row['nick'] .'">
  123.          '.$row['nick'] .'|';
  124. }
  125. echo "<table width=\"470\" cellspacing=\"1\" cellpadding=\"1\">";
  126. echo "<tr>";
  127. echo "<td rowspan=\"1\" width=\"80\"style='border:1px solid #808080' >";
  128.             echo $cadena ; // aqui nos aparecera los nombres en cadena y ahy podremoscliquear y elegir
  129.             echo "</td>";
  130.             echo "</tr>";
  131.             echo "</table >";
  132.  
  133. ?>
  134. <br>
  135. <?php echo "<table width=\"470\" cellspacing=\"1\" cellpadding=\"1\">";
  136. echo "<tr>";
  137. echo "<td rowspan=\"2\" width=\"80\"style='border:1px solid #808080' ><b>";
  138.             require ("publi/menu.htm");//esto es solo publicidad tu puedes borrarlo si quieres
  139.             echo "</td>";
  140.             echo "</tr>";
  141.             echo "</table >";
  142. ?>
  143.  
  144. </td>
  145.   </tr>
  146. </table>
  147.  
  148. </body>
  149. </html>