plxPlugins->callHook('Index')); # Chargement du fichier de langue loadLang(PLX_CORE.'lang/'.$plxMotor->aConf['default_lang'].'/core.php'); $plxMotor->prechauffage(); $plxMotor->demarrage(); # Creation de l'objet d'affichage $plxShow = plxShow::getInstance(); # On démarre la bufferisation ob_start(); ob_implicit_flush(0); # Traitements du thème if($plxMotor->style == '' or !is_dir(PLX_ROOT.'themes/'.$plxMotor->style)) { header('Content-Type: text/plain'); echo L_ERR_THEME_NOTFOUND.' ('.PLX_ROOT.'themes/'.$plxMotor->style.') !'; } elseif(file_exists(PLX_ROOT.'themes/'.$plxMotor->style.'/'.$plxMotor->template)) { # On impose le charset header('Content-Type: text/html; charset='.PLX_CHARSET); # Insertion du template include(PLX_ROOT.'themes/'.$plxMotor->style.'/'.$plxMotor->template); } else { header('Content-Type: text/plain'); echo L_ERR_FILE_NOTFOUND.' ('.PLX_ROOT.'themes/'.$plxMotor->style.'/'.$plxMotor->template.') !'; } # Récuperation de la bufférisation $output = ob_get_clean(); # Hooks spécifiques au thème $output = str_replace('', $plxShow->callHook('ThemeEndHead', false).'', $output); $output = str_replace('', $plxShow->callHook('ThemeEndBody', false).'', $output); # Hook Plugins eval($plxMotor->plxPlugins->callHook('IndexEnd')); # On applique la réécriture d'url si nécessaire if($plxMotor->aConf['urlrewriting']) { $output = plxUtils::rel2abs($plxMotor->aConf['racine'], $output); } # On applique la compression gzip si nécessaire et disponible if($plxMotor->aConf['gzip']) { if($encoding=plxUtils::httpEncoding()) { header('Content-Encoding: '.$encoding); echo("\x1f\x8b\x08\x00\x00\x00\x00\x00"); $size = strlen($output); $output = gzcompress($output, 9); $output = substr($output, 0, $size); } } # Restitution écran echo $output; exit; ?>