Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jul 2005
    Posts
    190
    Tokens
    0

    Default Techtuts User System

    Ahhh, TechTuts is broke and theyre forum maybe lost forever, I was wondering if anyone had the Login.PHP page on theyre comp, If so please copy and paste into thread +Rep

  2. #2
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    HTML Code:
    <? 
    oB_start(); 
    // allows you to use cookies. 
    include("config.php");
    include("header.php");
    if (!$logged[username]) 
    { 
    if (!$_POST[login]) 
    { 
    echo(" 
    <center><form method=\"POST\"> 
    <table> 
    <tr> 
    <td align=\"right\"> 
    Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"> 
    </td> 
    </tr> 
    <tr> 
    <td align=\"right\"> 
    Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <input type=\"submit\" name=\"login\" value=\"Login\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <a href=\Users/register.php\>Register Here</a>
    <a href=\Users/forgot.php\>Forgot your password?</a> 
    </td></tr></table></form></center>"); 
    } 
    if ($_POST[login]) { 
    // the form has been submitted. We continue... 
    $username=$_POST['username']; 
    $password = md5($_POST[password]); 
    // the above lines set variables with the submitted information. 
    $info = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); 
    $data = mysql_fetch_array($info); 
    if($data[password] != $password) { 
    // the password was not the user's password! 
    echo "Incorrect username or password!"; 
    }else{ 
    // the password was right! 
    $query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); 
    $user = mysql_fetch_array($query); 
    // gets the user's information 
    setcookie("id", $user[id],time()+(60*60*24*5), "/", ""); 
    setcookie("pass", $user[password],time()+(60*60*24*5), "/", ""); 
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password. 
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://www.hab-hopfm.co.uk\"/>Thank You! You will be redirected"); 
    // modify the above line...add in your site url instead of yoursite.com 
    } 
    } 
    } 
    else 
    { 
    // we now display the user controls. 
    $new = mysql_query("select * from pmessages where unread = 'unread' and touser = '$logged[username]'"); 
    $new = mysql_num_rows($new); 
    echo ("<center>Welcome <b>$logged[username]</b><br /></center> 
    - <a href=\editprofile.php\>Edit Profile</a><br /> 
    - <a href=\members.php\>Member List</a><br /> 
    - <a href=\messages.php\>Private Message Center ($new new)</a><br /> 
    - <a href=\searchbox.php\>Search for member</a><br />
    - <a href=\submitlink.php\>Submit a link to Hab-HopFM</a><br />
    - <a href=\logout.php\>Logout</a>"); 
    } 
    ?>
    here this should work.

    -Chris
    Last edited by ClubTime; 01-06-2006 at 02:21 PM.

  3. #3
    Join Date
    Jul 2005
    Posts
    190
    Tokens
    0

    Default

    Is it possible for unedited version?

  4. #4
    Join Date
    Dec 2005
    Posts
    1,733
    Tokens
    201
    Habbo
    Bomb-Head

    Latest Awards:

    Default

    PHP Code:
    <? 
    oB_start
    (); 
    // allows you to use cookies. 
    include("config.php");
    if (!
    $logged[username]) 

    if (!
    $_POST[login]) 

    echo(

    <center><form method=\"POST\"> 
    <table> 
    <tr> 
    <td align=\"right\"> 
    Username: <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"> 
    </td> 
    </tr> 
    <tr> 
    <td align=\"right\"> 
    Password: <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <input type=\"submit\" name=\"login\" value=\"Login\"> 
    </td></tr><tr> 
    <td align=\"center\"> 
    <a href=\register.php\>Register Here</a>
    </td></tr></table></form></center>"
    ); 

    if (
    $_POST[login]) { 
    // the form has been submitted. We continue... 
    $username=$_POST['username']; 
    $password md5($_POST[password]); 
    // the above lines set variables with the submitted information. 
    $info mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); 
    $data mysql_fetch_array($info); 
    if(
    $data[password] != $password) { 
    // the password was not the user's password! 
    echo "Incorrect username or password!"
    }else{ 
    // the password was right! 
    $query mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); 
    $user mysql_fetch_array($query); 
    // gets the user's information 
    setcookie("id"$user[id],time()+(60*60*24*5), "/"""); 
    setcookie("pass"$user[password],time()+(60*60*24*5), "/"""); 
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password. 
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=http://www.yoursite.com\"/>Thank You! You will be redirected"); 
    // modify the above line...add in your site url instead of yoursite.com 



    else 

    // we now display the user controls. 
    echo ("<center>Welcome <b>$logged[username]</b><br /></center> 
    - <a href=\editprofile.php\>Edit Profile</a><br /> 
    - <a href=\members.php\>Member List</a><br /> 
    - <a href=\logout.php\>Logout</a>"
    ); 

    ?>
    theres the un edited version
    Last edited by Bomb-Head; 01-06-2006 at 03:02 PM.

  5. #5
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    Yup nice work lol

  6. #6
    Join Date
    Dec 2005
    Posts
    1,733
    Tokens
    201
    Habbo
    Bomb-Head

    Latest Awards:

    Default

    lol - chris go on msn
    Last edited by Bomb-Head; 01-06-2006 at 03:14 PM.

  7. #7
    Join Date
    Oct 2004
    Location
    Derby
    Posts
    790
    Tokens
    1,148

    Latest Awards:

    Default

    argh, I needed this user system and now the sites down = (.

    Anyone know any other good ones?

    Rob



    People who I respect

    RichardKnox | Nets | JoeComins | Raremandan | Embrace | Css | Encryptions!

    I love Christmas too much - Im looking forward to it already!

  8. #8
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    I have all the files if you want them but i not sure about the tables, maybe you can get them somewhere else.

    Or you could try http://xoops.org

    @bomb-head i am =]
    Last edited by ClubTime; 01-06-2006 at 03:31 PM.

  9. #9
    Join Date
    Feb 2006
    Location
    Coventry
    Posts
    2,096
    Tokens
    0

    Latest Awards:

    Default

    I got all the user system tuts saved on my hdd if anybody wantsme to upload them.

  10. #10
    Join Date
    Feb 2006
    Posts
    2,185
    Tokens
    0

    Latest Awards:

    Default

    So many people reley on that site.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •