FailPHP

Page 19 of 24 FirstFirst ... 91112131415161718192021222324 LastLast
Results 271 to 285 of 359
  1. #271
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    Quote Originally Posted by Grant View Post
    It doesn't help when you have a mass unban tool in the Housekeeping and try to show us a banned account..
    lol, fml, forgot about housekeeping.

    Here's a picture...


  2. #272

    information Re: FailPHP

    Quote Originally Posted by Predict View Post
    lol, fml, forgot about housekeeping.

    Here's a picture...

    Nice man! Can waith for releasing it!

  3. #273
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    Not sure if this is the best way to submit a news article.

    PHP Code:
    function PostArticle($title,$message)
    {
        global 
    $db,$userLoggedIn;
        
        
    $db->sql_query("INSERT INTO articles (Title, Message, Author, TimeStamp)
        VALUES ('"
    .$db->sql_escape($title)."','".$db->sql_escape($message)."','".$db->sql_escape($userLoggedIn->username)."','".time()."')");

    Not sure if I should be using return() or not, meh

    Works like a treat though, talan.x10.bz/housekeeping/post.article.php

  4. #274
    PHP & C# Developer Stevehabbz is offline
    MemberRank
    Nov 2011 Join Date
    244Posts

    Re: FailPHP

    When this CMS when complete?

  5. #275
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    When I can be arsed to finish it off, lol.



    Couldn't be arsed having people messing withe the database so no-one is now rank 3.

  6. #276
    prjRev.com Kryptos is offline
    MemberRank
    Feb 2010 Join Date
    Planet EarthLocation
    579Posts

    Re: FailPHP

    Quote Originally Posted by Predict View Post
    Not sure if this is the best way to submit a news article.

    PHP Code:
    function PostArticle($title,$message)
    {
        global 
    $db,$userLoggedIn;
        
        
    $db->sql_query("INSERT INTO articles (Title, Message, Author, TimeStamp)
        VALUES ('"
    .$db->sql_escape($title)."','".$db->sql_escape($message)."','".$db->sql_escape($userLoggedIn->username)."','".time()."')");

    Not sure if I should be using return() or not, meh

    Works like a treat though, talan.x10.bz/housekeeping/post.article.php
    PHP Code:
    function PostArticle($title,$message)
    {
        global 
    $db,$userLoggedIn;
        
        if(
    $db->sql_query("INSERT INTO articles (Title, Message, Author, TimeStamp)
        VALUES ('"
    .$db->sql_escape($title)."','".$db->sql_escape($message)."','".$db->sql_escape($userLoggedIn->username)."','".time()."')"))
            { return 
    true; }
            return 
    false;
    }

    if(!
    PostArticle('lol''test')) { echo 'Error making an article'; } else { 'Article has been made'; } 
    A little help.. Sorry for indenting.

  7. #277
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    Wouldn't believe how bad I've been stressing on how to get my head around coding this "simple" -_- "extra".



    Basically you can now edit your news articles. Looks abit dodgy, still working on the design, just getting the code out of the way. Planning to do the same with ban list, so you can unban a certain user.

    Instead of having variables for all my posts, I've decided to delete the variables for the posts and just the $_POST[''] instead. Why am I doing this? Well basically it'll perform faster to operate, instead of using the variable to get the $_POST['']

  8. #278
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: FailPHP

    Yhee 0.00000001 sec faster x.x
    Posted via Mobile Device

  9. #279
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    Quote Originally Posted by joopie View Post
    Yhee 0.00000001 sec faster x.x
    Posted via Mobile Device
    I can tell you wanted that extra bit.





    This has been a bitch, recoded the whole thing, page by page. -_-

  10. #280

    information Re: FailPHP

    Quote Originally Posted by Predict View Post
    I can tell you wanted that extra bit.





    This has been a bitch, recoded the whole thing, page by page. -_-
    Hey, If yoou are done with this CMS, Do you want to make one with me? I'm a newbie at coding for CMS and don't know everything.

  11. #281
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: FailPHP

    Quote Originally Posted by Predict View Post
    I can tell you wanted that extra bit.

    {2_images}

    {blah_blah}
    I do like the style of the housekeeping, isn't that from the original habbo?

  12. #282
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    Quote Originally Posted by Makarov View Post
    I do like the style of the housekeeping, isn't that from the original habbo?
    Yep, pretty much. ^^ Although there is no code leaked from sulake's housekeeping apart from images. ^^

  13. #283
    <insert title here> Shorty is offline
    MemberRank
    Feb 2007 Join Date
    United KingdomLocation
    1,861Posts

    Re: FailPHP

    Quote Originally Posted by Predict View Post
    Yep, pretty much. ^^ Although there is no code leaked from sulake's housekeeping apart from images. ^^
    TUNNY has a nice collection of images.. Index of /habbo/Housekeeping


  14. #284

    Re: FailPHP

    Love the CMS already!

    Do you want to release the code again from 'index.php'. I want to see it again.

  15. #285
    Account Upgraded | Title Enabled! Predict is offline
    MemberRank
    Aug 2008 Join Date
    760Posts

    Re: FailPHP

    That's a nice collection.



    Update: You can remove a single ban from the ban lists and remove an article from the article list, lol.

    PHP Code:
    <?php
        define
    ('SECURITY'true);
        require_once(
    "habboweb/templates/config.php");
        
        if(
    getValidation()) { header("Location: ".ROOT."me"); die; }
        
        if(!empty(
    $_POST))
        {
            
    $errors = array();
            
            if((
    $_POST["username"] == "") && ($_POST["password"] == ""))
            {
                
    $errors[] = "Please enter your username and password to log in.";
            }
            
            if(
    count($errors) == 0)
            {
                if(!
    usernameExists($_POST["username"]))
                {
                    
    $errors[] = "Incorrect username or password.";
                }
                else
                {
                    
    $result getUser($_POST["username"]);
                    
                    if(
    $result["Rank"] < '1')
                    {
                        
    $errors[] = "You have been banned from accessing Habbo Hotel.";
                    }
                    else
                    {
                        
    $getPassword getHash($_POST["password"],$result["Password"]);
                        
                        if(
    $getPassword != $result["Password"])
                        {
                            
    $errors[] = "Incorrect username or password.";
                        }
                        else
                        {
                            
    $userLoggedIn = new userLoggedIn();
                            
    $userLoggedIn->active $result["Active"];
                            
    $userLoggedIn->background $result["Background"];
                            
    $userLoggedIn->about $result["About"];
                            
    $userLoggedIn->email $result["Email"];
                            
    $userLoggedIn->password $result["Password"];
                            
    $userLoggedIn->username $result["Username"];
                            
    $userLoggedIn->id $result["ID"];
                        
                            
    $userLoggedIn->updateSignIn();
                        
                            
    $_SESSION["User"] = $userLoggedIn;
                        
                            
    header("Location: ".ROOT."me"); die;
                        }
                    }
                }
            }
        }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
    <!-- Designed and coded by Predict on forum.ragezone.com -->
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Design - Login</title>
    <link rel="stylesheet" href="<?php echo ROOT?>habboweb/styles/login.css" type="text/css" />
    </head>
    <body>
    <?php
    if (!empty($_GET['reg']))
    {
        echo
    '<div id="header-notification"><li>'.$_GET["reg"].', thank you for registering with us, you can now login.</li></div>';
    }

    if(!empty(
    $_POST) && count($errors) > 0)
    {
    ?>
    <div id="header-notification"><?php getError($errors); ?></div>
    <?php ?>
    <div id="header-container">
        <div id="header">
            <div id="logo">
                <b></b>
            </div>
            <div id="whitebox">
                0 members online
            </div>
            <form action="" method="post">
                <div id="login-form">
                    <div id="login-form-username">
                        <label class="login-text">Username</label>
                        <input type="text" name="username" id="login-username" maxlength="16" />
                    </div>
                    <div id="login-form-password">
                        <label class="login-text">Password</label>
                        <input type="password" name="password" id="login-password" maxlength="50" />
                    </div>
                    <div id="login-form-submit">
                        <input type="submit" value="Login" />
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div id="content-container">
        <div id="content">
            <div id="content-img-container">
                <div id="content-img">
                    <a href="<?php echo ROOT?>register"></a>
                </div>
            </div>
            Copyright Habbo Hotel 2011, All rights reserved go to their respective owner(s).
        </div>
    </div>
    </body>
    </html>
    Index ^



Advertisement