ERROR, HELP?

JordanB

New Member
Jan 15, 2016
16
1
I'm getting this error, but I can't seem to see the problem?
Error; Parse error: syntax error, unexpected '[', expecting ')' in C:\xampp\KERNEL-XDRCMS\Init.php on line 61
Can anybody spot the error? I'll include code to both config and init.php

c7248a0a6f31608675747830015af287.png

Line 61;
$_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? str_replace(['<', '>', '"', '\'', '\\'], ['&lt;', '&gt;', '&quot;', '&#39;', '&#92;'], $_SERVER['HTTP_USER_AGENT']) : '';

Would be a big help!
Config:
<?php
#####################################################################
#||||| XdrCMS - Sistema de administración de contenido Habbo |||||#
#||||| Created by Xdr - HTML, PHP, CSS & KERNEL/CORE |||||#
# ----------------------------------------------------------------- #
#||||| © Copyright 2014. Xdr 2014 - Open Source Software |||||#
#||||| © Copyright 2014. Xdr - Kernel/Core Structure |||||#
#||||| © Copyright 2014. Sulake Corporation - Habbo Archives |||||#
# ----------------------------------------------------------------- #
#||||| XdrCMS es un Software de libre edición no protegido. |||||#
#||||| Los archivos de Kernel estan protegidos por Xdr. |||||#
#####################################################################

$hotelName = 'Habbo';

$Restrictions = [
'Maintenance' => [
'Active' => false, // false -> desacttivado, true -> activado
'Except' => 8, // rango minimo para saltarse el manteminiento.
'Twitter' => 'habboluxia', // nombre de twitter, sin @
'TwitterCount' => 10 // twitts a mostrar.
],
'Country' => [
'Action' => 0, // 0 -> Desactivado (Todo el mundo puede acceder), 1 -> Bloquear (Los paises que esten en la lista no pueden entrar), 2-> Permitir (Solo los paises que esten en la lista pueden entrar)
'Strict' => true, // true -> Si ocurre un error (Que no encuentra el pais), no te deja pasar. false -> Desactivado.
'List' => ['ES', 'US']
],
'Security' => [
'SecretKeys' => [
'Enabled' => false,
'Keys' => ['4' => 'REDTU'] // userID => KEY(min-max length 5)
]
]
];

$Config['MySQL'] = [
'host' => '127.0.0.1',
'user' => 'root',
'pass' => 'jordanb',
'dbname' => 'habbo'
];

########## UBICACIÓN DEL SOFTWARE ##########
$Config['URL'] = [
'Default' => [
'Require.www' => false, //
'SSL.enabled' => false, // https://
'Server' => 'localhost',
'Lang' => 'es_ES' // GLOBAL.
],
/* 'example.com' => ['Require.www' => false, 'SSL.enabled' => false, 'Lang' => 'es_ES', 'MySQL' => ['host' => '127.0.0.1','user' => 'root','pass' => 'Azure','dbname' => 'cmsdb']], */
'devPrivateServer' => 'localhost', // servidor privado de desarrollo - NO TOCAR
'dirACP' => '/ADMdeHLUXIA' // ADMIN CONTROL PANEL DIRECTORY
];

$Config['Vouchers'] = [
'TableName' => 'vouchers',
'CoinColumn' => 'type',
'CodeColumn' => 'voucher',
'ValueColumn' => 'value',
'Types' => [
'CREDIT' => 'credits'
]
];

########## Config. MAIL ###########
// Si la CMS envia emails(Poner true o false), para esto tienes que tener el SMTP configurado.
$Config['EnabledMails'] = true;
// En este orden: Puerto, Tipo de Conexion(ssl, tls), Servidor, Usar Autentificación(true o false), Usuario y Contraseña.
$Config['SMTP'] = [587, 'tsl', 'smtp.gmail.com', true, '[email protected]', ''];

########## Config. Avanzada ##########
// Ajusta los datos correspondientes para la conexión a la Base de datos.

$Config['OnlineType'] = 1;

