Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Hey i Need Help with Ubercms 2.0.1 that jonty release
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Brad" data-source="post: 108737" data-attributes="member: 17995"><p>[CODE]<?php</p><p> /*</p><p> |</p><p> . .|---.,---.,---.</p><p> | || ||---'| UberCMS 2.0</p><p> `---'`---'`---'`</p><p> UberCMS</p><p> Coded originally by Meth0d (2010-2011)</p><p> Continued by Jonty (2011-now)</p><p> </p><p> Build 2.0.0 SS, Public</p><p> */</p><p> </p><p>define('DS', DIRECTORY_SEPARATOR);</p><p>define('CWD', str_replace('manage' . DS, '', dirname(__FILE__) . DS));</p><p>define("includes_directory", './includes/');</p><p>define("config_directory", './includes/configuration/');</p><p> </p><p>require_once config_directory . "ubercms_config.php";</p><p>define("regOnlineText", $frontend['online_text_reg']);</p><p> </p><p>require_once includes_directory . "class.core.php";</p><p>require_once includes_directory . "class.db.mysql.php";</p><p>require_once includes_directory . "class.cron.php";</p><p>require_once includes_directory . "class.users.php";</p><p>require_once includes_directory . "class.tpl.php";</p><p>require_once includes_directory . "class.cdn.php";</p><p>require_once includes_directory . "class.zaphotel.php";</p><p>require_once includes_directory . "class.gtfo.php";</p><p> </p><p> </p><p>define("vembaEnabled", $vemba['enable']);</p><p> </p><p>$core = new uberCore();</p><p>$core->ParseConfig();</p><p>$cron = new uberCron();</p><p>$users = new uberUsers();</p><p>$tpl = new uberTpl();</p><p>$cdn = new ZapDataNetwork();</p><p>$zaphotel = new zaphotel();</p><p>$gtfo = new GtfoClean();</p><p> </p><p>$tpl->SetParam("siteName", $site['name']);</p><p>$tpl->SetParam("shortName", $site['short_name']);</p><p>$tpl->SetParam("footerLinks", $frontend['footer_links']);</p><p>$tpl->SetParam("footerText", $frontend['footer_text']);</p><p>$tpl->SetParam("vembaId", $vemba['id']);</p><p>$tpl->SetParam("fpOnlineText", $frontend['online_text_fp']);</p><p>$tpl->SetParam("regOnlineText", $frontend['online_text_reg']);</p><p>$tpl->SetParam("twitter", $site['twitter_account']);</p><p>$tpl->SetParam("facebook", $site['facebook_account']);</p><p> </p><p> </p><p> </p><p>$headers = @apache_request_headers();</p><p> </p><p>// ***************************************************</p><p>// Reverse proxy & cloudflare setup checked & ips corrected if needed</p><p>if ($reverseproxy['enabled'] == true) {</p><p> if (isset($headers["X-Forwarded-For"])) {</p><p> $_SERVER["REMOTE_ADDR"] = $headers["X-Forwarded-For"];</p><p> }</p><p>}</p><p>else if ($cloudflare['enabled'] == true) {</p><p> if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {</p><p> $_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"];</p><p> }</p><p>}</p><p>if ($reverseproxy['enabled'] == true && $cloudflare['enabled'] == true) {</p><p> $ip['orig'] = $_SERVER["REMOTE_ADDR"];</p><p> $realClient = explode(",", $ip['orig']);</p><p> $realClientIP = $realClient[0];</p><p> </p><p> $_SERVER["REMOTE_ADDR"] = $realClientIP;</p><p>}</p><p> </p><p>// ***************************************************</p><p>// Check for VPN blocks</p><p>if ($vpn['block'] == true) {</p><p> $user['hostname'] = @gethostbyaddr($_SERVER["REMOTE_ADDR"]);</p><p> if(in_array($user['hostname'], $vpn['blocked_hosts'])) {</p><p> exit($vpn['blocked_message']);</p><p> }</p><p>}</p><p> </p><p>if($voting['thehabbos_enabled'] == false) {</p><p> $mode = "1";</p><p>}</p><p>else {</p><p> $mode = "2";</p><p>}</p><p> </p><p>// ****** Set Params for Client use</p><p>$tpl->SetParam('connection_info_host', $client['connection_info_host']);</p><p>$tpl->SetParam('connection_info_port', $client['connection_info_port']);</p><p>$tpl->SetParam('site_url', WWW);</p><p>$tpl->SetParam('client_reload_url', WWW);</p><p>$tpl->SetParam('client_fatal_error_url', WWW . "/flash_client_error");</p><p>$tpl->SetParam('external_variables_txt', $client['external_variables_txt']);</p><p>$tpl->SetParam('external_texts_txt', $client['external_texts_txt']);</p><p>$tpl->SetParam('furnidata_load_url', $client['furnidata_load_url']);</p><p>$tpl->SetParam('productdata_load_url', $client['productdata_load_url']);</p><p>$tpl->SetParam('client_starting', $client['client_starting']);</p><p>$tpl->SetParam('habbo_swf', $client['habbo_swf']);</p><p>$tpl->SetParam('swf_base_dir', $client['swf_base_dir']);</p><p> </p><p> </p><p>date_default_timezone_set('America/Los_Angeles');</p><p>define('UBER', true);</p><p>define('LB', chr(13));</p><p>define("INCLUDES", includes_directory);</p><p> </p><p> </p><p> </p><p>define('USER_IP', $_SERVER['REMOTE_ADDR']);</p><p> </p><p>@set_magic_quotes_runtime('0');</p><p>error_reporting(E_ALL);</p><p> </p><p>session_start();</p><p> </p><p>$db = new MySQL($core->config['MySQL']['hostname'], $core->config['MySQL']['username'],</p><p> $core->config['MySQL']['password'], $core->config['MySQL']['database']);</p><p>$db->Connect();</p><p> </p><p>$cron->Execute();</p><p> </p><p>if (isset($_SESSION['UBER_USER_N']) && isset($_SESSION['UBER_USER_H']))</p><p>{</p><p> $userN = $_SESSION['UBER_USER_N'];</p><p> $userH = $_SESSION['UBER_USER_H'];</p><p> </p><p> if ($users->ValidateUser($userN, $userH))</p><p> {</p><p> define('LOGGED_IN', true);</p><p> define('USER_NAME', $userN);</p><p> define('USER_ID', $users->name2id($userN));</p><p> define('USER_HASH', $userH);</p><p> </p><p> $users->CacheUser(USER_ID);</p><p> }</p><p> else</p><p> {</p><p> @session_destroy();</p><p> header('Location: ./index.html');</p><p> exit;</p><p> } </p><p>}</p><p>else</p><p>{</p><p> define('LOGGED_IN', false);</p><p> define('USER_NAME', 'Guest');</p><p> define('USER_ID', -1);</p><p> define('USER_HASH', null);</p><p>}</p><p> </p><p>define('FORCE_MAINTENANCE', ((uberCore::GetMaintenanceStatus() == "1") ? true : false));</p><p> </p><p>if (FORCE_MAINTENANCE && !defined('IN_MAINTENANCE'))</p><p>{</p><p> if (!LOGGED_IN || !$users->HasFuse(USER_ID, 'fuse_ignore_maintenance'))</p><p> {</p><p> header("Location: " . WWW . "/maintenance.php");</p><p> exit;</p><p> }</p><p>}</p><p> </p><p>if ((!defined('BAN_PAGE') || !BAN_PAGE) && ($users->IsIpBanned(USER_IP) || (LOGGED_IN && $users->IsUserBanned(USER_NAME))))</p><p>{</p><p> header("Location: " . WWW . "/banned.php");</p><p> exit;</p><p>}</p><p> </p><p>$core->CheckCookies();</p><p> </p><p>function dbquery($strQuery = '')</p><p>{</p><p> global $db;</p><p> </p><p> if($db->IsConnected())</p><p> {</p><p> return $db->DoQuery($strQuery);</p><p> }</p><p> </p><p> return $db->Error('Could not process query, no active db connection detected..');</p><p>}</p><p> </p><p>function filter($strInput = '')</p><p>{</p><p> global $core;</p><p> </p><p> return $core->FilterInputString($strInput);</p><p>}</p><p> </p><p>function clean($strInput = '', $ignoreHtml = false, $nl2br = false) {</p><p> global $core;</p><p> return $core->CleanStringForOutput($strInput, $ignoreHtml, $nl2br);</p><p>}</p><p> </p><p>function derpC($strInput = '', $ignoreHtml = true, $nl2br = false) {</p><p> global $core;</p><p> return $core->CleanStringForOutput($strInput, $ignoreHtml, $nl2br);</p><p>}</p><p>function shuffle_assoc(&$array)</p><p>{</p><p> $keys = array_keys($array);</p><p> </p><p> shuffle($keys);</p><p> </p><p> foreach($keys as $key)</p><p> {</p><p> $new[$key] = $array[$key];</p><p> }</p><p> </p><p> $array = $new;</p><p> </p><p> return true;</p><p>}</p><p> </p><p>if (defined('MUST_LOG') && !LOGGED_IN) {</p><p> header('Location: ' . WWW . '/');</p><p>}</p><p> </p><p>function fixText($str, $quotes = true, $clean = false, $ltgt = false, $transform = false, $guestbook = false)</p><p>{</p><p> global $core;</p><p> </p><p> return $core->fixText($str, $quotes, $clean, $ltgt, $transform, $guestbook);</p><p>}</p><p> </p><p>function GenRandom()</p><p>{</p><p> global $core;</p><p> </p><p> return $core->GenRandom();</p><p>}</p><p> </p><p>function BBCode($str)</p><p>{</p><p> global $core;</p><p> </p><p> return $core->BBCode($str);</p><p>}</p><p> </p><p>function unicodeText($str, $clean = false)</p><p>{</p><p> $str = str_replace("°", "\u00a1", $str);</p><p> $str = str_replace("ø", "\u00bf", $str);</p><p> $str = str_replace("—", "\u00d1", $str);</p><p> $str = str_replace("Ò", "\u00f1", $str);</p><p> $str = str_replace("¡Å", "\u00c1", $str);</p><p> $str = str_replace("·", "\u00e1", $str);</p><p> $str = str_replace("…", "\u00c9", $str);</p><p> $str = str_replace("È", "\u00e9", $str);</p><p> $str = str_replace("”", "\u00d3", $str);</p><p> $str = str_replace("Û", "\u00f3", $str);</p><p> $str = str_replace("⁄", "\u00da", $str);</p><p> $str = str_replace("˙", "\u00fa", $str);</p><p> $str = str_replace("Õç", "\u00cd", $str);</p><p> $str = str_replace("Ì", "\u00ed", $str);</p><p> </p><p> $str = str_replace('"', '\"', $str);</p><p> </p><p> return $str;</p><p>}</p><p> </p><p>function Contains($str, $words, $filter = false)</p><p>{</p><p> $return = false;</p><p> </p><p> if ($filter) {</p><p> $str = strtolower($str);</p><p> $words = strtolower($words);</p><p> }</p><p> </p><p> if (@strpos($str, $words) === false) {</p><p> $return = false;</p><p> } else {</p><p> $return = true;</p><p> }</p><p> </p><p> $getWords = explode(",", str_replace(" ", "", $words));</p><p> </p><p> foreach ($getWords as $Word) {</p><p> if (!$return) {</p><p> if (@strpos($str, $Word) === false) {</p><p> $return = false;</p><p> } else {</p><p> $return = true;</p><p> }</p><p> }</p><p> }</p><p> </p><p> return $return;</p><p>}</p><p> </p><p>function write($str, $quotes = true, $clean = false, $ltgt = true, $transform = false, $guestbook = false)</p><p>{</p><p> echo fixText($str, $quotes, $clean, $ltgt, $transform, $guestbook);</p><p>}</p><p> </p><p>function IsEven($intNumber)</p><p>{</p><p> if ($intNumber % 2 == 0) {</p><p> return true;</p><p> } else {</p><p> return false;</p><p> }</p><p>}</p><p> </p><p>if ($site['enable_id_flagging'] == true) {</p><p> if (LOGGED_IN) {</p><p> $isFlagged = mysql_num_rows(mysql_query("SELECT `id` FROM `flagged_users` WHERE `id` = '" . USER_ID . "'"));</p><p> if($isFlagged) {</p><p> die(</p><p> "Your account's access has been terminated. <br />" .</p><p> "Please contact <a href='mailto:" . $site['contact_email'] . "'>" . $site['contact_email'] . "</a> to restore account access."</p><p> );</p><p> }</p><p> }</p><p>}</p><p>?>[/CODE]</p><p> </p><p> </p><p>Replace That With Your Global.php</p></blockquote><p></p>
[QUOTE="Brad, post: 108737, member: 17995"] [CODE]<?php /* | . .|---.,---.,---. | || ||---'| UberCMS 2.0 `---'`---'`---'` UberCMS Coded originally by Meth0d (2010-2011) Continued by Jonty (2011-now) Build 2.0.0 SS, Public */ define('DS', DIRECTORY_SEPARATOR); define('CWD', str_replace('manage' . DS, '', dirname(__FILE__) . DS)); define("includes_directory", './includes/'); define("config_directory", './includes/configuration/'); require_once config_directory . "ubercms_config.php"; define("regOnlineText", $frontend['online_text_reg']); require_once includes_directory . "class.core.php"; require_once includes_directory . "class.db.mysql.php"; require_once includes_directory . "class.cron.php"; require_once includes_directory . "class.users.php"; require_once includes_directory . "class.tpl.php"; require_once includes_directory . "class.cdn.php"; require_once includes_directory . "class.zaphotel.php"; require_once includes_directory . "class.gtfo.php"; define("vembaEnabled", $vemba['enable']); $core = new uberCore(); $core->ParseConfig(); $cron = new uberCron(); $users = new uberUsers(); $tpl = new uberTpl(); $cdn = new ZapDataNetwork(); $zaphotel = new zaphotel(); $gtfo = new GtfoClean(); $tpl->SetParam("siteName", $site['name']); $tpl->SetParam("shortName", $site['short_name']); $tpl->SetParam("footerLinks", $frontend['footer_links']); $tpl->SetParam("footerText", $frontend['footer_text']); $tpl->SetParam("vembaId", $vemba['id']); $tpl->SetParam("fpOnlineText", $frontend['online_text_fp']); $tpl->SetParam("regOnlineText", $frontend['online_text_reg']); $tpl->SetParam("twitter", $site['twitter_account']); $tpl->SetParam("facebook", $site['facebook_account']); $headers = @apache_request_headers(); // *************************************************** // Reverse proxy & cloudflare setup checked & ips corrected if needed if ($reverseproxy['enabled'] == true) { if (isset($headers["X-Forwarded-For"])) { $_SERVER["REMOTE_ADDR"] = $headers["X-Forwarded-For"]; } } else if ($cloudflare['enabled'] == true) { if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) { $_SERVER["REMOTE_ADDR"] = $_SERVER["HTTP_CF_CONNECTING_IP"]; } } if ($reverseproxy['enabled'] == true && $cloudflare['enabled'] == true) { $ip['orig'] = $_SERVER["REMOTE_ADDR"]; $realClient = explode(",", $ip['orig']); $realClientIP = $realClient[0]; $_SERVER["REMOTE_ADDR"] = $realClientIP; } // *************************************************** // Check for VPN blocks if ($vpn['block'] == true) { $user['hostname'] = @gethostbyaddr($_SERVER["REMOTE_ADDR"]); if(in_array($user['hostname'], $vpn['blocked_hosts'])) { exit($vpn['blocked_message']); } } if($voting['thehabbos_enabled'] == false) { $mode = "1"; } else { $mode = "2"; } // ****** Set Params for Client use $tpl->SetParam('connection_info_host', $client['connection_info_host']); $tpl->SetParam('connection_info_port', $client['connection_info_port']); $tpl->SetParam('site_url', WWW); $tpl->SetParam('client_reload_url', WWW); $tpl->SetParam('client_fatal_error_url', WWW . "/flash_client_error"); $tpl->SetParam('external_variables_txt', $client['external_variables_txt']); $tpl->SetParam('external_texts_txt', $client['external_texts_txt']); $tpl->SetParam('furnidata_load_url', $client['furnidata_load_url']); $tpl->SetParam('productdata_load_url', $client['productdata_load_url']); $tpl->SetParam('client_starting', $client['client_starting']); $tpl->SetParam('habbo_swf', $client['habbo_swf']); $tpl->SetParam('swf_base_dir', $client['swf_base_dir']); date_default_timezone_set('America/Los_Angeles'); define('UBER', true); define('LB', chr(13)); define("INCLUDES", includes_directory); define('USER_IP', $_SERVER['REMOTE_ADDR']); @set_magic_quotes_runtime('0'); error_reporting(E_ALL); session_start(); $db = new MySQL($core->config['MySQL']['hostname'], $core->config['MySQL']['username'], $core->config['MySQL']['password'], $core->config['MySQL']['database']); $db->Connect(); $cron->Execute(); if (isset($_SESSION['UBER_USER_N']) && isset($_SESSION['UBER_USER_H'])) { $userN = $_SESSION['UBER_USER_N']; $userH = $_SESSION['UBER_USER_H']; if ($users->ValidateUser($userN, $userH)) { define('LOGGED_IN', true); define('USER_NAME', $userN); define('USER_ID', $users->name2id($userN)); define('USER_HASH', $userH); $users->CacheUser(USER_ID); } else { @session_destroy(); header('Location: ./index.html'); 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.php"); exit; } } if ((!defined('BAN_PAGE') || !BAN_PAGE) && ($users->IsIpBanned(USER_IP) || (LOGGED_IN && $users->IsUserBanned(USER_NAME)))) { header("Location: " . WWW . "/banned.php"); exit; } $core->CheckCookies(); function dbquery($strQuery = '') { global $db; if($db->IsConnected()) { return $db->DoQuery($strQuery); } return $db->Error('Could not process query, no active db connection detected..'); } function filter($strInput = '') { global $core; return $core->FilterInputString($strInput); } function clean($strInput = '', $ignoreHtml = false, $nl2br = false) { global $core; return $core->CleanStringForOutput($strInput, $ignoreHtml, $nl2br); } function derpC($strInput = '', $ignoreHtml = true, $nl2br = false) { global $core; return $core->CleanStringForOutput($strInput, $ignoreHtml, $nl2br); } function shuffle_assoc(&$array) { $keys = array_keys($array); shuffle($keys); foreach($keys as $key) { $new[$key] = $array[$key]; } $array = $new; return true; } if (defined('MUST_LOG') && !LOGGED_IN) { header('Location: ' . WWW . '/'); } function fixText($str, $quotes = true, $clean = false, $ltgt = false, $transform = false, $guestbook = false) { global $core; return $core->fixText($str, $quotes, $clean, $ltgt, $transform, $guestbook); } function GenRandom() { global $core; return $core->GenRandom(); } function BBCode($str) { global $core; return $core->BBCode($str); } function unicodeText($str, $clean = false) { $str = str_replace("°", "\u00a1", $str); $str = str_replace("ø", "\u00bf", $str); $str = str_replace("—", "\u00d1", $str); $str = str_replace("Ò", "\u00f1", $str); $str = str_replace("¡Å", "\u00c1", $str); $str = str_replace("·", "\u00e1", $str); $str = str_replace("…", "\u00c9", $str); $str = str_replace("È", "\u00e9", $str); $str = str_replace("”", "\u00d3", $str); $str = str_replace("Û", "\u00f3", $str); $str = str_replace("⁄", "\u00da", $str); $str = str_replace("˙", "\u00fa", $str); $str = str_replace("Õç", "\u00cd", $str); $str = str_replace("Ì", "\u00ed", $str); $str = str_replace('"', '\"', $str); return $str; } function Contains($str, $words, $filter = false) { $return = false; if ($filter) { $str = strtolower($str); $words = strtolower($words); } if (@strpos($str, $words) === false) { $return = false; } else { $return = true; } $getWords = explode(",", str_replace(" ", "", $words)); foreach ($getWords as $Word) { if (!$return) { if (@strpos($str, $Word) === false) { $return = false; } else { $return = true; } } } return $return; } function write($str, $quotes = true, $clean = false, $ltgt = true, $transform = false, $guestbook = false) { echo fixText($str, $quotes, $clean, $ltgt, $transform, $guestbook); } function IsEven($intNumber) { if ($intNumber % 2 == 0) { return true; } else { return false; } } if ($site['enable_id_flagging'] == true) { if (LOGGED_IN) { $isFlagged = mysql_num_rows(mysql_query("SELECT `id` FROM `flagged_users` WHERE `id` = '" . USER_ID . "'")); if($isFlagged) { die( "Your account's access has been terminated. <br />" . "Please contact <a href='mailto:" . $site['contact_email'] . "'>" . $site['contact_email'] . "</a> to restore account access." ); } } } ?>[/CODE] Replace That With Your Global.php [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Hey i Need Help with Ubercms 2.0.1 that jonty release
Top