function html_78503d8cb0bd66f2d97f4b9c0f7d329a($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '

' . (($t1 = BOUCLE_art_agendahtml_78503d8cb0bd66f2d97f4b9c0f7d329a($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
<div class="menu" id="menu-agenda">
	<br />
	<h3 class="structure">' . _T('public|spip|ecrire:icone_agenda') . '</h3>
	<ul>
		<li>
			<a class="lien" href="' . interdire_scripts(generer_url_public('agenda', '')) . '" title="' . _T('public|spip|ecrire:icone_agenda') . '">' . _T('public|spip|ecrire:icone_agenda') . '</a>
			<ul>
		' . $t1 . '
			</ul>
		</li>
	</ul>
</div>
' : '') . '

';
    return analyse_resultat_skel('html_78503d8cb0bd66f2d97f4b9c0f7d329a', $Cache, $page, 'squelettes/inc/inc-menu-agenda.html');
}
function html_f3666965c018303599bb64189cbac96c($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = ' <div' . (($t1 = strval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string) 'divclass', null), 'spip-admin-bloc'), true)))) !== '' ? ' class="' . $t1 . '"' : '') . ' id=\'spip-admin\' dir="' . lang_dir(@$Pile[0]['lang'], 'ltr', 'rtl') . '">' . (($t1 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'analyser', null), true)))) !== '' ? '
	<a href="' . $t1 . ('" class="spip-admin-boutons"
		id="analyser">' . _T('public|spip|ecrire:analyse_xml') . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'xhtml_error', null), true)))) !== '' ? ' (' . $t2 . ')' : '') . '</a>') : '') . '
	' . (($t1 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'objet', null), true) ? ' ' : ''))) !== '' ? $t1 . ('
		' . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'id_objet', null), true)))) !== '' ? '<a href="' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) ('voir_' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'objet', null), true))), null), true)) . '" class="spip-admin-boutons"
		id="voir_' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'objet', null), true)) . '">' . interdire_scripts(_T(objet_info(entites_html(table_valeur(@$Pile[0], (string) 'objet', null), true), 'texte_objet'))) . '
			(' . $t2 . ')</a>' : '') . '
	') : '') . '<!--extra-->' . (($t1 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'ecrire', null), true)))) !== '' ? '
	<a href="' . $t1 . ('" class="spip-admin-boutons"
		id="ecrire">' . _T('public|spip|ecrire:espace_prive') . '</a>') : '') . '
	<a href="' . parametre_url(self(), 'var_mode', interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'calcul', null), true))) . '" class="spip-admin-boutons"
		id="var_mode">' . _T('public|spip|ecrire:admin_recalculer') . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'use_cache', null), true)) . '</a>' . (($t1 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'preview', null), true)))) !== '' ? '
	<a href="' . $t1 . ('" class="spip-admin-boutons"
		id="preview">' . _T('public|spip|ecrire:previsualisation') . '</a>') : '') . (($t1 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'debug', null), true)))) !== '' ? '
	<a href="' . $t1 . ('" class="spip-admin-boutons"
		id="debug">' . _T('public|spip|ecrire:admin_debug') . '</a>') : '') . '
</div>
';
    return analyse_resultat_skel('html_f3666965c018303599bb64189cbac96c', $Cache, $page, 'squelettes-dist/formulaires/administration.html');
}
function html_9d96364ed1d79895affe5b2e3d246085($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '<div class="formulaire_spip formulaire_ecrire_auteur ajax" id="formulaire_ecrire_auteur' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'id', null), true)) . '">
<br class=\'bugajaxie\' />
' . (($t1 = strval(interdire_scripts(table_valeur(@$Pile[0], (string) 'message_ok', null)))) !== '' ? '<p class="reponse_formulaire reponse_formulaire_ok">' . $t1 . '</p>' : '') . '
' . (($t1 = strval(interdire_scripts(table_valeur(@$Pile[0], (string) 'message_erreur', null)))) !== '' ? '<p class="reponse_formulaire reponse_formulaire_erreur">' . $t1 . '</p>' : '') . '
' . (($t1 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'editable', null), true)))) !== '' ? $t1 . ('
<form method=\'post\' action=\'' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'action', null), true)) . '#formulaire_ecrire_auteur' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'id', null), true)) . '\' enctype=\'multipart/form-data\'>
	
	' . '<div>' . form_hidden(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'action', null), true))) . '<input name=\'formulaire_action\' type=\'hidden\'
		value=\'' . @$Pile[0]['form'] . '\' />' . '<input name=\'formulaire_action_args\' type=\'hidden\'
		value=\'' . @$Pile[0]['formulaire_args'] . '\' />' . (!empty($Pile[0]['_hidden']) ? @$Pile[0]['_hidden'] : '') . '</div>
	' . (($t2 = strval(interdire_scripts(table_valeur(table_valeur(@$Pile[0], (string) 'erreurs', null), 'previsu') ? ' ' : ''))) !== '' ? $t2 . ('
	<fieldset class="previsu">
		<legend>' . _T('public|spip|ecrire:previsualisation') . '</legend>
		<ul>
			<li><strong>' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'sujet_message_auteur', null), true)) . '</strong> - <em>' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'email_message_auteur', null), true)) . '</em></li>
			<li>' . interdire_scripts(nl2br(entites_html(table_valeur(@$Pile[0], (string) 'texte_message_auteur', null), true))) . '</li>
		</ul>
		<p class="boutons"><input type="submit" class="submit" name="confirmer" value="' . _T('public|spip|ecrire:form_prop_confirmer_envoi') . '" /></p>
	</fieldset>
	') : '') . '
	
	<fieldset>
		<legend>' . _T('public|spip|ecrire:envoyer_message') . '</legend>
		<ul class="editer-groupe">
			<li class=\'editer saisie_email_message_auteur obligatoire' . (($t2 = strval(interdire_scripts(table_valeur(table_valeur(@$Pile[0], (string) 'erreurs', null), 'email_message_auteur') ? ' ' : ''))) !== '' ? ' ' . $t2 . 'erreur' : '') . '\'>
				<label for="email_message_auteur' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'id', null), true)) . '">' . _T('public|spip|ecrire:entree_adresse_email') . ' ' . _T('public|spip|ecrire:info_obligatoire_02') . '</label>
				' . (($t2 = strval(interdire_scripts(table_valeur(table_valeur(@$Pile[0], (string) 'erreurs', null), 'email_message_auteur')))) !== '' ? '<span class="erreur_message">' . $t2 . '</span>' : '') . '
				<input' . (($t2 = strval('' ? 'required="required" type="email" class="text email"' : 'type="text" class="text"')) !== '' ? ' ' . $t2 : '') . ' name="email_message_auteur" id="email_message_auteur' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'id', null), true)) . '" value="' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'email_message_auteur', null), true)) . '" size="30" />
			</li>
			<li class=\'editer saisie_sujet_message_auteur obligatoire' . (($t2 = strval(interdire_scripts(table_valeur(table_valeur(@$Pile[0], (string) 'erreurs', null), 'sujet_message_auteur') ? ' ' : ''))) !== '' ? ' ' . $t2 . 'erreur' : '') . '\'>
				<label for="sujet_message_auteur' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'id', null), true)) . '">' . _T('public|spip|ecrire:form_prop_sujet') . ' ' . _T('public|spip|ecrire:info_obligatoire_02') . '</label>
				' . (($t2 = strval(interdire_scripts(table_valeur(table_valeur(@$Pile[0], (string) 'erreurs', null), 'sujet_message_auteur')))) !== '' ? '<span class="erreur_message">' . $t2 . '</span>' : '') . '
				<input type="text" class="text" name="sujet_message_auteur" id="sujet_message_auteur' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'id', null), true)) . '" value="' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'sujet_message_auteur', null), true)) . '" size="30"' . ' />
			</li>
			<li class=\'editer saisie_texte_message_auteur obligatoire' . (($t2 = strval(interdire_scripts(table_valeur(table_valeur(@$Pile[0], (string) 'erreurs', null), 'texte_message_auteur') ? ' ' : ''))) !== '' ? ' ' . $t2 . 'erreur' : '') . '\'>
				<label for="texte_message_auteur' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'id', null), true)) . '">' . _T('public|spip|ecrire:info_texte_message') . ' ' . _T('public|spip|ecrire:info_obligatoire_02') . '</label>
				' . (($t2 = strval(interdire_scripts(table_valeur(table_valeur(@$Pile[0], (string) 'erreurs', null), 'texte_message_auteur')))) !== '' ? '<span class="erreur_message">' . $t2 . '</span>' : '') . '
				<textarea name="texte_message_auteur" id="texte_message_auteur' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'id', null), true)) . '" rows="10" cols="60">' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'texte_message_auteur', null), true)) . '</textarea>
			</li>
		</ul>
	</fieldset>
	
	<p style="display: none;">
		<label for="nobot">' . _T('public|spip|ecrire:antispam_champ_vide') . '</label>
		<input type="text" class="text" name="nobot" id="nobot" value="' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'nobot', null), true)) . '" size="10" />
	</p>
	<p class="boutons"><input type="submit" class="submit" name="valide" value="' . _T('public|spip|ecrire:form_prop_envoyer') . '" /></p>
