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 2 of 2
  1. #1
    Join Date
    Jul 2005
    Location
    Manchester, UK
    Posts
    731
    Tokens
    0
    Habbo
    pappalou

    Default Problem with usersystem loading in Expandables.

    Right, so this is my login.php for my usersystem;

    Code:
    <?  
    ob_start();  
    // allows you to use cookies.  
    include("config.php");  
    if (!$logged[username])  
    {  
    if (!$_POST[login])  
    {  
    echo("
    <center><form method=\"POST\">
    <table>  
    <tr>
    <center>Welcome to eBobba Usersystem!</center>
    <td align=\"center\">
    User Name:<br> <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\">  
    </td>  
    </tr>  
    <tr>  
    <td align=\"center\">  
    Password:<br> <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"password\">  
    </td></tr><tr>  
    <td align=\"center\">  
    <input type=\"submit\" name=\"login\" value=\"Login\">  <br><br>
    <a href='http://www.ebobba.net/account/register.php'><b>Register Here</b></a>
    </td></tr><tr>  <br>
    <td align=\"center\">  
    </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 "<meta http-equiv=\"Refresh\" content=\"2; URL=login.php\"/><center>You've entered an incorrect username or password.<br><br>Please Wait..</center>";  
    }else{  
    // the password was right!  
    $profile = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'") or die(mysql_error()); 
    $query = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());  
    $user = mysql_fetch_array($query);  
    $date =  date("j F  G : i"); 
    if($user[level] == 11){ 
    mysql_query("INSERT INTO `modlogins` (`id` , `description` ) VALUES (NULL , '$user[username] :::: $date')"); 
    } 
    // gets the user's information  
    setcookie("id", $user[id],time()+(60*60*24*5), "/", ""); 
    setcookie("pass", $user[password],time()+(60*60*24*5), "/", ""); 
    mysql_query("INSERT INTO `logins` (`id`, `username` , `description` ) VALUES (NULL , '$user[username]' , '$date')"); 
    // the above lines set 2 cookies. 1 with the user's id and another with his/her password. 
    echo ("<meta http-equiv=\"Refresh\" content=\"1; URL=http://www.ebobba.net/account/login.php\"><body bgcolor=FFFFFF><center>Logging in..</center>");  
    // modify the above line...add in your site url instead of yoursite.com  
    }  
    }  
    }  
    
    else  
    { 
    $profile = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'") or die(mysql_error());    
    $new = mysql_query("select * from pmessages where unread = 'unread' and touser = '$logged[username]'");  
    $new = mysql_num_rows($new); 
    $pms = mysql_query("select * from pmessages where touser = '$logged[username]'");  
    $pms = mysql_num_rows($pms);  
    $rquery = mysql_query("SELECT * FROM cfh"); # Queries The Call For Help Messages  
    while($m=mysql_fetch_array($rquery)) # Displays Them All In Order 
    // we now display the user controls. 
    if($logged[username] && $logged[level] == 0 ){ 
    echo "<meta http-equiv=\"Refresh\" content=\"0; URL=banned_user.php\"/>"; 
    } 
    if($logged[username] && $logged[level] >= 1) 
    { 
    echo ("<meta http-equiv=\"Refresh\" content=\"600; URL=/user/logout.php\"/><p><center><img src=\"http://www.bonxy.co.uk/user/images/mainmenu.gif\"<br><br>
    <br>
    
    Welcome <b>$logged[username]</b></span>!</center>
    <br><br>
    <img src=star.gif> <a href='http://www.ebobba.net/account/c4h.php'>Call For Help</a></b><br />
    <img src=star.gif> <a style='cursor:pointer' onclick='dopage('http://www.ebobba.net/account/console.php', 'content')>Console</a></b><br />
    <img src=star.gif> <a onclick='dopage('memberslist.php', 'content')>Members List</a>';</b><br />
    <img src=star.gif> <a href='http://www.ebobba.net/account/furnishop.php'>Shop</a></b><br />
    <img src=star.gif> <a href='http://www.ebobba.net/account/useroptions.php'>Edit Profile</a></b><br />
    <img src=star.gif> <a href='http://www.ebobba.net/account/bank.php'>Bank</b></a><br />
    <img src=star.gif> <a href='http://www.ebobba.net/account/badges.php'>Badges</a><br /></b>
    <img src=star.gif> <a href='http://www.ebobba.net/account/rooms.php'>Chatrooms</a><br /></b>
    <img src=star.gif> <a href='http://www.ebobba.net/account/rewards.php'>Rewards</a></b><br />
    <img src=star.gif> <a href=\"http://www.ebobba.net/iot\" target=\"_self\">eBobba Help Tool</a></b><br>
    <img src=star.gif> <a href='http://www.ebobba.net/**************.php' target='_self'>Logout</a></b><br><br> ");
     
    if($logged[username] && $logged[level] == 2 || $logged[level] == 12) 
    echo "<img src=star.gif> <a href=\"http://www.ebobba.net/account/vip/index.php\" target=\"_self\"><font color='pink'>V.I.P Panel</a></b><br>";
     
    if($logged[username] && $logged[level] == 12) 
    echo "<img src=star.gif> <a href=\"http://www.ebobba.net/account/admin/index.php\" target=\"_self\"><font color='red'>Admin Panel</b></a><br />";
    
    if($logged[username] && $logged[level] == 11 || $logged[level] == 12) 
    echo "<img src=star.gif> <a href=\"http://www.ebobba.net/account/mod/index.php\" target=\"_self\"><font color='red'>Mod Panel</b></a><br />";
    
    if($logged[username] && $logged[level] == 10 || $logged[level] == 12) 
    echo "<img src=star.gif> <a href=\"http://www.ebobba.net/account/support/index.php\" target=\"_self\"><font color='red'>Support Panel</b></a><br />";
    
    if($logged[username] && $logged[level] == 9 || $logged[level] == 12) 
    echo "<img src=star.gif> <a href=\"http://www.ebobba.net/account/managers/index.php\" target=\"_self\"><font color='red'>Staff Panel</b></a><br />";
    
    if($logged[username] && $logged[level] == 4 || $logged[level] == 12) 
    echo "<img src=star.gif> <a href=\"/user/reporter/index.php\" target=\"_self\"><font color='red'>Reporters Panel</b></a><br />";
    
    if($logged[username] && $logged[level] == 12) 
    echo "<img src=star.gif> <a href=\"http://www.ebobba.net/housekeeping\" target=\"_self\"><font color='blue'>Housekeeping Panel</b></a><br />"; 
    }  
    } 
    ?>
    <html> 
    <head> 
    <title>Home</title> 
    <style type="text/css"> 
    a { 
    font-size: 8pt; 
    color: #000000; 
    } 
    a:link { 
    text-decoration: none;
    color: #000000; 
    } 
    a:visited { 
    text-decoration: none;
    color: #000000; 
    } 
    a:hover { 
    text-decoration: underline; bold; 
    color: #000000; 
    } 
    a:active { 
    text-decoration: none;
    color: #000000; 
    } 
    body,td,th,p { 
    font-family: Verdana; 
    font-size: 8pt; 
    color: #000000; 
    } 
    .12 { color: red; } 
    .11 { color: navy; } 
    .10 { color: ; } 
    .9 { color: darkorchid; } 
    .8 { color: darkorchid; } 
    .7 { color: darkorchid; } 
    .6 { color: darkorchid; } 
    .5 { color: green; } 
    .4 { color: green; } 
    .3 { color: green; } 
    .2 { color: green; } 
    .1 { color: black; } 
    input { 
        font-family: Tahoma, Arial; 
        font-size: 8pt; 
        font-weight: bold; 
        width: 100; 
        color: #000000; 
        background-color: #FFFFFF; 
        border: 1px solid #000000; 
    } 
    select { 
        background-color: #ffffff; 
        font-family: Arial, Helvetica, sans-serif; 
        font-size: 8pt; 
        color: #000000; 
        width: 100; 
        border: 1px solid #000000; 
    } 
    textarea { 
    background-color: #ffffff; 
        font-family: Arial, Helvetica, sans-serif; 
        font-size: 8pt; 
        color: #000000; 
        width: 100; 
        border: 1px solid #000000; 
    } 
    
    </style> 
    <meta http-equiv=\"Refresh\" content=\"30; URL=login.php\"/>
    </head> 
    <body bgcolor="ffffff"> 
    </body> 
    </html>
    <?
    if ($logged[banned] == 'banned'){
    echo ("<meta http-equiv=\"Refresh\" content=\"0; URL=banned_user.php\"/>");
    }
    ?>
    the bit that has been bolded is the onclick script i need, so that page loads in the expandable iframe.

    However it does not work for some reason, as it only works in HTML code, not in PHP code.

    So basically to sum things up, i need that page bolded in the code to load in the expandable iframes using the onclick script, but it does not work!

    So i'm asking if anyone could make it work for me? or tell me how?

    Moved by Mattps22004 (Forum Moderator) from Website Designing & Development: Please post in the correct forum next time, thanks.
    Last edited by Matt.; 24-07-2007 at 01:29 PM.

  2. #2
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    you need to have the ajax navi script part included or in that file.

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


Posting Permissions

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