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 13
  1. #1
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default [Kane] Need a Script!

    Ok,

    On my game you log in and it takes you to the news page.

    And i have news then i have

    ''~Admin CP''
    ''~Mod CP''

    Normaly user's can see it but not acsess it.

    Can anyone give me a script where only The Staff can see it?

    Thanks.

    Rep+

    Moved by opensourcehost (Forum Moderator) from Web Designing: Please post in the correct forum next time, thanks .
    Last edited by Mr.OSH; 24-06-2007 at 01:13 PM.

  2. #2
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    3,285
    Tokens
    0

    Latest Awards:

    Default

    We can't really do it for you because we don't know how the game is coded. Basically, you need to add an if statement that checks the logged in user's name in the database, and if they're in the moderator usergroup show them the page, and if they're not show them a permissions error.



    i used to be NintendoNews. visit my blog or add me on twitter.
    need help with vista? i am a microsoft certified technology specialist in configuring windows vista and connected home integrator.. pm me for help!


    "I am the way, the truth, and the life. No one comes to the Father except through me"
    John 14:6 (NIV)


  3. #3
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by NintendoNews View Post
    We can't really do it for you because we don't know how the game is coded. Basically, you need to add an if statement that checks the logged in user's name in the database, and if they're in the moderator usergroup show them the page, and if they're not show them a permissions error.
    Well, This is the code for the Cp's On news page.

    Code:
    <tr><td>
    <?php if ($fetch->userlevel != "0"){
    echo "
      <tr>
        <td><a href=\"admincp.php\" target=\"main\">~<b>Admin CP</font></center></a></td>
      <tr>";
    }
    ?>
    <center>
    <tr><td>
    <?php if ($fetch->userlevel != "0"){
    echo "
      <tr>
        <td><a href=\"modcp.php\" target=\"main\">~<b>MOD CP</a></td>
      <tr>";
    }
    ?>
    I Just need it so user levels 1 & 4 see them.

  4. #4
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by Kayne View Post
    Well, This is the code for the Cp's On news page.

    Code:
    <tr><td>
    <?php if ($fetch->userlevel != "0"){
    echo "
      <tr>
        <td><a href=\"admincp.php\" target=\"main\">~<b>Admin CP</font></center></a></td>
      <tr>";
    }
    ?>
    <center>
    <tr><td>
    <?php if ($fetch->userlevel != "0"){
    echo "
      <tr>
        <td><a href=\"modcp.php\" target=\"main\">~<b>MOD CP</a></td>
      <tr>";
    }
    ?>
    I Just need it so user levels 1 & 4 see them.
    PHP Code:
    <tr><td>
    <?php if ($fetch->userlevel == "4"){
    echo 
    "
      <tr>
        <td><a href=\"admincp.php\" target=\"main\">~<b>Admin CP</font></center></a></td>
      <tr>"
    ;
    }
    ?>
    <center>
    <tr><td>
    <?php if ($fetch->userlevel == "1" || $fetch->userlevel == "4"){
    echo 
    "
      <tr>
        <td><a href=\"modcp.php\" target=\"main\">~<b>MOD CP</a></td>
      <tr>"
    ;
    }
    ?>

  5. #5
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Thanks Ryan,

    Ille try when site's back up.

    Rep+ If it works

  6. #6
    Join Date
    Sep 2006
    Location
    Doncaster, UK
    Posts
    4,081
    Tokens
    0

    Latest Awards:

    Default

    I thought you were fluent in PHP?
    Quote Originally Posted by Nain View Post
    i voted 'Not Sure' as im, not sure!

  7. #7
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Adam, Can you for once just not post in any of my threads?

  8. #8
    Join Date
    Sep 2006
    Location
    Doncaster, UK
    Posts
    4,081
    Tokens
    0

    Latest Awards:

    Default

    Erm, no.

    A forum is for discussion and that's what I'm doing.
    Quote Originally Posted by Nain View Post
    i voted 'Not Sure' as im, not sure!

  9. #9
    Oni Guest

    Default

    Quote Originally Posted by Kayne View Post
    Adam, Can you for once just not post in any of my threads?
    He can do what he wants, Its your fault for claiming your fluent in php.

  10. #10
    Join Date
    Apr 2006
    Location
    Salford
    Posts
    2,108
    Tokens
    0

    Latest Awards:

    Default

    Well Dont Discuss in my threads.

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
  •