</form>
') : '') . '
</div>
';
    return analyse_resultat_skel('html_9d96364ed1d79895affe5b2e3d246085', $Cache, $page, 'squelettes-dist/formulaires/ecrire_auteur.html');
}
function BOUCLE_documenthtml_b8a8020987dd01f8087ad24f961857eb(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    $in = array();
    if (!is_array($a = @$Pile[0]['mode'])) {
        $in[] = $a;
    } else {
        $in = array_merge($in, $a);
    }
    if (!isset($command['table'])) {
        $command['table'] = 'documents';
        $command['id'] = '_document';
        $command['from'] = array('documents' => 'spip_documents', 'L1' => 'spip_types_documents');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("documents.id_document", "L1.titre AS type_document", "documents.taille", "documents.mode", "documents.largeur", "documents.hauteur", "documents.titre", "L1.mime_type");
        $command['orderby'] = array();
        $command['join'] = array('L1' => array('documents', 'extension'));
        $command['limit'] = '';
        $command['having'] = array();
    }
    $command['where'] = array(array('(documents.taille > 0 OR documents.distant=\'oui\')'), array('=', 'documents.id_document', sql_quote(@$Pile[0]['id_document'], '', 'bigint(21) NOT NULL AUTO_INCREMENT')), !(is_array(@$Pile[0]['mode']) ? count(@$Pile[0]['mode']) : strlen(@$Pile[0]['mode'])) ? '' : (is_array(@$Pile[0]['mode']) ? sql_in('documents.mode', sql_quote($in)) : array('=', 'documents.mode', sql_quote(@$Pile[0]['mode'], '', 'varchar(10) NOT NULL DEFAULT \'document\''))));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('plugins-dist/medias/modeles/img.html', 'html_b8a8020987dd01f8087ad24f961857eb', '_document', 1, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            $t0 .= '

' . vide($Pile['vars'][$_zzz = (string) 'image'] = interdire_scripts(($a = match(entites_html(sinon(table_valeur(@$Pile[0], (string) 'mode_force', null), interdire_scripts($Pile[$SP]['mode'])), true), 'image|vignette') or is_string($a) and strlen($a)) ? $a : interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'embed', null), true)) ? ' ' : '')) . (($t1 = strval(table_valeur($Pile["vars"], (string) 'image', null))) !== '' ? $t1 . ('
<span class=\'spip_document_' . $Pile[$SP]['id_document'] . ' spip_documents' . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'align', null), true)))) !== '' ? ' spip_documents_' . $t2 : '') . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'class', null), true)))) !== '' ? ' ' . $t2 : '') . ' spip_lien_ok\'' . (($t2 = strval(interdire_scripts(match(entites_html(table_valeur(@$Pile[0], (string) 'align', null), true), 'left|right')))) !== '' ? '
 style=\'float:' . $t2 . ';\'' : '') . '>
' . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lien', null), true)))) !== '' ? '<a href="' . $t2 . ('"' . (($t3 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lien_class', null), true)))) !== '' ? ' class="' . $t3 . '"' : '') . '>') : '') . '<img src=\'' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_document'], 'document', '', '', true))) . '\'' . (($t2 = strval(interdire_scripts($Pile[$SP]['largeur']))) !== '' ? ' width="' . $t2 . '"' : '') . (($t2 = strval(interdire_scripts($Pile[$SP]['hauteur']))) !== '' ? ' height="' . $t2 . '"' : '') . ' alt="' . interdire_scripts(texte_backend(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) . '"' . (($t2 = strval(interdire_scripts(texte_backend(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))))) !== '' ? ' title="' . $t2 . '"' : '') . ' />' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lien', null), true) ? '</a>' : '') . '</span>
') : '') . (!table_valeur($Pile["vars"], (string) 'image', null) ? ' ' . ('
	' . vide($Pile['vars'][$_zzz = (string) 'fichier'] = extraire_attribut(quete_logo_document(quete_document($Pile[$SP]['id_document'], ''), '', '', '', 0, 0, ''), 'src')) . '
	' . vide($Pile['vars'][$_zzz = (string) 'width'] = extraire_attribut(quete_logo_document(quete_document($Pile[$SP]['id_document'], ''), '', '', '', 0, 0, ''), 'width')) . '
	' . vide($Pile['vars'][$_zzz = (string) 'height'] = extraire_attribut(quete_logo_document(quete_document($Pile[$SP]['id_document'], ''), '', '', '', 0, 0, ''), 'height')) . '
<span class=\'spip_document_' . $Pile[$SP]['id_document'] . ' spip_documents' . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'align', null), true)))) !== '' ? ' spip_documents_' . $t2 : '') . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'class', null), true)))) !== '' ? ' ' . $t2 : '') . ' spip_lien_ok\'' . (($t2 = strval(interdire_scripts(match(entites_html(table_valeur(@$Pile[0], (string) 'align', null), true), 'left|right')))) !== '' ? '
 style=\'float:' . $t2 . (';' . (($t3 = strval(table_valeur($Pile["vars"], (string) 'width', null))) !== '' ? ' width:' . $t3 . 'px;' : '') . '\'') : '') . '><a href="' . interdire_scripts(($a = entites_html(table_valeur(@$Pile[0], (string) 'lien', null), true) or is_string($a) and strlen($a)) ? $a : vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_document'], 'document', '', '', true)))) . '"' . (($t2 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lien', null), true) ? '' : 'type="' . interdire_scripts($Pile[$SP]['mime_type']) . '"'))) !== '' ? '
 ' . $t2 : '') . (($t2 = strval(interdire_scripts(texte_backend(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))))) !== '' ? ' title="' . $t2 . '"' : '') . '><img src=\'' . table_valeur($Pile["vars"], (string) 'fichier', null) . '\' width=\'' . table_valeur($Pile["vars"], (string) 'width', null) . '\' height=\'' . table_valeur($Pile["vars"], (string) 'height', null) . '\' alt=\'' . interdire_scripts(attribut_html(strlen(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])) ? interdire_scripts(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])) . ' {' . interdire_scripts($Pile[$SP]['type_document']) . '}' : interdire_scripts($Pile[$SP]['type_document']))) . '\' /></a></span>
') : '');
        }
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_document @ plugins-dist/medias/modeles/img.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
コード例 #5
0
ファイル: referenceurs.php プロジェクト: rhertzog/lcs
function inc_referenceurs_dist ($id_article, $select, $table, $where, $groupby, $limit, $serveur='') {

	$nbvisites = $lescriteres = array();

	$result = sql_select("maj, referer_md5, referer, $select AS vis", $table, $where, $groupby, "maj DESC", $limit,'',$serveur);
	while ($row = sql_fetch($result,$serveur)) {
		$referer = interdire_scripts($row['referer']);
		$buff = stats_show_keywords($referer, $referer);
		
		if ($buff["host"]) {
			$numero = $buff["hostname"];
			$visites = $row['vis'];
			$referermd5 = $row['referer_md5'];
			$lesreferermd5[$numero] = $referermd5;
			$lesliens[$numero] = $referer;
			$lesurls[$numero] = $buff["host"];
			if (!isset($nbvisites[$numero]))
				$nbvisites[$numero] = $visites;
			else
				$nbvisites[$numero] += $visites;
			if (!isset($lesreferers[$numero]))
				$lesreferers[$numero] = array();
			if (!isset($lesliensracine[$numero]))
				$lesliensracine[$numero]=0;

			if (isset($buff["keywords"])
			AND  $c = $buff["keywords"]) {
				if (!isset($lescriteres[$numero][$c])) {
					$lescriteres[$numero][$c] = true;
					$tmp= " &laquo;&nbsp;$c&nbsp;&raquo;";
				} else 	$tmp = "";
			} else {
				$tmp = $buff["path"];
				if ($buff["query"])
					$tmp .= "?".$buff['query'];
				if (strlen($tmp) > 18)
					$tmp = "/".substr($tmp, 0, 15)."...";
				else if (strlen($tmp) > 0)
					$tmp = "/$tmp";
			}
			if ($tmp) {
				$lesreferers[$numero][] = "<a href=\"".attribut_html($referer)."\">".quote_amp(urldecode($tmp))."</a>" . (($visites > 1)?" ($visites)":""). ($id_article ? '' : referes($referermd5));
			} else $lesliensracine[$numero] += $visites;
		}
	}
	
	if (!count($nbvisites)) return array();
	arsort($nbvisites);
	return referers_group($nbvisites, $id_article, $lesliensracine, $lesreferermd5, $lesreferers, $lesurls);
}
function html_e3cac34669117ef67c3fe7b2fef7351d($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '<!-- L\'entete du site -->
<div id="entete" class="pas_surlignable">
	<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])) . '" class="nom-site"><span>' . interdire_scripts(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0])) . '</span></a>


  
