Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

m6 - mobbo the kick butt habbo network cms [PDO/API/jQuery/TPL/PHP5.5/Logs/+]

Status
Not open for further replies.
git bisect -m
Loyal Member
Joined
Sep 2, 2011
Messages
2,171
Reaction score
916
Hello, this it's the mobbo development thread.

What is mobbo?
mobbo it's a habbo environment social cms, with the mobbo you can get the MAX of response and speed of a Habbo CMS, it's a CMS with template system, plugins system, hooks system, logs system, languages system, parsering system, request system, and more. And uses PDO, and have a Installer.

How to install?
You can install mobbo using only tree steps:
1-Import a Habbo Database on your MySQL server
2- Extract the mobbo on your Web Server
3- Access the cms in the web browser and follow the Setup Steps.

How the Template system works
The Template system it's composed with 5 SubClasses:
1 - Pages (Manage and load the requests of Pages)
2 - Parsering (Parse the content of the Template)
3 - Actions (Parse the Requests Actions)
4 - ParserAPI (It's a customizable class. and in that your create functions for the parser interpreter)
5 - Templates (Manage the templates and check what template it's active and control the response of non .php files)

The Classes
Mobbo have all-in-built Classes:
- Downloader.class.php (Download Files using CURL)
- ZipClass.class.php (Manage .zip files)
- Transaction.class.php (Manage the SQL Transactions)
- Connection.class.php (Manage the Database Connection)
- LoggerTXT,XML,HTML (Manage the interpreter of the Logs)
- Security.class.php (Provide anti-DDOS Functions, and Injection filters)
- Logger.class.php (Controls the Logs)
- Translation.class.php (Controls the Translation Interface)
And so More..

How works the Translation System
Folder: /application/languages/LANGNAME.lang
The Translation class cooperate with the Parsering Class, you can invoke a Line of your language file using
[{(NO_OF_LINE)}]
You can setup your language on the settings.ini

How work Pages System
All .php Pages are been redirected to index.php
But this file makes that:
if you call ?action=ACTION_NAME
The Interpreter will call a Function of the Actions.class.php, The Login, Register, and other Internal Functions thtat don't need a .php File are deposited in this class.
if you call ?pages=PAGENAME
The interpreter will call a page from your template.
if you call ?settings=VARIABLE||1
You can use a function of the Parser interpreter.
An example:
Code:
RewriteRule ^me(|/)$ ./index.php?pages=header-me-footer&settings=users||1--plugins||1--settings||1--languages||1--hooks||1

How Work the Template System
You can Create templates and plugins on
, and in the HK you make upload of a zip.
The Template work in that:
1- the template created pick the .zip name, if you .zip call Habbo.zip, the template will be named Habbo
2- In the .zip the files are directly putted and have an Template.ini
3- the template.ini say to the template system the desc, and version, and author of Theme
4- If have an folder web-gallery in the .zip , the Template system will make a copy to the /gallery/.

Logs System
The logs system are fresh, you can make logs of users actions, files access, sql transactions, and errors, and ddos attacks.

The Transaction
The transaction.class.php uses the PDO functionallitys and create based-mysql-functions;
Example:
Code:
Transaction::query("....");
Transaction::fetch('....');
Transaction::evaluate('.....');

Images of the CMS
Index:

Register:

Loading:

Home:

Home 2:

Profile:

Comunidade:

Members:

Shop:

Staffs:

Safety:

Painel Login:

Painel Home:

404 Not Found:

405 Manutenção:

[Screens on PT-BR]

Snippets
Code:
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Pages
 *
 * @author Gisele Santoro
 */
class Pages extends Parsering
    {

    private
            $page;
    private
            $name;
    private
            $args;
    private
            $path;
    protected
            $geton = Array();

    private
            function run()
        {
        if ($_GET)
            {
            $oct = Actions::Names();
            foreach ($oct as $ind => $val)
                {
                if (array_key_exists($val, $_GET))
                    {
                    Actions::show($val);
                    }
                }
            $act         = isset($_GET['actions']) ? htmlspecialchars($_GET['actions']) : 1;
            $pae         = isset($_GET['pages']) ? htmlspecialchars($_GET['pages']) : 'index';
            $this->geton = $_GET;

            if ($act != 1)
                {
                if ($act != 0 || $act != 1)
                    {
                    self::actions($act);
                    }
                }
            else if (isset($pae) || $act != 0 || $act != 1)
                {
                if ($pae != 0 || $pae != 1 || $pae != 'index')
                    {
                    $pag = strpos($pae, '-') ? explode('-', $pae) : $pae;
                    if (is_array($pag))
                        {
                        $this->name = $pag;
                        foreach ($pag as $ind => $vale)
                            {
                            if ($this->page == NULL)
                                {
                                parent::template(TEMPLATES . $this->path . '/' . $vale . '.php', $this->args);
                                $this->page = parent::display();
                                }
                            else
                                {
                                parent::template(TEMPLATES . $this->path . '/' . $vale . '.php', $this->args);
                                $this->page .= parent::display();
                                }
                            }
                        }
                    else
                        {
                        $this->name = $pag;
                        parent::template(TEMPLATES . $this->path . '/' . $pag . '.php', $this->args);
                        $this->page = parent::display();
                        }
                    }
                else
                    {
                    parent::template(TEMPLATES . $this->path . '/index.php', $this->args);
                    $this->page = parent::display();
                    }
                }
            }
        else
            {
            parent::template(TEMPLATES . $this->path . '/index.php', $this->args);
            $this->page = parent::display();
            }
        }

    private
            function getdefault()
        {
        $query      = Transaction::query("SELECT * FROM mobbo_templates WHERE active = '1' LIMIT 1;");
        $row        = Transaction::fetch($query);
        $this->path = $row['path'];
        }

    public
            function __construct($args = array())
        {
        if (is_array($args) || $args != NULL)
            {
            $this->args = $args;
            }
        self::getdefault();
        self::run();
        }

    public
            function show()
        {
        if (isset($this->page))
            {
            if ($this->page != 0 || $this->page != 1)
                {
                return $this->page;
                }
            }
        }

    private
            function Actions($act = array())
        {
        Actions::show($act);
        }

    function __destruct()
        {
        if (is_array($this->name))
            {
            $page = implode('+', $this->name);
            }
        else
            {
            $page = $this->name;
            }
        $ip = $_SERVER['REMOTE_ADDR'];
        Transaction::log("The page $page has been accessed by ip $ip", 'logs');
        Transaction::destruir();
        }

    public
    static
            function full_url($s)
        {
        $ssl      = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true : false;
        $sp       = strtolower($s['SERVER_PROTOCOL']);
        $protocol = substr($sp, 0, strpos($sp, '/')) . (($ssl) ? 's' : '');
        $port     = $s['SERVER_PORT'];
        $port     = ((!$ssl && $port == '80') || ($ssl && $port == '443')) ? '' : ':' . $port;
        $host     = isset($s['HTTP_X_FORWARDED_HOST']) ? $s['HTTP_X_FORWARDED_HOST'] : isset($s['HTTP_HOST']) ? $s['HTTP_HOST'] : $s['SERVER_NAME'];
        return $protocol . '://' . $host . $port . $s['REQUEST_URI'];
        }

    }
(Pages.class.php)

Github
You can Clone or download the CMS on Github


Works with
Sukis, Plus, Phoenix, Uber, Swift..

Credits
ZURB - Foundation Framework
bi0s (me) - Maked the cms from SCRATCH

Updated on
22/08/2014

Contact
Skype: live:sant0ro
Twitter: @m0vame

Thanks.
 
I don't even know
Loyal Member
Joined
Apr 7, 2010
Messages
1,699
Reaction score
420
Security::ddosprotect();

Do you seriously think that function is going to do poop? When I dos you with my C# script do you seriously think I'm going to save that cookie for you? Nope, if you want to do this correctly and fast you'll need a RAM cache like APC or Memcached or XCache. Also, if you do a check like that, do it before the mysql connection, otherwise you can still flood the mysql server.



public static
function injection($string)
{
$string = stripslashes($string);
return $string;
}

public static
function textFilterHK($string = '')
{
return Security::injection(stripslashes(trim($string)));
}

public static
function textFilter($string = '')
{
return Security::injection(stripslashes(trim(htmlspecialchars($string))));
}

What are you trying to accomplish with so many stripslashes?
 
Joined
Aug 10, 2011
Messages
7,399
Reaction score
3,307
This is like the 4th time this thread has been posted? Its more like a release thread rather than a development thread.

What are you trying to accomplish with so many stripslashes?

RgzXObk - m6 - mobbo the kick butt habbo network cms [PDO/API/jQuery/TPL/PHP5.5/Logs/+] - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Joined
Feb 22, 2012
Messages
2,103
Reaction score
1,271
the thread is english the prints should be too

ont:
Following things that I suggest you to change:
- Layout (Doesn't look habboish)
- Param your Queries, because this is really bad, and unsafe:
Code:
$ban = Transaction::query("SELECT * FROM bans WHERE value = '" . $myrow['username'] . "' AND bantype = 'user' or value = '" . $remote_ip . "' AND bantype = 'ip' LIMIT 1");
- Make it worldwide (it's current set to Brazillian timezone):
Code:
date_default_timezone_set("Brazil/East");
Code:
date_default_timezone_set('America/Sao_Paulo');
- application / classes / enginerin / Security.class.php
You could make some API to connect to IIS or Apache somehow to block, because it is not possible, you are simply throwing another page, since DDoS has nothing to do with page content.

And some other stuff.
Good luck.
 
Joined
Aug 10, 2011
Messages
7,399
Reaction score
3,307
If you start using a class / framework etc etc please start by learning the correct syntax and the proper usage of the functions. This will result into:

A: Better maintainable code.
B: Easy to understand for others.

Statistics show that there are 3 bugs every 1000 lines of code and applying the wrong techniques doesn't lower the chance of creating bugs.
 
Status
Not open for further replies.
Back
Top