";
if($opac_view_filter_class){
$requete="select idlocation, location_libelle, location_pic, css_style from docs_location where location_visible_opac=1
and idlocation in(". implode(",",$opac_view_filter_class->params["nav_sections"]).") order by location_libelle ";
}
else
$requete="select idlocation, location_libelle, location_pic, css_style from docs_location where location_visible_opac=1 order by location_libelle ";
$resultat=mysql_query($requete);
if (mysql_num_rows($resultat)>1) {
print "
";
$npl=0;
while ($r=mysql_fetch_object($resultat)) {
if ($npl==0) print "";
if ($r->location_pic) $image_src = $r->location_pic ;
else $image_src = "images/bibli-small.png" ;
print "
".$r->location_libelle." | ";
$npl++;
if ($npl==$opac_nb_localisations_per_line) {
print "
";
$npl=0;
}
}
if ($npl!=0) {
while ($npl<$opac_nb_localisations_per_line) {
print " | ";
$npl++;
}
print "";
}
print "
";
} else {
if (mysql_num_rows($resultat)) {
$location=mysql_result($resultat,0,0);
$requete="select idsection, section_libelle, section_pic from docs_section, exemplaires where expl_location=$location and section_visible_opac=1 and expl_section=idsection group by idsection order by section_libelle ";
$resultat=mysql_query($requete);
print "
";
$npl=0;
while ($r=mysql_fetch_object($resultat)) {
if ($npl==0) print "";
if ($r->section_pic) $image_src = $r->section_pic ;
else $image_src = "images/rayonnage-small.png" ;
print "
".$r->section_libelle." | ";
$npl++;
if ($npl==$opac_nb_localisations_per_line) {
print "
";
$npl=0;
}
}
if ($npl!=0) {
while ($npl<$opac_nb_localisations_per_line) {
print " | ";
$npl++;
}
print "";
}
print "
";
}
}
print "
";
print "";
?>