Hey i Need Help with Ubercms 2.0.1 that jonty release

Fade

Member
Feb 3, 2012
131
8
i saw this how to remove
Notice: Constant LB already defined in C:\xampp\htdocs\global.php on line 120

Notice: Constant INCLUDES already defined in C:\xampp\htdocs\global.php on line 121
 

Fade

Member
Feb 3, 2012
131
8
cant
yeah Delete Them define('LB', chr(13));
define("INCLUDES", includes_directory); From Global.php
Warning: require_once(C:\xampp\htdocs\inc\class.core.php) [ ]: failed to open stream: No such file or directory in C:\xampp\htdocs\global.phpon line 39

Fatal error: require_once() [ ]: Failed opening required 'C:\xampp\htdocs\inc\class.core.php' (include_path='.;C:\xampp\php\PEAR') inC:\xampp\htdocs\global.php on line 39
 

Brad

Well-Known Member
Jun 5, 2012
2,320
993
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."
                );
        }
    }
}
?>


Replace That With Your Global.php
 

Fade

Member
Feb 3, 2012
131
8
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."
                );
        }
    }
}
?>


Replace That With Your Global.php

ok ill try
 

Users who are viewing this thread

Top