</div><!-- entete -->';
    return analyse_resultat_skel('html_e3cac34669117ef67c3fe7b2fef7351d', $Cache, $page, 'squelettes/inc/inc-bandeau.html');
}
function BOUCLE_langueshtml_9491858aea5af6033788aa1936ebca8d(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'rubriques';
        $command['id'] = '_langues';
        $command['from'] = array('rubriques' => 'spip_rubriques');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("rubriques.lang", "rubriques.titre");
        $command['orderby'] = array('rubriques.lang');
        $command['join'] = array();
        $command['limit'] = '';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('rubriques.statut', '!', 'publie', ''), array('=', 'rubriques.id_parent', 0), array('NOT', array('=', 'rubriques.lang', sql_quote(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lang', null), true)), '', 'varchar(10) NOT NULL DEFAULT \'\''))));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-bas_menu-lang.html', 'html_9491858aea5af6033788aa1936ebca8d', '_langues', 18, $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']))))) !== '' ? '
		<span lang="' . spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) . '" xml:lang="' . spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) . '">| 
		<a href="spip.php?action=converser&amp;var_lang=' . spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) . '&amp;redirect=/" rel="alternate"  title="' . _T('public|spip|ecrire:accueil_site') . ' : ' . traduire_nom_langue(spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang'])) . '" dir="' . lang_dir($Pile[$SP]['lang'], 'ltr', 'rtl') . '">' . $t1 . '</a>
		</span>
' : '';
            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_langues @ squelettes/inc/inc-bas_menu-lang.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
function BOUCLE_breves_rubriqueshtml_11157eacea3e766769d2031f1e2eed04(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'breves';
        $command['id'] = '_breves_rubriques';
        $command['from'] = array('breves' => 'spip_breves');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("breves.date_heure", "breves.date_heure AS date", "breves.id_breve", "breves.texte", "breves.titre", "breves.lang");
        $command['orderby'] = array('breves.date_heure DESC');
        $command['join'] = array();
        $command['limit'] = '0,10';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('breves.statut', 'publie,prop', 'publie', ''), array('=', 'breves.id_rubrique', sql_quote(@$Pile[0]['id_rubrique'], '', 'bigint(21) NOT NULL DEFAULT \'0\'')), array('=', 'breves.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/inc/inc-breves.html', 'html_11157eacea3e766769d2031f1e2eed04', '_breves_rubriques', 2, $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>' . (($t1 = strval(interdire_scripts(affdate(normaliser_date($Pile[$SP]['date']))))) !== '' ? '<span>' . $t1 . '</span>' : '') . '
              <a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_breve'], 'breve', '', '', true))) . '" ' . (($t1 = strval(interdire_scripts(entites_html(textebrut(filtre_introduction_dist('', $Pile[$SP]['texte'], 300, $connect, null)))))) !== '' ? 'title="' . $t1 . '"' : '') . '>' . interdire_scripts(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) . '</a>
          	</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_breves_rubriques @ squelettes/inc/inc-breves.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
function html_541d8d0e325a80d1e837a45e506f5e26($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '<div class="formulaire_spip formulaire_recherche' . (($t1 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'class', null), true)))) !== '' ? ' ' . $t1 : '') . '" id="formulaire_recherche">
<form action="' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'action', null), true)) . '" method="get"><div>
	' . interdire_scripts(form_hidden(entites_html(table_valeur(@$Pile[0], (string) 'action', null), true))) . '
	' . (($t1 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'lang', null), true)))) !== '' ? '<input type="hidden" name="lang" value="' . $t1 . '" />' : '') . '
	<label for="' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) '_id_champ', null), true)) . '">' . _T('public|spip|ecrire:info_rechercher_02') . '</label>
	<input type="' . ('' ? 'search' : 'text') . '" class="search text" size="10" name="recherche" id="' . interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) '_id_champ', null), true)) . '"' . (($t1 = strval(interdire_scripts(entites_html(table_valeur(@$Pile[0], (string) 'recherche', null), true)))) !== '' ? ' value="' . $t1 . '"' : '') . ' accesskey="4" autocapitalize="off" autocorrect="off"
	/><input type="submit" class="submit" value="&gt;&gt;" title="' . _T('public|spip|ecrire:info_rechercher') . '" />
</div></form>
</div>
';
    return analyse_resultat_skel('html_541d8d0e325a80d1e837a45e506f5e26', $Cache, $page, 'squelettes-dist/formulaires/recherche.html');
}
function BOUCLE_polices_webfontshtml_6df0ecfade86092ec8be1bb468d967e1(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'mots';
        $command['id'] = '_polices_webfonts';
        $command['from'] = array('mots' => 'spip_mots');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("mots.texte");
        $command['orderby'] = array();
        $command['where'] = array(array('=', 'mots.titre', "'polices'"));
        $command['join'] = array();
        $command['limit'] = '';
        $command['having'] = array();
    }
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/styles.html', 'html_6df0ecfade86092ec8be1bb468d967e1', '_polices_webfonts', 72, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            $t0 .= ($t1 = strval(interdire_scripts($Pile[$SP]['texte']))) !== '' ? '
<style type="text/css">
	' . $t1 . '
</style>
' : '';
        }
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_polices_webfonts @ squelettes/styles.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
function BOUCLE_auteurshtml_bc3326b3fba39516fdcfa67a49c7ff7f(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'auteurs';
        $command['id'] = '_auteurs';
        $command['from'] = array('auteurs' => 'spip_auteurs', 'L1' => 'spip_auteurs_liens');
        $command['type'] = array();
        $command['groupby'] = array("auteurs.id_auteur");
        $command['select'] = array("auteurs.nom", "auteurs.id_auteur");
        $command['orderby'] = array('auteurs.nom');
        $command['join'] = array('L1' => array('auteurs', 'id_auteur'));
        $command['limit'] = '';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('auteurs.statut', '!5poubelle', '!5poubelle', ''), array('=', 'L1.id_objet', sql_quote(@$Pile[0]['id_objet'], '', 'bigint(21) NOT NULL DEFAULT \'0\'')), array('=', 'L1.objet', sql_quote(@$Pile[0]['objet'], '', 'varchar(25) NOT NULL DEFAULT \'\'')));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes-dist/modeles/lesauteurs.html', 'html_bc3326b3fba39516fdcfa67a49c7ff7f', '_auteurs', 9, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            $t1 = '
