function BOUCLE_annonces_sitehtml_d7ab7eee0b09f43b71ae8cf8a6406a91(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'syndic';
        $command['id'] = '_annonces_site';
        $command['from'] = array('syndic' => 'spip_syndic', 'L1' => 'spip_mots_liens', 'L2' => 'spip_mots');
        $command['type'] = array();
        $command['groupby'] = array("syndic.id_syndic");
        $command['select'] = array("0+syndic.nom_site AS num", "syndic.id_syndic", "syndic.id_rubrique", "syndic.url_site", "syndic.nom_site", "syndic.descriptif");
        $command['orderby'] = array('num');
        $command['where'] = array(quete_condition_statut('syndic.statut', 'publie,prop', 'publie', ''), array('=', 'L2.titre', "'Annonce'"));
        $command['join'] = array('L1' => array('syndic', 'id_objet', 'id_syndic', 'L1.objet=' . sql_quote('site')), 'L2' => array('L1', 'id_mot'));
        $command['limit'] = '';
        $command['having'] = array();
    }
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-annonces.html', 'html_d7ab7eee0b09f43b71ae8cf8a6406a91', '_annonces_site', 1, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            $t0 .= '
            <li class="annonce">
            ' . (!is_array($l = quete_logo('id_syndic', 'ON', $Pile[$SP]['id_syndic'], '', 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="' . generer_url_entite($Pile[$SP]['id_syndic'], 'site', '', '', $connect ? $connect : NULL) . '"' . (calcul_exposer($Pile[$SP]['id_syndic'], 'id_syndic', $Pile[0], $Pile[$SP]['id_rubrique'], 'id_syndic', '') ? ' class="' . 'on' . '"' : '') . (($t2 = strval(interdire_scripts(attribut_html(typo(supprimer_numero(calculer_url($Pile[$SP]['url_site'], $Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $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_syndic', 'ON', $Pile[$SP]['id_syndic'], '', 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(calculer_url($Pile[$SP]['url_site'], $Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $connect, $Pile[0])))), 'title', interdire_scripts(attribut_html(typo(supprimer_numero(calculer_url($Pile[$SP]['url_site'], $Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $connect, $Pile[0])))) . '
				</a>

			' : '<p>
                ' . (($t2 = strval(interdire_scripts(typo(supprimer_numero(calculer_url($Pile[$SP]['url_site'], $Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $connect, $Pile[0])))) !== '' ? '<big style="text-align:center;"><a href="' . generer_url_entite($Pile[$SP]['id_syndic'], 'site', '', '', $connect ? $connect : NULL) . '"' . (($t3 = strval(interdire_scripts(attribut_html(propre($Pile[$SP]['descriptif'], $connect, $Pile[0]))))) !== '' ? ' title="' . $t3 . '"' : '') . ' style="text-align:center;">' . $t2 . '</a></big>' : '') . '
                <br />
                </p>

			') . '
          	</li>
            ';
        }
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_annonces_site @ squelettes/inc/inc-annonces.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
function BOUCLE_auteur_principalhtml_ce97d1249b67fffb20134bd49b8a9e29(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'auteurs';
        $command['id'] = '_auteur_principal';
        $command['from'] = array('auteurs' => 'spip_auteurs');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("auteurs.id_auteur", "auteurs.lang", "auteurs.nom", "auteurs.bio", "auteurs.url_site", "auteurs.nom_site", "auteurs.email");
        $command['orderby'] = array();
        $command['join'] = array();
        $command['limit'] = '';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('auteurs.statut', '!5poubelle', '!5poubelle', ''), array('=', 'auteurs.id_auteur', sql_quote(@$Pile[0]['id_auteur'], '', 'bigint(21) NOT NULL AUTO_INCREMENT')));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/auteur.html', 'html_ce97d1249b67fffb20134bd49b8a9e29', '_auteur_principal', 1, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            $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(supprimer_numero($Pile[$SP]['nom']), "TYPO", $connect, $Pile[0]))) . ' - [' . interdire_scripts(textebrut(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0]))) . ']</title>
	' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-meta') . ', array(\'id_auteur\' => ' . argumenter_squelette($Pile[$SP]['id_auteur']) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/auteur.html\',\'html_ce97d1249b67fffb20134bd49b8a9e29\',\'\',7,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
	<link rel="alternate" type="application/rss+xml" title="' . interdire_scripts(textebrut(typo(supprimer_numero($Pile[$SP]['nom']), "TYPO", $connect, $Pile[0]))) . '" href="' . interdire_scripts(parametre_url(generer_url_public('backend', ''), 'id_auteur', $Pile[$SP]['id_auteur'])) . '" />
	' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('styles') . ', array(\'id_auteur\' => ' . argumenter_squelette($Pile[$SP]['id_auteur']) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/auteur.html\',\'html_ce97d1249b67fffb20134bd49b8a9e29\',\'\',9,$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']) . ' auteur aut' . $Pile[$SP]['id_auteur'] . '">
<div id="page" class="auteur">

<!-- *****************************************************************
	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_auteur\' => ' . argumenter_squelette($Pile[$SP]['id_auteur']) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/auteur.html\',\'html_ce97d1249b67fffb20134bd49b8a9e29\',\'\',19,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>

<!-- *****************************************************************
	Contenu principal (centre)
	Main content (center) 
    ************************************************************* -->
	<div id="bloc-contenu">
		<div class="cartouche">
		' . (($t1 = strval(filtrer('image_graver', filtrer('image_reduire', !is_array($l = quete_logo('id_auteur', 'ON', $Pile[$SP]['id_auteur'], '', 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')))) !== '' ? '<span style="float:right;">' . $t1 . '</span>' : '') . '
			<h1 class="">' . interdire_scripts(typo(supprimer_numero($Pile[$SP]['nom']), "TYPO", $connect, $Pile[0])) . '</h1>
			<div class="texte">
				' . (($t1 = strval(interdire_scripts(propre($Pile[$SP]['bio'], $connect, $Pile[0])))) !== '' ? '<div  class="bio">' . $t1 . '</div>' : '') . '
				' . (($t1 = strval(calculer_url($Pile[$SP]['url_site'], '', 'url', $connect))) !== '' ? '<b>' . interdire_scripts(typo(supprimer_numero(calculer_url($Pile[$SP]['url_site'], $Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $connect, $Pile[0])) . ' : <a href="' . $t1 . ('">' . calculer_url($Pile[$SP]['url_site'], '', 'url', $connect) . '</a></b><br />') : '') . '
				' . (($t1 = strval(interdire_scripts(calculer_notes()))) !== '' ? $t1 . '<br />' : '') . '
				<br />
				' . (($t1 = strval(executer_balise_dynamique('FORMULAIRE_ECRIRE_AUTEUR', array($Pile[$SP]['id_auteur'], @$Pile[0]['id_article'], $Pile[$SP]['email']), array('squelettes/auteur.html', 'html_ce97d1249b67fffb20134bd49b8a9e29', '_auteur_principal', 27, $GLOBALS['spip_lang'])))) !== '' ? '<h2 id="message">' . _T('public|spip|ecrire:info_envoyer_message_prive') . '</h2>' . $t1 : '') . '
			</div><!-- texte -->
		</div><!-- cartouche -->
		<!-- Articles de l\'auteur -->
		<h2>' . _T('public|spip|ecrire:articles_auteur') . '</h2>
		' . (($t1 = BOUCLE_articleshtml_ce97d1249b67fffb20134bd49b8a9e29($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? $t1 : '
		') . '
	</div><!-- bloc-contenu -->

