• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP entites_html函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中entites_html函数的典型用法代码示例。如果您正苦于以下问题:PHP entites_html函数的具体用法?PHP entites_html怎么用?PHP entites_html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了entites_html函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: inc_informer_dist

function inc_informer_dist($id, $col, $exclus, $rac, $type, $do = 'aff')
{
    include_spip('inc/texte');
    if ($type == "rubrique") {
        $row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = {$id}");
        if ($row) {
            $titre = typo($row["titre"]);
            $descriptif = propre($row["descriptif"]);
        } else {
            $titre = _T('info_racine_site');
        }
    } else {
        $titre = '';
    }
    $res = '';
    if ($type == "rubrique" and $GLOBALS['spip_display'] != 1 and isset($GLOBALS['meta']['image_process'])) {
        if ($GLOBALS['meta']['image_process'] != "non") {
            $chercher_logo = charger_fonction('chercher_logo', 'inc');
            if ($res = $chercher_logo($id, 'id_rubrique', 'on')) {
                list($fid, $dir, $nom, $format) = $res;
                include_spip('inc/filtres_images_mini');
                $res = image_reduire("<img src='{$fid}' alt='' />", 100, 48);
                if ($res) {
                    $res = "<div style='float: " . $GLOBALS['spip_lang_right'] . "; margin-" . $GLOBALS['spip_lang_right'] . ": -5px; margin-top: -5px;'>{$res}</div>";
                }
            }
        }
    }
    $rac = spip_htmlentities($rac);
    # ce lien provoque la selection (directe) de la rubrique cliquee
    # et l'affichage de son titre dans le bandeau
    $titre = strtr(str_replace("'", "&#8217;", str_replace('"', "&#34;", textebrut($titre))), "\n\r", "  ");
    $js_func = $do . '_selection_titre';
    return "<div style='display: none;'>" . "<input type='text' id='" . $rac . "_sel' value='{$id}' />" . "<input type='text' id='" . $rac . "_sel2' value=\"" . entites_html($titre) . "\" />" . "</div>" . "<div class='informer' style='padding: 5px; border-top: 0px;'>" . (!$res ? '' : $res) . "<p><b>" . safehtml($titre) . "</b></p>" . (!$descriptif ? '' : "<div>" . safehtml($descriptif) . "</div>") . "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>" . "<input type='submit' class='fondo' value='" . _T('bouton_choisir') . "'\nonclick=\"{$js_func}('{$titre}',{$id},'selection_rubrique','id_parent'); return false;\" />" . "</div>" . "</div>";
}
开发者ID:JLuc,项目名称:SPIP,代码行数:35,代码来源:informer.php


示例2: configuration_bloc_votre_site