<span class="vcard author"><a class="url fn spip_in" href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_auteur'], 'auteur', '', '', true))) . '">' . interdire_scripts(typo(supprimer_numero($Pile[$SP]['nom']), "TYPO", $connect, $Pile[0])) . '</a></span>';
            $t0 .= (strlen($t1) && strlen($t0) ? ', ' : '') . $t1;
        }
        $iter->free();
    }
    if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
        spip_log(intval(1000 * $timer) . "ms BOUCLE_auteurs @ squelettes-dist/modeles/lesauteurs.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
function html_65c161fa3974dab7ff9b5b08fa07491e($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = ($t1 = strval(invalideur_session($Cache, (function_exists("autoriser") || include_spip("inc/autoriser")) && autoriser('configurer', '_admin_vider') ? " " : "" ? ' ' : ''))) !== '' ? $t1 . ('

' . boite_ouvrir(interdire_scripts(wrap(concat(filtre_balise_img_dist(chemin_image('image-24.png'), '', 'cadre-icone'), _T('info_images_auto')), '<h3>')), 'simple', 'titrem') . '<div id="placehoder_taille_cache_images"><p>&nbsp;<br />&nbsp;<br />&nbsp;<br /></p></div>
	<script type="text/javascript">
		jQuery(function(){jQuery(\'#placehoder_taille_cache_images\').animateLoading().load(\'' . invalideur_session($Cache, replace(generer_action_auteur('calculer_taille_cache', 'images'), '&amp;', '&')) . '\');});
	</script>
	<noscript>
		<iframe src="' . invalideur_session($Cache, generer_action_auteur('calculer_taille_cache', 'images')) . '" style="width: 100%;height: 3em;overflow: hidden;"></iframe>
	</noscript>

' . boite_pied() . '
	' . bouton_action(_T('public|spip|ecrire:bouton_vider_cache'), invalideur_session($Cache, generer_action_auteur('purger', 'vignettes', invalideur_session($Cache, self()))), 'ajax') . '
' . boite_fermer() . '
') : '';
    return analyse_resultat_skel('html_65c161fa3974dab7ff9b5b08fa07491e', $Cache, $page, '../prive/squelettes/inclure/admin_vider_images.html');
}
コード例 #13
0
ファイル: ecran_securite.php プロジェクト: spip/SPIP
 function filtre_filtrer_entites_dist($t)
 {
     include_spip('inc/texte');
     return interdire_scripts(filtrer_entites($t));
 }
コード例 #14
0
ファイル: revisions.php プロジェクト: genma/spip_ynh
function propre_diff($texte)
{
    $span_diff = array();
    if (preg_match_all(',<(/)?(span|div) (class|rem)="diff-[^>]*>,', $texte, $regs, PREG_SET_ORDER)) {
        $regs = array_slice($regs, 0, 500);
        #limiter la casse s'il y en a trop
        foreach ($regs as $c => $reg) {
            $texte = str_replace($reg[0], '@@@SPIP_DIFF' . $c . '@@@', $texte);
        }
    }
    // [ ...<span diff> -> lien ]
    // < tag <span diff> >
    $texte = preg_replace(',<([^>]*?@@@SPIP_DIFF[0-9]+@@@),', '&lt;\\1', $texte);
    # attention ici astuce seulement deux @@ finals car on doit eviter
    # deux patterns a suivre, afin de pouvoir prendre [ mais eviter [[
    $texte = preg_replace(',(^|[^[])[[]([^[\\]]*@@@SPIP_DIFF[0-9]+@@),', '\\1&#91;\\2', $texte);
    // desactiver TeX & toujours-paragrapher
    $tex = $GLOBALS['traiter_math'];
    $GLOBALS['traiter_math'] = '';
    $mem = $GLOBALS['toujours_paragrapher'];
    $GLOBALS['toujours_paragrapher'] = false;
    $texte = propre($texte);
    // retablir
    $GLOBALS['traiter_math'] = $tex;
    $GLOBALS['toujours_paragrapher'] = $mem;
    // un blockquote mal ferme peut gener l'affichage, et title plante safari
    $texte = preg_replace(',<(/?(blockquote|title)[^>]*)>,i', '&lt;\\1>', $texte);
    // Dans les <cadre> c'est un peu plus complique
    if (preg_match_all(',<textarea (.*)</textarea>,Uims', $texte, $area, PREG_SET_ORDER)) {
        foreach ($area as $reg) {
            $remplace = preg_replace(',@@@SPIP_DIFF[0-9]+@@@,', '**', $reg[0]);
            if ($remplace != $reg[0]) {
                $texte = str_replace($reg[0], $remplace, $texte);
            }
        }
    }
    // replacer les valeurs des <span> et <div> diff-
    if (is_array($regs)) {
        foreach ($regs as $c => $reg) {
            $bal = !$reg[1] ? $reg[0] : "</{$reg['2']}>";
            $texte = str_replace('@@@SPIP_DIFF' . $c . '@@@', $bal, $texte);
            $GLOBALS['les_notes'] = str_replace('@@@SPIP_DIFF' . $c . '@@@', $bal, $GLOBALS['les_notes']);
        }
    }
    // quand le dernier tag est ouvrant le refermer ...
    $reg = end($regs);
    if (!$reg[1] and $reg[2]) {
        $texte .= "</{$reg['2']}>";
    }
    // et interdire_scripts !
    $texte = interdire_scripts($texte);
    return $texte;
}
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_articleshtml_a80389532d86f8e6929960268237a0a8(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    $doublons_index = array();
    // Initialise le(s) critère(s) doublons
    if (!isset($doublons[$d = 'articles'])) {
        $doublons[$d] = '';
    }
    if (!isset($command['table'])) {
        $command['table'] = 'articles';
        $command['id'] = '_articles';
        $command['from'] = array('articles' => 'spip_articles');
        $command['type'] = array();
        $command['groupby'] = array();
        $command['select'] = array("articles.date", "articles.lang", "articles.id_article", "articles.texte", "articles.descriptif", "articles.chapo", "articles.titre");
        $command['orderby'] = array('articles.date DESC');
        $command['join'] = array();
        $command['limit'] = '0,3';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('articles.statut', 'publie,prop,prepa/auteur', 'publie', ''), array(sql_in('articles.id_article', $doublons[$doublons_index[] = 'articles'], 'NOT')));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-trad.html', 'html_a80389532d86f8e6929960268237a0a8', '_articles', 6, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        lang_select($GLOBALS['spip_lang']);
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            foreach ($doublons_index as $k) {
                $doublons[$k] .= "," . $Pile[$SP]['id_article'];
            }
            // doublons
            lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
            $t0 .= '
          	<li>' . (($t1 = strval(interdire_scripts(affdate(normaliser_date($Pile[$SP]['date']))))) !== '' ? '<span>' . $t1 . ((($t2 = strval(traduire_nom_langue(spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang'])))) !== '' ? ' - <dfn class="lang">' . $t2 . '</dfn>' : '') . '</span>') : '') . ' 
          	    
              <a href="' . spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'], '.')) . '/spip.php?action=converser&amp;redirect=' . spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'], '.')) . '%2F' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) . '&amp;var_lang=' . spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) . '" hreflang="' . spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) . '" ' . (($t1 = strval(interdire_scripts(entites_html(textebrut(filtre_introduction_dist($Pile[$SP]['descriptif'], strlen($Pile[$SP]['descriptif']) ? '' : $Pile[$SP]['chapo'] . "\n\n" . $Pile[$SP]['texte'], 500, $connect, null)))))) !== '' ? 'title="' . $t1 . '"' : '') . '>' . interdire_scripts(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) . '</a>
          	</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_articles @ squelettes/inc/inc-trad.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
function html_76ddbc2b5f1671bea60186a8fa5bb500($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '<!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[0]['lang'] ? @$Pile[0]['lang'] : $GLOBALS['spip_lang']) . '" lang="' . spip_htmlentities(@$Pile[0]['lang'] ? @$Pile[0]['lang'] : $GLOBALS['spip_lang']) . '" dir="' . lang_dir(@$Pile[0]['lang'], 'ltr', 'rtl') . '">
<head>
	<title>[' . interdire_scripts(textebrut(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0]))) . '] : ' . _T('public|spip|ecrire:icone_agenda') . '</title>
	' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-meta') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/agenda.html\',\'html_76ddbc2b5f1671bea60186a8fa5bb500\',\'\',6,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
	' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('styles') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/agenda.html\',\'html_76ddbc2b5f1671bea60186a8fa5bb500\',\'\',7,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
</head>
<body dir="' . lang_dir(@$Pile[0]['lang'], 'ltr', 'rtl') . '" class="' . spip_htmlentities(@$Pile[0]['lang'] ? @$Pile[0]['lang'] : $GLOBALS['spip_lang']) . ' plan">
<div id="page">

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

