
Originally Posted by
Tr0ll.™
You don't need any of those 'variables'
I'm cleaning it up as we speak...
Cleaned up 'global.php':
PHP Code:
<?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * *
* BrainCMS - Habbo CMS designed for BrainProject *
* * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copright (c) 2011, nobrain *
* http://mmodev.co.uk *
* * * * * * * * * * * * * * * * * * * * * * * * * * *
* This program is free software: you can *
* redistribute it and/or modify *
* it under the terms of the GNU General Public *
* License as published by *
* the Free Software Foundation, either version 3 *
* of the License, or (at your option) any later *
* version. *
* * * * * * * * * * * * * * * * * * * * * * * * * * */
require_once 'includes/configuration.php';
// Hotel Configuration Definitions (configuration.php)
define(LINK, $config['Site']['Link']);
define(SHORTNAME, $config['Hotel']['Shortname']);
define(LONGNAME, $config['Hotel']['Longname']);
define(WEBBUILD, $config['Hotel']['Webbuild']);
define(VARS, $config['Client']['Variables']);
define(TEXTS, $config['Client']['Flash_texts']);
define(HABBO_SWF, $config['Client']['Habbo_swf']);
define(HOST, $config['MySQL']['Host']);
define(USER, $config['MySQL']['User']);
define(PASS, $config['MySQL']['Pass']);
define(DATA, $config['MySQL']['Data']);
define(ERROR_REPORTING, $config['Brain']['Error_reporting']);
define(MySQL_ERROR, '<center><font size=+4><bold>BrainCMS - MySQL Error</body></font></center><br />');
// Variables
// Error reporting
error_reporting(ERROR_REPORTING); // You can change this in the configuration
// MySQL Connection (Credits to Tr0ll™)
mysql_connect(HOST, USER, PASS) or die(MySQL_ERROR . "<center>Unable to connect to your MySQL Connection Information</center>");
mysql_select_db(DATA) or die(MySQL_ERROR . "<center>Unable to connect to database '" . DATA . "'</center>")
?>