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

PHP propre函数代码示例

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

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



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

示例1: blocs_callback

function blocs_callback($matches) {
	list($titre, $corps) = preg_split(',(\n\n|\r\n\r\n|\r\r),', trim($matches[3]), 2);
	// pas de corps !
	if(!strlen($corps = trim($corps))) {
		$corps = $titre;
		$titre = preg_replace(',[\n\r]+,s', ' ', couper(propre($titre), 30));
	}
	// pas d'intertitre !
	$titre = preg_replace(',^{{{(.*)}}}$,', '$1', trim($titre));
	if(!strlen($titre)) $titre = '???';
	// un resume facultatif
	if(preg_match(',<resume>(.*)</resume>\s?(.*)$,ms', $corps, $res))
		{ $corps = $res[2]; $res = $res[1]; } else $res = '';
	// types de blocs : bloc|invisible|visible
	if ($matches[1]=='visible' || defined('_CS_PRINT')) {
		$h = $d = '';
		$r = ' blocs_invisible blocs_slide';
	} else {
		$h = ' blocs_replie';
		$d = ' blocs_invisible blocs_slide';
		$r = '';
	}

	// blocs numerotes
	$b = strlen($matches[2])?" cs_bloc$matches[2]":''; 
	// title
	$title = function_exists('blocs_title')
		?"<div class='blocs_title blocs_invisible'>".join(_BLOC_TITLE_SEP, blocs_title($titre, $corps, $matches[2], $h<>'')).'</div>'
		:''; // valeur par defaut geree en JS
	return "<div class='cs_blocs$b'><"._BLOC_TITRE_H." class='blocs_titre$h blocs_click'><a href='javascript:;'>$titre</a></"._BLOC_TITRE_H.">"
		.(strlen($res)?"<div class='blocs_resume$r'>\n$res\n</div>":"")
		."<div class='blocs_destination$d'>\n\n".blocs_rempl($corps)."\n\n</div>$title</div>";
}
开发者ID:rhertzog,项目名称:lcs,代码行数:33,代码来源:blocs.php


示例2: exec_acces_restreint

function exec_acces_restreint(){
	if (!autoriser('administrer','zone',0)) {
		include_spip('inc/minipres');
		echo minipres();
		exit;
	}

	$commencer_page = charger_fonction('commencer_page','inc');
	echo $commencer_page(_T('accesrestreint:page_zones_acces'));
	
	echo gros_titre(_T('accesrestreint:titre_zones_acces'),'',false);
	echo debut_gauche("acces_restreint",true);
	
	echo debut_boite_info(true);
	echo propre(_T('accesrestreint:info_page'));	
	echo fin_boite_info(true);
	
	if (autoriser('webmestre')) {
		$res = icone_horizontale(_L('Configuration des acc&#232;s .htaccess'), generer_url_ecrire("acces_restreint_config"), "../"._DIR_PLUGIN_ACCESRESTREINT."/img_pack/zones-acces-24.gif", "cadenas-24.gif",false);
		echo bloc_des_raccourcis($res);
	}
	
	echo debut_droite("acces_restreint",true);
	echo recuperer_fond('prive/acces_restreint',$_GET);
	if (autoriser('modifier','zone'))
		echo "<div>".icone_inline(_T('accesrestreint:creer_zone'),
		  generer_url_ecrire("zones_edit","new=oui"),
		  _DIR_PLUGIN_ACCESRESTREINT."/img_pack/zones-acces-24.gif",
		  "creer.gif",'right')."</div>";

	echo fin_gauche(),fin_page();
}
开发者ID:rhertzog,项目名称:lcs,代码行数:32,代码来源:acces_restreint.php


示例3: traiter_ressources