<!-- *****************************************************************
	Contenu principal (centre)
	Main content (center) 
    ************************************************************* -->

	<div id="bloc-contenu">
		' . BOUCLE_langue_contexte_exclushtml_76ddbc2b5f1671bea60186a8fa5bb500($Cache, $Pile, $doublons, $Numrows, $SP) . '
		' . (($t1 = BOUCLE_langueshtml_76ddbc2b5f1671bea60186a8fa5bb500($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
		<div id="sommaire">
			<h4>' . _T('public|spip|ecrire:info_langues') . '</h4>
			<ul>
			' . $t1 . '
			</ul>
		</div>
		' : '') . '

		<h2>' . _T('public|spip|ecrire:icone_agenda') . '</h2>

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

    <hr />
		
	
		<h3>' . _T('public|spip|ecrire:info_visites_par_mois') . '</h3>
	' . (($t1 = BOUCLE_archivehtml_76ddbc2b5f1671bea60186a8fa5bb500($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? $t1 . '
				</ul>
			  </li>
			</ul>
			</div><!-- plan -->
	' : '') . '
	</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/agenda.html\',\'html_76ddbc2b5f1671bea60186a8fa5bb500\',\'\',107,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
    ' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-breves') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/agenda.html\',\'html_76ddbc2b5f1671bea60186a8fa5bb500\',\'\',108,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
    ' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-syndic') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/agenda.html\',\'html_76ddbc2b5f1671bea60186a8fa5bb500\',\'\',109,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>

	</div><!-- encart -->
' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-menu') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/agenda.html\',\'html_76ddbc2b5f1671bea60186a8fa5bb500\',\'\',112,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-bas') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/agenda.html\',\'html_76ddbc2b5f1671bea60186a8fa5bb500\',\'\',113,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>
</div><!-- page -->

</body>
</html>


';
    return analyse_resultat_skel('html_76ddbc2b5f1671bea60186a8fa5bb500', $Cache, $page, 'squelettes/agenda.html');
}
function html_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = BOUCLE_lien_webfontshtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP) . '

<!-- META DATA -->
	<meta http-equiv="Content-Type" content="text/html; charset=' . interdire_scripts($GLOBALS['meta']['charset']) . '" />
	<meta http-equiv="Content-language" content="' . spip_htmlentities(@$Pile[0]['lang'] ? @$Pile[0]['lang'] : $GLOBALS['spip_lang']) . '" />
	<meta name="language" content="' . spip_htmlentities(@$Pile[0]['lang'] ? @$Pile[0]['lang'] : $GLOBALS['spip_lang']) . '" />
	<meta http-equiv="Content-Style-Type" content="text/css" />
	<meta http-equiv="Content-Script-Type" content="text/javascript" />
	<meta name="generator" content="SPIP' . (($t1 = strval(spip_version())) !== '' ? ' ' . $t1 : '') . '" />
	<meta name="robots" content="index,follow" />
	<link rel="schema.DCTERMS"  href="http://purl.org/dc/terms/" />
	<link rel="schema.DC"       href="http://purl.org/dc/elements/1.1/" />
' . (($t1 = BOUCLE_article_headhtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? $t1 : '
' . (($t2 = BOUCLE_breve_headhtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? $t2 : (($t3 = BOUCLE_mot_headhtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? $t3 : (($t4 = BOUCLE_rubrique_headhtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? $t4 : (($t5 = BOUCLE_site_headhtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? $t5 : '  
	<!-- META pages recapitulatives - META summary pages -->
' . (($t6 = BOUCLE_keywords_recaphtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
  <meta name="keywords" content="' . $t6 . '" />' : '') . '
  ' . (($t6 = strval(interdire_scripts(attribut_html(propre($GLOBALS['meta']['descriptif_site'], $connect, $Pile[0]))))) !== '' ? '<meta name="description" content="' . $t6 . '" />' : '') . '
  <meta name="author" content="' . BOUCLE_author_recaphtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP) . '" />
  <!-- META Dublin Core - voir: http://uk.dublincore.org/documents/dcq-html/  -->
  ' . (($t6 = strval(interdire_scripts(entites_html(textebrut(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0])))))) !== '' ? '<meta name="DC.title" content="' . $t6 . '" />
  ' : '') . (($t6 = strval(spip_htmlentities(@$Pile[0]['lang'] ? @$Pile[0]['lang'] : $GLOBALS['spip_lang']))) !== '' ? '<meta name="DC.language" scheme="ISO639-1" content="' . $t6 . '" />
  ' : '') . (($t6 = strval(spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'], '.')))) !== '' ? '<meta name="DC.identifier" scheme="DCTERMS.URI" content="' . $t6 . '" />
  ' : '') . (($t6 = strval(spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'], '.')))) !== '' ? '<meta name="DC.source" scheme="DCTERMS.URI" content="' . $t6 . '" />' : '') . BOUCLE_recap_auteursDChtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP) . (($t6 = strval(interdire_scripts(attribut_html(couper(propre($GLOBALS['meta']['descriptif_site'], $connect, $Pile[0]), '150'))))) !== '' ? '
  <meta name="DC.description" content="' . $t6 . '" />' : '') . (($t6 = BOUCLE_recap_subjectDChtml_f7a72f7c15527e9fefe562fecb18cf87($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
  <meta name="DC.subject" content="' . $t6 . '" />' : '') . (($t6 = strval(interdire_scripts(date_iso(normaliser_date(@$Pile[0]['date']))))) !== '' ? '
  <meta name="DC.date" scheme="ISO8601" content="' . $t6 . '" />' : '') . '

'))))) . '

' . (($t1 = strval(interdire_scripts(($a = extraire_attribut(filtrer('image_graver', filtrer('image_format', filtrer('image_recadre', filtrer('image_passe_partout', ($a = ($a = table_valeur(@$Pile[0], (string) 'favicon', null) or is_string($a) and strlen($a)) ? $a : find_in_path('favicon.ico') or is_string($a) and strlen($a)) ? $a : (!is_array($l = quete_logo('id_syndic', 'ON', "'0'", '', 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']}'\"" : "") . ' />'), '32', '32'), '32', '32', 'center'), 'ico')), 'src') or is_string($a) and strlen($a)) ? $a : find_in_path('spip.ico')))) !== '' ? '  <link rel="shortcut icon" href="' . $t1 . '" type="image/x-icon" />' : '') . '

' . (($t1 = strval(interdire_scripts(generer_url_public('backend', '')))) !== '' ? '  <link rel="alternate" type="application/rss+xml" title="' . _T('public|spip|ecrire:syndiquer_site') . ' : ' . interdire_scripts(textebrut(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0]))) . '" href="' . $t1 . '" />' : '') . '

