
Forum » » Thèmes Dynamic » » un header différent selon la page
Posté : 20-05-2010 11:03 
<?php
/********************************************************************* ***/
/* DUNE by NPDS   ; & nbsp; &n bsp; */
/* =========================== & nbsp; &n bsp; */
/* &nb sp; &nbs p;   ; & nbsp; */
/* DYNAMIC THEME engine for NPDS &n bsp; &nb sp; &nbs p; */
/* NPDS Copyright (c) 2002-2009 &n bsp; &nb sp; */
/* &nb sp; &nbs p;   ; & nbsp; */
/* This program is free software. You can& nbsp;redistribute it and/or modify */
/* it under the terms of the GNU Gene ral Public License as published by */
/* the Free Software Foundation; either version 2 of the License.   ;*/
/************************************************************************/
br />global $theme,$id;; $rep=false;
if (file_exists("themes/".$theme."/html/header.html")) {$rep=$theme;}
elseif (file_exists("themes/default/html/header.html")) {$rep="default";}
elseif (file_exists("themes/default/html/header1.html")) an style="color: #007700">{ $rep="default";}
else {
echo "header.html manquant / not f ind !<br />";
die();
}
if ($rep) {
if (!$ContainerGlobal)
echo "<body !onload!=\"init( );\" class=\"body\">\n";
else {
echo "<body !onload!=\"init( );\">";
echo $ContainerGlobal;
}
ob_start();
function url_actuelle()
{
return "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
}
if ($_SERVER["REQUEST_URI"]=index.php){
!include!("themes/".$rep."/html/header.html");
$Xcontent=ob_get_contents();
ob_end_clean();
echo meta_lang(aff_langue($Xcontent));}
elseif ($_SERVER["REQUEST_URI"]!=index.php){
!include!("themes/".$rep."/html/header1.html");
$Xcontent=ob_get_contents();
ob_end_clean();
echo meta_lang(aff_langue($Xcontent));}
}
?>
Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=24363&forum=48