<?php
require_once 'application/class/class_ManageSession.php';

global $connecteur;

$rayon = getValue('rayon');

$rayons = explode('SpliterRayon', $rayon);

$obj_xml = new GenXslt(true);

$i = 0; 
$libelleRayon = ''; 

foreach($rayons as $ray)
{
    $rayonSql = SqlArticle::rqGetLibelleRayon($ray)->Trouve1();

    if(trim($rayonSql['LIBRAYON']) != '')
    {
        $i++; 
        $libelleRayon .='<span ';
        if(BoolSql($rayonSql['AUTHCLIC']))
            {
                $libelleRayon.= "onclick=\"setValueForElement(\\'filtre_rayon_panel\\',\\'NIV_".$rayonSql["NIVRAYON"]."_".$ray."\\'); document.getElementById(\\'btn_recherche_panel_rayon\\').click();supprimerElemRecherche();\"";
            }   
        if($i == 1)
        {
            $libelleRayon .= '>'.str_replace("'","\\'",$rayonSql['LIBRAYON']).'</span>';
        }
        else
        {
            $libelleRayon .= '> >> '.str_replace("'","\\'",$rayonSql['LIBRAYON']).'</span>';
        }
    }
}

echo "
var el = document.getElementById('ariane".getValue('codeArt')."');
el.innerHTML  = '".$libelleRayon."';
";