';
    return analyse_resultat_skel('html_f7a72f7c15527e9fefe562fecb18cf87', $Cache, $page, 'squelettes/inc/inc-meta.html');
}
コード例 #19
0
ファイル: debusquer.php プロジェクト: JLuc/SPIP
function debusquer_source($objet, $affiche)
{
    $quoi = $GLOBALS['debug_objets'][$affiche][$objet];
    if (!empty($GLOBALS['debug_objets']['boucle'][$objet]->id_boucle)) {
        $nom = $GLOBALS['debug_objets']['boucle'][$objet]->id_boucle;
    } else {
        $nom = $GLOBALS['debug_objets']['sourcefile'][$objet];
    }
    $res2 = "";
    if ($affiche == 'resultat') {
        $legend = $nom;
        $req = $GLOBALS['debug_objets']['requete'][$objet];
        if (function_exists('_mysql_traite_query')) {
            $c = strtolower(_request('connect'));
            $c = $GLOBALS['connexions'][$c ? $c : 0]['prefixe'];
            $req = _mysql_traite_query($req, '', $c);
        }
        //  permettre le copier/coller facile
        // $res = ancre_texte($req, array(), true);
        $res = "<div id='T" . md5($req) . "'>\n<pre>\n" . $req . "</pre>\n</div>\n";
        //  formatage et affichage des resultats bruts de la requete
        $ress_req = spip_query($req);
        $brut_sql = '';
        $num = 1;
        //  eviter l'affichage de milliers de lignes
        //  personnalisation possible dans mes_options
        $max_aff = defined('_MAX_DEBUG_AFF') ? _MAX_DEBUG_AFF : 50;
        while ($retours_sql = sql_fetch($ress_req)) {
            if ($num <= $max_aff) {
                $brut_sql .= "<h3>" . ($num == 1 ? $num . " sur " . sql_count($ress_req) : $num) . "</h3>";
                $brut_sql .= "<p>";
                foreach ($retours_sql as $key => $val) {
                    $brut_sql .= "<strong>" . $key . "</strong> => " . spip_htmlspecialchars(couper($val, 150)) . "<br />\n";
                }
                $brut_sql .= "</p>";
            }
            $num++;
        }
        $res2 = interdire_scripts($brut_sql);
        foreach ($quoi as $view) {
            //  ne pas afficher les $contexte_inclus
            $view = preg_replace(",<\\?php.+\\?[>],Uims", "", $view);
            if ($view) {
                $res2 .= "\n<br /><fieldset>" . interdire_scripts($view) . "</fieldset>";
            }
        }
    } elseif ($affiche == 'code') {
        $legend = $nom;
        $res = ancre_texte("<" . "?php\n" . $quoi . "\n?" . ">");
    } elseif ($affiche == 'boucle') {
        $legend = _T('zbug_boucle') . ' ' . $nom;
        // Le compilateur prefixe le nom des boucles par l'extension du fichier source.
        $gram = preg_match('/^([^_]+)_/', $objet, $r) ? $r[1] : '';
        $res = ancre_texte(public_decompiler($quoi, $gram, 0, 'boucle'));
    } elseif ($affiche == 'squelette') {
        $legend = $GLOBALS['debug_objets']['sourcefile'][$objet];
        $res = ancre_texte($GLOBALS['debug_objets']['squelette'][$objet]);
    }
    return array($legend, $res, $res2);
}
コード例 #20
0
ファイル: texte_mini.php プロジェクト: loorenzooo/aslfc
function safehtml($t)
{
    static $safehtml;
    if (!$t or !is_string($t)) {
        return $t;
    }
    # attention safehtml nettoie deux ou trois caracteres de plus. A voir
    if (strpos($t, '<') === false) {
        return str_replace("", '', $t);
    }
    $t = interdire_scripts($t);
    // jolifier le php
    $t = echappe_js($t);
    if (!isset($safehtml)) {
        $safehtml = charger_fonction('safehtml', 'inc', true);
    }
    if ($safehtml) {
        $t = $safehtml($t);
    }
    return interdire_scripts($t);
    // interdire le php (2 precautions)
}
コード例 #21
0
ファイル: inc_text.php プロジェクト: nyimbi/legalcase
function propre($letexte)
{
    return interdire_scripts(trim($letexte));
}
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 html_2ac554317f8f8f8aa21871c007ab234d($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '
<div id="bas">
	<a href="' . spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'], '.')) . '" title="' . _T('public|spip|ecrire:accueil_site') . '">' . _T('public|spip|ecrire:accueil_site') . '</a> | 
	<a href="' . vider_url(urlencode_1738(generer_url_entite('1', 'auteur', '', '', true))) . '" title="' . _T('public|spip|ecrire:info_contact') . '">' . _T('public|spip|ecrire:info_contact') . '</a> | 
	<a href="' . interdire_scripts(generer_url_public('plan', '')) . '" title="' . _T('public|spip|ecrire:plan_site') . '">' . _T('public|spip|ecrire:plan_site') . '</a>
		' . (($t1 = strval(interdire_scripts(invalideur_session($Cache, table_valeur($GLOBALS["visiteur_session"], (string) 'id_auteur', null) ? '' : ' ')))) !== '' ? $t1 . (' | <a href="' . interdire_scripts(parametre_url(generer_url_public('login', ''), 'url', self())) . '" rel="nofollow" class=\'login_modal\'>' . _T('public|spip|ecrire:lien_connecter') . '</a>') : '') . (($t1 = strval(invalideur_session($Cache, (function_exists("autoriser") || include_spip("inc/autoriser")) && autoriser('ecrire') ? " " : ""))) !== '' ? $t1 . ('| <a href="' . interdire_scripts(eval('return ' . '_DIR_RESTREINT_ABS' . ';')) . '">' . _T('public|spip|ecrire:espace_prive') . '</a>') : '') . (($t1 = strval(interdire_scripts(invalideur_session($Cache, table_valeur($GLOBALS["visiteur_session"], (string) 'id_auteur', null) ? ' ' : '')))) !== '' ? $t1 . (' | <a href="' . executer_balise_dynamique('URL_LOGOUT', array(), array('squelettes/inc/inc-bas.html', 'html_2ac554317f8f8f8aa21871c007ab234d', '', 1, $GLOBALS['spip_lang'])) . '" rel="nofollow">' . _T('public|spip|ecrire:icone_deconnecter') . '</a>') : '') . ' | 
	<a href="' . interdire_scripts(generer_url_public('statistiques', '')) . '" title="' . _T('public|spip|ecrire:titre_statistiques') . '">' . _T('public|spip|ecrire:titre_statistiques') . '</a> | 
	<span style="white-space: nowrap;">' . _T('public|spip|ecrire:info_visiteurs') . ' : 
	' . BOUCLE_art_visiteshtml_2ac554317f8f8f8aa21871c007ab234d($Cache, $Pile, $doublons, $Numrows, $SP) . '
	' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-affvisit') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/inc/inc-bas.html\',\'html_2ac554317f8f8f8aa21871c007ab234d\',\'\',13,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '></span>

	<p>
		<a href="' . interdire_scripts(generer_url_public('backend', '')) . '" rel="nofollow" title="' . _T('public|spip|ecrire:bouton_radio_syndication') . ' ' . traduire_nom_langue(spip_htmlentities(@$Pile[0]['lang'] ? @$Pile[0]['lang'] : $GLOBALS['spip_lang'])) . '"><img src="' . find_in_path('styles/img/rss.png') . '" alt="' . _T('public|spip|ecrire:icone_suivi_activite') . '" style="position:relative;bottom:-0.3em;" width="16" height="16" class="format_png" /><span style="text-transform: uppercase;">&nbsp;' . spip_htmlentities(@$Pile[0]['lang'] ? @$Pile[0]['lang'] : $GLOBALS['spip_lang']) . '&nbsp;</span></a>

' . BOUCLE_rubriques_cheminhtml_2ac554317f8f8f8aa21871c007ab234d($Cache, $Pile, $doublons, $Numrows, $SP) . '

' . BOUCLE_syndic_rubhtml_2ac554317f8f8f8aa21871c007ab234d($Cache, $Pile, $doublons, $Numrows, $SP) . '
	<big>&nbsp;
		<b><a href="http://' . spip_htmlentities(@$Pile[0]['lang'] ? @$Pile[0]['lang'] : $GLOBALS['spip_lang']) . '.wikipedia.org/wiki/Really_Simple_Syndication">?</a></b>
	</big>
' . BOUCLE_syndic_testhtml_2ac554317f8f8f8aa21871c007ab234d($Cache, $Pile, $doublons, $Numrows, $SP) . '
	</p>
	
	<p>
		<a href="http://www.spip.net" title="' . _T('public|spip|ecrire:site_realise_avec_spip') . ' ' . spip_version() . '"> ' . _T('public|spip|ecrire:site_realise_avec_spip') . ' ' . interdire_scripts('3.1.0') . '</a> + 
		<a href="http://edu.ca.edu/rubrique43.html" title="' . _T('spip:squelette') . ' AHUNTSIC - ' . calcul_version_squelette() . '">AHUNTSIC</a>
	</p>



' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-bas_cc') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/inc/inc-bas.html\',\'html_2ac554317f8f8f8aa21871c007ab234d\',\'\',44,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>


' . (($t1 = strval(interdire_scripts(filtre_info_plugin_dist("visiteurs_connectes", "est_actif") ? ' ' : ''))) !== '' ? $t1 . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc-visiteurs') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/inc/inc-bas.html\',\'html_2ac554317f8f8f8aa21871c007ab234d\',\'\',47,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>' : '') . '
' . (($t1 = strval(interdire_scripts(filtre_info_plugin_dist("couteau_suisse", "est_actif") ? ' ' : ''))) !== '' ? $t1 . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('fonds/visiteurs_connectes') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/inc/inc-bas.html\',\'html_2ac554317f8f8f8aa21871c007ab234d\',\'\',48,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>' : '') . ' 


</div><!-- fin bas -->