function  configuration_bloc_votre_site()
{
	$adresse_site = entites_html($GLOBALS['meta']["adresse_site"]);
	$nom_site = entites_html($GLOBALS['meta']["nom_site"]);
	$email_webmaster = entites_html($GLOBALS['meta']["email_webmaster"]);
	$descriptif_site = entites_html($GLOBALS['meta']["descriptif_site"]);

	return debut_cadre_relief("", true, "", "<label for='nom_site'>"._T('info_nom_site')."</label>".aide ("confnom"))
	. "<input type='text' name='nom_site' id='nom_site' value=\"$nom_site\" size='40' class='forml' />"
	. fin_cadre_relief(true)

	. debut_cadre_relief("", true, "", "<label for='adresse_site'>"._T('info_adresse_url')."</label>")
	. "<input type='text' name='adresse_site' id='adresse_site' value=\"$adresse_site/\" size='40' class='forml' />"
	. fin_cadre_relief(true)

	. debut_cadre_relief("", true, "","<label for='descriptif_site'>". _T('entree_description_site')."</label>")
	. "<textarea name='descriptif_site' id='descriptif_site' class='forml' rows='4' cols='40'>$descriptif_site</textarea>"
	. fin_cadre_relief(true)

	. "<div>&nbsp;</div>"
	
	. debut_cadre_relief("", true, "", "<label for='email_webmaster'>"._T('info_email_webmestre')."</label>")
	. "<input type='text' name='email_webmaster' id='email_webmaster' value=\"$email_webmaster\" size='40' class='formo' />"
	. fin_cadre_relief(true);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:25,代码来源:accueil.php


示例3: html_f3666965c018303599bb64189cbac96c

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');
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:26,代码来源:html_f3666965c018303599bb64189cbac96c.php


示例4: html_9d96364ed1d79895affe5b2e3d246085

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');
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:59,代码来源:html_9d96364ed1d79895affe5b2e3d246085.php


示例5: BOUCLE_documenthtml_b8a8020987dd01f8087ad24f961857eb

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;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:56,代码来源:html_b8a8020987dd01f8087ad24f961857eb.php


示例6: produire_image_math

function produire_image_math($tex) {
	global $traiter_math;
	switch ($traiter_math) {
		// Attention: mathml desactiv'e pour l'instant
		case 'mathml':
			$ext = '.xhtml';
			$server = $GLOBALS['mathml_server'];
			break;
		case 'tex':
			$ext = '.png';
			$server = $GLOBALS['tex_server'];
			break;
		default:
			return $tex;
	}

	// Regarder dans le repertoire local des images TeX et blocs MathML
	if (!@is_dir($dir_tex = _DIR_VAR.'cache-TeX/'))
		@mkdir ($dir_tex, _SPIP_CHMOD);
	$fichier = $dir_tex .md5(trim($tex)).$ext;
	

	if (!@file_exists($fichier)) {
		// Aller chercher l'image sur le serveur
		if ($server) {
			spip_log($url = $server.'?'.rawurlencode($tex));
			include_spip('inc/distant');
			recuperer_page($url,$fichier);
		}
	}


	// Composer la reponse selon presence ou non de l'image
	$tex = entites_html($tex);
	if (@file_exists($fichier)) {

		// MathML
		if ($traiter_math == 'mathml') {
			return join(file("$fichier"),"");
		}

		// TeX
		else {
			list(,,,$size) = @getimagesize($fichier);
			$alt = "alt=\"$tex\" title=\"$tex\""; 
			return "<img src=\"$fichier\" style=\"vertical-align:middle;\" $size $alt />";
		}

	}
	else // pas de fichier
		return "<tt><span class='spip_code' dir='ltr'>$tex</span></tt>";

}
开发者ID:rhertzog,项目名称:lcs,代码行数:53,代码来源:math.php


示例7: afficher_textarea_barre

function afficher_textarea_barre($texte, $forum=false, $form='')
{
	global $spip_display, $spip_ecran;
	$rows = ($spip_ecran == "large") ? 28 : 15;
	
	$class = 'formo' . ($forum ? ' textarea_forum':'');
	return 
	  "<textarea name='texte' id='texte' "
	. " rows='$rows' class='$class' cols='40'>"
	. entites_html($texte)
	. "</textarea>\n";
}
开发者ID:rhertzog,项目名称:lcs,代码行数:12,代码来源:barre.php


示例8: inc_safehtml_dist

function inc_safehtml_dist($t) {
	static $process, $test;

	if (!$test) {
		$process = false;
		if ($f = find_in_path('lib/safehtml/classes')) {
			define('XML_HTMLSAX3', $f.'/');
			require_once XML_HTMLSAX3.'safehtml.php';
			$process = new safehtml();
			$process->deleteTags[] = 'param'; // sinon bug Firefox
		}
		if ($process)
			$test = 1; # ok
		else
			$test = -1; # se rabattre sur une fonction de securite basique
	}

	if ($test > 0) {
		# autoriser des trucs
		# ex: l'embed de youtube
		if (
		false !== strpos($t, 'iframe')) {
			foreach (extraire_balises($t, 'iframe') as $iframe) {
				if (preg_match(',^http://(www\.)?(youtube\.com|(player\.)?vimeo\.com)/.*,', extraire_attribut($iframe, 'src'))) {
					$re = '___IFRAME___'.md5($iframe);
					$ok[$re] = $iframe;
					$t = str_replace($iframe, $re, $t);
				}
			}
		}

		# reset ($process->clear() ne vide que _xhtml...),
		# on doit pouvoir programmer ca plus propremement
		$process->_counter = array();
		$process->_stack = array();
		$process->_dcCounter = array();
		$process->_dcStack = array();
		$process->_listScope = 0;
		$process->_liStack = array();
#		$process->parse(''); # cas particulier ?
		$process->clear();
		$t = $process->parse($t);

		# reinserer les trucs autorises
		if ($ok)
		foreach ($ok as $re => $v)
			$t = str_replace($re, $v, $t);
	}
	else
		$t = entites_html($t); // tres laid, en cas d'erreur

	return $t;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:53,代码来源:safehtml.php


示例9: protege_champ

function protege_champ($texte){
	if (is_array($texte))
		$texte = array_map('protege_champ',$texte);
	else {
		// ne pas corrompre une valeur serialize
		if ((preg_match(",^[abis]:\d+[:;],", $texte) AND unserialize($texte)!=false) OR is_null($texte))
			return $texte;
		$texte = entites_html($texte);
		$texte = str_replace("'","&#39;",$texte);
	}
	return $texte;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:12,代码来源:formulaire_.php


示例10: cextras_enum

function cextras_enum($enum, $val='', $type='valeur', $name='') {
	$enums = array();
	foreach ($vals = explode("\n", $enum) as $x) {
		list($cle, $desc) = explode(',', trim($x), 2);
		$enums[$cle] = _T($desc);
	}

	$val_t = explode(',', $val);

	foreach($enums as $cle => $desc) {
		switch($type) {
			case 'valeur':
				$enums[$cle] = 
					($cle == $val
					OR in_array($cle, $val_t))
						? sinon(sinon($desc,$cle),_T('cextra:cextra_par_defaut'))
						: '';
				break;
			case 'option':
				$enums[$cle] = '<option value="'.entites_html($cle).'"'
					. ($cle == $val
						? " selected='selected'"
						: ''
					) .'> '.sinon(sinon($desc,$cle),_T('cextra:cextra_par_defaut'))
					.'</option>'
					."\n";
				break;
			case 'radio':
				$enums[$cle] = "<div class='choix'><input type='radio' name='$name' id='${name}_$cle' value=\"".entites_html($cle).'"'
					. ($cle == $val
						? " checked='checked'"
						: ''
					) ."><label for='${name}_$cle'>"
					. sinon(sinon($desc,$cle),_T('cextra:cextra_par_defaut'))
					.'</label></div>'
					."\n";
				break;
			case 'cases':
				$enums[$cle] = "<div class='choix'><input type='checkbox' name='${name}[]' id='${name}_$cle' value=\"".entites_html($cle).'"'
					. (in_array($cle, $val_t)
						? " checked='checked'"
						: ''
					) ." /><label for='${name}_$cle'>"
					. sinon(sinon($desc,$cle),_T('cextra:cextra_par_defaut'))
					.'</label></div>'
					."\n";
				break;
		}
	}
	
	return trim(join("\n", $enums));
}
开发者ID:rhertzog,项目名称:lcs,代码行数:52,代码来源:cextras_pipelines.php


示例11: protege_champ

/**
 * Protéger les saisies d'un champ de formulaire
 * 
 * Proteger les ' et les " dans les champs que l'on va injecter,
 * sans toucher aux valeurs sérialisées
 *
 * @see entites_html()
 * @param string|array $texte
 *     Saisie à protéger
 * @return string|array
 *     Saisie protégée
**/
function protege_champ($texte)
{
    if (is_array($texte)) {
        $texte = array_map('protege_champ', $texte);
    } else {
        // ne pas corrompre une valeur serialize
        if (preg_match(",^[abis]:\\d+[:;],", $texte) and unserialize($texte) != false or is_null($texte)) {
            return $texte;
        }
        $texte = entites_html($texte);
    }
    return $texte;
}
开发者ID:nursit,项目名称:SPIP,代码行数:25,代码来源:formulaire_.php


示例12: inc_tourner_dist

function inc_tourner_dist($id_document, $document, $script, $flag, $type)
{
	global $spip_lang_right;

	if (!$document) {
		// retour d'Ajax
		$document = sql_fetsel("*", "spip_documents", "id_document = " . intval($id_document));
	}

	$prim = 'id_' . $type;
	// si pas de doc le hash sera inutilisable
	$id = intval(sql_getfetsel('id_objet', 'spip_documents_liens', "objet=".sql_quote($type)." AND id_document = " . intval($id_document)));

	$titre = $document['titre'];
	$id_vignette = $document['id_vignette'];
	$fichier = entites_html($document['fichier']);

	if (isset($document['url']))
		$url = $document['url'];
	else {
		$url = generer_url_entite($id_document, 'document');
	}

	$res = '';

	// Indiquer les documents manquants avec un panneau de warning

	if ($document['distant'] != 'oui') {
		if (!@file_exists(get_spip_doc($document['fichier']))){
			$c = _T('fichier_introuvable',
					array('fichier'=>basename($document['fichier'])));
			$res = "<img src='" . chemin_image('warning-24.gif')
				."'\n\tstyle='float: right;'\n\talt=\"$c\"\n\ttitle=\"$c\" />";
		} else {
			if ($flag AND !$id_vignette) 
				$res = boutons_rotateurs($document, $type, $id, $id_document,$script);
		}
	} else {
		$res = "\n<div class='verdana1' style='float: $spip_lang_right; text-align: $spip_lang_right;'>";
		
		// Signaler les documents distants par une icone de trombone
		$res .= "<img src='" . chemin_image('attachment.gif') . "'\n\t \n\talt=\"$fichier\"\n\ttitle=\"$fichier\" />\n";
		// Bouton permettant de copier en local le fichier
		$res .= bouton_copier_local($document, $type, $id, $id_document, $script);
		
		$res .= "</div>\n";
	}
	return tourner_greffe($id_document, $document, $url, $res);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:49,代码来源:tourner.php


示例13: BOUCLE_articleshtml_ce97d1249b67fffb20134bd49b8a9e29

function BOUCLE_articleshtml_ce97d1249b67fffb20134bd49b8a9e29(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'articles';
        $command['id'] = '_articles';
        $command['from'] = array('articles' => 'spip_articles', 'L1' => 'spip_auteurs_liens');
        $command['type'] = array();
        $command['groupby'] = array("articles.id_article");
        $command['select'] = array("articles.titre", "articles.id_article", "articles.lang", "articles.texte", "articles.descriptif", "articles.chapo", "articles.date");
        $command['orderby'] = array('articles.titre');
        $command['join'] = array('L1' => array('articles', 'id_objet', 'id_article', 'L1.objet=' . sql_quote('article')));
        $command['limit'] = '';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('articles.statut', 'publie,prop,prepa/auteur', 'publie', ''), array('=', 'L1.id_auteur', sql_quote($Pile[$SP]['id_auteur'], '', 'bigint(21) NOT NULL DEFAULT \'0\'')));
    if (defined("_BOUCLE_PROFILER")) {
        $timer = time() + microtime();
    }
    $t0 = "";
    // REQUETE
    $iter = IterFactory::create("SQL", $command, array('squelettes/auteur.html', 'html_ce97d1249b67fffb20134bd49b8a9e29', '_articles', 39, $GLOBALS['spip_lang']));
    if (!$iter->err()) {
        lang_select($GLOBALS['spip_lang']);
        $SP++;
        // RESULTATS
        while ($Pile[$SP] = $iter->fetch()) {
            lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
            $t1 = '
			<h3><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></h3>
			<div class="detail">
				' . interdire_scripts(nom_jour(normaliser_date($Pile[$SP]['date']))) . ' ' . interdire_scripts(affdate(normaliser_date($Pile[$SP]['date']))) . '
			</div>
		';
            $t0 .= (strlen($t1) && strlen($t0) ? '<br />' : '') . $t1;
            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/auteur.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:47,代码来源:html_ce97d1249b67fffb20134bd49b8a9e29.php


示例14: BOUCLE_art_agendahtml_78503d8cb0bd66f2d97f4b9c0f7d329a

function BOUCLE_art_agendahtml_78503d8cb0bd66f2d97f4b9c0f7d329a(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
    static $command = array();
    static $connect;
    $command['connect'] = $connect = '';
    if (!isset($command['table'])) {
        $command['table'] = 'articles';
        $command['id'] = '_art_agenda';
        $command['from'] = array('articles' => 'spip_articles', 'L1' => 'spip_mots_liens', 'L2' => 'spip_mots');
        $command['type'] = array();
        $command['groupby'] = array("articles.id_article");
        $command['select'] = array("articles.date_redac", "articles.id_article", "articles.texte", "articles.descriptif", "articles.chapo", "articles.titre", "articles.lang");
        $command['orderby'] = array('articles.date_redac');
        $command['join'] = array('L1' => array('articles', 'id_objet', 'id_article', 'L1.objet=' . sql_quote('article')), 'L2' => array('L1', 'id_mot'));
        $command['limit'] = '0,5';
        $command['having'] = array();
    }
    $command['where'] = array(quete_condition_statut('articles.statut', 'publie,prop,prepa/auteur', 'publie', ''), array('=', 'L2.titre', "'Agenda'"), array('<', 'TIMESTAMPDIFF(HOUR,articles.date_redac,NOW())/24', "1"), array('=', 'articles.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-menu-agenda.html', 'html_78503d8cb0bd66f2d97f4b9c0f7d329a', '_art_agenda', 4, $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(affdate(normaliser_date($Pile[$SP]['date_redac'])))) !== '' ? '<span>' . $t1 . (' ' . (($t2 = strval(heures(normaliser_date($Pile[$SP]['date_redac'])) != '0' ? (($t3 = strval(heures(normaliser_date($Pile[$SP]['date_redac'])))) !== '' ? $t3 . ':' : '') . minutes(normaliser_date($Pile[$SP]['date_redac'])) : '')) !== '' ? '- ' . $t2 : '') . '</span>') : '') . '
					<a class="lien' . interdire_scripts(@$Pile[0]['exposer']) . ' article" href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) . '" ' . (($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_art_agenda @ squelettes/inc/inc-menu-agenda.html", "profiler" . _LOG_AVERTISSEMENT);
    }
    return $t0;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:46,代码来源:html_78503d8cb0bd66f2d97f4b9c0f7d329a.php


示例15: BOUCLE_langueshtml_9491858aea5af6033788aa1936ebca8d

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;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:45,代码来源:html_9491858aea5af6033788aa1936ebca8d.php


示例16: BOUCLE_breves_rubriqueshtml_11157eacea3e766769d2031f1e2eed04

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']))) 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP entities_to_ascii函数代码示例发布时间:2022-05-15
下一篇:
PHP entete函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap