, Gruppo Meta * @package Museo&Web CMS * @category script * @version $Rev: 117 $ * @modifiedby $LastChangedBy: ugoletti $ * @lastmodified $Date: 2007-05-11 17:17:42 +0200 (ven, 11 mag 2007) $ * * This file is based on file that are part Glizy framework (core/pages/bootStrap.php) */ // check if the "cache" folder exists and if it's writable if (!file_exists('cache') || !is_writable('cache')) { showErrorPage('E_ERROR', 'CACHE_ERROR', 'CACHE_ERROR_MESSAGE'); } // check if there are the "install" or "upgrade" folder in production server if ((file_exists('install') || file_exists('upgrade')) && ($_SERVER['HTTP_HOST']!='localhost' && $_SERVER['HTTP_HOST']!='127.0.0.1')) { showErrorPage('E_WARNING', 'INSTALL_FOLDER_ERROR', 'INSTALL_FOLDER_MESSAGE'); } // include the framework files (Glizy core) require_once("core/core.inc.php"); // create the instancd of DB application with name MW $application = &org_glizy_ObjectFactory::createObject('org.glizy.application.ApplicationDB', 'MW'); // run the application $application->run(); // function that show the error page and exit function showErrorPage($code, $description, $message) { // read the browser language $lang = 'it'; if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) { list($langComplete, $lang) = explode(',', $_SERVER["HTTP_ACCEPT_LANGUAGE"]); $lang = substr($lang, 0, 2); } // check if exists a file with locale strings if (file_exists('static/org_minervaeurope_museoweb/pages/locale/'.$lang.'.php')) { include('static/org_minervaeurope_museoweb/pages/locale/'.$lang.'.php'); } else { include('static/org_minervaeurope_museoweb/pages/locale/it.php'); } // compose the error message $e = array(); $e['code'] = $code; $e['description'] = $localeStrings[$description]; $e['message'] = $localeStrings[$message]; // include the error page and exit include('static/org_minervaeurope_museoweb/pages/error.php'); exit(); } ?>