' . '<' . '?php echo recuperer_fond( ' . argumenter_squelette('inc/inc-bas_menu-lang') . ', array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . '), array("compil"=>array(\'squelettes/inc/inc-bas.html\',\'html_2ac554317f8f8f8aa21871c007ab234d\',\'\',53,$GLOBALS[\'spip_lang\'])), _request("connect"));
?' . '>

	' . interdire_scripts(@$Pile[0]['spip_cron']) . '
';
    return analyse_resultat_skel('html_2ac554317f8f8f8aa21871c007ab234d', $Cache, $page, 'squelettes/inc/inc-bas.html');
}
function html_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '	<div class="menu" id="menu-principal">
		<ul>
			<li id="menu-principal-accueil"><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])) . '" accesskey="0">' . _T('public|spip|ecrire:accueil_site') . '</a></li>

			' . BOUCLE_articlehtml_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons, $Numrows, $SP) . '
			' . BOUCLE_rubriquehtml_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons, $Numrows, $SP) . '

			<li id="menu-principal-contact"><a href="' . vider_url(urlencode_1738(generer_url_entite('1', 'auteur', '', '', true))) . '" title="' . _T('public|spip|ecrire:info_contact') . '"  accesskey="7">' . _T('public|spip|ecrire:info_contact') . '</a></li>
			
			' . BOUCLE_art_agendahtml_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons, $Numrows, $SP) . '			

			<li id="menu-principal-plan"><a href="' . interdire_scripts(generer_url_public('plan', '')) . '" title="' . _T('public|spip|ecrire:plan_site') . '" accesskey="3">' . _T('public|spip|ecrire:plan_site') . '</a></li>

			' . BOUCLE_sitehtml_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons, $Numrows, $SP) . '

			<li id="menu-principal-resume"><a href="' . interdire_scripts(generer_url_public('resume', '')) . '" title="' . _T('public|spip|ecrire:en_resume') . '" accesskey="5">' . _T('public|spip|ecrire:en_resume') . '</a></li>
			
	
			' . (($t1 = strval(executer_balise_dynamique('FORMULAIRE_RECHERCHE', array(), array('squelettes/inc/inc-menu-principal.html', 'html_7e58ec237019eff13c867a6e81765d14', '', 0, $GLOBALS['spip_lang'])))) !== '' ? '<li id="menu-principal-recherche">
			<div class="menu" id="menu-recherche">
				<h3 class="structure">' . _T('public|spip|ecrire:info_rechercher') . '</h3>
					<ul>
						<li>
					' . $t1 . '			
						</li>			
					</ul>
			</div><!-- menu-recherche -->
			</li>' : '') . '
		</ul>
	</div>';
    return analyse_resultat_skel('html_7e58ec237019eff13c867a6e81765d14', $Cache, $page, 'squelettes/inc/inc-menu-principal.html');
}
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;
}
function html_bb1fa8f06f75cd5c61b4de0a063c1a54($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
    if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
        $doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
    }
    $connect = '';
    $page = '    <!-- Sur le Web -->


    ' . (($t1 = BOUCLE_art_syndichtml_bb1fa8f06f75cd5c61b4de0a063c1a54($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
      <div class="menu rub">
      <ul>
        <li><a href="' . interdire_scripts(generer_url_public('site', '')) . '" title="' . _T('public|spip|ecrire:autres_sites') . '">' . _T('public|spip|ecrire:nouveautes_web') . '</a>
          <ul>

            ' . $t1 . '

          </ul>
        </li>
      </ul>
      </div><!-- menu -->                
    ' : '


    ' . (($t2 = BOUCLE_art_syndic2html_bb1fa8f06f75cd5c61b4de0a063c1a54($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
      <div class="menu rub">
      <ul>
        <li><a href="' . interdire_scripts(generer_url_public('site', '')) . '" title="' . _T('public|spip|ecrire:autres_sites') . '">' . _T('public|spip|ecrire:nouveautes_web') . '</a>
          <ul>

            ' . $t2 . '

          </ul>
        </li>
      </ul>
      </div><!-- menu -->                
    ' : '') . '

    ') . '
      	

    ' . (($t1 = BOUCLE_siteshtml_bb1fa8f06f75cd5c61b4de0a063c1a54($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
      <div class="menu rub">
      <ul>
        <li><a href="' . interdire_scripts(generer_url_public('site', '')) . '" title="' . _T('public|spip|ecrire:autres_sites') . '">' . _T('public|spip|ecrire:sites_web') . '</a>
          <ul>
            ' . $t1 . '
          </ul>
        </li>
      </ul>
      </div><!-- menu -->
    ' : '') . '

    ';
    return analyse_resultat_skel('html_bb1fa8f06f75cd5c61b4de0a063c1a54', $Cache, $page, 'squelettes/inc/inc-syndic.html');
}
コード例 #27
0
/**
 * Composer le code de sécurisation anti script
 *
 * @param string $code
 * @param Champ $p
 *     Balise sur laquelle s'applique le filtre
 * @return string
 */
