HabboCMS [PHP, MySQL] [All Emus]

Page 6 of 8 FirstFirst 12345678 LastLast
Results 76 to 90 of 114
  1. #76
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Newest updates:

    Done with the core for Translation system (for now)
    Plugins configuration file is now SimpleXML
    Added template system
    Added template skin configuration file
    Added HabboID (Login with email)
    HabboID supports multipile avatars
    Added PayGol API Script
    Removed Jampo Mail
    Rewrited most of the commands (for better performance)
    Added bans & IP Bans

    Cool facts:
    Language system is using in average 0.005 secounds to complete
    Template system is using in average 0.01 secounds to complete

    New features:
    Logs all purchases in .txt files
    Stores all error messages that a user gets
    HabboID now supports user identity (user can create a custom login username) (optinal ofcourse)
    Staff page (plugin)
    Top stats (plugin)

    HabboASE new features:
    Advanced User lookup, Clones, includes Rooms, room chatlogs, cfhs, badges, Inventory (What user has in hand) and Login logs (with IP)
    Bans and manage bans (appeals etc.)
    Edit user
    Edit rooms
    Edit badges
    Hotel alert
    Staff alert
    Fake login (login as)

    Starting with Homes and Groups (homes) when im done with the template system

    Snippets:
    Spoiler:

    PHP Code:
    <?php
     
    /* Start page */
     
    define('START_LOAD'microtime(true)); 

     
    /* Internal Information (version etc) */
     
    define('VB''1.0.0');
     
    define('S''core/'); //Location where all system files are
     
    define('P''plugins/'); //Where plugins are located (X . S . P)
     
    define('B''storage/'); //Where cache, config and temp files are located (X . S . B)
     
    define('C''system/'); //Where config files are located (X . S . B . C)
     
    define('L''languages/'); //Where lanuages files are located (X . S . B . L)
     
    define('E''servers/'); //Where server files are located (X . S . B . E)
     
    define('H''purchases/'); //Where completed purchases logs are stored. (X . S . B . E)
     
    define('F''errors/'); //Where CMS Error logs are stored (X . S . B . F)
     
    define('K''skins/'); //Where all skins (tempalte) files are located (X . S . K)
     
    if(!defined('X')) define('X'''); //If global.php is called from a higher folder then X will be defined, if not call it ''

     /*Check if the server is able to run HabboCMS */
     
    if(ini_get('safe_mode')) die("For HabboCMS to work please turn PHP Safe-Mode to 'Off' read more here: <a href='http://php.net/manual/en/features.safe-mode.php'>PHP Safe mode Manual</a>");
     if(!
    function_exists('curl_init')) die("Your web server does not have 'curl' extension installed. For HabboCMS to work you must install 'php-curl' (# yum install php-curl)");
     if(!
    function_exists('mysql_connect')) die("Your web server does not have 'mysql' extension installed. For HabboCMS to work you must install 'php-mysql' (# yum install php-mysql)");
     if(!
    function_exists('mcrypt_decrypt')) die("Your web server does not have 'mcrypt' extension installed. For HabboCMS to work you must install 'php-mcrypt' (# yum install php53-mcrypt)");
     
     
    /* Check if all required exists */
     
    if(!file_exists('general.php')) die("Could not find your HabboCMS Config file. Please re-install HabboCMS"); //General Config file
     
    if(!file_exists('sql.php')) die("Could not find Database settings. Please re-install HabboCMS");

     
    /* Include all required files */
     
    require "general.php";

     
    /* Check if all general variables are there */
     
    if(!isset($_HabboCMS['website']['www'], 
              
    $_HabboCMS['website']['shortname'], 
              
    $_HabboCMS['website']['sitename'], 
              
    $_HabboCMS['website']['language'], 
              
    $_HabboCMS['website']['hash'],  
              
    $_HabboCMS['website']['plugins'], 
              
    $_HabboCMS['website']['webgallery'],
              
    $_HabboCMS['website']['gallery_rev'], 
              
    $_HabboCMS['website']['skin'],
              
    $_HabboCMS['client']['gordon'], 
              
    $_HabboCMS['client']['ip'], 
              
    $_HabboCMS['client']['direct_ip'], 
              
    $_HabboCMS['client']['port'], 
              
    $_HabboCMS['client']['variables'], 
              
    $_HabboCMS['client']['texts'], 
              
    $_HabboCMS['client']['productdata'], 
              
    $_HabboCMS['client']['furnidata'], 
              
    $_HabboCMS['MUS']['active'], 
              
    $_HabboCMS['MUS']['ip'], 
              
    $_HabboCMS['MUS']['port'], 
              
    $_HabboCMS['server']['type'], 
              
    $_HabboCMS['general']['newbiemotto'], 
              
    $_HabboCMS['general']['startcredits'], 
              
    $_HabboCMS['general']['startpixels'],
              
    $_HabboCMS['mail']['supportmail'], 
              
    $_HabboCMS['mail']['replyto'],
              
    $_HabboCMS['facebook']['enabled'], 
              
    $_HabboCMS['facebook']['app_id'], 
              
    $_HabboCMS['facebook']['app_id_secret'], 
              
    $_HabboCMS['facebook']['permissions'],
              
    $_HabboCMS['twitter']['name'])) die("Missing variable from configuration file, please re-install HabboCMS");

     
    /* Check if language and server files exists */
     
    if(!file_exists($_HabboCMS['website']['language'] . '.php')) die("Could not find your HabboCMS Config file. Please re-install HabboCMS"); //Check if language file exists
     
    if(!file_exists($_HabboCMS['server']['type'] . '.php')) die("Could not find Database settings. Please re-install HabboCMS"); //Check if server files exists

     /* Get language file and server file */
     //require X . S . B . L . $_HabboCMS['website']['language'] . '.php';
     
    require $_HabboCMS['server']['type'] . '.php';

     
    /* Check if data comes from CloudFlare and get real IP Adress */
     
    if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { 
       
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; 
       
    //define('USING_CLOUDFLARE', true);
     
    }

     
    /* Start Sessions */
     
    session_start();

     
    /* Check if banned */
     
    if (!empty($_SESSION['website_banned'])) {
       
    header("Location: /banned");
       exit;
     }

     
    /* Check if domain is correct */
     
    $website = ((isset($_SERVER["HTTPS"]))?"https://":"http://") . $_SERVER["SERVER_NAME"];
     if(
    $website != $_HabboCMS['website']['www'] && !defined('IGNORE_SUBDOMAIN')) {
       
    header("Location: " $_HabboCMS['website']['www'] . $_SERVER['REQUEST_URI']);
       exit;
     }
     
     
    /* Define usefull variables */
     
    define('WWW'$_HabboCMS['website']['www']);
     
    define('SITE_NAME'$_HabboCMS['website']['shortname']);
     
    define('FULL_NAME'$_HabboCMS['website']['sitename']);
     
    define('URL'$website $_SERVER["REQUEST_URI"]);
     
    define('WEB'$website);

     
    /* Check for session */
     
    if (!empty($_SESSION['habbo_id']) && $_SESSION['habbo_id'] != 'null' && !empty($_SESSION['habbo_username']) && $_SESSION['habbo_username'] != 'null' && !empty($_SESSION['habbo_session_token'])) {
       
    define('IDENTITY'$_SESSION['habbo_id']);
       
    define('USERNAME'$_SESSION['habbo_username']);
       
    define('SESSION_TOKEN'$_SESSION['habbo_session_token']);
     } else {
       
    define('IDENTITY''null');
       
    define('USERNAME''Guest');
       
    define('SESSION_TOKEN''null_token');
     }

     
    /* Get requested page */
     
    $page explode('?'$_SERVER["REQUEST_URI"]);
     if(
    substr($page[0], 1) == ''$page 'index'; else $page substr($page[0], 1);
     
    define('PAGE'$page);

     
    /* Check if all class files exists */
     
    if(!file_exists("functions.habbocms.php")) die("Could not find class file <b>fucntions.habbocms.php</b>. Please re-install HabboCMS");
     if(!
    file_exists("translator.habbocms.php")) die("Could not find class file <b>translator.habbocms.php</b>. Please re-install HabboCMS");
     if(!
    file_exists("core.habbocms.php")) die("Could not find class file <b>core.habbocms.php</b>. Please re-install HabboCMS");
     if(!
    file_exists("sql.habbocms.php")) die("Could not find class file <b>sql.habbocms.php</b>. Please re-install HabboCMS");
     if(!
    file_exists("users.habbocms.php")) die("Could not find class file <b>users.habbocms.php</b>. Please re-install HabboCMS");
     if(!
    file_exists("template.habbocms.php")) die("Could not find class file <b>template.habbocms.php</b>. Please re-install HabboCMS");
     if(!
    file_exists("plugins.habbocms.php")) die("Could not find class file <b>plugins.habbocms.php</b>. Please re-install HabboCMS");

     
    /* Include server files */
     
    require "functions.habbocms.php";
     require 
    "translator.habbocms.php";
     require 
    "core.habbocms.php";
     require 
    "sql.habbocms.php";
     require 
    "users.habbocms.php";
     require 
    "template.habbocms.php";
     require 
    "plugins.habbocms.php";

     
    /* Install and set variables for system class files */
     
    $core = new HabboCMS;
     
    $sql = new HabboSQL;
     
    $users = new HabboUsers;
     
    $plugins = new HabboPlugins;
     
    $html = new HabboTemplate;
    ?>
    PHP Code:
    <?php
     
    if(IDENTITY != 'null') {
      
    header("Location: " WWW "/me");
      exit;
     }
     
    $lang = new HabboTranslator('frontpage,lostpw');
     
    $this->add_key('pagetitle'$lang->s['frontpage.page_name']);
     
    $this->add_key('extra'"  <style type='text/css'>
        body {
          background-color: #000;
        }
        #footer .footer-links   { color: #666666; }
        #footer .footer-links a { color: #ffffff; }
        #footer .copyright      { color: #666666; }
        #footer #compact-tags-container span, #footer #compact-tags-container a { color: #333333; }
      </style>\n"
    true);
     
    $this->add_key('body_extra'' id="frontpage"');
     
    $this->styleset('frontpage');
     
    $this->install_widget('header');
    ?>
    <div id="overlay"></div>
    <?php $this->install_widget('lostpw'); ?>
    <div id="site-header">
    <form id="loginformitem" name="loginformitem" action="{www}/security_check" method="post">
    <?php
    if (!empty($_SESSION['login_error_msg'])) {
      echo 
    "<div id=\"loginerrorfieldwrapper\">\n<div id=\"loginerrorfield\">\n<div>" $_SESSION['login_error_msg'] . "</div>\n</div>\n</div>";
      
    $_SESSION['login_error_msg'] = false;
    }
    ?>
    <div style="clear: both;"></div>
    <div id="site-header-content">
    <div id="habbo-logo"></div>
    <div id="login-form">
    <div id="login-form-email">
    <label for="login-username" class="login-text"><?php echo $lang->s['frontpage.username'];  ?></label>
    <input tabindex="3" type="text" class="login-field" name="credentials.username" id="login-username" value="" maxlength="48"/>
    <input tabindex="6" type="checkbox" name="_login_remember_me" id="login-remember-me" value="true"/>
    <label for="login-remember-me"><?php echo $lang->s['frontpage.keeplogged'];  ?></label>
    <div id="landing-remember-me-notification" class="bottom-bubble" style="display:none;">
    <div class="bottom-bubble-t"><div></div></div>
    <div class="bottom-bubble-c"><?php echo $lang->s['frontpage.keeplogged_message'];  ?></div>
    <div class="bottom-bubble-b"><div></div></div>
    </div>
    </div>
    <div id="login-form-password">
    <label for="login-password" class="login-text"><?php echo $lang->s['frontpage.password'];  ?></label>
    <input tabindex="4" type="password" class="login-field" name="credentials.password" id="login-password" maxlength="32"/>
    <div id="login-forgot-password">
    <a href="#" id="forgot-password"><span><?php echo $lang->s['frontpage.forgot'];  ?></span></a>
    </div>
    </div>
    <div id="login-form-submit">
    <input type="submit" value="Login" class="login-top-button" id="login-submit-button"/>
    <a href="#" tabindex="5" id="login-submit-new-button"><span><?php echo $lang->s['frontpage.login'];  ?></span></a>
    </div>
    </div>

    <?php if ($_HabboCMS['facebook']['enabled']) { ?>
    <div id="rpx-login">
      <div>
        <div id="fb-root"></div>
        <script type="text/javascript">
            window.fbAsyncInit = function() {
                Cookie.erase("fbsr_<?php echo $_HabboCMS['facebook']['app_id']; ?>");
                FB.init({appId: '<?php echo $_HabboCMS['facebook']['app_id']; ?>', status: true, cookie: true, xfbml: true});
                $(document).fire("fbevents:scriptLoaded");

            };
            window.assistedLogin = function(FBobject, optresponse) {
                
                Cookie.erase("fbsr_<?php echo $_HabboCMS['facebook']['app_id']; ?>");
                FBobject.init({appId: '<?php echo $_HabboCMS['facebook']['app_id']; ?>', status: true, cookie: true, xfbml: true});

                permissions = '<?php echo $_HabboCMS['facebook']['permissions']; ?>';
                defaultAction = function(response) {

                    if (response.authResponse) {
                        fbConnectUrl = "/facebook?connect=true";
                        Cookie.erase("fbhb_val_<?php echo $_HabboCMS['facebook']['app_id']; ?>");
                        Cookie.set("fbhb_val_<?php echo $_HabboCMS['facebook']['app_id']; ?>", response.authResponse.accessToken);
                        Cookie.erase("fbhb_expr_<?php echo $_HabboCMS['facebook']['app_id']; ?>");
                        Cookie.set("fbhb_expr_<?php echo $_HabboCMS['facebook']['app_id']; ?>", response.authResponse.expiresIn);
                        window.location.replace(fbConnectUrl);
                    }
                };

                if (typeof optresponse == 'undefined')
                    FBobject.login(defaultAction, {scope:permissions});
                else
                    FBobject.login(optresponse, {scope:permissions});

            };

            (function() {
                var e = document.createElement('script');
                e.async = true;
                e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
                document.getElementById('fb-root').appendChild(e);
            }());
        </script>
        <a class="fb_button fb_button_large" onclick="assistedLogin(FB); return false;"><span class="fb_button_text"><?php echo $lang->s['frontpage.facebook_login'];  ?></span></a>
      </div>
      <div>          
      </div>
    </div>
    <?php ?>
    </div>
    </div>
    PHP Code:
    <?php
     
    class HabboTranslator {
       public 
    $s = array();
       function 
    __construct($page) {
            global 
    $_HabboCMS;
            
    $start microtime(true);
           
    $sections explode(','$page);
           foreach (
    $sections as $page) {
             require 
    $_HabboCMS['website']['language'] . '.php';
             
    $this->array_merge($this->s,$s);
           }
            
    $total_time round(((microtime(true)) - $start), 4);
            echo 
    '<!-- language system installed in: ' $total_time ' secounds -->';
       }
       
    /*Removes cache that was generated when the class was called*/
       
    public function clear_cache() {
            unset(
    $this->s);
            
    $this->= array();
            return 
    true;
       }

       public function 
    s($key$replace = array()) {
         
    $key $this->s[$key];

       }

     }
    ?>


    I will make an video of me developing soon ;)
    Last edited by seanrom; 08-11-12 at 07:33 PM. Reason: added snippets

  2. #77
    Apprentice AppleLion is offline
    MemberRank
    Nov 2012 Join Date
    The NetherlandsLocation
    11Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    I can translate it to Dutch if you Like ;D

  3. #78
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Working on habblet/ajax but its killing me, any suggestions?
    maybe how to debug what habbo.com does when it sends headers etc

  4. #79
    Apprentice AppleLion is offline
    MemberRank
    Nov 2012 Join Date
    The NetherlandsLocation
    11Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    I use now PHPRETRO, but i dont wanna lose user accounts or that they must make a NEW account... Can you make a thing that you can use a another Password Hash code? So people dont lose there users :(

  5. #80
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by AppleLion View Post
    I use now PHPRETRO, but i dont wanna lose user accounts or that they must make a NEW account... Can you make a thing that you can use a another Password Hash code? So people dont lose there users :(
    That would be possible, I can do that

  6. #81
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by AppleLion View Post
    I use now PHPRETRO, but i dont wanna lose user accounts or that they must make a NEW account... Can you make a thing that you can use a another Password Hash code? So people dont lose there users :(
    That's easy, just set the hashing algorithm in the configuration so it can be changed, it will also need the salt in the configuration. :)

    SHA-3 FTW!

  7. #82
    The one and only! Hejula is offline
    MemberRank
    Nov 2008 Join Date
    4,128Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by ησвяαιη View Post
    That's easy, just set the hashing algorithm in the configuration so it can be changed, it will also need the salt in the configuration. :)

    SHA-3 FTW!
    SHA-3 is pretty impressive. Just read the Wiki page about it!

    SHA-3 - Wikipedia, the free encyclopedia

  8. #83
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Hejula View Post
    SHA-3 is pretty impressive. Just read the Wiki page about it!

    SHA-3 - Wikipedia, the free encyclopedia
    Already done a shit ton of research into it :)

  9. #84
    Apprentice AppleLion is offline
    MemberRank
    Nov 2012 Join Date
    The NetherlandsLocation
    11Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by ησвяαιη View Post
    Already done a shit ton of research into it :)
    Im not a expert in that things O_O

    I hope he can make a thing that i can import my users and that the progam can change it to the Hash of that CMS.

    Idea:

    A tool to import users that change all password Hashes to the new Hash.

  10. #85
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by AppleLion View Post
    Im not a expert in that things O_O

    I hope he can make a thing that i can import my users and that the progam can change it to the Hash of that CMS.

    Idea:

    A tool to import users that change all password Hashes to the new Hash.
    Not planing on using the same hash method as PHPRetro, so there will be like a button saying "Click here to import your old account" and they type in username and password and it automaticlly changes the hash. Like Sulake did when they merged the english speaking hotels

  11. #86
    Apprentice AppleLion is offline
    MemberRank
    Nov 2012 Join Date
    The NetherlandsLocation
    11Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Oleaa View Post
    Not planing on using the same hash method as PHPRetro, so there will be like a button saying "Click here to import your old account" and they type in username and password and it automaticlly changes the hash. Like Sulake did when they merged the english speaking hotels
    That's GREAT! You're Amazing

  12. #87
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    I'm starting to hate PHP more and more,
    so fuck PHP I will go for ruby with rails next time

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

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Oleaa View Post
    I'm starting to hate PHP more and more,
    so fuck PHP I will go for ruby with rails next time
    Can you atleast say why you hate PHP? :P

  14. #89
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: HabboCMS [PHP, MySQL] [All Emus]

    I created a template system,
    the class HabboTemplate is installing the page with function __construct which makes me not allow to make another class or call other db functions ($db, $sql, $general_sql etc) without getting the member function error.

    If that made sense

    Im sure I have done something wrong or there is a fix on this but... fml

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

    Re: HabboCMS [PHP, MySQL] [All Emus]

    Quote Originally Posted by Oleaa View Post
    I created a template system,
    the class HabboTemplate is installing the page with function __construct which makes me not allow to make another class or call other db functions ($db, $sql, $general_sql etc) without getting the member function error.

    If that made sense

    Im sure I have done something wrong or there is a fix on this but... fml
    Error message and code of where the line is, and maybe your template class?

    Maybe I can help you :)



Page 6 of 8 FirstFirst 12345678 LastLast

Advertisement