3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2007 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined("_ECRIRE_INC_VERSION")) return;
15 # Les information d'une rubrique selectionnee dans le mini navigateur
17 // http://doc.spip.org/@inc_informer_dist
18 function inc_informer_dist($id, $col, $exclus, $rac, $type)
20 global $couleur_foncee,$spip_display,$spip_lang_right ;
22 include_spip('inc/texte');
23 if ($type == "rubrique") {
24 $res = spip_query("SELECT titre, descriptif FROM spip_rubriques WHERE id_rubrique = $id");
25 if ($row = spip_fetch_array($res)) {
26 $titre = typo($row["titre"]);
27 $descriptif = propre($row["descriptif"]);
29 $titre = _T('info_racine_site');
35 if ($type == "rubrique" AND $spip_display != 1 AND $spip_display!=4 AND isset($GLOBALS['meta']['image_process']))
36 if ($GLOBALS['meta']['image_process'] != "non") {
37 $chercher_logo = charger_fonction('chercher_logo', 'inc');
38 if ($res = $chercher_logo($id, 'id_rubrique', 'on')) {
39 list($fid, $dir, $nom, $format) = $res;
40 include_spip('inc/filtres_images');
41 $res = image_reduire("<img src='$fid' alt='' />", 100, 48);
43 $res = "<div style='float: $spip_lang_right; margin-$spip_lang_right: -5px; margin-top: -5px;'>$res</div>";
47 $rac = htmlentities($rac);
49 # ce lien provoque la selection (directe) de la rubrique cliquee
50 # et l'affichage de son titre dans le bandeau
51 $titre = strtr(str_replace("'", "’",
52 str_replace('"', """, textebrut($titre))),
55 return "<div style='display: none;'>"
56 . "<input type='text' id='".$rac."_sel' value='$id' />"
57 . "<input type='text' id='".$rac."_sel2' value=\""
58 . entites_html($titre)
61 . "<div class='arial2' style='padding: 5px; background-color: white; border: 1px solid $couleur_foncee; border-top: 0px;'>"
63 . "<div><p><b>$titre</b></p></div>"
64 . (!$descriptif ?
'' : "<div>$descriptif</div>")
65 . "<div style='text-align: $spip_lang_right;'>"
66 . "<input type='submit' class='fondo' value='"
67 . _T('bouton_choisir')
68 . "'\nonclick=\"aff_selection_titre('$titre',$id,'selection_rubrique','id_parent'); return false;\" />"