Ver Mensaje Individual
  #6 (permalink)  
Antiguo 02/05/2011, 14:11
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 usuario registrados con vista online y sistema de mensaj

Y atenemos al menos los 5 pasos basicos para que funcione nuestro sistema de registro y reconocimientodel usuario.

Ahora pondre la pagina que mostrara el perfil del usuario cuando el sistema lo reconosca.

mostrar.php

Código PHP:
Ver original
  1. <?php  
  2. session_start();   //esta parte es para asegurar que `para ver su perfil el usuario tienen que estar conectado al sistema      
  3.    
  4.  $conexion = mysql_connect('localhost','esquina_esquina','esquina123')or die ('Ha fallado la conexión: '.mysql_error());
  5.             mysql_select_db('esquina_base')or die ('Error al seleccionar la Base de Datos: '.mysql_error());
  6.        
  7.   $result_1= "SELECT * FROM usuarios  where id = ". $_SESSION['id'] ."";  
  8.     $result = mysql_query($result_1 , $conexion) or die ( mysql_error() );  
  9.  
  10.  
  11. while ($row = mysql_fetch_array($result)){
  12.  
  13. echo "<table width=\"325\" cellspacing=\"4\" cellpadding=\"4\">";
  14.         echo "<tr>";
  15.             echo "<td rowspan=\"2\" width=\"80\"style='border:1px solid #808000 ' ><b>";
  16.             echo "<img src='http://www.esquinadosamba.cl/Usuarios1/imagenes/thumbnails/$row[imagen]' >";//selecionamos la imagen de perfil del usuario
  17.             echo "</td>";
  18.                    
  19.             echo "<td  width=\"80\" height=\"40\"  style='border:1px solid #808000'>";
  20.             echo '       <b> Nick  : </b>' . $_SESSION['nick'] . ''; //selecionamos su nombre de acuerdo a su session iniciada
  21.             echo "</td>";  
  22.             echo "</tr>";  
  23.             echo "<td  width=\"80\" height=\"40\" style='border:1px solid #808000'>";
  24.             echo '       <b> Registro : </b>' . $row['fecha'] . '';     //    La fechade registro
  25.             echo "</td>";
  26.             echo "</tr>";
  27.            
  28.             echo "<td  width=\"80\" height=\"40\"style='border:1px solid #808000'>";
  29.             echo '<b>Ultima visita  <br><br><br></b>' . $row['timestamp'] . ''; //su hora de conexion
  30.             echo "</td>";          
  31.             echo "<td  width=\"80\" height=\"40\"style='border:1px solid #808000'>";
  32.             echo '<b>Conectado ahora  <br><br><br></b> '     . $row['conectado'] . ''; //y su estado si esta conectado o no
  33.             echo "</td>";
  34.             echo "</tr>";
  35.             echo "</table >";
  36.            
  37. echo "<table width=\"325\" cellspacing=\"4\" cellpadding=\"4\">";
  38.         echo "<tr>";           
  39.             echo "<td  aling=\"right\" width=\"80\" height=\"40\"style='border:1px solid #808000'>";  //tambien su mail  
  40.             echo " <b> E-mail  : </b> ".$row ['mail'];                   
  41.             echo "</td>";    
  42.  
  43.         echo "</tr>";
  44. echo "</table >";
  45. echo"<br>";
  46.        
  47. }        
  48. ?>
  49. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  50. "http://www.w3.org/TR/html4/loose.dtd">
  51. <html>
  52. <head>
  53. <title>Perfil del usuario</title>
  54. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  55. </head>
  56.  
  57. <body>
  58.  
  59. <!--Bueno este formulraio es para que el usuario cambie su foto de perfil por la que el quiera-->
  60.  
  61. <table width="323" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#808000">
  62.   <tr>
  63.     <td width="332">
  64. <form action="Usuarios1/imagenes/carga.php" method="post" enctype="multipart/form-data">  
  65.   <p>Cambia tu imagen de perfil:  <br>
  66.       <input name="fichero" type="file" size="20" maxlength="20">
  67.       <input name="submit" type="submit" value="Upload!">  
  68. </form> </td>
  69.   </tr>
  70. </table>
  71. </body>
  72.  
  73. </html>