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
ERROR, HELP?
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="JordanB" data-source="post: 367285" data-attributes="member: 65658"><p>I'm getting this error, but I can't seem to see the problem?</p><p>Error; <strong>Parse error</strong>: syntax error, unexpected '[', expecting ')' in <strong>C:\xampp\KERNEL-XDRCMS\Init.php</strong> on line <strong>61</strong></p><p><strong>Can anybody spot the error? I'll include code to both config and init.php</strong></p><p><strong></strong></p><p><strong><img src="https://i.gyazo.com/c7248a0a6f31608675747830015af287.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </strong></p><p><strong>Line 61; </strong></p><p><strong>[spoiler]$_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? str_replace(['<', '>', '"', '\'', '\\'], ['&lt;', '&gt;', '&quot;', '&#39;', '&#92;'], $_SERVER['HTTP_USER_AGENT']) : '';[/spoiler]</strong></p><p><strong></strong></p><p><strong>Would be a big help!</strong></p><p><strong>Config:</strong></p><p><strong>[spoiler]</strong></p><p><strong><?php</strong></p><p><strong>#####################################################################</strong></p><p><strong>#||||| XdrCMS - Sistema de administración de contenido Habbo |||||#</strong></p><p><strong>#||||| Created by Xdr - HTML, PHP, CSS & KERNEL/CORE |||||#</strong></p><p><strong># ----------------------------------------------------------------- #</strong></p><p><strong>#||||| © Copyright 2014. Xdr 2014 - Open Source Software |||||#</strong></p><p><strong>#||||| © Copyright 2014. Xdr - Kernel/Core Structure |||||#</strong></p><p><strong>#||||| © Copyright 2014. Sulake Corporation - Habbo Archives |||||#</strong></p><p><strong># ----------------------------------------------------------------- #</strong></p><p><strong>#||||| XdrCMS es un Software de libre edición no protegido. |||||#</strong></p><p><strong>#||||| Los archivos de Kernel estan protegidos por Xdr. |||||#</strong></p><p><strong>#####################################################################</strong></p><p><strong></strong></p><p><strong>$hotelName = 'Habbo';</strong></p><p><strong></strong></p><p><strong>$Restrictions = [</strong></p><p><strong> 'Maintenance' => [</strong></p><p><strong> 'Active' => false, // false -> desacttivado, true -> activado</strong></p><p><strong> 'Except' => 8, // rango minimo para saltarse el manteminiento.</strong></p><p><strong> 'Twitter' => 'habboluxia', // nombre de twitter, sin @</strong></p><p><strong> 'TwitterCount' => 10 // twitts a mostrar.</strong></p><p><strong> ],</strong></p><p><strong> 'Country' => [</strong></p><p><strong> '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)</strong></p><p><strong> 'Strict' => true, // true -> Si ocurre un error (Que no encuentra el pais), no te deja pasar. false -> Desactivado.</strong></p><p><strong> 'List' => ['ES', 'US']</strong></p><p><strong> ],</strong></p><p><strong> 'Security' => [</strong></p><p><strong> 'SecretKeys' => [</strong></p><p><strong> 'Enabled' => false,</strong></p><p><strong> 'Keys' => ['4' => 'REDTU'] // userID => KEY(min-max length 5)</strong></p><p><strong> ]</strong></p><p><strong> ]</strong></p><p><strong>];</strong></p><p><strong></strong></p><p><strong>$Config['MySQL'] = [</strong></p><p><strong> 'host' => '127.0.0.1',</strong></p><p><strong> 'user' => 'root',</strong></p><p><strong> 'pass' => 'jordanb',</strong></p><p><strong> 'dbname' => 'habbo'</strong></p><p><strong>];</strong></p><p><strong></strong></p><p><strong>########## UBICACIÓN DEL SOFTWARE ##########</strong></p><p><strong>$Config['URL'] = [</strong></p><p><strong> 'Default' => [</strong></p><p><strong> 'Require.www' => false, // <a href="http://www.example.com" target="_blank">www.example.com</a></strong></p><p><strong> 'SSL.enabled' => false, // https://</strong></p><p><strong> 'Server' => 'localhost',</strong></p><p><strong> 'Lang' => 'es_ES' // GLOBAL.</strong></p><p><strong> ],</strong></p><p><strong> /* 'example.com' => ['Require.www' => false, 'SSL.enabled' => false, 'Lang' => 'es_ES', 'MySQL' => ['host' => '127.0.0.1','user' => 'root','pass' => 'Azure','dbname' => 'cmsdb']], */</strong></p><p><strong> 'devPrivateServer' => 'localhost', // servidor privado de desarrollo - NO TOCAR</strong></p><p><strong> 'dirACP' => '/ADMdeHLUXIA' // ADMIN CONTROL PANEL DIRECTORY</strong></p><p><strong>];</strong></p><p><strong></strong></p><p><strong>$Config['Vouchers'] = [</strong></p><p><strong> 'TableName' => 'vouchers',</strong></p><p><strong> 'CoinColumn' => 'type',</strong></p><p><strong> 'CodeColumn' => 'voucher',</strong></p><p><strong> 'ValueColumn' => 'value',</strong></p><p><strong> 'Types' => [</strong></p><p><strong> 'CREDIT' => 'credits'</strong></p><p><strong> ]</strong></p><p><strong>];</strong></p><p><strong></strong></p><p><strong>########## Config. MAIL ###########</strong></p><p><strong>// Si la CMS envia emails(Poner true o false), para esto tienes que tener el SMTP configurado.</strong></p><p><strong>$Config['EnabledMails'] = true; </strong></p><p><strong>// En este orden: Puerto, Tipo de Conexion(ssl, tls), Servidor, Usar Autentificación(true o false), Usuario y Contraseña.</strong></p><p><strong>$Config['SMTP'] = [587, 'tsl', 'smtp.gmail.com', true, '<a href="mailto:tuemail@gmail.com">tuemail@gmail.com</a>', '']; </strong></p><p><strong></strong></p><p><strong>########## Config. Avanzada ##########</strong></p><p><strong>// Ajusta los datos correspondientes para la conexión a la Base de datos.</strong></p><p><strong></strong></p><p><strong>$Config['OnlineType'] = 1;</strong></p><p><strong></strong></p><p><strong>$Config['Cache'] = [</strong></p><p><strong> 'internalConfig' => [</strong></p><p><strong> 'extension' => ''// TODAY: '.' . date('YmdH')</strong></p><p><strong> ],</strong></p><p><strong> 'AIO' => true,</strong></p><p><strong> 'PROMOS' => true,</strong></p><p><strong> 'PLUGINS' => true,</strong></p><p><strong> 'ONLINES' => true</strong></p><p><strong>];</strong></p><p><strong></strong></p><p><strong>$Config['AXMS'] = ['127.0.0.1', 30005, 'user123', '']; // host, port, user, pass</strong></p><p><strong></strong></p><p><strong>########## OPENID ##########</strong></p><p><strong></strong></p><p><strong>$_Facebook = [</strong></p><p><strong> 'Enabled' => true, // true -> Activado, false -> desactivado</strong></p><p><strong> 'App' => [</strong></p><p><strong> 'ID' => '1404187333147691',</strong></p><p><strong> 'PrivateID' => 'dcb7471653a3515e46ed68e9de08f5dd',</strong></p><p><strong> 'Name' => 'App Name' // App Name</strong></p><p><strong> ],</strong></p><p><strong> 'Page' => '<a href="http://www.facebook.com/habboLuxia.cf" target="_blank">http://www.facebook.com/habboLuxia.cf</a>'</strong></p><p><strong>];</strong></p><p><strong></strong></p><p><strong>########## RANKS ##########</strong></p><p><strong></strong></p><p><strong>// groupId => ['tabName', 'tabColor'],</strong></p><p><strong>$rankGroups = [</strong></p><p><strong> 0 => ['Equipo Administrativo', 'red'],</strong></p><p><strong> 1 => ['Colaboradores', 'blue'],</strong></p><p><strong>];</strong></p><p><strong></strong></p><p><strong>//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</strong></p><p><strong>$staffRanks = [</strong></p><p><strong></strong></p><p><strong> </strong></p><p><strong> '6' => ['guias', 1, false, false, false, false, false, false, false, false, false, false, false, true, false],</strong></p><p><strong> '7' => ['alfas', 1, true, true, false, false, false, false, false, false, false, false, false, true, false],</strong></p><p><strong> '8' => ['Colaboradores', 1, true, true, false, false, false, false, false, false, false, false, true, false, false],</strong></p><p><strong> '9' => ['Mod de prueba', 1, false, false, false, false, false, false, false, false, false, false, true, false, false],</strong></p><p><strong> '10' => ['Moderadores', 0, true, false, false, false, false, true, false, false, true, false, true, false, false],</strong></p><p><strong> '11' => ['Game master', 0, true, false, false, true, false, true, false, false, true, false, true, false, false],</strong></p><p><strong> '12' => ['Co-Administradores', 0, true, true, true, true, false, true, false, false, true, true, true, true, false],</strong></p><p><strong> '13' => ['Administradores', 0, true, true, false, true, false, true, true, true, true, true, true, true, true],</strong></p><p><strong> '14' => ['Dueños', 0, true, true, true, true, true, true, true, true, true, true, true, true, true],</strong></p><p><strong> '15' => ['Dueños', 0, true, true, true, true, true, true, true, true, true, true, true, true, true],</strong></p><p><strong>];</strong></p><p><strong></strong></p><p><strong>########## ID DEL ADMINISTRADOR ##########</strong></p><p><strong>// Por favor ajusta la ID correspondiente a tu usuario dentro del Hotel.</strong></p><p><strong>// Esto te permitira tener el Acceso total del hotel.</strong></p><p><strong></strong></p><p><strong>$sysadmin = 4;</strong></p><p><strong>?>[/spoiler]</strong></p><p><strong>Init.php:</strong></p><p><strong>[spoiler]</strong></p><p><strong><?php</strong></p><p><strong>/*=========================================================+</strong></p><p><strong>|| # Azure Kernel of XDRCMS. All rights reserved.</strong></p><p><strong>|| # Copyright © 2014 Xdr.</strong></p><p><strong>|| # Azure Kernel 3.0</strong></p><p><strong>|+=========================================================+</strong></p><p><strong>|| # XDR 2014. The power of Proyects.</strong></p><p><strong>|| # Este es un Software de código libre, libre edición.</strong></p><p><strong>|+=========================================================+</strong></p><p><strong>*/</strong></p><p><strong></strong></p><p><strong>// Inicio</strong></p><p><strong></strong></p><p><strong>define('IN_AZURE', TRUE);</strong></p><p><strong>if(array_key_exists('HTTP_CLIENT_IP', $_SERVER))</strong></p><p><strong> define('MY_IP', str_replace('::1', '127.0.0.1', $_SERVER['HTTP_CLIENT_IP']));</strong></p><p><strong>elseif(array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER))</strong></p><p><strong> define('MY_IP', str_replace('::1', '127.0.0.1', $_SERVER['HTTP_X_FORWARDED_FOR']));</strong></p><p><strong>elseif(array_key_exists('REMOTE_ADDR', $_SERVER))</strong></p><p><strong> define('MY_IP', str_replace('::1', '127.0.0.1', $_SERVER['REMOTE_ADDR']));</strong></p><p><strong>else</strong></p><p><strong> exit;</strong></p><p><strong></strong></p><p><strong></strong></p><p><strong>define('DS', DIRECTORY_SEPARATOR);</strong></p><p><strong>define('KERNEL', dirname(__FILE__) . DS);</strong></p><p><strong>define('LANGUAGES', KERNEL . 'Lang' . DS);</strong></p><p><strong>define('Files', KERNEL . 'Files' . DS);</strong></p><p><strong></strong></p><p><strong>date_default_timezone_set('Europe/Madrid');</strong></p><p><strong>ob_start('fatal_error_handler');</strong></p><p><strong>register_shutdown_function('__ENDSCRIPT');</strong></p><p><strong></strong></p><p><strong>function fatal_error_handler($buffer){</strong></p><p><strong> $error = error_get_last();</strong></p><p><strong> if($error['type'] == 1):</strong></p><p><strong> require 'Error500.php';</strong></p><p><strong> return $newBuffer;</strong></p><p><strong> endif;</strong></p><p><strong></strong></p><p><strong> return $buffer;</strong></p><p><strong>}</strong></p><p><strong></strong></p><p><strong>function __ENDSCRIPT(){</strong></p><p><strong> if(isset($GLOBALS['MySQLi']))</strong></p><p><strong> $GLOBALS['MySQLi']->close();</strong></p><p><strong> if(class_exists('SOCKETS'))</strong></p><p><strong> SOCKETS::CLOSE();</strong></p><p><strong>}</strong></p><p><strong></strong></p><p><strong>ini_set('default_charset', 'ISO-8859-1');</strong></p><p><strong>ini_set('expose_php', 0);</strong></p><p><strong>ini_set('session.name', 'aXDR-RTM:1');</strong></p><p><strong>ini_set('session.gc_probability', 10);</strong></p><p><strong>ini_set('session.gc_divisor', 100);</strong></p><p><strong>ini_set('session.cookie_httponly', 1);</strong></p><p><strong>ini_set('session.gc_maxlifetime', 600);</strong></p><p><strong>ini_set('zlib_output_compression', 'On');</strong></p><p><strong></strong></p><p><strong>//error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING);</strong></p><p><strong>$_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? str_replace(['<', '>', '"', '\'', '\\'], ['&lt;', '&gt;', '&quot;', '&#39;', '&#92;'], $_SERVER['HTTP_USER_AGENT']) : '';</strong></p><p><strong>$_SERVER['REQUEST_URI'] = str_replace('.php', '', strtolower($_SERVER['REQUEST_URI']));</strong></p><p><strong></strong></p><p><strong>define ('URI', (strstr($_SERVER['REQUEST_URI'], '?') !== FALSE ? explode('?', $_SERVER['REQUEST_URI'])[0] : $_SERVER['REQUEST_URI']));</strong></p><p><strong></strong></p><p><strong>@session_start();</strong></p><p><strong>// AntiHTML & SQL Injection</strong></p><p><strong>if(count($_POST) > 50 || count($_GET) > 50)</strong></p><p><strong> exit;</strong></p><p><strong></strong></p><p><strong>$rKeys = get_html_translation_table(HTML_ENTITIES, ENT_HTML401 | ENT_QUOTES, 'ISO-8859-1');</strong></p><p><strong>$rKeys['\\'] = '&#92;';</strong></p><p><strong></strong></p><p><strong>foreach($_POST as $Key => $Value)</strong></p><p><strong> $_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)));</strong></p><p><strong>foreach($_GET as $Key => $Value)</strong></p><p><strong> $_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)));</strong></p><p><strong></strong></p><p><strong>$siteBlocked = false;</strong></p><p><strong></strong></p><p><strong>require 'Azure.Cache.php';</strong></p><p><strong>require 'Azure.Methods.php';</strong></p><p><strong>if(isset($LOAD)):</strong></p><p><strong> foreach($LOAD as $f){</strong></p><p><strong> require_once KERNEL . 'Other' . DS . $f . '.php';</strong></p><p><strong> }</strong></p><p><strong>endif;</strong></p><p><strong></strong></p><p><strong>require 'Azure.Core.php';</strong></p><p><strong></strong></p><p><strong>if($Restrictions['Country']['Action'] > 0 && MY_IP != '127.0.0.1'):</strong></p><p><strong> if(isset($_SESSION['Country'])):</strong></p><p><strong> $Code = $_SESSION['Country'];</strong></p><p><strong> else:</strong></p><p><strong> $Code = file_get_contents('<a href="http://api.hostip.info/country.php?ip=" target="_blank">http://api.hostip.info/country.php?ip=</a>' . $_SERVER['REMOTE_ADDR']);</strong></p><p><strong> $_SESSION['Country'] = $Code;</strong></p><p><strong> endif;</strong></p><p><strong></strong></p><p><strong> if($Restrictions['Country']['Strict'] && $Code == 'XX'):</strong></p><p><strong> $siteBlocked = true;</strong></p><p><strong> elseif($Restrictions['Country']['Action'] == '1' && isset($Restrictions['Country']['List'][$Code])):</strong></p><p><strong> $siteBlocked = true;</strong></p><p><strong> elseif($Restrictions['Country']['Action'] == '2' && !isset($Restrictions['Country']['List'][$Code])):</strong></p><p><strong> $siteBlocked = true;</strong></p><p><strong> endif;</strong></p><p><strong>endif;</strong></p><p><strong></strong></p><p><strong>require 'Azure.User.php';</strong></p><p><strong> USER::CHECK();</strong></p><p><strong></strong></p><p><strong>if(($Restrictions['Maintenance']['Active'] && ((USER::$LOGGED && USER::$Data['Rank'] < $Restrictions['Maintenance']['Except']) || !USER::$LOGGED)) && !isset($_uMaintenance)):</strong></p><p><strong> require Files . $Config['Lang'] . DS . 'HTMLs' . DS . 'Maintenance.html';</strong></p><p><strong> exit;</strong></p><p><strong>endif;</strong></p><p><strong></strong></p><p><strong>//LOL</strong></p><p><strong>header('X-Origin-Id: resin-fe-4');</strong></p><p><strong></strong></p><p><strong>###############################LoadFILES###################################</strong></p><p><strong>DEFINE('SCRIPT', Files . $Config['Lang'] . DS . 'Scripts' . DS);</strong></p><p><strong>DEFINE('HEADER', Files . $Config['Lang'] . DS . 'Templates' . DS . 'Headers' . DS);</strong></p><p><strong>DEFINE('FOOTER', Files . $Config['Lang'] . DS . 'Templates' . DS . 'Footers' . DS);</strong></p><p><strong>DEFINE('HTML', Files . $Config['Lang'] . DS . 'HTMLs' . DS);</strong></p><p><strong>DEFINE('ACP', Files . $Config['Lang'] . DS . 'ACP' . DS);</strong></p><p><strong>?>[/spoiler]</strong></p></blockquote><p></p>
[QUOTE="JordanB, post: 367285, member: 65658"] I'm getting this error, but I can't seem to see the problem? Error; [B]Parse error[/B]: syntax error, unexpected '[', expecting ')' in [B]C:\xampp\KERNEL-XDRCMS\Init.php[/B] on line [B]61 Can anybody spot the error? I'll include code to both config and init.php [IMG]https://i.gyazo.com/c7248a0a6f31608675747830015af287.png[/IMG] Line 61; [spoiler]$_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? str_replace(['<', '>', '"', '\'', '\\'], ['<', '>', '"', ''', '\'], $_SERVER['HTTP_USER_AGENT']) : '';[/spoiler] Would be a big help! Config: [spoiler] <?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, // [URL='http://www.example.com']www.example.com[/URL] '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]tuemail@gmail.com[/EMAIL]', '']; ########## 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' => '[URL]http://www.facebook.com/habboLuxia.cf[/URL]' ]; ########## 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; ?>[/spoiler] Init.php: [spoiler] <?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(['<', '>', '"', '\'', '\\'], ['<', '>', '"', ''', '\'], $_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['\\'] = '\'; 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('[URL]http://api.hostip.info/country.php?ip=[/URL]' . $_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); ?>[/spoiler][/B] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
ERROR, HELP?
Top