Pages vues depuis 25/05/2001 : 108 397 156
Index du forum »» Thèmes Dynamic »» un header différent selon la page
<?PHP
global $idrubric;
if (($idrubric!='' || $idrubric!=0) && file_exists("images/banners/".$idrubric.".gif")){
echo "<img src='/images/banners/".$idrubric.".gif' alt='' border='0' />";
}
else
echo "<img src='/images/banners/def.gif' alt='' border='0' />";
?>
<?php
/************************************************************************/
/* DUNE by NPDS */
/* =========================== */
/* */
/* DYNAMIC THEME engine for NPDS */
/* NPDS Copyright (c) 2002-2009 */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
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")) {$rep="default";}
else {
echo "header.html manquant / not find !<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));}
}
?>
Message édité par : colonelwog / 18-11-2010 09:05