<!-- *****************************************************************
	Menus contextuels (droite)
	Contextual menus (right) 
    ************************************************************* -->
	<div id="encart">
	' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-annonces') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/auteur.html\',\'html_ce97d1249b67fffb20134bd49b8a9e29\',\'\',53,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>

		' . (($t1 = BOUCLE_auteurshtml_ce97d1249b67fffb20134bd49b8a9e29($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
		<!-- Tous les auteurs -->
			<div class="menu">
				<ul class="titre">
					<li><b>' . _T('public|spip|ecrire:icone_tous_auteur') . '</b>
						' . $t1 . '
					</li>
				</ul>
			</div><!-- menu -->
		' : '') . '
	</div><!-- encart -->
' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-menu') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/auteur.html\',\'html_ce97d1249b67fffb20134bd49b8a9e29\',\'\',72,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-bas') . ', array(\'id_auteur\' => ' . argumenter_squelette($Pile[$SP]['id_auteur']) . ',
	\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/auteur.html\',\'html_ce97d1249b67fffb20134bd49b8a9e29\',\'\',73,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
</div><!-- page -->

</body>
</html>
';
        }
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_auteur_principal @ squelettes/auteur.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
示例#3
0
function inc_lien($lien, $texte = '', $class = '', $title = '', $hlang = '', $rel = '', $connect = '')
{
    # Tests TW
    if (!$GLOBALS['tw']) {
        return inc_lien_dist($lien, $texte, $class, $title, $hlang, $rel, $connect);
    }
    static $u = null;
    if (!$u) {
        $u = url_de_base();
    }
    $typo = false;
    // Si une langue est demandee sur un raccourci d'article, chercher
    // la traduction ;
    // - [{en}->art2] => traduction anglaise de l'article 2, sinon art 2
    // - [{}->art2] => traduction en langue courante de l'art 2, sinon art 2
    if ($hlang and $match = typer_raccourci($lien)) {
        @(list($type, , $id, , $args, , $ancre) = $match);
        if ($id_trad = sql_getfetsel('id_trad', 'spip_articles', "id_article={$id}") and $id_dest = sql_getfetsel('id_article', 'spip_articles', "id_trad={$id_trad} AND lang=" . sql_quote($hlang))) {
            $lien = "{$type}{$id_dest}";
        } else {
            $hlang = '';
        }
    }
    $mode = ($texte and $class) ? 'url' : 'tout';
    $lien = calculer_url($lien, $texte, $mode, $connect);
    if ($mode === 'tout') {
        $texte = $lien['titre'];
        if (!$class and isset($lien['class'])) {
            $class = $lien['class'];
        }
        $lang = isset($lien['lang']) ? $lien['lang'] : '';
        $mime = isset($lien['mime']) ? " type='" . $lien['mime'] . "'" : "";
        $lien = $lien['url'];
    }
    $lien = trim($lien);
    if (strncmp($lien, "#", 1) == 0) {
        # ancres pures (internes a la page)
        $class = 'spip_ancre';
    } elseif (strncasecmp($lien, 'mailto:', 7) == 0) {
        # pseudo URL de mail
        $class = "spip_mail";
    } elseif (strncmp($texte, '<html>', 6) == 0) {
        # cf traiter_lien_explicite
        $class = "spip_url spip_out";
    } elseif (!$class) {
        $class = "spip_out";
    }
    # si pas spip_in|spip_glossaire
    // Si l'objet n'est pas de la langue courante, on ajoute hreflang
    if (!$hlang and $lang !== $GLOBALS['spip_lang']) {
        $hlang = $lang;
    }
    $lang = $hlang ? " hreflang='{$hlang}'" : '';
    if ($title) {
        $title = ' title="' . attribut_html($title) . '"';
    }
    // rel=external pour les liens externes
    if ((strncmp($lien, 'http://', 7) == 0 or strncmp($lien, 'https://', 8) == 0) and strncmp("{$lien}/", $u, strlen($u)) != 0) {
        $rel = trim("{$rel} external");
    }
    if ($rel) {
        $rel = " rel='{$rel}'";
    }
    if (traiter_modeles($texte, false, $echapper ? 'TYPO' : '', $connect) == $texte) {
        $texte = typo($texte, true, $connect);
        $lien = "<a href=\"" . str_replace('"', '&quot;', $lien) . "\" class='{$class}'{$lang}{$title}{$rel}{$mime}>{$texte}</a>";
        return $lien;
    }
    # ceci s'execute heureusement avant les tableaux et leur "|".
    # Attention, le texte initial est deja echappe mais pas forcement
    # celui retourne par calculer_url.
    # Penser au cas [<imgXX|right>->URL], qui exige typo('<a>...</a>')
    $lien = "<a href=\"" . str_replace('"', '&quot;', $lien) . "\" class='{$class}'{$lang}{$title}{$rel}{$mime}>{$texte}</a>";
    return typo($lien, true, $connect);
}
示例#4
0
文件: lien.php 项目: rhertzog/lcs
function inc_lien_dist($lien, $texte='', $class='', $title='', $hlang='', $rel='', $connect='')
{
	// Si une langue est demandee sur un raccourci d'article, chercher
	// la traduction ;
	// - [{en}->art2] => traduction anglaise de l'article 2, sinon art 2
	// - [{}->art2] => traduction en langue courante de l'art 2, sinon art 2
	if ($hlang
	AND $match = typer_raccourci($lien)) { 
		@list($type,,$id,,$args,,$ancre) = $match; 
		if ($id_trad = sql_getfetsel('id_trad', 'spip_articles', "id_article=$id")
		AND $id_dest = sql_getfetsel('id_article', 'spip_articles',
			"id_trad=$id_trad  AND statut<>'refuse' AND lang=" . sql_quote($hlang))
		)
			$lien = "$type$id_dest";
		else
			$hlang = '';
	}

	$mode = ($texte AND $class) ? 'url' : 'tout';
	$lien = calculer_url($lien, $texte, $mode, $connect);
	if ($mode === 'tout') {
		$texte = $lien['titre'];
		if (!$class AND isset($lien['class'])) $class = $lien['class'];
		$lang = isset($lien['lang']) ?$lien['lang'] : '';
		$mime = isset($lien['mime']) ? " type='".$lien['mime']."'" : "";
		$lien = $lien['url'];
	}
	if (substr($lien,0,1) == '#')  # ancres pures (internes a la page)
		$class = 'spip_ancre';
	elseif (preg_match('/^\s*mailto:/',$lien)) # pseudo URL de mail
		$class = "spip_mail";
	elseif (preg_match('/^<html>/',$texte)) # cf traiter_lien_explicite
		$class = "spip_url spip_out";
	elseif (!$class) {
	        # spip_out sur les URLs externes
	        if (preg_match(',^\w+://,iS', $lien)
	        AND strncasecmp($lien, url_de_base(), strlen(url_de_base()))
	        )
                $class = "spip_out"; # si pas spip_in|spip_glossaire
        }

	// Si l'objet n'est pas de la langue courante, on ajoute hreflang
	if (!$hlang AND $lang!==$GLOBALS['spip_lang'])
		$hlang = $lang;

	$lang = ($hlang ? " hreflang='$hlang'" : '');

	if ($title)
		$title = ' title="'.texte_backend($title).'"';
	else
		$title = ''; // $title peut etre 'false'

	// rel=external pour les liens externes
	if (preg_match(',^https?://,S', $lien)
	AND false === strpos("$lien/", url_de_base()))
		$rel = trim("$rel external");
	if ($rel) $rel = " rel='$rel'";

	$lien = "<a href=\"".str_replace('"', '&quot;', $lien)."\" class='$class'$lang$title$rel$mime>$texte</a>";

	# ceci s'execute heureusement avant les tableaux et leur "|".
	# Attention, le texte initial est deja echappe mais pas forcement
	# celui retourne par calculer_url.
	# Penser au cas [<imgXX|right>->URL], qui exige typo('<a>...</a>')
	return typo($lien, true, $connect);
}
示例#5
0
文件: lien.php 项目: loorenzooo/aslfc
function inc_lien_dist($lien, $texte = '', $class = '', $title = '', $hlang = '', $rel = '', $connect = '', $env = array())
{
    static $u = null;
    if (!$u) {
        $u = url_de_base();
    }
    $typo = false;
    // Si une langue est demandee sur un raccourci d'article, chercher
    // la traduction ;
    // - [{en}->art2] => traduction anglaise de l'article 2, sinon art 2
    // - [{}->art2] => traduction en langue courante de l'art 2, sinon art 2
    // s'applique a tout objet traduit
    if ($hlang and $match = typer_raccourci($lien)) {
        @(list($type, , $id, , $args, , $ancre) = $match);
        $trouver_table = charger_fonction('trouver_table', 'base');
        $desc = $trouver_table(table_objet($type, $connect), $connect);
        if ($desc and $id_table_objet = $desc['key']['PRIMARY KEY']) {
            $table_objet_sql = $desc['table'];
            if ($row = sql_fetsel('*', $table_objet_sql, "{$id_table_objet}=" . intval($id)) and isset($row['id_trad']) and isset($row['lang']) and $id_dest = sql_getfetsel($id_table_objet, $table_objet_sql, "id_trad=" . intval($row['id_trad']) . " AND lang=" . sql_quote($hlang)) and objet_test_si_publie($type, $id_dest)) {
                $lien = "{$type}{$id_dest}";
            } else {
                $hlang = '';
            }
        } else {
            $hlang = '';
        }
    }
    $mode = ($texte and $class) ? 'url' : 'tout';
    $lien = calculer_url($lien, $texte, $mode, $connect);
    if ($mode === 'tout') {
        $texte = $lien['titre'];
        if (!$class and isset($lien['class'])) {
            $class = $lien['class'];
        }
        $lang = isset($lien['lang']) ? $lien['lang'] : '';
        $mime = isset($lien['mime']) ? " type='" . $lien['mime'] . "'" : "";
        $lien = $lien['url'];
    }
    $lien = trim($lien);
    if (strncmp($lien, "#", 1) == 0) {
        # ancres pures (internes a la page)
        $class = 'spip_ancre';
    } elseif (strncasecmp($lien, 'mailto:', 7) == 0) {
        # pseudo URL de mail
        $class = "spip_mail";
    } elseif (strncmp($texte, '<html>', 6) == 0) {
        # cf traiter_lien_explicite
        $class = "spip_url spip_out";
    } elseif (!$class) {
        $class = "spip_out";
    }
    # si pas spip_in|spip_glossaire
    // Si l'objet n'est pas de la langue courante, on ajoute hreflang
    if (!$hlang and $lang !== $GLOBALS['spip_lang']) {
        $hlang = $lang;
    }
    $lang = $hlang ? " hreflang='{$hlang}'" : '';
    if ($title) {
        $title = ' title="' . attribut_html($title) . '"';
    } else {
        $title = '';
    }
    // $title peut etre 'false'
    // rel=external pour les liens externes
    if ((strncmp($lien, 'http://', 7) == 0 or strncmp($lien, 'https://', 8) == 0) and strncmp("{$lien}/", $u, strlen($u)) != 0) {
        $rel = trim("{$rel} external");
    }
    if ($rel) {
        $rel = " rel='{$rel}'";
    }
    // si pas de modele dans le texte du lien, on peut juste passer typo sur le texte, c'est plus rapide
    // les rares cas de lien qui encapsule un modele passe en dessous, c'est plus lent
    if (traiter_modeles($texte, false, '', $connect, null, $env) == $texte) {
        $texte = typo($texte, true, $connect, $env);
        $lien = "<a href=\"" . str_replace('"', '&quot;', $lien) . "\" class='{$class}'{$lang}{$title}{$rel}" . (isset($mime) ? $mime : '') . ">{$texte}</a>";
        return $lien;
    }
    # ceci s'execute heureusement avant les tableaux et leur "|".
    # Attention, le texte initial est deja echappe mais pas forcement
    # celui retourne par calculer_url.
    # Penser au cas [<imgXX|right>->URL], qui exige typo('<a>...</a>')
    $lien = "<a href=\"" . str_replace('"', '&quot;', $lien) . "\" class='{$class}'{$lang}{$title}{$rel}{$mime}>{$texte}</a>";
    $res = typo($lien, true, $connect, $env);
    // dans ce cas, echapons le resultat du modele pour que propre etc ne viennent pas pouicher le html
    $res = echappe_html("<html>{$res}</html>");
    return $res;
}
function BOUCLE_siteshtml_bb1fa8f06f75cd5c61b4de0a063c1a54(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'syndic';
        $command['id'] = '_sites';
        $command['from'] = array('syndic' => 'spip_syndic');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("syndic.nom_site", "syndic.url_site", "syndic.descriptif");
        $command['orderby'] = array('syndic.nom_site');
        $command['join'] = array();
        $command['limit'] = '0,5';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('syndic.statut', 'publie,prop', 'publie', ''), array('=', 'syndic.syndication', "'non'"), array('=', 'syndic.id_rubrique', sql_quote(@$Pile[0]['id_rubrique'], '', 'bigint(21) NOT NULL DEFAULT \'0\'')));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-syndic.html', 'html_bb1fa8f06f75cd5c61b4de0a063c1a54', '_sites', 52, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            $t0 .= '
            <li>
                ' . (($t1 = strval(interdire_scripts(typo(supprimer_numero(calculer_url($Pile[$SP]['url_site'], $Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $connect, $Pile[0])))) !== '' ? '<a href="' . calculer_url($Pile[$SP]['url_site'], '', 'url', $connect) . '" ' . (($t2 = strval(interdire_scripts(attribut_html(supprimer_tags(propre($Pile[$SP]['descriptif'], $connect, $Pile[0])))))) !== '' ? 'title="' . $t2 . '"' : '') . ' class="spip_out">' . $t1 . '</a>' : '') . '
            </li>            
            ';
        }
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_sites @ squelettes/inc/inc-syndic.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}