Don't think I'm planning to update this CMS anytime soon, considering I've released in on page 23?
Although I have been updating uberCMS (reDev) and it's going pretty good.

class.homes.php
PHP Code:
<?php
class HomesManager
{
public static function HomeExists($id)
{
return (mysql_num_rows(mysql_query("SELECT null FROM homes WHERE home_id = '".mysql_real_escape_string($id)."' LIMIT 1")) > 0) ? true : false;
}
public static function GetHomeId($id)
{
if (!HomesManager::HomeExists($id))
{
return 0;
}
else
{
return mysql_result(mysql_query("SELECT home_id FROM homes WHERE home_id = '".mysql_real_escape_string($id)."' LIMIT 1"), 0);
}
}
public static function CreateHome($id)
{
mysql_query("INSERT INTO homes (home_id,allow_display) VALUES ($id,'".mysql_real_escape_string($id)."','1')");
$homeId = HomesManager::GetHomeId($id);
$home = HomesManager::GetHome($homeId);
$home->AddItem(494, 25, 1, 'profile', 'w_skin_defaultskin', $id);
return $homeId;
}
public static function GetHomeDataRow($id)
{
return mysql_fetch_assoc(mysql_query("SELECT * FROM homes WHERE home_id = '".mysql_real_escape_string($id)."' LIMIT 1"));
}
public static function GetHome($id)
{
$row = HomesManager::GetHomeDataRow($id);
if ($row == null)
{
return null;
}
else
{
return new Home($row['home_id']);
}
}
public static function DisplayHome($id)
{
return mysql_fetch_assoc(mysql_query("SELECT allow_display FROM homes WHERE home_id = '".mysql_real_escape_string($id)."' AND allow_display = '1' LIMIT 1"));
}
public static function GetUserDataRow($id)
{
return mysql_fetch_assoc(mysql_query("SELECT username FROM users WHERE id = '".mysql_real_escape_string($id)."' LIMIT 1"));
}
public static function BadgesExist($id)
{
return mysql_num_rows(mysql_query("SELECT id FROM homes_items WHERE data = 'badges' AND home_id = '".mysql_real_escape_string($id)."' LIMIT 1"));
}
}
class Home
{
public $id = 0;
public $homeId = 0;
public function Home($id)
{
$this->id = $id;
$this->homeId = $id;
}
public function AddItem($x, $y, $z, $data, $skin)
{
mysql_query("INSERT INTO homes_items (home_id,x,y,z,data,skin) VALUES ('".mysql_real_escape_string($this->id)."','".mysql_real_escape_string($x)."','".mysql_real_escape_string($y)."','".mysql_real_escape_string($z)."','".mysql_real_escape_string($data)."','".mysql_real_escape_string($skin)."')");
}
public function GetItems($id = false)
{
if($id == false)
{
$list = Array();
$query = mysql_query("SELECT * FROM homes_items WHERE home_id = '".mysql_real_escape_string($this->id)."' ORDER BY z ASC");
while ($row = mysql_fetch_assoc($query))
{
$list[] = new HomeItem($row['id'], $row['home_id'], $row['data'], $row['skin'], $row['x'], $row['y'], $row['z']);
}
}
else
{
$query = mysql_query("SELECT * FROM homes_items WHERE id = '".$id."' LIMIT 1");
$row = mysql_fetch_assoc($query);
$list = new HomeItem($row['id'], $row['home_id'], $row['data'], $row['skin'], $row['x'], $row['y'], $row['z']);
}
return $list;
}
}
class HomeItem
{
public $id = 0;
public $homeId = 0;
public $data = null;
public $skin = null;
public $x = 0;
public $y = 0;
public $z = 0;
public function HomeItem($id, $homeId, $data, $skin, $x, $y, $z)
{
$this->id = $id;
$this->homeId = $homeId;
$this->data = $data;
$this->skin = $skin;
$this->x = $x;
$this->y = $y;
$this->z = $z;
}
public function GetHome()
{
return HomesManager::GetHome($this->homeId);
}
public function UpdateItem($skinId, $stickieId)
{
switch($skinId)
{
case 1:
$skin = 'defaultskin';
break;
case 2:
$skin = 'speechbubbleskin';
break;
case 3:
$skin = 'metalskin';
break;
case 4:
$skin = 'noteitskin';
break;
case 5:
$skin = 'notepadskin';
break;
case 6:
$skin = 'goldenskin';
break;
case 7:
$skin = 'hc_machineskin';
break;
case 8:
$skin = 'hc_pillowskin';
break;
default:
$skin = 'defaultskin';
break;
}
mysql_query("UPDATE homes_items SET skin = '".mysql_real_escape_string($skinId)."' WHERE id = '".mysql_real_escape_string($stickieId)."'");
$query = mysql_query("SELECT * from homes_items WHERE id = '".mysql_real_escape_string($stickieId)."'");
$row = mysql_fetch_array($query);
$list = new HomeItem($row['id'], $row['home_id'], $row['data'], $row['skin'], $row['x'], $row['y'], $row['z']);
return $list->GetHtml();
}
public function GetHtml()
{
switch (strtolower($this->data))
{
case 'profile':
$widget = new Template('widgets/profile');
$query = mysql_query("SELECT username, look, account_created, online FROM users WHERE id = '".$this->GetHome()->homeId."' LIMIT 1");
$row = mysql_fetch_assoc($query);
if ($row['online'] == 1)
{
$status = 'online';
}
else
{
$status = 'offline';
}
$widget->SetParam('profile', '<span class="name-text">'.$row['username'].'</span>
</div>
<br class="clear" />
<img src="http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/879/web-gallery/images/myhabbo/profile/habbo_'.$status.'.gif" alt="'.$status.'" />
<div class="birthday text">
Created on:
</div>
<div class="birthday date">
'.$row['account_created'].'
</div>
<div>
</div>
</div>
<div class="profile-figure">
<img src="http://www.habbo.co.uk/habbo-imaging/avatarimage?figure='.$row['look'].'&direction=4" alt="'.$row['username'].'" />');
break;
case 'badges':
$widget = new Template('widgets/badges');
$query = mysql_query("SELECT badge_id FROM user_badges WHERE user_id = '".$this->GetHome()->homeId."'");
while($row = mysql_fetch_assoc($query))
{
$widget->SetParam('badges', '<li style="background-image: url(http://habbo.hs.llnwd.net/c_images/album1584/'.$row['badge_id'].'.gif)"></li>');
}
break;
}
$widget->SetParam('id', $this->id);
$widget->SetParam('pos-x', $this->x);
$widget->SetParam('pos-y', $this->y);
$widget->SetParam('pos-z', $this->z);
$widget->SetParam('skin', $this->skin);
$widget->SetParam('edit-home', $this->skin);
if (isset($_SESSION['EditHome']))
{
if ($_SESSION['EditHome'] == $this->GetHome()->homeId)
{
$widget->SetParam('edit-home', '<h3>
<img src="'.WWW.'/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/879/web-gallery/images/myhabbo/icon_edit.gif" width="19" height="18" class="edit-button" id="widget-'.$this->id.'-edit" />
<script type="text/javascript">
var editButtonCallback = function(e)
{
openEditMenu(e, '.$this->id.', "widget", "widget-'.$this->id.'-edit");
};
Event.observe("widget-'.$this->id.'-edit", "click", editButtonCallback);
Event.observe("widget-'.$this->id.'-edit", "editButton:click", editButtonCallback);
</script>');
}
}
else
{
$widget->SetParam('edit-home', '<h3>');
}
return $widget->GetHtml();
}
}
?>




Doesn't look like much, but it's a great deal compared to how the original was.
global.php
PHP Code:
<?php
require_once "templates/class.core.php";
require_once "templates/class.db.mysql.php";
require_once "templates/class.cron.php";
require_once "templates/class.users.php";
require_once "templates/class.tpl.php";
$core = new uberCore();
$cron = new uberCron();
$users = new uberUsers();
$tpl = new uberTpl();
session_start();
require_once "templates/inc.config.php";
define('WWW', $config['Site']['www']);
$db = new mysql($config['mysql']['hostname'], $config['mysql']['username'], $config['mysql']['password'], $config['mysql']['database']);
$db->Connect();
$cron->Execute();
if (isset($_SESSION['UBER_USER_N']) && isset($_SESSION['UBER_USER_H']))
{
if ($users->ValidateUser($_SESSION['UBER_USER_N'], $_SESSION['UBER_USER_H']))
{
define('LOGGED_IN', true);
define('USER_NAME', $_SESSION['UBER_USER_N']);
define('USER_ID', $users->name2id($_SESSION['UBER_USER_N']));
define('USER_HASH', $_SESSION['UBER_USER_H']);
$users->CacheUser(USER_ID);
}
else
{
unset($_SESSION['UBER_USER_N']);
unset($_SESSION['UBER_USER_H']);
exit;
}
}
else
{
define('LOGGED_IN', false);
define('USER_NAME', 'Guest');
define('USER_ID', -1);
define('USER_HASH', null);
}
define('FORCE_MAINTENANCE', ((uberCore::GetMaintenanceStatus() == "1") ? true : false));
if (FORCE_MAINTENANCE && !defined('IN_MAINTENANCE'))
{
if (!LOGGED_IN || !$users->HasFuse(USER_ID, 'fuse_ignore_maintenance'))
{
header("Location: ".WWW."/maintenance/");
exit;
}
}
if ((!defined('BAN_PAGE') || !BAN_PAGE) && ($users->IsIpBanned($_SERVER['REMOTE_ADDR']) || (LOGGED_IN && $users->IsUserBanned(USER_NAME))))
{
header("Location: ".WWW."/banned/");
exit;
}
?>
Please understand that I'm still developing this, so things will change-over time.
Oh and if you did read UberCMS "notice"
Code:
/*=======================================================================
| UberCMS - Advanced Website and Content Management System for uberEmu
| #######################################################################
| Copyright (c) 2010, Roy 'Meth0d'
| http://www.meth0d.org
| #######################################################################
| This program is free software: you can redistribute it and/or modify
| it under the terms of the GNU General Public License as published by
| the Free Software Foundation, either version 3 of the License, or
| (at your option) any later version.
| #######################################################################
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
\======================================================================*/
The owner gave me permission to edit it and release it.