Imagine ~ Excel above the rest (Mutli Theme, Page Editor, Mutli DB)+

Status
Not open for further replies.

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
WdpiHNmbHiM1.png

What Is Imagine?
Imagine is a project with the idea in mind that retros can indeed be just as powerful as Habbo Hotel. Our mission is to develop and design a Content Management System (CMS) that not only provides the basics, but it extremely flexible and allows even the newest hotel owners manage their website to the max! Imagine has a variety of features ranging from it's powerful page editor, to it's extensively developed plugin system & management dashboard. My plan is to make owning your own retro an effortless task to help expand our community.


Feature List
  • Organized folder structure to allow quick and painless editing
  • Ability to support multiple databases and emulators
  • Page management made simple
  • Plugin management
  • Cerberus Administration
    • Ability to edit website settings
    • Edit SEO settings
    • Ability to change SWFs being used (Found in "/public/swfs")
    • Ability to modify default user data
    • Manage Pages
      • Create new pages
      • Edit current ones
      • Add or remove page plugins
    • Manage Plugins
      • View Distribution Tree (list of pages + plugins used)
      • Edit text, or source code
      • Create text box containers
    • Manage Users
      • View all users
      • Modify User
      • Search by IP or name
    • More to come!
View our development progress on 2.0
Imagine uses a website called Trello to organize our ideas, and keep ourselves on task. View our next generation's ideas and progress via ( )

Screenshots of progress
You must be registered for see images attach

You must be registered for see images attach

You must be registered for see images attach
You must be registered for see images attach
You must be registered for see images attach
You must be registered for see images attach
You must be registered for see images attach
You must be registered for see images attach


Development Log
Coming soon
Development Team
Leader or LeChris [Sole Developer]

Honorable Mentions
iExit - Avatar Chooser
Lazarus - Default Theme

@griimnak - Ideas on how to improve



Thank you for reading about Imagine! I hope you come back to check up on the progress, and will enjoy our first release.
 
Last edited by a moderator:

Rubber

Creepz.eu
Feb 24, 2012
100
3
This looks amazing
Hopefully you go on with it and not stop after a time like some others :)
Keep up the good work! i follow this topic
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
This looks amazing
Hopefully you go on with it and not stop after a time like some others :)
Keep up the good work! i follow this topic
To tell the truth, this project has been going on and used on several hotels in the past few months. I'm doing the big features now such as groups, and what not!
Also, I'm going to make an effort to have full Habbo homes, and not our modern homes bullshit.
 

Rubber

Creepz.eu
Feb 24, 2012
100
3
that sounds very good
You gonna release it when it's fully done or you gonna release it in beta stages?
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
Code snippets would of been added last night however, it was over the character limit. I'll add code in later. @Wickd haha yeah, except it's a lot faster and I planned on adding a language system in later.

Code Snippets from Cerberus
PHP:
<?php
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
    session_start();

    require_once('application/configuration.php');
    foreach(glob('application/cerberus/*.php') as $file) { include_once $file; }
    foreach(glob('application/imagine/*.php') as $file) { include_once $file; }

    $overwatch = new Cerberus\overwatch();
    $manager = new Cerberus\manager();
    $widget = new Cerberus\widgets();
   
    $mysqli = new database($host, $user, $pass, $name);
    $users = new Imagine\users();
    $template = new Imagine\template();
?>
PHP:
<?php
namespace Cerberus;
class overwatch {

    final public function check($var) { if(preg_match('/[^a-zA-Z0-9\s]/', $var)) { return "dirty"; } else { return "clean"; } }
    final public function filter($var) { $var = preg_replace('/[^a-zA-Z0-9\s]/', '', strip_tags(html_entity_decode($var))); return $var; }
    final public function encrypt($var) {  $var = crypt(''.$var.'', '$%9dgjsi3w924vwCERBERUS#fivIiQ3'); return $var; }

    final public function clean($var) {
        $var = trim($var);  $var = stripslashes($var);  $var = (filter_var($var, FILTER_SANITIZE_STRING)); return $var;
    }
                                               
   
    final public function query($what, $where) { global $mysqli;
        $query = $mysqli->select($what)->from($where)->fetch(); foreach ($query as $m) { return $m[$what]; }
    }
   
