[ Index ]
 

Code source de SPIP 1.9.2c

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/ecrire/inc/ -> informer.php (source)

   1  <?php
   2  
   3  /***************************************************************************\
   4   *  SPIP, Systeme de publication pour l'internet                           *
   5   *                                                                         *
   6   *  Copyright (c) 2001-2007                                                *
   7   *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
   8   *                                                                         *
   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  \***************************************************************************/
  12  
  13  if (!defined("_ECRIRE_INC_VERSION")) return;
  14  
  15  # Les information d'une rubrique selectionnee dans le mini navigateur
  16  
  17  // http://doc.spip.org/@inc_informer_dist
  18  function inc_informer_dist($id, $col, $exclus, $rac, $type)
  19  {
  20      global $couleur_foncee,$spip_display,$spip_lang_right ;
  21  
  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"]);
  28          } else {
  29              $titre = _T('info_racine_site');
  30          }
  31      } else
  32          $titre = '';
  33  
  34      $res = '';
  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);
  42              if ($res)
  43                  $res =  "<div style='float: $spip_lang_right; margin-$spip_lang_right: -5px; margin-top: -5px;'>$res</div>";
  44          }
  45      }
  46  
  47      $rac = htmlentities($rac);
  48  
  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("'", "&#8217;",
  52              str_replace('"', "&#34;", textebrut($titre))),
  53                 "\n\r", "  ");
  54  
  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)
  59      . "\" />"
  60      . "</div>"
  61      . "<div class='arial2' style='padding: 5px; background-color: white; border: 1px solid $couleur_foncee; border-top: 0px;'>"
  62      . (!$res ? '' : $res)
  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;\" />"
  69      .  "</div>"
  70      .  "</div>";
  71  }
  72  ?>


Généré le : Wed Nov 21 10:20:27 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics