';
//on remplace le dernier slash
function str_lreplace($search, $replace, $subject)
{
$pos = strrpos($subject, $search);
if($pos !== false)
{
$subject = substr_replace($subject, $replace, $pos, strlen($search));
}
return $subject;
}
//si on est une url article on ne prend que l'url de la catégorie
if(strpos($_SERVER['REQUEST_URI'], ".html") != false){
$posDeuxiemeSlash = strpos($_SERVER['REQUEST_URI'], "/", 1);
$urlActuelle = substr($_SERVER['REQUEST_URI'], 0, $posDeuxiemeSlash);
//et si on est pas dans un article
} else {
$urlActuelle = str_lreplace("/", "", $_SERVER['REQUEST_URI']);
}
if(isset($arrayAll)){
if(is_array($arrayAll)){
if(is_array($arrayAll[0]) && is_array($arrayAll[1])){
foreach($arrayAll[0] as $url=>$CatName){
foreach($arrayAll[1] as $url2=>$arrayArticle){
if(isset($passage[$url2])){
break;
}
if($url2 == $urlActuelle){
foreach($arrayArticle as $article){
if($article[0] != $_SERVER['REQUEST_URI']){
echo '
'."\n";
//Galerie photo
if($V['gal_use'] == '1')
echo 'Galerie photos';
$r = mysql_query("SELECT * FROM `cms_p` WHERE `ol`='1' && `USE`='NORMAL' && `menu`='1' && `rub`='0' && `ttamp`<='".time()."' ORDER BY `ttamp` DESC",$V['SQL']);
while($t = sqla($r))
echo ''.$t['titre'].'';
/********************************* V3 MENUS AVEC SOUS CATEGORIES *************************************************/
$categories_tree = buildTreeSansArticle(0,"");
$menu_cat = displayTree($categories_tree);
echo $menu_cat;
/********************************* FIN V3 MENUS AVEC SOUS CATEGORIES ***********************************************/
//Affichage des liens partenaires
// $r = mysql_query("select * from `cms_l` order by `posi` asc, `titre` asc");
// if(mysql_num_rows($r)>='1'){
// echo '';
// while($t = sqla($r)){
// //SI le lien est cloake
// if($t["is_cloaked"]){
// //On l affiche que si c est google
// if(is_google())
// echo ''.$t['ancre'].'';
// }
// //Sinon on l'affiche tout le temps
// else
// echo ''.$t['ancre'].'';
// }
// }
echo '
'.$V['pub4'].'
'."\n".'
'."\n".'
'."\n";
}
echo ' '."\n".'
'."\n";
if(!isset($V['affichage_footer']) || $V['affichage_footer'] == '1'){
/***************** V3 : TITRE DYNAMIQUE ****************/
$originalFooter = $V['footer'];
$dynamicFooter = str_replace_assoc($titleReplaceDatas,$originalFooter);
/***************** V3 : FIN TITRE DYNAMIQUE ****************/
echo ''."\n";
}
//cloaking sous footer
$r = mysql_query("select * from `cms_l` order by `posi` asc, `titre` asc");
if(mysql_num_rows($r)>='1'){
echo '
';
while($t = sqla($r)){
//SI le lien est cloake
if($t["is_cloaked"]){
//On l affiche que si c est google
if(is_google())
echo ''.$t['ancre'].' ';
}
//Sinon on l'affiche tout le temps
else
echo ''.$t['ancre'].' ';
}
echo '