    final public function query2($what, $where, $var, $who) { global $mysqli;
            $query = $mysqli->select($what)->from($where)->where($var, $who)->fetch();
                foreach ($query as $m) { return $m[$what]; }
    }
   
    final public function log($page, $event) { global $mysqli;
        $data = array(
            'user' => ''.$_SESSION["user"]["username"].'',
            'page' => ''.$page.'',
            'action' => ''.$event.'',
            'date' => ''.date("Y-m-d h:i:sa").'');
        $mysqli->insert("imagine_admin_log", $data);
       }
   
    final public function MUS($command, $data = '') { $this->log("MUS Commands", "Sent <b>:$command $data</b>");
     $MUSdata = $command . chr(1) . $data;
     $socket = @socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
     @socket_connect($socket, "127.0.0.1", "30001");
     @socket_send($socket, $MUSdata, strlen($MUSdata), MSG_DONTROUTE);  
     @socket_close($socket);
}
   
   
} ?>
PHP:
<?php global $overwatch, $manager, $widget;
$manager->session("true", "5");
$section = 'Web Content';
if(!isset($_GET["page"])) { if(isset($_GET["id"])) { } else { header('Location: /cerberus/index.php?url=news&page=start'); } }
require_once('/template/widgets/header.php');

echo '<div id="column1" class="column" style="width:650px;">';
    if(!isset($_GET["id"])) { $widget->get("news_post"); } else { $widget->get("news_edit"); }
echo '</div>';

echo '<div id="column2" class="column" style="width:220px;">';
    $widget->get("news_other");
    $widget->get("news_author");
echo '</div>';
?>
 

FConnect

New Member
Dec 5, 2013
3
0
In all honesty, the code (as listed above) makes my eyes water, I'd say it needs more cleaning up and proper spacing. Would also help leaving comments for people who want to develop-from or add-to the CMS.
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
In all honesty, the code (as listed above) makes my eyes water, I'd say it needs more cleaning up and proper spacing. Would also help leaving comments for people who want to develop-from or add-to the CMS.
It's purely impossible for me to clean the code anymore than it is, without wasting time, considering even the queries are using chain functions.
 

Rubber

Creepz.eu
Feb 24, 2012
100
3
you gonna release a beta version
I think it looks very nice at the moment
 

Wickd

The first member of the Knights of the Pink Table
Jan 15, 2013
1,936
612
Installation system under construction! (Taking a break from group homes)
NzkixAw.png

Quick code snippets
PHP:
<?php
ini_set('display_errors','On');
require_once('global.php');
$template->build($_GET["url"]);
?>
PHP:
<?php

// Classes (for organization mainly)
require_once('application/class.template.php');
require_once('application/class.mysqli.php');
require('application/class.overwatch.php');

$template = new template();

$mysqli = new mysqli();

$overwatch = new overwatch();

?>
PHP:
<?php
class template {

    function build($url) {
         if(file_exists('resources/'.$url.'.php')) {
                require_once('resources/widgets/header.php');
                require_once ('resources/'.$url.'.php');
    }
        else { require_once('resources/404.php'); }
    }
 
