$lC_Cache = new lC_Cache(); // include the database class require $lC_Vqmod->modCheck(DIR_FS_CATALOG . 'includes/classes/database.php'); // make a connection to the database... now $lC_Database = lC_Database::connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD); $lC_Database->selectDatabase(DB_DATABASE); // set the application parameters $Qcfg = $lC_Database->query('select configuration_key as cfgKey, configuration_value as cfgValue from :table_configuration'); $Qcfg->bindTable(':table_configuration', TABLE_CONFIGURATION); $Qcfg->setCache('configuration'); $Qcfg->execute(); while ($Qcfg->next()) { if (!defined($Qcfg->value('cfgKey'))) { define($Qcfg->value('cfgKey'), $Qcfg->value('cfgValue')); } } $Qcfg->freeResult(); // include functions require $lC_Vqmod->modCheck(DIR_FS_CATALOG . 'includes/functions/general.php'); require $lC_Vqmod->modCheck(DIR_FS_CATALOG . 'includes/functions/html_output.php'); // include directory listing class require $lC_Vqmod->modCheck(DIR_FS_CATALOG . 'includes/classes/directory_listing.php'); // include and start the services require $lC_Vqmod->modCheck(DIR_FS_CATALOG . 'includes/classes/services.php'); $lC_Services = new lC_Services(); $lC_Services->startServices(); // instantiate the addons class require_once $lC_Vqmod->modCheck(DIR_FS_CATALOG . 'includes/classes/addons.php'); $lC_Addons = new lC_Addons(); setLocalization();
} session_start(); require_once 'functions/sanitize.php'; require_once 'functions/assoc.php'; require_once 'functions/locale.php'; if (isset($_GET['locale'])) { $lang = $_GET['locale']; $_SESSION['locale'] = $lang; setcookie("locale", $lang, time() + 3600 * 24 * 30); } else { if (isset($_POST["locale"])) { $lang = $_POST['locale']; $_SESSION['locale'] = $lang; setcookie("locale", $lang, time() + 3600 * 24 * 30); } else { if (isset($_SESSION['locale'])) { $lang = $_SESSION['locale']; } else { if (isset($_COOKIE['locale'])) { $lang = $_COOKIE['locale']; } else { $lang = 'es'; } } } } setLocalization($lang); date_default_timezone_set($configure['place']); if ($configure['database_activate'] == false) { include $configurePath['app'] . '/includes/errors/nodatabase.php'; }