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!


Results 1 to 4 of 4

Thread: i need help

  1. #1
    Join Date
    Apr 2006
    Posts
    536
    Tokens
    0

    Default i need help

    i added all the files for my mafia game

    someone sent me all the old stuff for it

    i was wondering why do u have to enter a username+password to get into it

    i just uploaded all the files there was in there onto the hosting

    http://mafiabrap.freehostia.com

    is it a file or somthing

    thanks

    tom

    Moved by Hitman (Forum Moderator) from Designing & Development: Please post in the correct forum next time, thanks.
    Last edited by Hitman; 27-03-2008 at 06:47 PM.


  2. #2
    Join Date
    Nov 2007
    Posts
    586
    Tokens
    0

    Default

    Check whether the index file is password protected.

  3. #3
    Join Date
    Apr 2006
    Posts
    536
    Tokens
    0

    Default

    <?php
    session_start();
    include 'includes/db_connect.php';
    // *** Validate request to login to this site.
    if (($_POST['username']) || ($_POST['password'])){
    if(!$_POST['username']){
    echo "<div class=prob>- Please enter a username.<br></div>";
    }elseif(!$_POST['password']){
    echo "<div class=prob>- Please enter a password.<br></div>";
    }else{
    $username = $_POST['username'];
    $password =$_POST['password'];
    $sql = mysql_query("SELECT id FROM users WHERE username='$username' AND password='$password' AND activated='1'");
    $login_check = mysql_num_rows($sql);
    $targetstats = mysql_query("SELECT username, password, status FROM users WHERE username='$username'");
    while($ts = mysql_fetch_array($targetstats)){
    $username= $ts[0];
    $pw = $ts[1];
    $status = $ts[2];
    }
    if($pw!=$password){
    echo "Invalid username and password combination";
    }elseif($login_check == 0 ){
    echo "Invalid username and password combination";
    }elseif($pw!=$password){
    echo "Invalid username and password combination";
    }elseif ($status == "Dead"){
    echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=Dead.php\">";
    }elseif ($status == "Banned"){
    echo "<link REL=stylesheet TYPE=text/css HREF=includes/in.css>You have been banned!";
    exit();
    }else{
    $_SESSION['username'] = $username;
    $_SESSION['password'] = $password;
    $now = time();
    $domain = $_SERVER['REMOTE_ADDR'];
    mysql_query("UPDATE users SET ip='$domain' WHERE username='$username'");
    echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=logged_in.php\">";
    }
    }
    }
    if(session_is_registered('username')){
    $checkpassword = $_SESSION['password'];
    $checkusername = $_SESSION['username'];
    $checklogin = mysql_query("SELECT id FROM users WHERE username='$checkusername' AND password='$checkpassword'");
    $checkloginrows = mysql_num_rows($checklogin);
    if($checkloginrows > 0 ){
    echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=logged_in.php\">";
    exit();
    }else{
    unset($_SESSION['username'],$_SESSION['password']);
    }
    }
    ?>
    <html>
    <head>
    <title>Gangster-Town</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="includes/out.css" rel="stylesheet" type="text/css">
    <style type="text/css">
    <!--
    .style2 {font-style: italic; font-size: 18px; color: #000000;}
    -->
    </style>
    </head>
    <body>
    <center>
    <table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
    <!--DWLayoutTable-->
    <tr>
    <td height="114" colspan="3" valign="top"><img src="images/bannergoed.gif" alt="banner"></td>
    </tr>
    <tr>
    <td width="178" height="100">&nbsp;</td>
    <td width="402" valign="top"><table width="100%" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#000000" class=thinline>
    <!--DWLayoutTable-->
    <tr>
    <td colspan="2" background="includes/grad.jpg"><div align="center">Login
    to Gangster-Town</div></td>
    </tr>
    <tr>
    <form name="form1" method="post" action="index.php">
    <td width="190" height="20">Username:</td>
    <td width="198"><input name="username" type="text" id="username"></td>
    <tr>
    <td height="20">Password</td>
    <td height="20"><input name="password" type="password" id="password"></td>
    </tr>
    <tr>
    <td height="20">&nbsp;</td>
    <td height="20"><input type="submit" name="Submit" value="Submit"></td>
    </tr>
    </form>
    </table></td>
    <td width="190">&nbsp;</td>
    </tr>
    <tr>
    <td height="14"></td>
    <td valign="top"><div align="center"><a href="register.php">Register</a> |
    <a href="lost.php">Lost password</a> | <a href="index.php">Login</a></div></td>
    <td></td>
    </tr>
    <tr>
    <td height="87"></td>
    <td>&nbsp;</td>
    <td></td>
    </tr>
    </table>
    </center>
    </body>
    </html>


    there index.php


  4. #4
    Join Date
    Apr 2005
    Posts
    4,614
    Tokens
    90

    Latest Awards:

    Default

    Delete the file called ".htaccess"

Posting Permissions

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