function traiter_ressources($r)
{
    $html = null;
    if ($ressource = charger_fonction('ressource', 'inc', true)) {
        $html = $ressource($r[0]);
    }
    if (is_null($html)) {
        include_spip('inc/lien');
        $url = explode(' ', trim($r[0], '<>'));
        $url = $url[0];
        # <http://url/absolue>
        if (preg_match(',^https?://,i', $url)) {
            $html = PtoBR(propre("<span class='ressource spip_out'>&lt;[->" . $url . "]&gt;</span>"));
        } else {
            if (false !== strpos($url, '/')) {
                $html = PtoBR(propre("<span class='ressource spip_in'>&lt;[->" . $url . "]&gt;</span>"));
            } else {
                preg_match(',\\.([^.]+)$,', $url, $regs);
                if (file_exists($f = _DIR_IMG . $regs[1] . '/' . $url)) {
                    $html = PtoBR(propre("<span class='ressource spip_in'>&lt;[" . $url . "->" . $f . "]&gt;</span>"));
                } else {
                    $html = PtoBR(propre("<span class='ressource'>&lt;" . $url . "&gt;</span>"));
                }
            }
        }
    }
    return '<html>' . $html . '</html>';
}
开发者ID:genma,项目名称:spip_ynh,代码行数:28,代码来源:ressource.php


示例4: 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


示例5: exec_description_outil_dist

function exec_description_outil_dist() {
cs_log("INIT : exec_description_outil_dist() - Preparation du retour par Ajax (donnees transmises par GET)");
	$script = _request('script');
	$outil = _request('outil');
cs_log(" -- outil = $outil - script = $script");
	cs_minipres(!preg_match('/^\w+$/', $script));
	// ici on commence l'initialisation de tous les outils
	global $outils, $metas_vars, $metas_outils;
	include_spip('cout_utils');
	// remplir $outils (et aussi $cs_variables qu'on n'utilise pas ici);
	include_spip('config_outils');
cs_log(" -- exec_description_outil_dist() - Appel de config_outils.php : nb_outils = ".count($outils));
	// installer les outils
	cs_installe_outils();

cs_log(" -- appel de charger_fonction('description_outil', 'inc') et de description_outil($outil, $script) :");
	include_spip('inc/cs_outils');
	$description_outil = charger_fonction('description_outil', 'inc');
	$descrip = cs_initialisation_d_un_outil($outil, $description_outil, true);
	cs_init_plugins();

cs_log(" FIN : exec_description_outil_dist() - Appel maintenant de ajax_retour() pour afficher la ligne de configuration de l'outil");	
	include_spip('inc/texte');
	include_spip('cout_fonctions'); // fonctions pour les pipelines
	ajax_retour(propre($descrip));
}
开发者ID:rhertzog,项目名称:lcs,代码行数:26,代码来源:description_outil.php


示例6: cs_propre

function cs_propre($texte) {
	include_spip('inc/texte');
	$mem = $GLOBALS['toujours_paragrapher'];
	$GLOBALS['toujours_paragrapher'] = false;
	$texte = propre($texte);
	$GLOBALS['toujours_paragrapher'] = $mem;
	return $texte;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:8,代码来源:cout_fonctions.php


示例7: exec_documents_liste_dist

function exec_documents_liste_dist()
{

//
// Recupere les donnees
//

$commencer_page = charger_fonction('commencer_page', 'inc');
echo $commencer_page(_T('titre_page_documents_liste'), "naviguer", "documents");
echo debut_gauche('', true);


//////////////////////////////////////////////////////
// Boite "voir en ligne"
//

echo debut_boite_info(true);

echo propre(_T('texte_recapitiule_liste_documents'));

echo fin_boite_info(true);



echo debut_droite('', true);

	// recupere les titres des types
	$res = sql_select('extension, titre', "spip_types_documents");
	while ($row = sql_fetch($res))
		$types[$row['extension']] = $row;

	$result = sql_select("docs.id_document AS id_doc, docs.extension AS extension, docs.fichier AS fichier, docs.date AS date, docs.titre AS titre, docs.descriptif AS descriptif, R.id_rubrique AS id_rub, R.titre AS titre_rub", "spip_documents AS docs, spip_documents_liens AS lien, spip_rubriques AS R", "docs.id_document = lien.id_document AND R.id_rubrique = lien.id_objet AND lien.objet='rubrique' AND docs.mode = 'document'", "", "docs.date DESC");

	while ($row=sql_fetch($result)){
		$titre=$row['titre'];
		$descriptif=$row['descriptif'];
		$date=$row['date'];
		$id_document=$row['id_doc'];
		$id_rubrique=$row['id_rub'];
		$titre_rub = typo($row['titre_rub']);
		$fichier = $row['fichier'];

		if (!$titre) $titre = _T('info_document').' '.$id_document;

		debut_cadre_relief("doc-24.gif");
		echo "<b>$titre</b> (" . $types[$row['extension']]['titre'] . ', ' . affdate($date) . ")";
		if ($descriptif)
			echo propre($descriptif);
		else
			echo "<p><tt>$fichier</tt>" . '</p>';

		echo "<p>"._T('info_dans_rubrique')." <a href='" . generer_url_ecrire("naviguer","id_rubrique=$id_rubrique") . "'>$titre_rub</a></p>";
		echo fin_cadre_relief(true);
	}

	echo fin_gauche(), fin_page();
}
开发者ID:rhertzog,项目名称:lcs,代码行数:57,代码来源:documents_liste.php


示例8: propre_notes

function propre_notes($texte)
{
    global $notes;
    $texte = propre($texte);
    if ($r = $notes(array())) {
        $texte .= "<div class='notes'>{$r}</div>";
        $notes('', 'depiler');
        $notes('', 'empiler');
    }
    return $texte;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:11,代码来源:tw_propre_typo.php


示例9: action_tester_taille_dist

function action_tester_taille_dist()
{
    if (!autoriser('configurer')) {
        return;
    }
    $taille = _request('arg');
    $taille = explode('-', $taille);
    $GLOBALS['taille_max'] = end($taille);
    $GLOBALS['taille_min'] = 0;
    if (count($taille) > 1) {
        $GLOBALS['taille_min'] = reset($taille);
    }
    // si l'intervalle est assez petit, on garde la valeur min
    if ($GLOBALS['taille_max'] * $GLOBALS['taille_max'] - $GLOBALS['taille_min'] * $GLOBALS['taille_min'] < 50000) {
        ecrire_meta('max_taille_vignettes', $t = $GLOBALS['taille_min'] * $GLOBALS['taille_min'] * 0.9, 'non');
        echo round($t / 1000000, 3) . ' Mpx';
        die;
    }
    $taille = $GLOBALS['taille_test'] = round(($GLOBALS['taille_max'] + $GLOBALS['taille_min']) / 2);
    include_spip('inc/filtres');
    // des inclusions representatives d'un hit prive et/ou public pour la conso memoire
    include_spip('public/assembler');
    include_spip('public/balises');
    include_spip('public/boucles');
    include_spip('public/cacher');
    include_spip('public/compiler');
    include_spip('public/composer');
    include_spip('public/criteres');
    include_spip('public/interfaces');
    include_spip('public/parametrer');
    include_spip('public/phraser_html');
    include_spip('public/references');
    include_spip('inc/presentation');
    include_spip('inc/charsets');
    include_spip('inc/documents');
    include_spip('inc/header');
    propre("<doc1>");
    // charger propre avec le trairement d'un modele
    $i = _request('i') + 1;
    $image_source = chemin_image("test.png");
    $GLOBALS['redirect'] = generer_url_action("tester_taille", "i={$i}&arg=" . $GLOBALS['taille_min'] . "-" . $GLOBALS['taille_test']);
    ob_start('action_tester_taille_error_handler');
    filtrer('image_recadre', $image_source, $taille, $taille);
    $GLOBALS['redirect'] = generer_url_action("tester_taille", "i={$i}&arg={$taille}-" . $GLOBALS['taille_max']);
    // si la valeur intermediaire a reussi, on teste la valeur maxi qui est peut etre sous estimee
    $taille = $GLOBALS['taille_max'];
    filtrer('image_recadre', $image_source, $taille, $taille);
    $GLOBALS['redirect'] = generer_url_action("tester_taille", "i={$i}&arg={$taille}-" . $GLOBALS['taille_max']);
    ob_end_clean();
    // on est ici, donc pas de plantage
    echo redirige_formulaire($GLOBALS['redirect']);
}
开发者ID:genma,项目名称:spip_ynh,代码行数:52,代码来源:tester_taille.php


示例10: inc_informer_auteur_dist

function inc_informer_auteur_dist($id)
{
	global $spip_display,$spip_lang_right ;

	include_spip('inc/presentation');
	include_spip('inc/formater_auteur');

	$row = sql_fetsel("*", "spip_auteurs", "id_auteur = $id");
	if ($row) {
		$nom = typo($row["nom"]);
		$bio = propre($row["bio"]);
		$mail = formater_auteur_mail($row, $id);
		$nb = sql_countsel("spip_auteurs_articles", "id_auteur=$id");
		if ($nb > 1)
		  $nb = $nb . "&nbsp;" . _T('info_article_2');
		else if($nb == 1)
		  $nb = "1&nbsp;" . _T('info_article');
		else $nb = "&nbsp;";
	} else {
		$nom = "<span style='color:red'>"
			. _T('texte_vide')
			. '</span>';
		$bio = $mail = $nb = '';
	}
	$res = '';
	if ($spip_display != 1 AND $spip_display!=4 AND $GLOBALS['meta']['image_process'] != "non") {
		$chercher_logo = charger_fonction('chercher_logo', 'inc');
		if ($res = $chercher_logo($id, 'id_auteur', 'on'))  {
			list($fid, $dir, $n, $format) = $res;
			include_spip('inc/filtres_images_mini');
			$res = image_reduire("<img src='$fid' alt='' />", 100, 48);
			if ($res)
				$res =  "<div style='float: $spip_lang_right; margin-$spip_lang_right: -5px; margin-top: -5px;'>$res</div>";
		}
	}

	return "<div class='informer-auteur'>"
	. (!$res ? '' : $res)
	. "<div><a href='"
	. generer_url_ecrire('auteur_infos', "id_auteur=$id")
	. "'>"
	. bonhomme_statut($row)
	. "</a> "
	. $mail
	. " <b>"
	. $nom
	. "</b><br />"
	. $nb
	. "</div><br />"
	. "<div>$bio</div>"
	.  "</div>";
}
开发者ID:rhertzog,项目名称:lcs,代码行数:52,代码来源:informer_auteur.php


示例11: configuration_relayeur_dist

function configuration_relayeur_dist($retour_proxy='')
{
	global $spip_lang_left;

	$res = $submit = '';

	$http_proxy = $GLOBALS['meta']["http_proxy"];
	$http_noproxy = $GLOBALS['meta']["http_noproxy"];

	if ($http_proxy) {
		include_spip('inc/distant');
		// Masquer un eventuel password authentifiant
		$http_proxy=entites_html(no_password_proxy_url($http_proxy));
		if ($http_proxy) {
			$res = "\n<p style='text-align: $spip_lang_left;' class='verdana1 spip_small'>"
			. "<label for='test_proxy'>" 
			. _T('texte_test_proxy')
			. "</label>"
			. "</p>"
			. "\n<p>"
			. "<input type='text' name='test_proxy' id='test_proxy' value='http://www.spip.net/' size='40' class='forml' />"
			. "</p>";

			if($retour_proxy) {
				$res .= debut_boite_info(true)
				. $retour_proxy
				. fin_boite_info(true);
			}
			$submit = array('valider_proxy' => _T('bouton_valider'),
					'tester_proxy' => _T('bouton_test_proxy'));
		}
	}

	$encours = "<label for='http_proxy'>" . ($http_proxy ? $http_proxy : "http://proxy:8080") . '</label>' ;
	$exemple = "<label for='http_noproxy'>" . ($http_noproxy ? $http_noproxy : "127.0.0.1 .mondomaine.net") . "</label>";
	$res = "\n<div class='verdana2'>"
	  . propre(_T('texte_proxy', array('proxy_en_cours' => "<b><tt><html>$encours</html></tt></b>")))
	  . "</div>"
	  . "\n<div class='verdana2'>"
	  . "<input type='text' name='http_proxy' id='http_proxy' size='40' class='forml' value='$http_proxy' />"
	  . "<br />"
	  . propre(_T('pas_de_proxy_pour', array('exemple' => "<b><tt><html>$exemple</html></tt></b>")))
	  . "<input type='text' name='http_noproxy' id='http_noproxy' size='40' class='forml' value='$http_noproxy' />"
	  . $res
	  . "</div>";

	$res = debut_cadre_trait_couleur("base-24.gif", true, "", _T('info_sites_proxy').aide ("confhttpproxy"))
	.  ajax_action_post('configurer_relayeur', 0, 'config_fonctions', '', $res, $submit)
	.  fin_cadre_trait_couleur(true);

	return ajax_action_greffe("configurer_relayeur", 0, $res);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:52,代码来源:relayeur.php


示例12: filtre_text_csv_dist

function filtre_text_csv_dist($t)
{
    include_spip('inc/csv');
    list($entete, $lignes) = analyse_csv($t);
    foreach ($lignes as &$l) {
        $l = join('|', $l);
    }
    $corps = join("\n", $lignes) . "\n";
    $corps = $caption . "\n|{{" . join('}}|{{', $entete) . "}}|" . "\n|" . str_replace("\n", "|\n|", $corps);
    $corps = str_replace('&#34#', '&#34;', $corps);
    include_spip('inc/texte');
    return propre($corps);
}
开发者ID:genma,项目名称:spip_ynh,代码行数:13,代码来源:filtres_mime.php


示例13: formulaires_rediriger_article_charger_dist

function formulaires_rediriger_article_charger_dist($id_article, $retour = '')
{
    $row = sql_fetsel('id_article,virtuel', 'spip_articles', 'id_article=' . intval($id_article));
    if (!$row['id_article']) {
        return false;
    }
    include_spip('inc/lien');
    $redirection = virtuel_redirige($row["virtuel"]);
    if (!$redirection and $GLOBALS['meta']['articles_redirection'] != 'oui') {
        return false;
    }
    include_spip('inc/texte');
    $valeurs = array('redirection' => $redirection, 'id' => $id_article, '_afficher_url' => $redirection ? propre("[->{$redirection}]") : '');
    return $valeurs;
}
开发者ID:nursit,项目名称:SPIP,代码行数:15,代码来源:rediriger_article.php


示例14: spiplistes_courrier_propre

/**
 * passe propre() sur un texte puis nettoye les trucs rajoutes par spip sur du html
 * ca s'utilise pour afficher un courrier dans l espace prive
 * on l'applique au courrier avant de confirmer l'envoi
 * @return string
 * @deprecated
 */
function spiplistes_courrier_propre ($texte) {
	//spiplistes_debug_log ('spiplistes_courrier_propre()');
	static $adresse_site;
	if (!$adresse_site) { $adresse_site = $GLOBALS['meta']['adresse_site']; }
	static $style_rev = '__STYLE__';
	
	if (preg_match ('@<style[^>]*>[^<]*</style>@'
							  , $texte
							  , $style_reg
							  )
		> 0
	) {
		
	}
	
	if (isset($style_reg[0])) {
		$style_str = $style_reg[0].'<!-- hole -->';
	}
	else {
		$style_str = '';
	}
	$texte = preg_replace ('@<style[^>]*>[^<]*</style>@', $style_rev, $texte);
	
	//passer propre si y'a pas de html (balises fermantes)
	if (!preg_match ('@</?('._BALISES_BLOCS.')[>[:space:]]@iS', $texte))
	{
		$texte = propre($texte); // pb: enleve aussi <style>...
	}
	//nettoyer les spip class truc en trop
	$texte = spiplistes_courrier_propre_bloog ($texte); 
	
	// remettre en place les styles
	$texte = str_replace ($style_rev, $style_str, $texte);
	
	//les liens avec double debut #URL_SITE_SPIP/#URL_ARTICLE
	$texte = preg_replace (
				'@'
				. $adresse_site
					. '/'
					. $adresse_site
					. '@'
				, $adresse_site
				, $texte
				);
	$texte = spiplistes_liens_absolus ($texte);
	
	return ($texte);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:55,代码来源:spiplistes_api_courrier.php


示例15: cs_introduction

function cs_introduction($texte, $descriptif, $lgr, $id, $racc, $connect) {
	@define('_INTRODUCTION_LGR', 100);
	// fonction couper_intro
	$couper = $GLOBALS['cs_couper_intro'];
	if (strlen($descriptif))
		# si descriptif contient juste des espaces ca produit une intro vide, 
		# c'est une fonctionnalite, pas un bug
		// ici le descriptif est coupe s'il est trop long
		$texte = $lgr<0?propre($couper($descriptif, -$lgr, _INTRODUCTION_CODE)):propre($descriptif);
	else {
		// pas de maths dans l'intro...
		$texte = preg_replace(',<math>.*</math>,imsU', '', $texte);
		// on coupe proprement...
		$lgr = $lgr>0?round($lgr*_INTRODUCTION_LGR/100):-$lgr;
		$texte = PtoBR(propre(supprimer_tags($couper(cs_introduire($texte), $lgr, _INTRODUCTION_CODE))));
	}
	// si les points de suite ont ete ajoutes
	return remplace_points_de_suite($texte, $id, $racc);
} // introduction()
开发者ID:rhertzog,项目名称:lcs,代码行数:19,代码来源:introduction_fonctions.php


示例16: pack_action_rapide

function pack_action_rapide() {
	include_spip('inc/texte'); // pour attribut_html()
	switch($n = count($GLOBALS['cs_installer'])) {
		case 0 : $info = _T('couteauprive:pack_nb_zero'); break;
		case 1 : $info = _T('couteauprive:pack_nb_un'); break;
		default : $info = _T('couteauprive:pack_nb_plrs', array('nb' => $n));
	}
	$liste = $script = '';
	if($n) {
		$exec = _request('exec');
		$fin_delete = _T('couteauprive:pack_delete');
		$fin_delete = "\" class='pack_delete' title=\"$fin_delete\"><img src=\""._DIR_IMG_PACK."poubelle.gif\" width='12' height='12' alt=\"$fin_delete\" /></a>&nbsp; <a href=\"";
		$fin_install = _T('couteauprive:pack_installe');
		$fin_install = "\" class='pack_install' title=\"$fin_install\"><img src=\""._DIR_IMG_PACK."secteur-12.gif\" width='12' height='12' alt=\"$fin_install\" /></a>&nbsp; ";
		foreach(array_keys($GLOBALS['cs_installer']) as $pack) {
			$u = urlencode($pack);
			$liste .= "\n-* <a href=\"" 
				. generer_url_ecrire($exec,'cmd=delete&pack='.$u)
				. $fin_delete
				. generer_url_ecrire($exec,'cmd=install&pack='.$u)
				. $fin_install . $pack;
		}
		$liste = propre($liste);
		$script = "<script type=\"text/javascript\"><!--
if (window.jQuery) jQuery(function(){
	jQuery('a.pack_delete').click( function() { 
		msg=\"".cs_javascript('couteauprive:pack_supprimer')."\";
		return window.confirm(msg.replace(/@pack@/,jQuery(this).parent().text().trim())); 
	});
	jQuery('a.pack_install').click( function() { 
		msg=\"".cs_javascript('couteauprive:pack_installer').'\n\n'.cs_javascript('couteauprive:cs_reset2')."\";
		return window.confirm(msg.replace(/@pack@/,jQuery(this).parent().text().trim())); 
	});
}); //--></script>\n";
	}
	// appel direct, sans ajax, histoire de mettre a jour le menu :
	return redirige_action_post('action_rapide', 'sauve_pack', 'admin_couteau_suisse', "cmd=pack#cs_infos",
			"\n$script<div style='padding:0.4em;'><p>$info</p>$liste<p>"._T('couteauprive:pack_sauver_descrip', array('file' => show_file_options()))
			."</p><div style='text-align: center;'><input class='fondo' type='submit' value=\""
			.attribut_html(_T('couteauprive:pack_sauver')) . "\" /></div></div>"); 
}
开发者ID:rhertzog,项目名称:lcs,代码行数:41,代码来源:pack_action_rapide.php


示例17: enfant_rub

/**
 * Crée l'affichage des listes de rubriques dans le privé
 *
 * @param int $collection
 *  L'identifiant numérique de la rubrique à lister
 * @param int $debut
 *  Le numéro de la pagination si paginé (> 500)
 * @param int $limite
 *  Le pas de pagination si paginé (> 500)
 * @return array $res
 *  Un tableau des sous rubriques
 */
function enfant_rub($collection, $debut = 0, $limite = 500)
{
    $voir_logo = (isset($GLOBALS['meta']['image_process']) and $GLOBALS['meta']['image_process'] != "non");
    $logo = "";
    if ($voir_logo) {
        $chercher_logo = charger_fonction('chercher_logo', 'inc');
        include_spip('inc/filtres_images_mini');
    }
    $res = array();
    $result = sql_select("id_rubrique, id_parent, titre, descriptif, lang ", "spip_rubriques", "id_parent={$collection}", '', '0+titre,titre', "{$debut},{$limite}");
    while ($row = sql_fetch($result)) {
        $id_rubrique = $row['id_rubrique'];
        $id_parent = $row['id_parent'];
        $titre = generer_info_entite($id_rubrique, 'rubrique', 'titre');
        // pour etre sur de passer par tous les traitements
        if ('' !== ($rang = recuperer_numero($row['titre']))) {
            $rang = "{$rang}. ";
        }
        if (autoriser('voir', 'rubrique', $id_rubrique)) {
            $les_sous_enfants = sous_enfant_rub($id_rubrique);
            changer_typo($row['lang']);
            $lang_dir = lang_dir($row['lang']);
            $descriptif = propre($row['descriptif']);
            if ($voir_logo) {
                if ($logo = $chercher_logo($id_rubrique, 'id_rubrique', 'on')) {
                    list($fid, $dir, $nom, $format) = $logo;
                    $logo = image_reduire("<img src='{$fid}' alt='' />", 48, 36);
                    if ($logo) {
                        $logo = inserer_attribut($logo, 'class', 'logo');
                    }
                }
            }
            $lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? "" : http_img_pack('auteur-0minirezo-16.png', '', " width='16' height='16'", _T('image_administrer_rubrique'))) . " <a dir='{$lang_dir}'" . ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') . " href='" . generer_url_entite($id_rubrique, 'rubrique') . "'>" . $rang . $titre . "</a>";
            $titre = (is_string($logo) ? $logo : '') . bouton_block_depliable($lib_bouton, $les_sous_enfants ? false : -1, "enfants{$id_rubrique}");
            $res[] = debut_cadre_sous_rub($id_parent ? "rubrique-24.png" : "secteur-24.png", true, "", $titre) . (!$descriptif ? '' : "\n<div class='descriptif'>{$descriptif}</div>") . $les_sous_enfants . fin_cadre_sous_rub(true);
        }
    }
    changer_typo($GLOBALS['spip_lang']);
    # remettre la typo de l'interface pour la suite
    return $res;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:53,代码来源:presenter_enfants.php


示例18: saisie_traitement_vue

/**
 * Traiter la valeur de la vue en fonction du env
 * si un traitement a ete fait en amont (champs extra) ne rien faire
 * si pas de traitement defini (formidable) passer typo ou propre selon le type du champ
 *
 * @param string $valeur
 * @param string|array $env
 * @return string
 */
function saisie_traitement_vue($valeur, $env)
{
    if (is_string($env)) {
        $env = unserialize($env);
    }
    if (!function_exists('propre')) {
        include_spip('inc/texte');
    }
    $valeur = trim($valeur);
    // si traitement est renseigne, alors le champ est deja mis en forme
    // (saisies)
    // sinon on fait une mise en forme smart
    if ($valeur and !isset($env['traitements'])) {
        if (in_array($env['type_saisie'], array('textarea'))) {
            $valeur = propre($valeur);
        } else {
            $valeur = '<p>' . typo($valeur) . '</p>';
        }
    }
    return $valeur;
}
开发者ID:RadioCanut,项目名称:site-radiocanut,代码行数:30,代码来源:saisies_fonctions.php


示例19: glossaire_verifie

function glossaire_verifie(&$c) {
	include_spip('public/parametrer'); // pour mes_fonctions
	$res = array();
	$c = count($gloss = glossaire_query_tab());
	for($i=0; $i<$c; $i++) for($j=$i+1; $j<$c; $j++) {
		$gi = &$gloss[$i]; $gj = &$gloss[$j];
		if(!isset($gi['mots']))
			list($gi['mots'],$gi['regs'],$gi['titre2']) = glossaire_parse(extraire_multi($gi['titre']));
		if(!isset($gj['mots']))
			list($gj['mots'],$gj['regs'],$gj['titre2']) = glossaire_parse(extraire_multi($gj['titre']));
		$u = false;
		$titre = $gi['mots']?glossaire_gogogo($gj['titre2'], $gi['mots'], -1, $u):'';
		if(count($gi['regs']))
			$titre .= preg_replace_callback($gi['regs'], "glossaire_echappe_mot_callback", $gj[titre], -1);
		if(strpos($titre,'@@GLOSS')!==false) {	
			$a = '['.$gi['titre'].'->mot'.$gi['id_mot'].']';
			$b = '['.$gj['titre'].'->mot'.$gj['id_mot'].']';
			$res[] = "&bull; "._T('couteauprive:glossaire_erreur', array('mot1'=>$a, 'mot2'=>$b))."\n_ ";
		}
	}
	if(count($res)) return propre(join('', $res)._T('couteauprive:glossaire_inverser'));
	return '';
}
开发者ID:rhertzog,项目名称:lcs,代码行数:23,代码来源:glossaire_action_rapide.php


示例20: configuration_porte_plume_dist

function configuration_porte_plume_dist()
{

	if (!$val =  $GLOBALS['meta']["barre_outils_public"]) {
		$val = 'oui';
	}
	$res = propre(_T("barre_outils:explication_barre_outils_public"));
	$res .= propre(_T("barre_outils:explication_barre_outils_public_2"));
	
	$res .= afficher_choix('barre_outils_public', $val,
		array(
			'oui' => _T("barre_outils:label_barre_outils_public_oui"),
			'non' => _T("barre_outils:label_barre_outils_public_non")
		), 
		" <br /> ");
	
	
	$res = debut_cadre_trait_couleur(find_in_path("images/porte-plume-24.png"), true, "", _T("barre_outils:info_porte_plume_titre"))
	. ajax_action_post('configurer', 'porte_plume', 'configuration','',$res)
	. fin_cadre_trait_couleur(true);

	return ajax_action_greffe('configurer-porte_plume', '', $res);

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



注:本文中的propre函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP prot函数代码示例发布时间:2022-05-15
下一篇:
PHP property_value函数代码示例发布时间: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