# Smarty and PEAR paths
ini_set('include_path', $_SERVER['DOCUMENT_ROOT'] . '/libs/pear/:' . $_SERVER['DOCUMENT_ROOT'] . '/libs/smarty/');
# Detect production or test site
if ($_SERVER['SERVER_NAME'] == "test.amiibogalaxy.com") {
define(PRODUCTION, false);
} else {
define(PRODUCTION, true);
}
# Database
require_once 'MDB2.php';
$_CONF['db'] = array(
'config' => array(
'phptype' => 'mysql',
'hostspec' => $_ENV['DATABASE_SERVER'],
'username' => 'u149585042_amiibo',
'password' => '6aQ4jsV?',
'database' => 'u149585042_amiibo',
),
'options' => array(
'ssl' => false,
'debug' => 2
)
);
$mdb2 =& MDB2::connect($_CONF['db']['config'], $_CONF['db']['options']);
if (PEAR::isError($mdb2)) {
die($mdb2->getMessage() . $mdb2->getDebugInfo());
}
$mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC);
$mdb2->loadModule('Extended', null, false);
$mdb2->query("SET NAMES UTF8");
define(AMIIBO, "amiibo");
if (PRODUCTION) {
define(COLLECTIONS, "collections");
define(MESSAGES, "messages");
define(THREADS, "message_threads");
define(USERS, "users");
} else {
define(COLLECTIONS, "collections_test");
define(MESSAGES, "messages_test");
define(THREADS, "message_threads_test");
define(USERS, "users_test");
}
# Smarty
define('SMARTY_DIR', $_SERVER['DOCUMENT_ROOT'] . '/libs/smarty/');
require (SMARTY_DIR . "Smarty.class.php");
$smarty = new Smarty();
$smarty->setTemplateDir($_SERVER['DOCUMENT_ROOT'] . '/templates/');
$smarty->setCompileDir($_SERVER['DOCUMENT_ROOT'] . '/templates/compiled/');
$smarty->setCacheDir($_SERVER['DOCUMENT_ROOT'] . '/templates/cache/');
$smarty->setConfigDir($_SERVER['DOCUMENT_ROOT'] . '/languages/');
//$smarty->compile_check = true;
//$smarty->caching = false;
// $smarty->error_reporting = 2047;
$currency_list = array(
'' => '',
'EUR' => '€',
'USD' => 'US$',
'GBP' => '₤',
'JPY' => '¥',
'AUD' => 'AU$',
'CAD' => 'C$',
);
$smarty->assign("currency_list", $currency_list);
?>
Warning: Undefined variable $mdb2 in /home/u149585042/domains/amiibo.tiamat.studio/public_html/libs/inc.language.php on line 121
Fatal error: Uncaught Error: Call to a member function getOne() on null in /home/u149585042/domains/amiibo.tiamat.studio/public_html/libs/inc.language.php:121
Stack trace:
#0 /home/u149585042/domains/amiibo.tiamat.studio/public_html/index.php(85): require_once()
#1 {main}
thrown in /home/u149585042/domains/amiibo.tiamat.studio/public_html/libs/inc.language.php on line 121