Arruma o erro da global

3 participantes

Hyouki Hyouki  • 30.09.11 10:25

Arruma o erro da global Empty Arruma o erro da global 30.09.11 10:25

tem muitos novatos q não sabem ajeita o erro da global

então vo ensina agora muito facil e rapido coisa de 20 segundos *-*

1- voce ira na sua cms procure pela bloco global voce ira procurar esse nome > set_magic_quotes_runtime('0');



<?php
/*=======================================================================
| StageCMS - Sistema avançado de Administração de CMS
| #######################################################################
| Copyright (c) 2010, Geek and Meth0d
| #######################################################################
| Este programa é um Free Software aonde você pode editar os conteúdos
| com os direitos autorais do editor.
| #######################################################################
| Contato: Divirta-se com a CMS ;D
| [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
\======================================================================*/


// ############################################################################
// Prepare the local environment

define('UBER', true);
define('DS', DIRECTORY_SEPARATOR);
define('LB', chr(13));
define('CWD', str_replace('manage' . DS, '', dirname(__FILE__) . DS));
define('INCLUDES', CWD . 'inc' . DS);
define('USER_IP', $_SERVER['REMOTE_ADDR']);

set_magic_quotes_runtime('0');
error_reporting(E_ALL);

session_start();


// ############################################################################
// Initialize core classes

require_once INCLUDES . "class.core.php";
require_once INCLUDES . "class.db.mysql.php";
require_once INCLUDES . "class.cron.php";
require_once INCLUDES . "class.users.php";
require_once INCLUDES . "class.tpl.php";

$core = new uberCore();
$cron = new uberCron();
$users = new uberUsers();
$tpl = new uberTpl();


// ############################################################################
// Execute some required core functionality

$core->ParseConfig();

$db = new MySQL($core->config['MySQL']['hostname'], $core->config['MySQL']['username'],
$core->config['MySQL']['password'], $core->config['MySQL']['database']);
$db->Connect();

$cron->Execute();

// ############################################################################
// Session handling

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();

// ############################################################################
// Some commonly used functions for easy access

function dbquery($strQuery = '')
{
global $db;

if($db->IsConnected())
{
return $db->DoQuery($strQuery);
}

return $db->Error('Não foi possível fazer esse processo, parece que não há conexão com a database.');
}

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;
}

?>

quando acha esse nome set_magic_quotes_runtime('0'); apague-o feche e salve pronto problema resolvido

quem gosto da o Up

vinivei vinivei  • 30.09.11 10:28

Arruma o erro da global Empty Re: Arruma o erro da global 30.09.11 10:28

ESSE TUTO EU JA SABIA COMO FAZER MAS ESTARÁ AJUDANDO MUITOS NOVATOS QUE COMEÇARAM MECHER NA AREA HABBO

andrei1545 andrei1545  • 04.10.11 22:29

Arruma o erro da global Empty Re: Arruma o erro da global 04.10.11 22:29

isso é antigo e seria melhor com um vidio ae
metas:
Spoiler:
Permissões neste sub-fórum
Não podes responder a tópicos

BH Servers

Recomendamos a BH Servers com proteção DDOS gratuita em Cloud Server de alta performance. Entrega imediata.