$Config['Cache'] = [
'internalConfig' => [
'extension' => ''// TODAY: '.' . date('YmdH')
],
'AIO' => true,
'PROMOS' => true,
'PLUGINS' => true,
'ONLINES' => true
];

$Config['AXMS'] = ['127.0.0.1', 30005, 'user123', '']; // host, port, user, pass

########## OPENID ##########

$_Facebook = [
'Enabled' => true, // true -> Activado, false -> desactivado
'App' => [
'ID' => '1404187333147691',
'PrivateID' => 'dcb7471653a3515e46ed68e9de08f5dd',
'Name' => 'App Name' // App Name
],
'Page' => ' '
];

########## RANKS ##########

// groupId => ['tabName', 'tabColor'],
$rankGroups = [
0 => ['Equipo Administrativo', 'red'],
1 => ['Colaboradores', 'blue'],
];

//rankName, tabId, access ACP, can edit or delete created things of other users, can delete logs, edit Server Config, edit Site Config, create News, create Styles, edit Users, ban Users, unBan Users, create vouchers, giveRank, create plugins
$staffRanks = [


'6' => ['guias', 1, false, false, false, false, false, false, false, false, false, false, false, true, false],
'7' => ['alfas', 1, true, true, false, false, false, false, false, false, false, false, false, true, false],
'8' => ['Colaboradores', 1, true, true, false, false, false, false, false, false, false, false, true, false, false],
'9' => ['Mod de prueba', 1, false, false, false, false, false, false, false, false, false, false, true, false, false],
'10' => ['Moderadores', 0, true, false, false, false, false, true, false, false, true, false, true, false, false],
'11' => ['Game master', 0, true, false, false, true, false, true, false, false, true, false, true, false, false],
'12' => ['Co-Administradores', 0, true, true, true, true, false, true, false, false, true, true, true, true, false],
'13' => ['Administradores', 0, true, true, false, true, false, true, true, true, true, true, true, true, true],
'14' => ['Dueños', 0, true, true, true, true, true, true, true, true, true, true, true, true, true],
'15' => ['Dueños', 0, true, true, true, true, true, true, true, true, true, true, true, true, true],
];

########## ID DEL ADMINISTRADOR ##########
// Por favor ajusta la ID correspondiente a tu usuario dentro del Hotel.
// Esto te permitira tener el Acceso total del hotel.

$sysadmin = 4;
?>
Init.php:
<?php
/*=========================================================+
|| # Azure Kernel of XDRCMS. All rights reserved.
|| # Copyright © 2014 Xdr.
|| # Azure Kernel 3.0
|+=========================================================+
|| # XDR 2014. The power of Proyects.
|| # Este es un Software de código libre, libre edición.
|+=========================================================+
*/

// Inicio

define('IN_AZURE', TRUE);
if(array_key_exists('HTTP_CLIENT_IP', $_SERVER))
define('MY_IP', str_replace('::1', '127.0.0.1', $_SERVER['HTTP_CLIENT_IP']));
elseif(array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER))
define('MY_IP', str_replace('::1', '127.0.0.1', $_SERVER['HTTP_X_FORWARDED_FOR']));
elseif(array_key_exists('REMOTE_ADDR', $_SERVER))
define('MY_IP', str_replace('::1', '127.0.0.1', $_SERVER['REMOTE_ADDR']));
else
exit;


define('DS', DIRECTORY_SEPARATOR);
define('KERNEL', dirname(__FILE__) . DS);
define('LANGUAGES', KERNEL . 'Lang' . DS);
define('Files', KERNEL . 'Files' . DS);

date_default_timezone_set('Europe/Madrid');
ob_start('fatal_error_handler');
register_shutdown_function('__ENDSCRIPT');

function fatal_error_handler($buffer){
$error = error_get_last();
if($error['type'] == 1):
require 'Error500.php';
return $newBuffer;
endif;

return $buffer;
}

function __ENDSCRIPT(){
if(isset($GLOBALS['MySQLi']))
$GLOBALS['MySQLi']->close();
if(class_exists('SOCKETS'))
SOCKETS::CLOSE();
}

