本文整理汇总了PHP中supprimer_numero函数的典型用法代码示例。如果您正苦于以下问题:PHP supprimer_numero函数的具体用法?PHP supprimer_numero怎么用?PHP supprimer_numero使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了supprimer_numero函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: url_nettoyer
function url_nettoyer($titre,$longueur_maxi,$longueur_min=0,$separateur='-',$filtre=''){
if (!defined('_TRANSLITTERER_URL')) define('_TRANSLITTERER_URL', true);
$titre = supprimer_tags(supprimer_numero(extraire_multi($titre)));
$url = corriger_caracteres($titre);
if (_TRANSLITTERER_URL) $url = translitteration($url);
if ($filtre)
$url = $filtre($url);
// on va convertir tous les caracteres de ponctuation et espaces
// a l'exception de l'underscore (_), car on veut le conserver dans l'url
$url = str_replace('_', chr(7), $url);
$url = @preg_replace(',[[:punct:][:space:]]+,u', ' ', $url);
$url = str_replace(chr(7), '_', $url);
// S'il reste trop de caracteres non latins, les gerer comme wikipedia
// avec rawurlencode :
if (_TRANSLITTERER_URL && preg_match_all(",[^a-zA-Z0-9 _]+,", $url, $r, PREG_SET_ORDER)) {
foreach ($r as $regs) {
$url = substr_replace($url, rawurlencode($regs[0]),
strpos($url, $regs[0]), strlen($regs[0]));
}
}
// S'il reste trop peu, renvoyer vide
if (strlen($url) < $longueur_min)
return '';
// Sinon couper les mots et les relier par des $separateur
if (_TRANSLITTERER_URL) $mots = preg_split(",[^a-zA-Z0-9_%]+,", $url);
else $mots = preg_split(",[\s]+,", $url);
$url = '';
foreach ($mots as $mot) {
if (!strlen($mot)) continue;
$url2 = $url.$separateur.$mot;
// Si on depasse $longueur_maxi caracteres, s'arreter
// ne pas compter 3 caracteres pour %E9 mais un seul
$long = preg_replace(',%.,', '', $url2);
if (strlen($long) > $longueur_maxi) {
break;
}
$url = $url2;
}
$url = substr($url, 1);
// On enregistre en utf-8 dans la base
$url = rawurldecode($url);
if (strlen($url) < $longueur_min)
return '';
return $url;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:57,代码来源:editer_url.php
示例2: 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
示例3: formulaires_editer_mot_verifier_dist
function formulaires_editer_mot_verifier_dist($id_mot = 'new', $id_groupe = 0, $retour = '', $associer_objet = '', $dummy1 = '', $dummy2 = '', $config_fonc = 'mots_edit_config', $row = array(), $hidden = '')
{
$erreurs = formulaires_editer_objet_verifier('mot', $id_mot, array('titre'));
// verifier qu'un mot du meme groupe n'existe pas avec le meme titre
// la comparaison accepte un numero absent ou different
// sinon avertir
if (!count($erreurs) and !_request('confirm_titre_mot')) {
if (sql_countsel("spip_mots", "titre REGEXP " . sql_quote("^([0-9]+[.] )?" . preg_quote(supprimer_numero(_request('titre'))) . "\$") . " AND id_mot<>" . intval($id_mot))) {
$erreurs['titre'] = _T('mots:avis_doublon_mot_cle') . " <input type='hidden' name='confirm_titre_mot' value='1' />";
}
}
return $erreurs;
}
开发者ID:loorenzooo,项目名称:aslfc,代码行数:13,代码来源:editer_mot.php
示例4: inc_plonger_dist
function inc_plonger_dist($id_rubrique, $idom = "", $list = array(), $col = 1, $exclu = 0, $do = 'aff')
{
global $spip_lang_left;
if ($list) {
$id_rubrique = $list[$col - 1];
}
$ret = '';
# recherche les filles et petites-filles de la rubrique donnee
# en excluant une eventuelle rubrique interdite (par exemple, lorsqu'on
# deplace une rubrique, on peut la deplacer partout a partir de la
# racine... sauf vers elle-meme ou sa propre branche)
$ordre = array();
$rub = array();
$res = sql_select("rub1.id_rubrique, rub1.titre, rub1.id_parent, rub1.lang, rub1.langue_choisie, rub2.id_rubrique AS id_enfant", "spip_rubriques AS rub1 LEFT JOIN spip_rubriques AS rub2 ON (rub1.id_rubrique = rub2.id_parent)", "rub1.id_parent = " . sql_quote($id_rubrique) . "\n\t\t\tAND rub1.id_rubrique!=" . sql_quote($exclu) . "\n\t\t\tAND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=" . sql_quote($exclu) . ")", "", "0+rub1.titre,rub1.titre");
while ($row = sql_fetch($res)) {
if (autoriser('voir', 'rubrique', $row['id_rubrique'])) {
$rub[$row['id_rubrique']]['enfants'] = $row['id_enfant'];
if ($row['id_parent'] == $id_rubrique) {
$t = trim(typo(supprimer_numero($row['titre'])));
if ($row['langue_choisie'] != 'oui') {
$t .= ' <small title="' . traduire_nom_langue($row['lang']) . '">[' . $row['lang'] . ']</small>';
}
$ordre[$row['id_rubrique']] = $t;
}
}
}
$next = isset($list[$col]) ? $list[$col] : 0;
if ($ordre) {
$rec = generer_url_ecrire('plonger', "rac={$idom}&exclus={$exclu}&do={$do}&col=" . ($col + 1));
$info = generer_url_ecrire('informer', "type=rubrique&rac={$idom}&do={$do}&id=");
$args = "'{$idom}',this,{$col},'{$spip_lang_left}','{$info}',event";
while (list($id, $titrebrut) = each($ordre)) {
$titre = supprimer_numero($titrebrut);
$classe1 = $id_rubrique ? 'petite-rubrique' : "petit-secteur";
if (isset($rub[$id]["enfants"])) {
$classe2 = " class='rub-ouverte'";
$url = "\nhref='{$rec}&id={$id}'";
} else {
$classe2 = $url = '';
$url = "\nhref='javascript:void(0)'";
}
$js_func = $do . '_selection_titre';
$click = "\nonclick=\"changerhighlight(this.parentNode.parentNode.parentNode);\nreturn " . (!is_array($list) ? ' false' : "aff_selection_provisoire({$id},{$args})") . "\"\nondblclick=\"" . "{$js_func}(this." . "firstChild.nodeValue," . $id . ",'selection_rubrique','id_parent');" . "\nreturn aff_selection_provisoire({$id},{$args});" . "\"";
$ret .= "<div class='" . ($id == $next ? "item on" : "item") . "'><div class='" . $classe1 . "'><div{$classe2}><a" . $url . $click . ">" . $titre . "</a></div></div></div>";
}
}
$idom2 = $idom . "_col_" . ($col + 1);
$left = $col * 150;
return http_img_pack("searching.gif", "*", "style='visibility: hidden; position: absolute; {$spip_lang_left}: " . ($left - 30) . "px; top: 2px; z-index: 2;' id='img_{$idom2}'") . "<div style='width: 150px; height: 100%; overflow: auto; position: absolute; top: 0px; {$spip_lang_left}: " . ($left - 150) . "px;'>" . $ret . "\n</div>\n<div id='{$idom2}'>" . ($next ? inc_plonger_dist($id_rubrique, $idom, $list, $col + 1, $exclu) : "") . "\n</div>";
}
开发者ID:JLuc,项目名称:SPIP,代码行数:50,代码来源:plonger.php
示例5: balise_CLEVERMAIL_UNSUBSCRIBE_dyn
function balise_CLEVERMAIL_UNSUBSCRIBE_dyn()
{
if (isset($_GET['id']) && $_GET['id'] != '') {
if (sql_countsel("spip_cm_lists_subscribers", "lsr_id=" . sql_quote($_GET['id'])) == 1) {
$abonnement = sql_fetsel("*", "spip_cm_lists_subscribers", "lsr_id=" . sql_quote($_GET['id']));
// Desinscription a cette liste demandee
$actionId = md5('unsubscribe#' . intval($abonnement['lst_id']) . '#' . intval($abonnement['sub_id']) . '#' . time());
if (sql_countsel("spip_cm_pending", "lst_id = " . intval($abonnement['lst_id']) . " AND sub_id = " . intval($abonnement['sub_id'])) == 0) {
sql_insertq("spip_cm_pending", array('lst_id' => intval($abonnement['lst_id']), 'sub_id' => $abonnement['sub_id'], 'pnd_action' => 'unsubscribe', 'pnd_action_date' => time(), 'pnd_action_id' => $actionId));
}
// Composition du message de demande de confirmation
$sub = sql_fetsel("*", "spip_cm_subscribers", "sub_id=" . intval($abonnement['sub_id']));
$list = sql_fetsel("*", "spip_cm_lists", "lst_id=" . intval($abonnement['lst_id']));
$template = array();
if (strpos($list['lst_name'], '/') === false) {
$template['@@NOM_LETTRE@@'] = supprimer_numero($list['lst_name']);
$template['@@NOM_CATEGORIE@@'] = '';
$template['@@NOM_COMPLET@@'] = $template['@@NOM_LETTRE@@'];
} else {
$template['@@NOM_LETTRE@@'] = supprimer_numero(substr($list['lst_name'], strpos($list['lst_name'], '/') + 1));
$template['@@NOM_CATEGORIE@@'] = supprimer_numero(substr($list['lst_name'], 0, strpos($list['lst_name'], '/')));
$template['@@NOM_COMPLET@@'] = $template['@@NOM_CATEGORIE@@'] . ' / ' . $template['@@NOM_LETTRE@@'];
}
$template['@@EMAIL@@'] = $sub['sub_email'];
$template['@@FORMAT_INSCRIPTION@@'] = $data['lsr_mode'] == 1 ? 'HTML' : 'texte';
//$template['@@URL_CONFIRMATION@@'] = $GLOBALS['meta']['adresse_site'].'/spip.php?page=clevermail_do&id='.$actionId;
$template['@@URL_CONFIRMATION@@'] = url_absolue(generer_url_public(_CLEVERMAIL_UNSUBSCRIBE, 'id=' . $actionId));
$to = $sub['sub_email'];
$subject = (intval($list['lst_subject_tag']) == 1 ? '[' . $template['@@NOM_COMPLET@@'] . '] ' : '') . html_entity_decode($list['lst_unsubscribe_subject'], ENT_QUOTES, 'UTF-8');
$body = $list['lst_unsubscribe_text'];
while (list($translateFrom, $translateTo) = each($template)) {
$body = str_replace($translateFrom, $translateTo, $body);
}
$from = sql_getfetsel("set_value", "spip_cm_settings", "set_name='CM_MAIL_FROM'");
$return = sql_getfetsel("set_value", "spip_cm_settings", "set_name='CM_MAIL_RETURN'");
// TODO : Et le charset ?
// TODO : Et le return-path ?
$envoyer_mail = charger_fonction('envoyer_mail', 'inc');
$envoyer_mail($to, $subject, $body, $from);
$return = '<p>' . _T('clevermail:desinscription_confirmation_debut') . ' ' . $template['@@NOM_COMPLET@@'] . ' ' . _T('clevermail:desinscription_confirmation_fin') . '</p>';
} else {
$return = '<p>' . _T('clevermail:aucune_inscription') . '</p>';
}
}
return $return;
}
开发者ID:nohavy,项目名称:clevermail,代码行数:46,代码来源:clevermail_unsubscribe.php
示例6: 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
示例7: 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']))))) !== '' ? '<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;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:45,代码来源:html_11157eacea3e766769d2031f1e2eed04.php
示例8: formulaires_clevermail_unsubscribe_why_traiter_dist
function formulaires_clevermail_unsubscribe_why_traiter_dist()
{
if (isset($_GET['id']) && $_GET['id'] != '') {
$action = sql_fetch(sql_select("*", "spip_cm_pending", array("pnd_action_id=" . sql_quote($_GET['id']), "pnd_action='unsubscribe'")));
if (empty($action)) {
return array('message_erreur' => 'Votre demande ne peut pas être traitée', 'editable' => false);
}
$list = sql_fetsel("*", "spip_cm_lists", "lst_id = " . intval($action['lst_id']));
$pos = strpos($list['lst_name'], "/");
if (strpos($list['lst_name'], '/') === false) {
$lettre = supprimer_numero($list['lst_name']);
$categorie = '';
$list_name_complet = $lettre;
} else {
$lettre = supprimer_numero(substr($list['lst_name'], strpos($list['lst_name'], '/') + 1));
$categorie = supprimer_numero(substr($list['lst_name'], 0, strpos($list['lst_name'], '/')));
$list_name_complet = $categorie . " / " . $lettre;
}
sql_delete("spip_cm_lists_subscribers", "lst_id = " . intval($action['lst_id']) . " AND sub_id = " . intval($action['sub_id']));
// remove posts from this list already queued
sql_delete("spip_cm_posts_queued", "sub_id = " . intval($action['sub_id']) . " AND pst_id IN (" . implode(',', sql_fetsel("lst_id", "spip_cm_posts", "lst_id=" . intval($action['lst_id']), "lst_id")) . ")");
$lst_name = sql_getfetsel("lst_name", "spip_cm_lists", "lst_id = " . intval($action['lst_id']));
$message_ok = _T('clevermail:desinscription_validee', array('lst_name' => $list_name_complet));
// E-mail d'alerte envoye au moderateur de la liste
$sub = sql_fetsel("*", "spip_cm_subscribers", "sub_id = " . intval($action['sub_id']));
sql_insertq("spip_cm_unsubscribe_why", array('sub_email' => $sub['sub_email'], 'sub_champ_exercice' => $sub['sub_champ_exercice'], 'sub_territoire' => $sub['sub_territoire'], 'lst_id' => $action['lst_id'], 'date_unsubscribe' => date('Y-m-d H:i:s'), 'choices_unsubscribe' => implode(':', $_POST['choices_unsubscribe']), 'choices_autre' => $_POST['autre']));
$list = sql_fetsel("*", "spip_cm_lists", "lst_id = " . intval($action['lst_id']));
$destinataire = $list['lst_moderator_email'];
$sujet = '[' . $list['lst_name'] . '] Désinscription de ' . addslashes($sub['sub_email']);
$corps = _T('clevermail:mail_info_desinscription_corps', array('nom_site' => $GLOBALS['meta']['nom_site'], 'url_site' => $GLOBALS['meta']['adresse_site'], 'sub_email' => addslashes($sub['sub_email']), 'lst_name' => $list['lst_name']));
$expediteur = sql_getfetsel("set_value", "spip_cm_settings", "set_name='CM_MAIL_FROM'");
$envoyer_mail = charger_fonction('envoyer_mail', 'inc');
$envoyer_mail($destinataire, $sujet, $corps, $expediteur);
$abonne = sql_getfetsel("sub_email", "spip_cm_subscribers", "sub_id=" . intval($action['sub_id']));
$liste = sql_getfetsel("lst_name", "spip_cm_lists", "lst_id=" . intval($action['lst_id']));
if (sql_countsel("spip_cm_lists_subscribers", "sub_id=" . intval($action['sub_id'])) == 0) {
sql_updateq("spip_cm_subscribers", array('sub_email' => md5(substr($abonne, 0, strpos($abonne, '@'))) . substr($abonne, strpos($abonne, '@'))), "sub_id = " . intval($action['sub_id']));
}
spip_log('Suppression du l\'abonnement de « ' . $abonne . ' » de la liste « ' . $liste . ' » (id=' . $action['lst_id'] . ')', 'clevermail');
sql_delete("spip_cm_pending", "pnd_action_id=" . sql_quote($_GET['id']));
return array('message_ok' => $message_ok, 'redirect' => 'spip.php');
} else {
return array('message_erreur' => 'Votre demande ne peut pas être traitée', 'editable' => false);
}
}
开发者ID:nohavy,项目名称:clevermail,代码行数:45,代码来源:clevermail_unsubscribe_why.php
示例9: BOUCLE_rubriquehtml_7e58ec237019eff13c867a6e81765d14
function BOUCLE_rubriquehtml_7e58ec237019eff13c867a6e81765d14(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
static $command = array();
static $connect;
$command['connect'] = $connect = '';
if (!isset($command['table'])) {
$command['table'] = 'rubriques';
$command['id'] = '_rubrique';
$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.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'] = '';
$command['having'] = array();
}
$command['where'] = array(quete_condition_statut('rubriques.statut', '!', 'publie', ''), array('=', 'L2.titre', "'inclu_menu_principal'"), array('=', 'rubriques.lang', sql_quote($GLOBALS['spip_lang'], '', 'varchar(10) NOT NULL DEFAULT \'\'')));
if (defined("_BOUCLE_PROFILER")) {
$timer = time() + microtime();
}
$t0 = "";
// REQUETE
$iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-menu-principal.html', 'html_7e58ec237019eff13c867a6e81765d14', '_rubrique', 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 .= '
' . (($t1 = strval(interdire_scripts(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))))) !== '' ? '<li class="menu-principal-rubriques"><a href="' . (($t2 = strval(spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'], '.')))) !== '' ? $t2 . '/' : '') . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))) . '">' . $t1 . '</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_rubrique @ squelettes/inc/inc-menu-principal.html", "profiler" . _LOG_AVERTISSEMENT);
}
return $t0;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:43,代码来源:html_7e58ec237019eff13c867a6e81765d14.php
示例10: formulaires_editer_mot_verifier_dist
function formulaires_editer_mot_verifier_dist($id_mot='new', $id_groupe=0, $retour='', $ajouter_id_article=0, $table='', $table_id=0, $config_fonc='mots_edit_config', $row=array(), $hidden=''){
$erreurs = formulaires_editer_objet_verifier('mot',$id_mot,array('titre'));
// verifier qu'un mot du meme groupe n'existe pas avec le meme titre
// la comparaison accepte un numero absent ou different
// sinon avertir
if (!count($erreurs) AND !_request('confirm_titre_mot')){
if ($l = sql_allfetsel('id_mot', "spip_mots",
"titre REGEXP ".sql_quote("^([0-9]+[.] )?".preg_quote(supprimer_numero(_request('titre')))."$")
." AND id_mot<>".intval($id_mot))) {
$a = 'id_mot='.$l[0]['id_mot'];
$h = generer_url_ecrire('mots_edit', $a);
$l = join(' ', array_map('array_shift', $l));
$t = _T('avis_doublon_mot_cle');
$erreurs['titre'] = "$t <a href='$h' title='$l'>?</a>"
." <input type='hidden' name='confirm_titre_mot' value='1' />";
set_request('edit','oui');
}
}
return $erreurs;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:21,代码来源:editer_mot.php
示例11: BOUCLE_auteurshtml_bc3326b3fba39516fdcfa67a49c7ff7f
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;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:39,代码来源:html_bc3326b3fba39516fdcfa67a49c7ff7f.php
示例12: BOUCLE_secteurshtml_7b757a9211fae3c1871c26ec4415f046
function BOUCLE_secteurshtml_7b757a9211fae3c1871c26ec4415f046(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
static $command = array();
static $connect;
$command['connect'] = $connect = '';
if (!isset($command['table'])) {
$command['table'] = 'rubriques';
$command['id'] = '_secteurs';
$command['from'] = array('rubriques' => 'spip_rubriques');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("rubriques.id_rubrique", "rubriques.lang", "0+rubriques.titre AS num1", "rubriques.titre");
$command['orderby'] = array('rubriques.lang DESC', 'num1', 'rubriques.titre');
$command['join'] = array();
$command['limit'] = '';
$command['having'] = array();
}
$command['where'] = array(quete_condition_statut('rubriques.statut', '!', 'publie', ''), array('=', 'rubriques.id_parent', 0), array('=', 'rubriques.lang', sql_quote($GLOBALS['spip_lang'], '', 'varchar(10) NOT NULL DEFAULT \'\'')));
if (defined("_BOUCLE_PROFILER")) {
$timer = time() + microtime();
}
$t0 = "";
// REQUETE
$iter = IterFactory::create("SQL", $command, array('squelettes/plan.html', 'html_7b757a9211fae3c1871c26ec4415f046', '_secteurs', 39, $GLOBALS['spip_lang']));
if (!$iter->err()) {
lang_select($GLOBALS['spip_lang']);
$SP++;
// RESULTATS
while ($Pile[$SP] = $iter->fetch()) {
lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
$t0 .= '
' . (($t1 = strval(traduire_nom_langue(unique(spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang'])), 'langues'))) !== '' ? '<h2>' . $t1 . '</h2>' : '') . '
<div class="plan-archives" style="clear:both;">
' . filtrer('image_graver', filtrer('image_reduire', !is_array($l = quete_logo('id_rubrique', 'ON', $Pile[$SP]['id_rubrique'], quete_parent($Pile[$SP]['id_rubrique']), 0)) ? '' : "<img class=\"spip_logo spip_logo_right spip_logos\" alt=\"\" style=\"float:right\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />', '120', '0')) . '
<h3><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))) . '">' . interdire_scripts(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) . '</a></h3>
</div>
' . (($t1 = BOUCLE_articles_racinehtml_7b757a9211fae3c1871c26ec4415f046($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
<ul>
' . $t1 . '
</ul>
' : '') . '
' . (($t1 = BOUCLE_rubriqueshtml_7b757a9211fae3c1871c26ec4415f046($Cache, $Pile, $doublons, $Numrows, $SP)) !== '' ? '
<ul>
' . $t1 . '
</ul>
' : '') . '
';
lang_select();
}
lang_select();
$iter->free();
}
if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
spip_log(intval(1000 * $timer) . "ms BOUCLE_secteurs @ squelettes/plan.html", "profiler" . _LOG_AVERTISSEMENT);
}
return $t0;
}
开发者ID:xablen,项目名称:Semaine14_SPIP_test,代码行数:57,代码来源:html_7b757a9211fae3c1871c26ec4415f046.php
示例13: traiter_raccourci_titre
function traiter_raccourci_titre($id, $type, $connect=NULL)
{
$trouver_table = charger_fonction('trouver_table', 'base');
$desc = $trouver_table(table_objet($type));
if (!($desc AND $s = $desc['titre'])) return array();
$_id = $desc['key']['PRIMARY KEY'];
$r = sql_fetsel($s, $desc['table'], "$_id=$id", '','','','',$connect);
if (!$r) return array();
$r['titre'] = supprimer_numero($r['titre']);
if (!$r['titre']) $r['titre'] = $r['surnom'];
if (!isset($r['lang'])) $r['lang'] = '';
return $r;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:13,代码来源:lien.php
示例14: signatures_edit
function signatures_edit($script, $id, $arg, $row) {
global $spip_lang_right, $spip_lang_left;
$id_signature = $row['id_signature'];
$id_article = $row['id_article'];
$date_time = $row['date_time'];
$nom_email= typo(echapper_tags($row['nom_email']));
$ad_email = echapper_tags($row['ad_email']);
$nom_site = typo(echapper_tags($row['nom_site']));
$url_site = echapper_tags($row['url_site']);
$statut = $row['statut'];
$res = !autoriser('modererpetition', 'article', $id_article) ? '' : true;
if ($res) {
if ($id) $arg .= "&id_article=$id_article";
$arg .= "#signature$id_signature";
$retour_s = redirige_action_auteur('editer_signatures', $id_signature, $script, $arg);
$retour_a = redirige_action_auteur('editer_signatures', "-$id_signature", $script, $arg);
if ($statut=="poubelle"){
$res = icone_inline (_T('icone_valider_signature'),
$retour_s,
"forum-interne-24.gif",
"creer.gif",
"right",
false);
} else {
$res = icone_inline (_T('icone_supprimer_signature'),
$retour_a,
"forum-interne-24.gif",
"supprimer.gif",
"right",
false);
if ($statut<>"publie") {
$res .= icone_inline (_T('icone_relancer_signataire'),
$retour_s,
"forum-interne-24.gif",
"creer.gif",
"right",
false);
}
}
$res = "<div class='editer_auteurs'>$res</div>";
}
$res .= "<div class='spip_small date'>".date_interface($date_time)."</div>\n";
if ($statut=="poubelle"){
$res .= "<div class='spip_x-small info_statut'>"._T('info_message_efface')."</div>\n";
}
if (strlen($url_site)>6) {
if (!$nom_site) $nom_site = _T('info_site');
$res .= "<div class='site'><span class='spip_x-small'>"._T('info_site_web')."</span> <a href='$url_site'>$nom_site</a></div>\n";
}
if ($ad_email) $res .= signatures_edit_mail($id_article, $ad_email, $row);
$res .= "<div class='texte'>" . message_de_signature($row) . "</div>";
if (!$id) {
if ($r = sql_fetsel("titre, id_rubrique", "spip_articles", "id_article=$id_article")) {
$id_rubrique = $r['id_rubrique'];
$titre_a = $r['titre'];
$titre_r = supprimer_numero(sql_getfetsel("titre", "spip_rubriques", "id_rubrique=$id_rubrique"));
$href = generer_url_ecrire('naviguer', "id_rubrique=" . $id_rubrique);
$h2 = generer_url_ecrire_article($id_article);
$res .= "<div class='nettoyeur'></div><div class='reponse_a'><a title='$id_article' href='"
. $h2
. "'>"
. typo($titre_a)
. "</a><a class='reponse_a' style='float: $spip_lang_right; padding-$spip_lang_left: 4px;' href='$href' title='$id_rubrique'>"
. typo($titre_r)
. " </a></div>";
}
}
$res = "<table class='signature' id='signature$id_signature' width='100%' cellpadding='3' cellspacing='0'>\n<tr><td class='verdana2 cartouche'>"
. ($nom_site ? "$nom_site / " : "")
. $nom_email
. "</td></tr>"
. "\n<tr><td class='serif contenu'>"
. $res
. "</td></tr></table>\n";
if ($statut=="poubelle") {
$res = "<table class='signature' width='100%' cellpadding='2' cellspacing='0' border='0'><tr><td class='poubelle'>"
. $res
. "</td></tr></table>";
}
return $res;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:92,代码来源:signatures.php
示例15: exec_spiplistes_courrier_edit
//.........这里部分代码省略.........
// Generer un sommaire
$page_result .= ""
. "<div class='boite-generer-option'>\n"
. "<label class='verdana2'>"
. "<input type='checkbox' id='avec_sommaire' name='avec_sommaire' value='non' />"
. _T('spiplistes:generer_un_sommaire')
. "</label>\n"
. "<div id='choisir_sommaire' class='option'>";
$page_result .= ""
//
// selecteur de rubriques
. "<label class='verdana2' for='ajouter_rubrique'&
|
请发表评论