elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web
| | |-+  PHP (Moderador: #!drvy)
| | | |-+  Sistema de usuarios php+mysql
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: 1 [2] 3 Ir Abajo Respuesta Imprimir
Autor Tema: Sistema de usuarios php+mysql  (Leído 9,675 veces)
SirLanceCC


Desconectado Desconectado

Mensajes: 1.093


Ver Perfil WWW
Re: Sistema de usuarios php+mysql
« Respuesta #10 en: 6 Julio 2008, 20:21 pm »

¿Pero como lo implementas en tu página?
Por que esa clase ya está programada y supongo que la mandas a llamar en algun lado.


En línea

Fraannn

Desconectado Desconectado

Mensajes: 27



Ver Perfil
Re: Sistema de usuarios php+mysql
« Respuesta #11 en: 6 Julio 2008, 21:31 pm »

Mirá tiene todos estos archivos:


logout.php
adm_area.php
login.php
registrar.php
admin.php
log.php
class.loginusers.php
admlogout.php
check.php

y después los .tpl :

edit.tpl
Código:
<div align="center"><font size="2" face="Lucida Console">Editar usuario</font>
</div>
<hr align="center">
 <form method="POST" action="">
   <div align="center">
     <table border="0" width="262" height="1">
       <tr>
         <td width="168" height="1"><font size="2" face="Lucida Console">nombre</font></td>
        <td width="223" height="1"><input type="text" value="[_NOMBRE]" name="nombre" size="22"></td>
      </tr>
       <tr>
         <td width="168" height="1"><font size="2" face="Lucida Console">correo</font></td>
        <td width="223" height="1"><input type="text" value="[_EMAIL]" name="email" size="22"></td>
      </tr>
       <tr>
         <td width="168" height="1"><font size="2" face="Lucida Console">Nivel</font></td>
        <td width="223" height="1">
          <select size="1" name="level" style="width: 40; height: 20">
[_LEVEL]     
      </select>         </td>
      </tr>
       <tr>
         <td width="168" height="1"></td>
        <td width="223" height="1"><input type="submit" value="Enviar" name="Editar"><input type="reset" value="Restablecer"></td>
      </tr>
      </table>
     <p><font size="2"><a href="index.php"><font face="Lucida console">Ir al inicio</font></a></font></p>
   </div>
</form>

admarea.tpl
Código:
<div align="center"><font size="2" face="Lucida Console">admin area - </font><a href="admlogout.php"><font size="2" face="Lucida Console">admin logout</font></a> - <a href="index.php"><font size="2" face="Lucida console">inicio</font></a></div>
<hr align="center">
 <div align="center">
   <table border="1" cellpadding="0" cellspacing="0" style="border-width:0; border-collapse: collapse" bordercolor="#111111" width="472" height="1">
     <tr>
       <td width="95" height="9" align="center" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1"><font size="2" face="Lucida Console">Nombre</font></td>
       <td width="182" height="9" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1"><font size="2" face="Lucida Console">Correo</font></td>
       <td width="77" height="9" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1"></td>
       <td width="55" height="9" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1"></td>
       <td width="53" height="9" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium; border-bottom-style: solid; border-bottom-width: 1"></td>
      </tr>
     [_POINT]
     <tr>
       <td width="95" height="20" align="center" style="border-left-style: none; border-left-width: medium; border-bottom-style: none; border-bottom-width: medium"></td>
       <td width="182" height="20" align="center" style="border-bottom-style: none; border-bottom-width: medium"></td>
       <td width="77" height="20" align="center" style="border-bottom-style: none; border-bottom-width: medium"></td>
       <td width="55" height="20" align="center" style="border-bottom-style: none; border-bottom-width: medium"></td>
       <td width="53" height="20" align="center" style="border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium"></td>
      </tr>
    </table>
 </div>

admarea_table.tpl
Código:
    <tr>
      <td width="95" height="1" align="center" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium"><div align="center">[_USUARIO]</div></td>
      <td width="182" height="1" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium"><div align="center">[_CORREO]</div></td>
      <td width="77" height="1" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium"></td>
      <td width="55" height="1" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium"><div align="center"><a href="[_LINK_EDITAR]">editar</a></div></td>
      <td width="53" height="1" align="center" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: solid; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium"><div align="center"><a href="[_LINK_BORRAR]">borrar</a></div></td>
    </tr>

logadm.tpl
Código:
<div align="center"><font size="2" face="Lucida Console">Login admin</font>
</div>
<hr align="center">
 <form method="POST" action="">
  <table border="0" width="262" height="1">
    <tr>
      <td width="168" height="1"><div align="center"><font size="2" face="Lucida Console">nombre</font></div></td>
      <td width="223" height="1"><div align="center">
        <input type="text" name="nombre" size="22">
      </div></td>
    </tr>
    <tr>
      <td width="168" height="1"><div align="center"><font size="2" face="Lucida Console">password</font></div></td>
      <td width="223" height="1"><div align="center">
        <input type="password" name="password" size="22">
      </div></td>
    </tr>
    <tr>
      <td width="168" height="1"></td>
      <td width="223" height="1"><div align="center">
        <input type="submit" value="Enviar" name="Login">
        <input type="reset" value="Restablecer">
      </div></td>
    </tr></form>
  <div align="center">
    </table>
  </div>
  <p align="center"><font size="2" face="Lucida console"><a href="index.php">Ir al inicio</a></font></p>

login.tpl
Código:
<div align="center"><font size="2" face="Lucida Console">Login</font>
</div>
<hr align="center">
 <form method="POST" action="">
  <table border="0" width="262" height="1">
    <tr>
      <td width="168" height="1"><div align="center"><font size="2" face="Lucida Console">nombre</font></div></td>
      <td width="223" height="1"><div align="center">
        <input type="text" name="nombre" size="22">
      </div></td>
    </tr>
    <tr>
      <td width="168" height="1"><div align="center"><font size="2" face="Lucida Console">password</font></div></td>
      <td width="223" height="1"><div align="center">
        <input type="password" name="password" size="22">
      </div></td>
    </tr>
    <tr>
      <td width="168" height="1"></td>
      <td width="223" height="1"><div align="center">
        <input type="submit" value="Enviar" name="Login">
        <input type="reset" value="Restablecer">
      </div></td>
    </tr></form>
  <div align="center">
    </table>
    <table width="163" height="1" border="0" align="center">
      <tr>
        <td width="157" height="1"><div align="center"><a href="registrar.php"><font size="1" face="Lucida Console">Resgistrate</font></a></div></td>
      </tr>
      </table>
    <p><font size="2" face="Lucida console"><a href="index.php">Ir al inicio</a></font></p>
  </div>

reg.tpl
Código:
<div align="center"><font size="2" face="Lucida Console">Registrar</font>
</div>
<hr align="center">
 <form method="POST" action="">
   <div align="center">
     <table border="0" width="262" height="1">
       <tr>
         <td width="168" height="1"><font size="2" face="Lucida Console">Nombre</font></td>
        <td width="223" height="1"><input type="text" name="nombre" size="22"></td>
      </tr>
       <tr>
         <td width="168" height="1"><font size="2" face="Lucida Console">Password</font></td>
        <td width="223" height="1"><input type="password" name="password" size="22"></td>
      </tr>
       <tr>
         <td width="168" height="1"><font size="2" face="Lucida Console">Re-Passw.</font></td>
        <td width="223" height="1"><input type="password" name="repassword" size="22"></td>
      </tr>
       <tr>
         <td width="168" height="1"><font size="2" face="Lucida Console">Correo</font></td>
        <td width="223" height="1"><input type="text" name="email" size="22"></td>
      </tr>
       <tr>
         <td width="168" height="1"></td>
        <td width="223" height="1"><input type="submit" value="Enviar" name="Registrar"><input type="reset" value="Restablecer"></td>
      </tr>
      </table>
     <p><font size="2" face="Lucida console"><a href="index.php">Ir al inicio</a></font></p>
   </div>
</form>

yourcount.tpl
Código:
<div align="center"><font size="2" face="Lucida Console">Editar usuario</font>
</div>
<hr align="center">
 <form method="POST" action="">
  <div align="center">
    <table border="0" width="271" height="1">
      <tr>
        <td width="203" height="1"><font size="2" face="Lucida Console">nombre</font></td>
        <td width="199" height="1"><input type="text" value="[_NOMBRE]" name="nombre" size="22"></td>
      </tr>
      <tr>
        <td width="203" height="1"><font size="2" face="Lucida Console">correo</font></td>
        <td width="199" height="1"><input type="text" value="[_EMAIL]" name="email" size="22"></td>
      </tr>
    </table>
    <br>
    <br>
    <font size="2" face="Lucida Console">Cambiar Password</font></div>
  <hr align="center">
  <div align="center"><br>
    <table width="401">
      <tr>
        <td width="112" height="1"><font size="2" face="Lucida Console">Password</font></td>
        <td width="391" height="1"><input type="password" name="password" size="22"></td>
      </tr>
      <tr>
        <td width="112" height="1"><font size="2" face="Lucida Console">Nueva password</font></td>
        <td width="391" height="1"><input type="password" name="newpass" size="22"></td>
      </tr>
      <tr>
        <td width="112" height="1"><font size="2" face="Lucida Console">Repetir la nueva password</font></td>
        <td width="391" height="1"><input type="password" name="newrepass" size="22"></td>
      </tr>
      <tr>
        <td width="1" height="1"></td>
        <td width="391" height="1"><input type="submit" value="Enviar" name="YCSubmit"><input type="reset" value="Restablecer"></td>
      </tr>
      </table>
    <p><font size="2" face="Lucida console"><a href="index.php">Ir al inicio</a></font></p>
  </div>
</form>

Estos son todos los archivos.. espero que me puedas dar una mano x)