ini_set('default_charset', 'ISO-8859-1');
ini_set('expose_php', 0);
ini_set('session.name', 'aXDR-RTM:1');
ini_set('session.gc_probability', 10);
ini_set('session.gc_divisor', 100);
ini_set('session.cookie_httponly', 1);
ini_set('session.gc_maxlifetime', 600);
ini_set('zlib_output_compression', 'On');

//error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING);
$_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? str_replace(['<', '>', '"', '\'', '\\'], ['&lt;', '&gt;', '&quot;', '&#39;', '&#92;'], $_SERVER['HTTP_USER_AGENT']) : '';
$_SERVER['REQUEST_URI'] = str_replace('.php', '', strtolower($_SERVER['REQUEST_URI']));

define ('URI', (strstr($_SERVER['REQUEST_URI'], '?') !== FALSE ? explode('?', $_SERVER['REQUEST_URI'])[0] : $_SERVER['REQUEST_URI']));

@session_start();
// AntiHTML & SQL Injection
if(count($_POST) > 50 || count($_GET) > 50)
exit;

$rKeys = get_html_translation_table(HTML_ENTITIES, ENT_HTML401 | ENT_QUOTES, 'ISO-8859-1');
$rKeys['\\'] = '&#92;';

foreach($_POST as $Key => $Value)
$_POST[$Key] = str_replace(array_keys($rKeys), array_values($rKeys), mb_convert_encoding($Value, 'ISO-8859-1', mb_detect_encoding($Value, 'UTF-8,ISO-8859-1,ISO-8859-15', true)));
foreach($_GET as $Key => $Value)
$_GET[$Key] = str_replace(array_keys($rKeys), array_values($rKeys), mb_convert_encoding($Value, 'ISO-8859-1', mb_detect_encoding($Value, 'UTF-8,ISO-8859-1,ISO-8859-15', true)));

$siteBlocked = false;

require 'Azure.Cache.php';
require 'Azure.Methods.php';
if(isset($LOAD)):
foreach($LOAD as $f){
require_once KERNEL . 'Other' . DS . $f . '.php';
}
endif;

require 'Azure.Core.php';

if($Restrictions['Country']['Action'] > 0 && MY_IP != '127.0.0.1'):
if(isset($_SESSION['Country'])):
$Code = $_SESSION['Country'];
else:
$Code = file_get_contents(' ' . $_SERVER['REMOTE_ADDR']);
$_SESSION['Country'] = $Code;
endif;

if($Restrictions['Country']['Strict'] && $Code == 'XX'):
$siteBlocked = true;
elseif($Restrictions['Country']['Action'] == '1' && isset($Restrictions['Country']['List'][$Code])):
$siteBlocked = true;
elseif($Restrictions['Country']['Action'] == '2' && !isset($Restrictions['Country']['List'][$Code])):
$siteBlocked = true;
endif;
endif;

require 'Azure.User.php';
USER::CHECK();

if(($Restrictions['Maintenance']['Active'] && ((USER::$LOGGED && USER::$Data['Rank'] < $Restrictions['Maintenance']['Except']) || !USER::$LOGGED)) && !isset($_uMaintenance)):
require Files . $Config['Lang'] . DS . 'HTMLs' . DS . 'Maintenance.html';
exit;
endif;

//LOL
header('X-Origin-Id: resin-fe-4');

###############################LoadFILES###################################
DEFINE('SCRIPT', Files . $Config['Lang'] . DS . 'Scripts' . DS);
DEFINE('HEADER', Files . $Config['Lang'] . DS . 'Templates' . DS . 'Headers' . DS);
DEFINE('FOOTER', Files . $Config['Lang'] . DS . 'Templates' . DS . 'Footers' . DS);
DEFINE('HTML', Files . $Config['Lang'] . DS . 'HTMLs' . DS);
DEFINE('ACP', Files . $Config['Lang'] . DS . 'ACP' . DS);
?>
 

Users who are viewing this thread

Top