    function step($current) {
        switch ($current) {
            case "start": return '1'; break;
            case "check": return '2'; break;
            case "mysql": return '3'; break;
            case "general": return '4'; break;
            case "default": return '5'; break;
        }
    }
}
?>
HTML:
@import url(http://fonts.googleapis.com/css?family=Sansita+One);
body{
    background: #EBEBEB;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

header{
    display: block;
    background: #21A0D1;
    width: 100%;
    height: 2.5%;
    padding: 1.5%;
}

logo{
    font-family: 'Sansita One', cursive;
    color: #FFFFFF;
    font-size: 24px;
    font-weight: bolder;
}

logo b{
    color: #B72A31;
    font-size: 14px;
}

container{
    display: block;
    background: #FFFFFF;
    margin:0 auto;
    width: 55%;
    padding: 25px;
    border-left: 1px solid gray;
    border-right: 1px solid gray;
    border-bottom: 1px solid gray;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

location::before {
    content: "Install / ";
}

location{
    display: block;
    margin-top: 5px;
    margin:0 auto;
    background: #5C5C5C;
    width: 85%;
    padding: 12px;
    color: white;
    font-size: 18px;
    font-weight: 800;
    border-radius: 5px;
}

right::before {
    content: "Step: ";
}
  
right{
    float:right;
    margin-right: 10px;
}

box{
    display: block;
    width: 350px;
}
O, that looks nice.
 

Khalil

IDK
Dec 6, 2011
1,642
786
I hope you're directly storing any hash generated by crypt(), and speaking of encryption and hashing, you should generate a random salt each time the encrypt function is being called out, using a universal salt is a big no-no, it just makes brute forcing a lot easier if a hacker gets hold of a hash generated by your encrypt function.

Also, I noticed you claim to have a two-step authentication system? I also noticed you're doing it weird, the only ones I ever saw do what you're trying to do (email & pass and if they are correct then have the one attempting to login go through security questions) are Mojang. Two-step authentication is usually done by text messaging or phone calls. Much obliged for the effort though.

And for your 'MUS sender', you need to make sure that the emulator your system supports has MUS support, otherwise, your 'MUS sender' will malfunction and start throwing exceptions everywhere when it's touched (I also noticed you copied that MUS sender of yours off of a thread, I thought you said this was completely from scratch? We'll find out in the long run what else you copied). Oh and finally, regarding your 'notable features', the code you published is not clean nor neat in any way.

Suggestions & Recommendations:
  • Kill the page after redirecting.
  • Sanitize $_GET requests first before using them.
  • After checking for the existence of a file, check whether it's readable or not.

I guess, good luck?

Oh and I forgot to mention, it doesn't count as a CMS unless it actually does the job of a content management system.

In all honesty, the code (as listed above) makes my eyes water, I'd say it needs more cleaning up and proper spacing. Would also help leaving comments for people who want to develop-from or add-to the CMS.
If they can't read and understand what that sorry excuse for real code does (no offence to the author, if he's even the true author?), then they shouldn't go about trying to play developer.
 
Last edited:

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
@Khalil
Any ideas on how I can improve my code to be structured better and also more efficient. Also, 2 step authorization is added as per one step being the direct login (email + pass), and the secondary is loaded as a widget onto the dashboard, where it'll check your IP and if it's the last IP you used, it'll allow it otherwise it'll require you to answer security questions which you identified on your first login.
 
Came home to my laptop trashed (thanks kids!)
Anyways, one of my mates had a backup to the CMS and I'll get a backup from a few weeks ago, and start re-coding.
 
I am re-coding this entire project to use the Laravel framework :)

Update:
I'm not going to add a theme changer into Imagine as it will not be needed, and it'll slow down things to be honest, and over complicate it when I could use the new Habbo theme and make everything based on it as it's quite different.
 
I am currently developing this CMS alongside Laravel now, and it's going well.
11294576_364492260424334_696255499_o.jpg

working on caching things better, and what not. Also got a nice folder structure going down
Code:
application >
    cerberus >
        cerberus (security) classes
    frameworks >
        laravel >
            laravel files
    imagine >
        imagine classes (ex templating, user sessions)

resources >
    pages >
        guest >
            files here will be accessible to non logged in users
        user >
            files here will be accessible only to logged in users
        staff >
            files here will be accessible only to staff members
    widgets >
        widget files are stored here
    themes >
        theme files here
 

Khalil

IDK
Dec 6, 2011
1,642
786
So, using Laravel, huh? Well, let's hope you know how to set it up and use it properly. Fatal Hotel is a good example on proper Laravel usage.

Good luck.
 

LeChris

John 15:18
Sep 30, 2013
2,786
1,395
Been working on using Angular for loading the pages just to increase overall site performance, and changing some of my backend once again.
Ignore the random ; placed around as its just the blade template engine, and will be removed before release of course
11304238_366828606857366_1297222386_o.jpg

11100666_366828620190698_2095935839_o.jpg
11330889_366828553524038_2101105246_o.jpg

None of this is final, and trust me changes will be made to the current status. Got ideas? Post em

Also,
I planned on allowing it so people with the technician rank can modify pages and move widgets around (like on wordpress), and for system pages (ex Index, Register) those will be locked.

Edit:
This version is being coded for mango emulator and support for other emulators will not come for a while.

Imagine's var database
11262331_366829383523955_495475969_o.jpg
 
Status
Not open for further replies.

Users who are viewing this thread

Top