Tirando erro Global.php
Primeiro passo vai na sua global ( no www , ou cms sei lá ) apague tudo da global.
Segundo passo ponha oque tá escrito abaixo:
ParseConfig();
$db = new MySQL($core->config['MySQL']['hostname'], $core->config['MySQL']['username'],
$core->config['MySQL']['password'], $core->config['MySQL']['database']);
$db->Connect();
$cron->Execute();
// ############################################################################
// A manipulação de sessões
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.html");
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();
// ############################################################################
// Algumas funções comumente usadas para facilitar o acesso
function dbquery($strQuery = '')
{
global $db;
if($db->IsConnected())
{
return $db->DoQuery($strQuery);
}
return $db->Error('Não foi possível processo de consulta, sem conexão db detectou..');
}
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 shuffle_assoc(&$array)
{
$keys = array_keys($array);
shuffle($keys);
foreach($keys as $key)
{
$new[$key] = $array[$key];
}
$array = $new;
return true;
}
?>
ParseConfig();
$db = new MySQL($core->config['MySQL']['hostname'], $core->config['MySQL']['username'],
$core->config['MySQL']['password'], $core->config['MySQL']['database']);
$db->Connect();
$cron->Execute();
// ############################################################################
// A manipulação de sessões
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.html");
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();
// ############################################################################
// Algumas funções comumente usadas para facilitar o acesso
function dbquery($strQuery = '')
{
global $db;
if($db->IsConnected())
{
return $db->DoQuery($strQuery);
}
return $db->Error('Não foi possível processo de consulta, sem conexão db detectou..');
}
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 shuffle_assoc(&$array)
{
$keys = array_keys($array);
shuffle($keys);
foreach($keys as $key)
{
$new[$key] = $array[$key];
}
$array = $new;
return true;
}
?>
Nenhum comentário:
Postar um comentário