function sandbox_composer_interdire_scripts($code, &$p)
{
    // Securite
    if ($p->interdire_scripts and $p->etoile != '**') {
        if (!preg_match("/^sinon[(](.*),'([^']*)'[)]\$/", $code, $r)) {
            $code = "interdire_scripts({$code})";
        } else {
            $code = interdire_scripts($r[2]);
            $code = "sinon(interdire_scripts({$r['1']}),'{$code}')";
        }
    }
    return $code;
}
コード例 #28
0
ファイル: formulaire_contact.php プロジェクト: pcrest/eludis
function balise_FORMULAIRE_CONTACT_dyn($id_machin)
{
    /* c’est ici qu’on met le traitement des données (insertion en base etc).
       Elle reçoit les valeures retournées par la fonction _stat et doit retourner soit :
        * un message d’erreur
        * un tableau représentant un squelette SPIP :
             1. le nom du fond (e.g. "formulaires/formulaire_forum")
             2. le délais
             3. un tableau des paramètres à passer à ce squelette (ensuite accessible par #ENV)
       On peut acceder ici aux variables postées par le formulaire en utilisation la fonction _request('name'); et faire des traitements 
       en fonction de celles ci pour faire l’insertion en base, envoyer un mail etc...
    	*/
    global $_FILES, $_HTTP_POST_FILES;
    // ces variables sont indispensables pour récuperer les documents joints
    // Récupération de id de la rubrique en cours
    $rubrique = intval(_request('id_rubrique'));
    // on recuperer l'id de l'auteur anonymous
    $connect_id_auteur = intval(_request('id_auteur'));
    // si il n'est pas dans la base => plugins openpublishing mal installé
    if (!$connect_id_auteur) {
        echo "Attention votre URL ne comporte pas d'id_auteur !";
        die("Veuillez modifier l'appelle à cette page pour y inclure cet identifiant auteur");
    }
    // récupération des variables du formulaire HTML
    // données actions
    $previsualiser = _request('previsualiser');
    $valider = _request('valider');
    $media = _request('media');
    $abandonner = _request('abandonner');
    // on quitte et renvoie vers le sommaire
    if ($abandonner) {
        $retour = '<div align="center"> <h3>Vous avez abandonn&eacute; la cr&eacute;ation d\'un article. <br /> <br /> Aucne information na &eacute;t&eacute; enregistr&eacute;e.</h3> </div>';
        $message = '<META HTTP-EQUIV="refresh" content="3; url=spip.php?page=rubrique&amp;id_rubrique=' . $rubrique . '">';
        $message = $message . $retour;
        return $message;
    }
    // on recupere l'id article (sinon on créer un nouveau article à chaque prévisualisation ou ajout de document ...
    $article = intval(stripslashes(_request('article')));
    // données pour formulaire document
    $formulaire_documents = stripslashes(_request('formulaire_documents'));
    $doc = stripslashes(_request('doc'));
    $type_doc = stripslashes(_request('type'));
    // donnée article
    $surtitre = stripslashes(_request('surtitre'));
    $titre = stripslashes(_request('titre'));
    $soustitre = stripslashes(_request('soustitre'));
    $descriptif = stripslashes(_request('descriptif'));
    $nom_site = stripslashes(_request('nom_site'));
    $url_site = stripslashes(_request('url_site'));
    $chapo = stripslashes(_request('chapo'));
    $texte = stripslashes(_request('texte'));
    $ps = stripslashes(_request('ps'));
    // déclarations de variables supplémentaires (pour la fonction ajout_document)
    $documents_actifs = array();
    // autres variables
    $lang = _request('var_lang');
    $nom = 'changer_lang';
    lang_dselect();
    $langues = liste_options_langues($nom, $lang);
    // remise à zero
    $formulaire_previsu = '';
    $bouton = '';
    $mess_error = '';
    $erreur_document = 0;
    // filtrage des zones de texte si elles sont emplies
    if ($titre) {
        $titre = entites_html($titre);
    }
    // on demande un nouvel identifiant
    if ($previsualiser || $media || $valider) {
        if (!$article) {
            $article = op_request_new_id($connect_id_auteur);
        }
    }
    // l'auteur demande la publication de son article
    if ($valider) {
        // statut de l'article : proposé
        $statut = 'prop';
        /****** préparation de la mise en base de donnée 	 ********/
        // on recupere le secteur et la langue associée
        $s = spip_query("SELECT id_secteur, lang FROM spip_rubriques WHERE id_rubrique = '{$rubrique}' ");
        if ($r = spip_fetch_array($s)) {
            $id_secteur = $r["id_secteur"];
            $lang = $r["lang"];
            // L'article existe déjà, on fait donc un UPDATE, et non un INSERT
            $retour = spip_query('UPDATE spip_articles SET titre = ' . spip_abstract_quote($titre) . ',	id_rubrique = ' . spip_abstract_quote($rubrique) . ',	texte = ' . spip_abstract_quote($texte) . ',	statut = ' . spip_abstract_quote($statut) . ',	lang = ' . spip_abstract_quote($lang) . ',	id_secteur = ' . spip_abstract_quote($id_secteur) . ',	ps =' . spip_abstract_quote($ps) . ',  nom_site =' . spip_abstract_quote($nom_site) . ',  url_site =' . spip_abstract_quote($url_site) . ',  surtitre =' . spip_abstract_quote($surtitre) . ',  soustitre =' . spip_abstract_quote($soustitre) . ',  chapo =' . spip_abstract_quote($chapo) . ',  descriptif =' . spip_abstract_quote($descriptif) . ',	date = NOW()' . ',	date_redac = NOW()' . ',	date_modif = NOW()' . ' WHERE id_article = ' . spip_abstract_quote($article));
            if ($retour == 1) {
                // tout c'est bien passé
                $retour = '';
            } else {
                $retour = "Erreur lors de l'insertion de votre article dans la base de donn&eacute;e, veuillez contactez les responsables du site";
            }
        }
        $retour = '<div align="center"> <h3>Votre article a bien &eacute;t&eacute; enregistr&eacute;. <br /> <br /> Il sera publi&eacute; apr&egrave;s validation.</h3> </div>';
        $message = '<META HTTP-EQUIV="refresh" content="3; url=spip.php?page=rubrique&amp;id_rubrique=' . $rubrique . '">';
        $message = $message . $retour;
        return $message;
    } else {
        // statut de l'article : en préparation
        $statut = "prepa";
        // si l'auteur demande la prévisualisation
        if ($previsualiser) {
            // quelques petites vérifications
            if (strlen($titre) < 3) {
                $erreur .= _T('forum_attention_trois_caracteres');
            }
            if (!$erreur) {
                $bouton = _T('Proposer');
            }
            // on rempli le formulaire de prévisualisation
            $formulaire_previsu = inclure_balise_dynamique(array('formulaires/FORMULAIRE_CONTACT_previsu', 0, array('date_redac' => $date_redac, 'titre' => interdire_scripts(typo($titre)), 'texte' => propre($texte), 'ps' => propre($ps), 'nom_site' => propre($nom_site), 'url_site' => propre($url_site), 'surtitre' => propre($surtitre), 'soustitre' => propre($soustitre), 'chapo' => propre($chapo), 'descriptif' => propre($descriptif), 'erreur' => $erreur)), false);
            // aucune idée de ce que c'est, mais ça à l'air important
            $formulaire_previsu = preg_replace("@<(/?)f(orm[>[:space:]])@ism", "<\\1no-f\\2", $formulaire_previsu);
        }
        // si l'auteur ajoute un documents
        if ($media) {
            // compatibilité php < 4.1
            if (!$_FILES) {
                $_FILES = $GLOBALS['HTTP_POST_FILES'];
            }
            // récupération des variables
            $fichier = $_FILES['doc']['name'];
            $size = $_FILES['doc']['size'];
            $tmp = $_FILES['doc']['tmp_name'];
            $type = $_FILES['doc']['type'];
            $error = $_FILES['doc']['error'];
            // vérification si upload OK
            if (!is_uploaded_file($tmp)) {
                echo $error;
                $mess_error = "Erreur d'upload ! le fichier temporaire est introuvable. <br /> Il ce peut que vous tentiez d'uploader un fichier trop volumineux. <br /> La taille maximale autoris&eacute;e est de 5 Mo";
                $erreur_document = 1;
            } else {
                inc_ajouter_documents_dist($tmp, $fichier, "article", $article, $type_doc, $id_document, &$documents_actifs);
            }
        }
        // cas d'un nouvel article ou re-affichage du formulaire
        // Gestion des documents
        $bouton = "Ajouter un nouveau document";
        $formulaire_documents = inclure_balise_dynamique(array('formulaires/formulaire_documents', 0, array('id_article' => $article, 'bouton' => $bouton)), false);
        // Liste des documents associés à l'article
        op_liste_vignette($article);
        // le bouton valider
        $bouton = _T('Proposer');
        // et on remplit le formulaire avec tout ça
        return array('formulaires/formulaire_contact', 0, array('formulaire_documents' => $formulaire_documents, 'formulaire_previsu' => $formulaire_previsu, 'formulaire_agenda' => $formulaire_agenda, 'bouton' => $bouton, 'article' => $article, 'rubrique' => $rubrique, 'surtitre' => $surtitre, 'soustitre' => $soustitre, 'descriptif' => $descriptif, 'nom_site' => $nom_site, 'url_site' => $url_site, 'chapo' => $chapo, 'ps' => $ps, 'mess_error' => $mess_error, 'url' => $url, 'titre' => interdire_scripts(typo($titre)), 'texte' => $texte));
    }
}
コード例 #29
0
ファイル: texte.php プロジェクト: genma/spip_ynh
/**
 * Typographie generale
 * avec protection prealable des balises HTML et SPIP
 *
 * http://code.spip.net/@typo
 *
 * @param string $letexte
 * @param bool $echapper
 * @param null $connect
 * @param array $env
 * @return string
 */
function typo($letexte, $echapper = true, $connect = null, $env = array())
{
    // Plus vite !
    if (!$letexte) {
        return $letexte;
    }
    // les appels directs a cette fonction depuis le php de l'espace
    // prive etant historiquement ecrit sans argment $connect
    // on utilise la presence de celui-ci pour distinguer les cas
    // ou il faut passer interdire_script explicitement
    // les appels dans les squelettes (de l'espace prive) fournissant un $connect
    // ne seront pas perturbes
    $interdire_script = false;
    if (is_null($connect)) {
        $connect = '';
        $interdire_script = true;
    }
    $echapper = $echapper ? 'TYPO' : false;
    // Echapper les codes <html> etc
    if ($echapper) {
        $letexte = echappe_html($letexte, $echapper);
    }
    //
    // Installer les modeles, notamment images et documents ;
    //
    // NOTE : propre() ne passe pas par ici mais directement par corriger_typo
    // cf. inc/lien
    $letexte = traiter_modeles($mem = $letexte, false, $echapper ? $echapper : '', $connect, null, $env);
    if (!$echapper and $letexte != $mem) {
        $echapper = '';
    }
    unset($mem);
    $letexte = corriger_typo($letexte);
    $letexte = echapper_faux_tags($letexte);
    // reintegrer les echappements
    if ($echapper !== false) {
        $letexte = echappe_retour($letexte, $echapper);
    }
    // Dans les appels directs hors squelette, securiser ici aussi
    if ($interdire_script) {
        $letexte = interdire_scripts($letexte);
    }
    return $letexte;
}
コード例 #30
0
ファイル: references.php プロジェクト: rhertzog/lcs
function applique_filtres($p) {

	// Traitements standards (cf. supra)
	if ($p->etoile == '')
		$code = champs_traitements($p);
	else
		$code = $p->code;

	// Appliquer les filtres perso
	if ($p->param)
		$code = compose_filtres($p, $code);

	// S'il y a un lien avec la session, ajouter un code qui levera
	// un drapeau dans la structure d'invalidation $Cache
	if (isset($p->descr['session']))
		$code = "invalideur_session(\$Cache, $code)";

	// Securite
	if ($p->interdire_scripts
	AND $p->etoile != '**') {
		if (!preg_match("/^sinon[(](.*),'([^']*)'[)]$/", $code, $r))
			$code = "interdire_scripts($code)";
		else {
		  $code = interdire_scripts($r[2]);
		  $code = "sinon(interdire_scripts($r[1]),'$code')";
		}
	}
	return $code;
}