error_reporting(E_ERROR); ini_set("display_errors", "on"); date_default_timezone_set('Europe/Lisbon'); if(isset($_SERVER['DOCUMENT_ROOT'])) { $root_path = $_SERVER['DOCUMENT_ROOT'] .'/'; } else { $root_path = $_SERVER['HOME'] ."/public_html/"; } require $root_path .'functions.php'; require $root_path. 'requiredDefines.php'; require $root_path. 'config.php'; $system_path = $root_path. "system/"; $library_include_path = $root_path ."system/library/"; if(!defined("DEF_CONTROLLER")){ define("DEF_CONTROLLER","site"); } require $system_path.'config/generalDefines.php'; set_include_path($library_include_path . PATH_SEPARATOR . get_include_path()); $model = ModelBase::Singleton(); $mpaginas = $model->loadModulo("paginas"); $mConfig = $model->loadModulo("config"); $url_completo = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; list($url_comp, $url_get) = explode("?", $url_completo); $url = explode('/', $url_comp); $website = $url[0]; $herois = $url[1]; if (!empty($url[2]) ) { $ling = $url[2]; } else { $ling = "pt"; } $tipo = $url[3]; $id = $url[4]; $ldata = $mConfig->lingua($ling); $campo = $ldata["ref"]; $lg_activo = $ldata["lingua"]; ?> include("header.php"); ?>
include("menu.php"); if(!empty($tipo) && file_exists( $tipo .".php")) { include($tipo . ".php"); } else { include("home.php"); } include("footer.php"); ?>