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)


  Mostrar Mensajes
Páginas: 1 [2] 3
11  Programación / PHP / Re: Sistema de usuarios php+mysql 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
12  Programación / PHP / Re: Páginas: index.php?id=1&cat=2 en: 7 Julio 2008, 18:46 pm
 
Código:
<?php
error_reporting(0); // para que no muestre errores...
$pagina = $_GET['id']; // indentificacion
if ($pagina == "1"){ include ("descargas.php"); }
elseif ($pagina == "2"){ include ("faq.php"); }
elseif ($pagina == "3"){ include ("weblinks.php"); }
elseif ($pagina == "4"){ include ("contacto.php"); } // xD
else { include ("inicio.php"); } // que NO sea la misma pagina donde esta el codigo.
?>

en la anteúltima línea que dice: else { include ("inicio.php"); }     "inicio.php" sería la página principal? mi página principal se llama "index.php", o sea, que la abre cualquier navegador como predeterminado, no? si yo pongo
http://www.misitio.com es lo mismo que yo ponga http://www.misitio.com/index.php ..entonces decis que tengo que poner inicio.php, y que hago con el index.php?

Perdón por mi ignorancia  :-( es que recién estoy empezando a tratar de programar algo, y bueno x)

13  Programación / PHP / Re: Sistema de usuarios php+mysql 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
14  Media / Diseño Gráfico / Re: Mi animacion en flash termina y vuelve al principio :S en: 6 Julio 2008, 21:56 pm
loop?
15  Programación / PHP / Re: Sistema de usuarios php+mysql 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)
16  Programación / PHP / Re: Páginas: index.php?id=1&cat=2 en: 6 Julio 2008, 20:18 pm
Código
  1. <?php
  2. error_reporting(0); // para que no muestre errores...
  3. $pagina = $_GET['pagina']; // indentificacion (como el ?id)
  4. if ($pagina == "inicio"){ echo "Esto es inicio"; }
  5. elseif ($pagina == "descargas"){ echo "Descargar: Super Mario Bros.exe xD"; }
  6. elseif ($pagina == "marijuana"){ echo "FUMAS DEMASIADO AVER SI TE MUERES ajjax xD"; }
  7. elseif ($pagina == "hacker"){ echo "Asi que quieres ser hacker ? tienes mucho por soñar todavia xD"; } // xD
  8. else { echo "Seleciona una opcion"; }
  9. ?>
Obiamente los menajes no tienen nade que ver con la realidad...es que me aburia un poco xD

Bueno pues eso solo que cambias el echo por include por ejemplo:

Código
  1. elseif ($pagina == "descargas"){ include ("descargas.php"); }

y obiamente la final (el "else" la cambias por  include('tupaginaprincipal.html');

 

PD: Ten cuidado con los includes (RFI's)

Saludos



Que hago mal?.. puse el código en un archivo "links.php" y desde el index le puse <?php include("links.php"); ?> ..


Código links.php
Código:
<?php
error_reporting(0);
$pagina = $_GET['id'];
if ($pagina == "1"){ include("descargas.php"); }
elseif ($pagina == "2"){ include("contacto.php"); }
elseif ($pagina == "3"){ include("faq.php"); }
elseif ($pagina == "4"){ include("weblinks.php"); }
else { include("index.php"); }
?>

y los links los pongo así, por ejemplo en el index.php que es donde hice la prueba:

Código:
<map name="Map">
<area shape="circle" coords="492,78,69" href="index.php">
<area shape="rect" coords="184,32,270,66" href="index.php">
<area shape="rect" coords="183,65,323,90" href="index.php?id=1">
<area shape="rect" coords="185,89,392,115" href="serviciotecnico.php">
<area shape="rect" coords="185,113,351,144" href="desbloqueos.php">
<area shape="rect" coords="718,29,843,66" href="index.php?id=2">
<area shape="rect" coords="620,63,839,90" href="marcasymodelos.php">
<area shape="rect" coords="714,89,839,112" href="index.php?id=4">
<area shape="rect" coords="763,111,840,144" href="index.php?id=3">
</map>

Pero lo único que hace es "actualizarme" el index.php .. :S no entiendo porque, todos los códigos que probé me hacen lo mismo :S
17  Programación / PHP / Re: Sistema de usuarios php+mysql en: 6 Julio 2008, 19:54 pm
Acá dejo el código donde tira el error, esto pasa en la línea 74. Si alguien puede ayudarme a solucionar esto, se lo agradecería:)


Código

Gracias atodos
18  Programación / PHP / Re: Páginas: index.php?id=1&cat=2 en: 6 Julio 2008, 09:07 am
Gracias, lo voy a probar.
19  Programación / PHP / Páginas: index.php?id=1&cat=2 en: 6 Julio 2008, 03:53 am
HOla, queria saber como hacer que en vez de que aparezca:

miweb.com/descargas.php
miweb.com/faq.php

Aparezca:

miweb.com/index.php?id=1
miweb.com/index.php?id=2

y para las descargas:

miweb.com/descargas.php?id=1&cat=2 o algo similar

.. Encontré varios pero lo pongo en el codigo y no me funciona, no me manda hacia la otra sección. Los que usé tenian la funcion switch creo..

20  Media / Diseño Gráfico / [Tutorial] Firma Tony Hawks en: 6 Julio 2008, 02:59 am
Bueno acá les dejo un tutorial que hice hace bastante.

Páginas: 1 [2] 3
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines