/**
 * Cherche un squelette par rubrique squelette-XX.html ou squelette=XX.html
 *
 * Options de recherche de squelette par le styliseur, appelé par le pipeline 'styliser'
 *
 * @pipeline styliser
 *
 * @param array $flux Données du pipeline
 * @return array       Données du pipeline
 */
function squelettes_par_rubrique_styliser_par_rubrique($flux)
{
    // uniquement si un squelette a ete trouve
    if ($squelette = $flux['data']) {
        $ext = $flux['args']['ext'];
        // On selectionne, dans l'ordre :
        // fond=10
        if ($id_rubrique = $flux['args']['id_rubrique']) {
            $f = "{$squelette}={$id_rubrique}";
            if (@file_exists("{$f}.{$ext}")) {
                $squelette = $f;
            } else {
                $maxiter = 10000;
                // on ne remonte pas au dela en profondeur
                // fond-10 fond-<rubriques parentes>
                do {
                    $f = "{$squelette}-{$id_rubrique}";
                    if (@file_exists("{$f}.{$ext}")) {
                        $squelette = $f;
                        break;
                    }
                } while ($maxiter-- and $id_rubrique = quete_parent($id_rubrique) and $id_rubrique != $flux['args']['id_rubrique']);
            }
            // sauver le squelette
            $flux['data'] = $squelette;
        }
    }
    return $flux;
}
Пример #2
0
function styliser_par_rubrique($flux) {

	// uniquement si un squelette a ete trouve
	if ($squelette = $flux['data']) {
		$ext = $flux['args']['ext'];

		// On selectionne, dans l'ordre :
		// fond=10
		if ($id_rubrique = $flux['args']['id_rubrique']) {
			$f = "$squelette=$id_rubrique";
			if (@file_exists("$f.$ext"))
				$squelette = $f;
			else {
				// fond-10 fond-<rubriques parentes>
				do {
					$f = "$squelette-$id_rubrique";
					if (@file_exists("$f.$ext")) {
						$squelette = $f;
						break;
					}
				} while ($id_rubrique = quete_parent($id_rubrique));
			}
			// sauver le squelette
			$flux['data'] = $squelette;
		}		
	}
	
	return $flux;
}
Пример #3
0
/**
 * Calcul pour savoir si un objet est expose dans le contexte
 * fournit par $reference
 *
 * http://code.spip.net/@calcul_exposer
 *
 * @param int $id
 * @param string $prim
 * @param array $reference
 * @param int $parent
 * @param string $type
 * @param string $connect
 * @return bool|string
 */
function calcul_exposer($id, $prim, $reference, $parent, $type, $connect = '')
{
    static $exposer = array();
    // Que faut-il exposer ? Tous les elements de $reference
    // ainsi que leur hierarchie ; on ne fait donc ce calcul
    // qu'une fois (par squelette) et on conserve le resultat
    // en static.
    if (!isset($exposer[$m = md5(serialize($reference))][$prim])) {
        $principal = isset($reference[$type]) ? $reference[$type] : (isset($reference["@{$type}"]) ? $reference["@{$type}"] : '');
        // le parent fournit en argument est le parent de $id, pas celui de $principal
        // il n'est donc pas utile
        $parent = 0;
        if (!$principal) {
            // regarder si un enfant est dans le contexte, auquel cas il expose peut etre le parent courant
            $enfants = array('id_rubrique' => array('id_article'), 'id_groupe' => array('id_mot'));
            if (isset($enfants[$type])) {
                foreach ($enfants[$type] as $t) {
                    if (isset($reference[$t]) or isset($reference["@{$t}"])) {
                        $type = $t;
                        $principal = isset($reference[$type]) ? $reference[$type] : $reference["@{$type}"];
                        continue;
                    }
                }
            }
        }
        $exposer[$m][$type] = array();
        if ($principal) {
            $principaux = is_array($principal) ? $principal : array($principal);
            foreach ($principaux as $principal) {
                $exposer[$m][$type][$principal] = true;
                if ($type == 'id_mot') {
                    if (!$parent) {
                        $parent = sql_getfetsel('id_groupe', 'spip_mots', "id_mot=" . intval($principal), '', '', '', '', $connect);
                    }
                    if ($parent) {
                        $exposer[$m]['id_groupe'][$parent] = true;
                    }
                } else {
                    if ($type != 'id_groupe') {
                        if (!$parent) {
                            if ($type == 'id_rubrique') {
                                $parent = $principal;
                            }
                            if ($type == 'id_article') {
                                $parent = quete_rubrique($principal, $connect);
                            }
                        }
                        do {
                            $exposer[$m]['id_rubrique'][$parent] = true;
                        } while ($parent = quete_parent($parent, $connect));
                    }
                }
            }
        }
    }
    // And the winner is...
    return isset($exposer[$m][$prim]) ? isset($exposer[$m][$prim][$id]) : '';
}
function BOUCLE_rubrique_principalhtml_0caead67327defaf94febb642f511490(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'rubriques';
        $command['id'] = '_rubrique_principal';
        $command['from'] = array('rubriques' => 'spip_rubriques');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("rubriques.id_rubrique", "rubriques.lang", "rubriques.titre", "rubriques.id_secteur", "rubriques.texte", "rubriques.descriptif");
        $command['orderby'] = array();
        $command['join'] = array();
        $command['limit'] = '';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('rubriques.statut', '!', 'publie', ''), array('=', 'rubriques.id_rubrique', sql_quote(@$Pile[0]['id_rubrique'], '', 'bigint(21) NOT NULL AUTO_INCREMENT')));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/rubrique.html', 'html_0caead67327defaf94febb642f511490', '_rubrique_principal', 1, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        lang_select($GLOBALS['spip_lang']);
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            lang_select_public($Pile[$SP]['lang'], 'oui', $Pile[$SP]['titre']);
            $t0 .= '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) . '" lang="' . spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) . '" dir="' . lang_dir($Pile[$SP]['lang'], 'ltr', 'rtl') . '">
<head>
	<title>[' . interdire_scripts(textebrut(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0]))) . '] : ' . interdire_scripts(entites_html(textebrut(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))))) . '</title>
	' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-meta') . ', array(\'id_rubrique\' => ' . argumenter_squelette($Pile[$SP]['id_rubrique']) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/rubrique.html\',\'html_0caead67327defaf94febb642f511490\',\'\',7,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
	<link rel="alternate" type="application/rss+xml" title="' . _T('public|spip|ecrire:syndiquer_rubrique') . ' : ' . interdire_scripts(entites_html(textebrut(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))))) . '" href="' . interdire_scripts(parametre_url(generer_url_public('backend', ''), 'id_rubrique', $Pile[$SP]['id_rubrique'])) . '" />

	' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('styles') . ', array(\'id_rubrique\' => ' . argumenter_squelette($Pile[$SP]['id_rubrique']) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/rubrique.html\',\'html_0caead67327defaf94febb642f511490\',\'\',10,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
</head>
<body dir="' . lang_dir($Pile[$SP]['lang'], 'ltr', 'rtl') . '" class="' . spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) . ' rubrique sect' . $Pile[$SP]['id_secteur'] . ' ' . BOUCLE_rubriques_bodyhtml_0caead67327defaf94febb642f511490($Cache, $Pile, $doublons, $Numrows, $SP) . ' rub' . $Pile[$SP]['id_rubrique'] . '">
<div id="page" class="rubrique rub' . $Pile[$SP]['id_rubrique'] . '">

<!-- *****************************************************************
	Bandeau, titre du site et menu langue
	Header and main menu (top and right) 
    ************************************************************* -->
	
' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-bandeau') . ', array(\'id_rubrique\' => ' . argumenter_squelette($Pile[$SP]['id_rubrique']) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/rubrique.html\',\'html_0caead67327defaf94febb642f511490\',\'\',20,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>

<!-- *****************************************************************
	Contenu principal (centre)
	Main content (center) 
    ************************************************************* -->
	<div id="bloc-contenu">
		<h5>
		<a href="' . spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'], '.')) . '" title="' . _T('public|spip|ecrire:accueil_site') . ' : ' . interdire_scripts(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0])) . '">' . _T('public|spip|ecrire:accueil_site') . '</a>
    ' . (($t1 = BOUCLE_rubriques_cheminhtml_0caead67327defaf94febb642f511490($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
    ' . $t1 . '
	' : '') . '
		' . (($t1 = strval(interdire_scripts(couper(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])), '60')))) !== '' ? '<b class=\'separateur\'>&gt;</b> ' . $t1 : '') . '
		</h5>
		<div class="ligne-debut"></div><!-- ligne-debut -->
    	' . (($t1 = strval(filtrer('image_graver', filtrer('image_reduire', !is_array($l = quete_logo('id_rubrique', 'ON', $Pile[$SP]['id_rubrique'], quete_parent($Pile[$SP]['id_rubrique']), 0)) ? '' : "<img class=\"spip_logo spip_logos\" alt=\"\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />', '120', '0')))) !== '' ? '<div class="logo-liste-art">
    		' . $t1 . '
    	</div>' : '') . '
    <h1 class="titre-article">' . interdire_scripts(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) . '</h1>
	' . (($t1 = strval(interdire_scripts(($a = filtrer('image_graver', filtrer('image_reduire', propre($Pile[$SP]['texte'], $connect, $Pile[0]), '560', '0')) or is_string($a) and strlen($a)) ? $a : interdire_scripts(propre($Pile[$SP]['descriptif'], $connect, $Pile[0]))))) !== '' ? '<div class="chapo ' . interdire_scripts($Pile[$SP]['texte'] ? '' : '') . '" id="description">
        ' . $t1 . ('
        ' . (($t2 = strval(interdire_scripts(calculer_notes()))) !== '' ? '<div class="notes" style="padding: 0 1.5em;">' . $t2 . '</div>' : '') . '
	</div><!-- chapo -->') : '') . '
	

		' . recuperer_fond('inc/inc-rub-documents', array_merge($Pile[0], array('id_rubrique' => $Pile[$SP]['id_rubrique'])), array('compil' => array('squelettes/rubrique.html', 'html_0caead67327defaf94febb642f511490', '_rubrique_principal', 43, $GLOBALS['spip_lang'])), _request('connect')) . '
	


		' . (($t1 = BOUCLE_type_miniplanhtml_0caead67327defaf94febb642f511490($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? $t1 . '
		' : '


		' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-rub-articles') . ', array_merge(' . var_export($Pile[0], 1) . ',array(\'id_rubrique\' => ' . argumenter_squelette($Pile[$SP]['id_rubrique']) . ',
	\'id_secteur\' => ' . argumenter_squelette($Pile[$SP]['id_secteur']) . ',
	\'self\' => ' . argumenter_squelette(self()) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . ')), array("compil"=>array(\'squelettes/rubrique.html\',\'html_0caead67327defaf94febb642f511490\',\'\',63,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
		
		') . '
		
		<br class="nettoyeur" />
	</div><!-- bloc-contenu -->
	
<!-- *****************************************************************
	Menus contextuels (droite)
	Contextual menus (right) 
    ************************************************************* -->
  <div id="encart">  

' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-annonces') . ', array_merge(' . var_export($Pile[0], 1) . ',array(\'self\' => ' . argumenter_squelette(self()) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . ')), array("compil"=>array(\'squelettes/rubrique.html\',\'html_0caead67327defaf94febb642f511490\',\'\',76,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>

' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-breves') . ', array_merge(' . var_export($Pile[0], 1) . ',array(\'id_rubrique\' => ' . argumenter_squelette($Pile[$SP]['id_rubrique']) . ',
	\'self\' => ' . argumenter_squelette(self()) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . ')), array("compil"=>array(\'squelettes/rubrique.html\',\'html_0caead67327defaf94febb642f511490\',\'\',78,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>

' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-syndic') . ', array_merge(' . var_export($Pile[0], 1) . ',array(\'id_rubrique\' => ' . argumenter_squelette($Pile[$SP]['id_rubrique']) . ',
	\'self\' => ' . argumenter_squelette(self()) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . ')), array("compil"=>array(\'squelettes/rubrique.html\',\'html_0caead67327defaf94febb642f511490\',\'\',80,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
	
  </div><!-- encart -->

<!-- *****************************************************************
	Navigation principale et rubriques (haut et/ou gauche)
	Main and Sections Navigation (top and/orleft) 
    ************************************************************* -->
' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-menu') . ', array(\'id_rubrique\' => ' . argumenter_squelette($Pile[$SP]['id_rubrique']) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/rubrique.html\',\'html_0caead67327defaf94febb642f511490\',\'\',88,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
<!-- *****************************************************************
	Pied de page - Footer
    ************************************************************* -->
' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-bas') . ', array(\'id_rubrique\' => ' . argumenter_squelette($Pile[$SP]['id_rubrique']) . ',
	\'id_secteur\' => ' . argumenter_squelette($Pile[$SP]['id_secteur']) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/rubrique.html\',\'html_0caead67327defaf94febb642f511490\',\'\',92,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>

</div><!-- page -->
</body>
</html>
';
            lang_select();
        }
        lang_select();
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_rubrique_principal @ squelettes/rubrique.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
function BOUCLE_rubriques_editohtml_0167a54ed63f4fd0ee2bbef24b5ac307(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    $in = array();
    if (!is_array($a = @$Pile[0]['lang'])) {
        $in[] = $a;
    } else {
        $in = array_merge($in, $a);
    }
    if (!isset($command['table'])) {
        $command['table'] = 'rubriques';
        $command['id'] = '_rubriques_edito';
        $command['from'] = array('rubriques' => 'spip_rubriques', 'L1' => 'spip_mots_liens', 'L2' => 'spip_mots');
        $command['type'] = array();
        $command['groupby'] = array("rubriques.id_rubrique");
        $command['select'] = array("0+rubriques.titre AS num", "rubriques.titre", "rubriques.id_rubrique", "rubriques.descriptif", "rubriques.texte", "rubriques.lang");
        $command['orderby'] = array('num', 'rubriques.titre');
        $command['join'] = array('L1' => array('rubriques', 'id_objet', 'id_rubrique', 'L1.objet=' . sql_quote('rubrique')), 'L2' => array('L1', 'id_mot'));
        $command['limit'] = '0,10';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('rubriques.statut', '!', 'publie', ''), !(is_array(@$Pile[0]['lang']) ? count(@$Pile[0]['lang']) : strlen(@$Pile[0]['lang'])) ? '' : (is_array(@$Pile[0]['lang']) ? sql_in('rubriques.lang', sql_quote($in)) : array('=', 'rubriques.lang', sql_quote($GLOBALS['spip_lang'], '', 'varchar(10) NOT NULL DEFAULT \'\''))), array('=', 'L2.titre', "'Editorial'"));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-sommaire-edito.html', 'html_0167a54ed63f4fd0ee2bbef24b5ac307', '_rubriques_edito', 8, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        lang_select($GLOBALS['spip_lang']);
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
            $t0 .= '
	  <br class="nettoyeur" />
      ' . (($t1 = strval(interdire_scripts(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))))) !== '' ? '<h3 class="edito-titre"><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))) . '">' . $t1 . '</a></h3>' : '') . '
	  ' . (($t1 = strval(filtrer('image_graver', filtrer('image_reduire', strlen($logo = !is_array($l = quete_logo('id_rubrique', 'ON', $Pile[$SP]['id_rubrique'], quete_parent($Pile[$SP]['id_rubrique']), 0)) ? '' : "<img class=\"spip_logo spip_logos\" alt=\"\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />') ? '<a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))) . '">' . $logo . '</a>' : '', '150', '0')))) !== '' ? '<div class="logo-liste-art">
		' . $t1 . '
	  </div>' : '') . '
      ' . (($t1 = strval(interdire_scripts(($a = propre($Pile[$SP]['descriptif'], $connect, $Pile[0]) or is_string($a) and strlen($a)) ? $a : interdire_scripts(propre($Pile[$SP]['texte'], $connect, $Pile[0]))))) !== '' ? '<div class="chapo ' . interdire_scripts($Pile[$SP]['descriptif'] ? '' : '') . '">' . $t1 . '
        	<div style="clear: both; height: .1em;">&nbsp;</div>
       </div>' : '') . '
';
            lang_select();
        }
        lang_select();
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_rubriques_edito @ squelettes/inc/inc-sommaire-edito.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
function BOUCLE_secteurshtml_7b757a9211fae3c1871c26ec4415f046(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'rubriques';
        $command['id'] = '_secteurs';
        $command['from'] = array('rubriques' => 'spip_rubriques');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("rubriques.id_rubrique", "rubriques.lang", "0+rubriques.titre AS num1", "rubriques.titre");
        $command['orderby'] = array('rubriques.lang DESC', 'num1', 'rubriques.titre');
        $command['join'] = array();
        $command['limit'] = '';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('rubriques.statut', '!', 'publie', ''), array('=', 'rubriques.id_parent', 0), array('=', 'rubriques.lang', sql_quote($GLOBALS['spip_lang'], '', 'varchar(10) NOT NULL DEFAULT \'\'')));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/plan.html', 'html_7b757a9211fae3c1871c26ec4415f046', '_secteurs', 39, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        lang_select($GLOBALS['spip_lang']);
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
            $t0 .= '
			' . (($t1 = strval(traduire_nom_langue(unique(spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang'])), 'langues'))) !== '' ? '<h2>' . $t1 . '</h2>' : '') . '
				<div class="plan-archives" style="clear:both;">
				' . filtrer('image_graver', filtrer('image_reduire', !is_array($l = quete_logo('id_rubrique', 'ON', $Pile[$SP]['id_rubrique'], quete_parent($Pile[$SP]['id_rubrique']), 0)) ? '' : "<img class=\"spip_logo spip_logo_right spip_logos\" alt=\"\" style=\"float:right\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />', '120', '0')) . '
				<h3><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))) . '">' . interdire_scripts(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) . '</a></h3>
				</div>
				' . (($t1 = BOUCLE_articles_racinehtml_7b757a9211fae3c1871c26ec4415f046($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
				<ul>
					' . $t1 . '
				</ul>
				' : '') . '
					' . (($t1 = BOUCLE_rubriqueshtml_7b757a9211fae3c1871c26ec4415f046($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
					<ul>
						' . $t1 . '
					</ul>
				' : '') . '
			';
            lang_select();
        }
        lang_select();
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_secteurs @ squelettes/plan.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
function BOUCLE_annonces_rubhtml_d7ab7eee0b09f43b71ae8cf8a6406a91(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'rubriques';
        $command['id'] = '_annonces_rub';
        $command['from'] = array('rubriques' => 'spip_rubriques', 'L1' => 'spip_mots_liens', 'L2' => 'spip_mots');
        $command['type'] = array();
        $command['groupby'] = array("rubriques.id_rubrique");
        $command['select'] = array("rubriques.date", "rubriques.id_rubrique", "rubriques.descriptif", "rubriques.titre", "rubriques.lang");
        $command['orderby'] = array('rubriques.date DESC');
        $command['join'] = array('L1' => array('rubriques', 'id_objet', 'id_rubrique', 'L1.objet=' . sql_quote('rubrique')), 'L2' => array('L1', 'id_mot'));
        $command['limit'] = '';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('rubriques.statut', '!', 'publie', ''), array('=', 'rubriques.lang', sql_quote($GLOBALS['spip_lang'], '', 'varchar(10) NOT NULL DEFAULT \'\'')), array('=', 'L2.titre', "'Annonce'"));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-annonces.html', 'html_d7ab7eee0b09f43b71ae8cf8a6406a91', '_annonces_rub', 64, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        lang_select($GLOBALS['spip_lang']);
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
            $t0 .= '

            <li class="annonce">
            ' . (!is_array($l = quete_logo('id_rubrique', 'ON', $Pile[$SP]['id_rubrique'], quete_parent($Pile[$SP]['id_rubrique']), 0)) ? '' : "<img class=\"spip_logo spip_logos\" alt=\"\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />' ? '<a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))) . '"' . (($t2 = strval(interdire_scripts(attribut_html(propre($Pile[$SP]['descriptif'], $connect, $Pile[0]))))) !== '' ? ' title="' . $t2 . '"' : '') . ' style="text-align:center;">
				' . inserer_attribut(inserer_attribut(filtrer('image_graver', filtrer('image_reduire', !is_array($l = quete_logo('id_rubrique', 'ON', $Pile[$SP]['id_rubrique'], quete_parent($Pile[$SP]['id_rubrique']), 0)) ? '' : "<img class=\"spip_logo spip_logos\" alt=\"\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />', '150', '0')), 'alt', interdire_scripts(attribut_html(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))), 'title', interdire_scripts(attribut_html(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))) . '
				</a>

			' : '<p>
                ' . (($t2 = strval(interdire_scripts(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))) !== '' ? '<big style="text-align:center;"><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))) . '"' . (($t3 = strval(interdire_scripts(attribut_html(propre($Pile[$SP]['descriptif'], $connect, $Pile[0]))))) !== '' ? ' title="' . $t3 . '"' : '') . ' style="text-align:center;">' . $t2 . '</a></big>' : '') . '
                </p>

			') . '
          	</li>
            ';
            lang_select();
        }
        lang_select();
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_annonces_rub @ squelettes/inc/inc-annonces.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}