En línea


bels_mike


Desconectado Desconectado

Mensajes: 329



Ver Perfil WWW
Re: Sistema de usuarios php+mysql
« Respuesta #12 en: 7 Julio 2008, 15:38 pm »

no hay nada como aquello q hace uno mismo.....
En línea

SirLanceCC


Desconectado Desconectado

Mensajes: 1.093


Ver Perfil WWW
Re: Sistema de usuarios php+mysql
« Respuesta #13 en: 7 Julio 2008, 16:05 pm »

Todo eso tu lo programaste?
Yo quiero ver el archivo que TU hiciste donde mandas a llamar la clase esta.
NO quiero ver la clase... es muy larga.
Quiero ver TU codigo donde USAS esa clase.
En línea

Fraannn

Desconectado Desconectado

Mensajes: 27



Ver Perfil
Re: Sistema de usuarios php+mysql
« Respuesta #14 en: 7 Julio 2008, 18:40 pm »

El tema es que yo NO programé nada.. no sé programar, recién estoy empezando..

Esto que puse, lo bajé de webtaller... este es el archivo original que bajé, después lofui adaptando a la web con includes..

class.LoginUsers.zip
En línea


SirLanceCC


Desconectado Desconectado

Mensajes: 1.093


Ver Perfil WWW
Re: Sistema de usuarios php+mysql
« Respuesta #15 en: 7 Julio 2008, 22:59 pm »

Ahhhhhhh!!!!
quiero ver el código de
http://www.celularesfeker.com/entrar.php
las 5 primeras líneas de ese archivo.

No sé como ser más claro.
En línea

Fraannn

Desconectado Desconectado

Mensajes: 27



Ver Perfil
Re: Sistema de usuarios php+mysql
« Respuesta #16 en: 8 Julio 2008, 01:42 am »

Ahora no estoy en mi casa, pero cuando llegue edito y lo escribo, pero por las dudas te digo que el entrar.php es una copia del index.php, con la diferencia que no tiene esa especie de bienvenida y además tiene un include.. <?php include("login.php"); ?>
el entrar.php es como cualquier otro archivode esta web, al igual que salir.php que tiene un include a "logout.php"... lo que buscás creo que está en el login.php
En línea


sirdarckcat
Aspirante a supervillano
Colaborador
***
Desconectado Desconectado

Mensajes: 7.029


No estoy loco, soy mentalmente divergente


Ver Perfil WWW
Re: Sistema de usuarios php+mysql
« Respuesta #17 en: 8 Julio 2008, 23:56 pm »

pon
Código:
session_start();
al principio del archivo, en la primera linea.
En línea

Fraannn

Desconectado Desconectado

Mensajes: 27



Ver Perfil
Re: Sistema de usuarios php+mysql
« Respuesta #18 en: 9 Julio 2008, 02:39 am »

Puse esto arriba de todo
Código:
	function LoginUsers()
{
session_start();

if(empty($this->link))
$this->_DbConnect();
}
ahora no tira ese error.. en el login no dice nada, pero al loguear dice:

Código:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/av000069/public_html/class.loginusers.php on line 196
Se han encontrado errores.
Mysql dice:

Y ESTO al registrar:
Código:
Warning: mysql_query() [function.mysql-query]: Access denied for user 'av000069'@'localhost' (using password: NO) in /home/av000069/public_html/class.loginusers.php on line 242

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/av000069/public_html/class.loginusers.php on line 242

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/av000069/public_html/class.loginusers.php on line 244

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/av000069/public_html/class.loginusers.php on line 250
Se han encontrado errores.
Mysql dice: Access denied for user 'av000069'@'localhost' (using password: NO)
« Última modificación: 9 Julio 2008, 02:47 am por Fraannn » En línea


sirdarckcat
Aspirante a supervillano
Colaborador
***
Desconectado Desconectado

Mensajes: 7.029


No estoy loco, soy mentalmente divergente


Ver Perfil WWW
Re: Sistema de usuarios php+mysql
« Respuesta #19 en: 9 Julio 2008, 04:16 am »

lol, ya leiste lo que dicen los errores?
si no sabes ingles usa un traductor xD
En línea

Páginas: 1 [2] 3 Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[S/ Solucion] [SMF] [MySQL] Ver claves de usuarios « 1 2 »
Desarrollo Web
Di~OsK 11 8,874 Último mensaje 15 Junio 2011, 20:36 pm
por Di~OsK
Ayuda con sistema PHP & MySQL
Dudas Generales
NaianPartei 0 1,452 Último mensaje 9 Junio 2013, 13:10 pm
por NaianPartei
Duda con usuarios por defecto en MySQL
Bases de Datos
redee 1 3,738 Último mensaje 19 Febrero 2014, 21:25 pm
por Carloswaldo
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines