本文整理汇总了PHP中vider_url函数的典型用法代码示例。如果您正苦于以下问题:PHP vider_url函数的具体用法?PHP vider_url怎么用?PHP vider_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vider_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formulaires_editer_site_verifier_dist
function formulaires_editer_site_verifier_dist($id_syndic='new', $id_rubrique=0, $retour='', $lier_trad=0, $config_fonc='sites_edit_config', $row=array(), $hidden=''){
include_spip('inc/filtres');
include_spip('inc/site');
$oblis = array('nom_site','url_site');
// Envoi depuis le formulaire d'analyse automatique d'un site
if (_request('ajoute_url_auto') AND strlen(vider_url($u = _request('url_auto')))) {
if ($auto = analyser_site($u)) {
// Si pas de logo, on va le chercher dans le ou les feeds
if(isset($auto['url_syndic']) && !$auto['logo'] && ($auto['url_syndic'] != _request('ajouter_url_auto')) && preg_match(',^select: (.+),', $auto['url_syndic'], $regs)){
$url_syndic = str_replace('select: ','',$auto['url_syndic']);
$feeds = explode(' ',$regs[1]);
foreach ($feeds as $feed) {
if(($auto_syndic = analyser_site($feed)) && isset($auto_syndic['format_logo'])){
$auto['format_logo'] = $auto_syndic['format_logo'];
$auto['logo'] = $auto_syndic['logo'];
break;
}
}
}
foreach($auto as $k=>$v){
set_request($k,$v);
}
$erreurs['message_ok'] =
_T('texte_referencement_automatique_verifier', array('url' => $u));
}
else{
$erreurs['url_auto'] = _T('avis_site_introuvable');
}
}
else
$erreurs = formulaires_editer_objet_verifier('site',$id_syndic,$oblis);
return $erreurs;
}
示例2: formulaires_editer_site_traiter_dist
function formulaires_editer_site_traiter_dist($id_syndic = 'new', $id_rubrique = 0, $retour = '', $lier_trad = 0, $config_fonc = 'sites_edit_config', $row = array(), $hidden = '')
{
// netoyer les entrees
if (!is_null(_request('url_site'))) {
set_request('url_site', vider_url(_request('url_site')));
}
return formulaires_editer_objet_traiter('site', $id_syndic, $id_rubrique, $lier_trad, $retour, $config_fonc, $row, $hidden);
}
示例3: 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;
}
示例4: revision_forum
function revision_forum($id_forum, $c = false)
{
$t = sql_fetsel("*", "spip_forum", "id_forum=" . intval($id_forum));
if (!$t) {
spip_log("erreur forum {$id_forum} inexistant");
return;
}
// Calculer l'invalideur des caches lies a ce forum
if ($t['statut'] == 'publie') {
include_spip('inc/invalideur');
$invalideur = array("id='forum/{$id_forum}'", "id='" . $t['objet'] . "/" . $t['id_objet'] . "'");
} else {
$invalideur = '';
}
// Supprimer 'http://' tout seul
if (isset($c['url_site'])) {
include_spip('inc/filtres');
$c['url_site'] = vider_url($c['url_site'], false);
}
$err = objet_modifier_champs('forum', $id_forum, array('nonvide' => array('titre' => _T('info_sans_titre')), 'invalideur' => $invalideur), $c);
$t = $t["id_thread"];
$cles = array();
foreach (array('id_objet', 'objet') as $k) {
if (isset($c[$k]) and $c[$k]) {
$cles[$k] = $c[$k];
}
}
// Modification des id_article etc
// (non autorise en standard mais utile pour des crayons)
// on deplace tout le thread {sauf les originaux}.
if (count($cles) and $t) {
spip_log("update thread id_thread={$t} avec " . var_export($cles, 1), 'forum.' . _LOG_INFO_IMPORTANTE);
sql_updateq("spip_forum", $cles, "id_thread=" . intval($t) . " AND statut!='original'");
// on n'affecte pas $r, car un deplacement ne change pas l'auteur
}
// s'il y a vraiment eu une modif, on
// enregistre le nouveau date_thread
if ($err === '') {
// on ne stocke ni le numero IP courant ni le nouvel id_auteur
// dans le message modifie (trop penible a l'usage) ; mais du
// coup attention a la responsabilite editoriale
/*
sql_updateq('spip_forum', array('ip'=>($GLOBALS['ip']), 'id_auteur'=>($GLOBALS['visiteur_session']['id_auteur'])),"id_forum=".intval($id_forum));
*/
// & meme ca ca pourrait etre optionnel
sql_updateq("spip_forum", array("date_thread" => date('Y-m-d H:i:s')), "id_thread=" . $t);
}
}
示例5: 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;
}
示例6: 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;
}
示例7: BOUCLE_art_syndichtml_bb1fa8f06f75cd5c61b4de0a063c1a54
function BOUCLE_art_syndichtml_bb1fa8f06f75cd5c61b4de0a063c1a54(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
static $command = array();
static $connect;
$command['connect'] = $connect = '';
if (!isset($command['table'])) {
$command['table'] = 'syndic_articles';
$command['id'] = '_art_syndic';
$command['from'] = array('syndic_articles' => 'spip_syndic_articles', 'L1' => 'spip_syndic');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("syndic_articles.date", "syndic_articles.titre", "syndic_articles.url", "L1.url_site", "L1.nom_site", "syndic_articles.descriptif");
$command['orderby'] = array('syndic_articles.date DESC');
$command['join'] = array('L1' => array('syndic_articles', 'id_syndic'));
$command['limit'] = '0,5';
$command['having'] = array();
}
$command['where'] = array(quete_condition_statut('L1.statut', 'publie,prop', 'publie', ''), quete_condition_statut('syndic_articles.statut', 'publie,prop', 'publie', ''), array('=', 'L1.id_rubrique', sql_quote(@$Pile[0]['id_rubrique'], '', 'bigint(21) NOT NULL DEFAULT \'0\'')));
if (defined("_BOUCLE_PROFILER")) {
$timer = time() + microtime();
}
$t0 = "";
// REQUETE
$iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-syndic.html', 'html_bb1fa8f06f75cd5c61b4de0a063c1a54', '_art_syndic', 6, $GLOBALS['spip_lang']));
if (!$iter->err()) {
$l1 = _T('public|spip|ecrire:form_prop_nom_site');
$SP++;
// RESULTATS
while ($Pile[$SP] = $iter->fetch()) {
$t0 .= '
<li>' . (($t1 = strval(interdire_scripts(affdate(normaliser_date($Pile[$SP]['date']))))) !== '' ? '<span>' . $t1 . '</span>' : '') . '
' . (($t1 = strval(interdire_scripts(supprimer_numero($Pile[$SP]['titre'])))) !== '' ? '<a href="' . vider_url($Pile[$SP]['url']) . '" ' . (($t2 = strval(interdire_scripts(attribut_html(supprimer_tags(typo(supprimer_numero(calculer_url($Pile[$SP]['url_site'], $Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $connect, $Pile[0])))))) !== '' ? 'title="' . $l1 . ' : ' . $t2 . '"' : '') . ' class="spip_out">' . $t1 . '</a>' : '') . '
' . (($t1 = strval(interdire_scripts(typo(supprimer_numero(calculer_url($Pile[$SP]['url_site'], $Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $connect, $Pile[0])))) !== '' ? '<span style="text-align: right;"><a href="' . calculer_url($Pile[$SP]['url_site'], '', 'url', $connect) . '" ' . (($t2 = strval(interdire_scripts(attribut_html(supprimer_tags(safehtml($Pile[$SP]['descriptif'])))))) !== '' ? 'title="' . $t2 . '"' : '') . ' class="spip_out" style="text-align: right; color: maroon; margin-top:-.5em">' . $t1 . '</a></span>' : '') . '
</li>
';
}
$iter->free();
}
if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
spip_log(intval(1000 * $timer) . "ms BOUCLE_art_syndic @ squelettes/inc/inc-syndic.html", "profiler" . _LOG_AVERTISSEMENT);
}
return $t0;
}
示例8: 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;
}
示例9: html_7e58ec237019eff13c867a6e81765d14
function html_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0)
{
if (isset($Pile[0]["doublons"]) and is_array($Pile[0]["doublons"])) {
$doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
}
$connect = '';
$page = ' <div class="menu" id="menu-principal">
<ul>
<li id="menu-principal-accueil"><a href="' . spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'], '.')) . '" title="' . _T('public|spip|ecrire:accueil_site') . ' : ' . interdire_scripts(typo($GLOBALS['meta']['nom_site'], "TYPO", $connect, $Pile[0])) . '" accesskey="0">' . _T('public|spip|ecrire:accueil_site') . '</a></li>
' . BOUCLE_articlehtml_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons, $Numrows, $SP) . '
' . BOUCLE_rubriquehtml_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons, $Numrows, $SP) . '
<li id="menu-principal-contact"><a href="' . vider_url(urlencode_1738(generer_url_entite('1', 'auteur', '', '', true))) . '" title="' . _T('public|spip|ecrire:info_contact') . '" accesskey="7">' . _T('public|spip|ecrire:info_contact') . '</a></li>
' . BOUCLE_art_agendahtml_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons, $Numrows, $SP) . '
<li id="menu-principal-plan"><a href="' . interdire_scripts(generer_url_public('plan', '')) . '" title="' . _T('public|spip|ecrire:plan_site') . '" accesskey="3">' . _T('public|spip|ecrire:plan_site') . '</a></li>
' . BOUCLE_sitehtml_7e58ec237019eff13c867a6e81765d14($Cache, $Pile, $doublons, $Numrows, $SP) . '
<li id="menu-principal-resume"><a href="' . interdire_scripts(generer_url_public('resume', '')) . '" title="' . _T('public|spip|ecrire:en_resume') . '" accesskey="5">' . _T('public|spip|ecrire:en_resume') . '</a></li>
' . (($t1 = strval(executer_balise_dynamique('FORMULAIRE_RECHERCHE', array(), array('squelettes/inc/inc-menu-principal.html', 'html_7e58ec237019eff13c867a6e81765d14', '', 0, $GLOBALS['spip_lang'])))) !== '' ? '<li id="menu-principal-recherche">
<div class="menu" id="menu-recherche">
<h3 class="structure">' . _T('public|spip|ecrire:info_rechercher') . '</h3>
<ul>
<li>
' . $t1 . '
</li>
</ul>
</div><!-- menu-recherche -->
</li>' : '') . '
</ul>
</div>';
return analyse_resultat_skel('html_7e58ec237019eff13c867a6e81765d14', $Cache, $page, 'squelettes/inc/inc-menu-principal.html');
}
示例10: inclure_previsu
/**
* Preparer la previsu d'un message de forum
*
* http://code.spip.net/@inclure_previsu
*
* @param string $texte
* @param string $titre
* @param string $url_site
* @param string $nom_site
* @param array $ajouter_mot
* @param array $doc
* @param string $objet
* @param int $id_objet
* @param int $id_forum
* @return string
*/
function inclure_previsu($texte, $titre, $url_site, $nom_site, $ajouter_mot, $doc, $objet, $id_objet, $id_forum)
{
global $table_des_traitements;
$bouton = _T('forum:forum_message_definitif');
include_spip('public/assembler');
include_spip('public/composer');
// appliquer les traitements de #TEXTE a la previsu
// comme on voit c'est complique... y a peut-etre plus simple ?
// recuperer les filtres eventuels de 'mes_fonctions.php' sur les balises
include_spip('public/parametrer');
$tmptexte = "";
$evaltexte = isset($table_des_traitements['TEXTE']['forums']) ? $table_des_traitements['TEXTE']['forums'] : $table_des_traitements['TEXTE'][0];
$evaltexte = '$tmptexte = ' . str_replace('%s', '$texte', $evaltexte) . ';';
// evaluer...
// [fixme]
// $connect et $Pile ne sont pas definis ici :/
// mais font souvent partie des variables appelees par les traitements
$connect = "";
$Pile = array(0 => array());
eval($evaltexte);
// supprimer les <form> de la previsualisation
// (sinon on ne peut pas faire <cadre>...</cadre> dans les forums)
return preg_replace("@<(/?)form\\b@ism", '<\\1div', inclure_balise_dynamique(array('formulaires/inc-forum_previsu', 0, array('titre' => safehtml(typo($titre)), 'texte' => $tmptexte, 'notes' => safehtml(calculer_notes()), 'url_site' => vider_url($url_site), 'nom_site' => safehtml(typo($nom_site)), 'ajouter_mot' => is_array($ajouter_mot) ? $ajouter_mot : array($ajouter_mot), 'ajouter_document' => $doc, 'bouton' => $bouton, 'objet' => $objet, 'id_objet' => $id_objet, 'id_forum' => $id_forum)), false));
}
示例11: BOUCLE_rubriques_editohtml_0167a54ed63f4fd0ee2bbef24b5ac307
function BOUCLE_rubriques_editohtml_0167a54ed63f4fd0ee2bbef24b5ac307(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$in = array();
if (!is_array($a = @$Pile[0]['lang'])) {
$in[] = $a;
} else {
$in = array_merge($in, $a);
}
if (!isset($command['table'])) {
$command['table'] = 'rubriques';
$command['id'] = '_rubriques_edito';
$command['from'] = array('rubriques' => 'spip_rubriques', 'L1' => 'spip_mots_liens', 'L2' => 'spip_mots');
$command['type'] = array();
$command['groupby'] = array("rubriques.id_rubrique");
$command['select'] = array("0+rubriques.titre AS num", "rubriques.titre", "rubriques.id_rubrique", "rubriques.descriptif", "rubriques.texte", "rubriques.lang");
$command['orderby'] = array('num', 'rubriques.titre');
$command['join'] = array('L1' => array('rubriques', 'id_objet', 'id_rubrique', 'L1.objet=' . sql_quote('rubrique')), 'L2' => array('L1', 'id_mot'));
$command['limit'] = '0,10';
$command['having'] = array();
}
$command['where'] = array(quete_condition_statut('rubriques.statut', '!', 'publie', ''), !(is_array(@$Pile[0]['lang']) ? count(@$Pile[0]['lang']) : strlen(@$Pile[0]['lang'])) ? '' : (is_array(@$Pile[0]['lang']) ? sql_in('rubriques.lang', sql_quote($in)) : array('=', 'rubriques.lang', sql_quote($GLOBALS['spip_lang'], '', 'varchar(10) NOT NULL DEFAULT \'\''))), array('=', 'L2.titre', "'Editorial'"));
if (defined("_BOUCLE_PROFILER")) {
$timer = time() + microtime();
}
$t0 = "";
// REQUETE
$iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-sommaire-edito.html', 'html_0167a54ed63f4fd0ee2bbef24b5ac307', '_rubriques_edito', 8, $GLOBALS['spip_lang']));
if (!$iter->err()) {
lang_select($GLOBALS['spip_lang']);
$SP++;
// RESULTATS
while ($Pile[$SP] = $iter->fetch()) {
lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
$t0 .= '
<br class="nettoyeur" />
' . (($t1 = strval(interdire_scripts(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))))) !== '' ? '<h3 class="edito-titre"><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))) . '">' . $t1 . '</a></h3>' : '') . '
' . (($t1 = strval(filtrer('image_graver', filtrer('image_reduire', strlen($logo = !is_array($l = quete_logo('id_rubrique', 'ON', $Pile[$SP]['id_rubrique'], quete_parent($Pile[$SP]['id_rubrique']), 0)) ? '' : "<img class=\"spip_logo spip_logos\" alt=\"\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />') ? '<a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))) . '">' . $logo . '</a>' : '', '150', '0')))) !== '' ? '<div class="logo-liste-art">
' . $t1 . '
</div>' : '') . '
' . (($t1 = strval(interdire_scripts(($a = propre($Pile[$SP]['descriptif'], $connect, $Pile[0]) or is_string($a) and strlen($a)) ? $a : interdire_scripts(propre($Pile[$SP]['texte'], $connect, $Pile[0]))))) !== '' ? '<div class="chapo ' . interdire_scripts($Pile[$SP]['descriptif'] ? '' : '') . '">' . $t1 . '
<div style="clear: both; height: .1em;"> </div>
</div>' : '') . '
';
lang_select();
}
lang_select();
$iter->free();
}
if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
spip_log(intval(1000 * $timer) . "ms BOUCLE_rubriques_edito @ squelettes/inc/inc-sommaire-edito.html", "profiler" . _LOG_AVERTISSEMENT);
}
return $t0;
}
示例12: BOUCLE_articles_rubriquehtml_8bf8bdc0aa13e79e11d908f1699ff96f
function BOUCLE_articles_rubriquehtml_8bf8bdc0aa13e79e11d908f1699ff96f(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$command['pagination'] = array(isset($Pile[0]['debut_articles_rubrique']) ? $Pile[0]['debut_articles_rubrique'] : null, 10);
if (!isset($command['table'])) {
$command['table'] = 'articles';
$command['id'] = '_articles_rubrique';
$command['from'] = array('articles' => 'spip_articles');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("articles.id_rubrique", "0+articles.titre AS num", "articles.date", "articles.id_article", "articles.surtitre", "articles.descriptif", "articles.titre", "articles.soustitre", "articles.chapo", "articles.texte", "articles.lang");
$command['orderby'] = array('num', 'articles.date DESC');
$command['join'] = array();
$command['limit'] = '';
$command['having'] = array();
}
$command['where'] = array(quete_condition_statut('articles.statut', 'publie,prop,prepa/auteur', 'publie', ''), sql_in('articles.id_rubrique', calcul_branche_in(sql_quote(@$Pile[0]['id_rubrique']))));
if (defined("_BOUCLE_PROFILER")) {
$timer = time() + microtime();
}
$t0 = "";
// REQUETE
$iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-rub-articles.html', 'html_8bf8bdc0aa13e79e11d908f1699ff96f', '_articles_rubrique', 1, $GLOBALS['spip_lang']));
if (!$iter->err()) {
// COMPTEUR
$Numrows['_articles_rubrique']['compteur_boucle'] = 0;
$Numrows['_articles_rubrique']['total'] = @intval($iter->count());
$debut_boucle = isset($Pile[0]['debut_articles_rubrique']) ? $Pile[0]['debut_articles_rubrique'] : _request('debut_articles_rubrique');
if (substr($debut_boucle, 0, 1) == '@') {
$debut_boucle = $Pile[0]['debut_articles_rubrique'] = quete_debut_pagination('id_article', $Pile[0]['@id_article'] = substr($debut_boucle, 1), 10, $iter);
$iter->seek(0);
}
$debut_boucle = intval($debut_boucle);
$debut_boucle = ($tout = $debut_boucle == -1) ? 0 : $debut_boucle;
$debut_boucle = max(0, min($debut_boucle, floor(($Numrows['_articles_rubrique']['total'] - 1) / 10) * 10));
$debut_boucle = intval($debut_boucle);
$fin_boucle = min($tout ? $Numrows['_articles_rubrique']['total'] : $debut_boucle + 9, $Numrows['_articles_rubrique']['total'] - 1);
$Numrows['_articles_rubrique']['grand_total'] = $Numrows['_articles_rubrique']['total'];
$Numrows['_articles_rubrique']["total"] = max(0, $fin_boucle - $debut_boucle + 1);
if ($debut_boucle > 0 and $debut_boucle < $Numrows['_articles_rubrique']['grand_total'] and $iter->seek($debut_boucle, 'continue')) {
$Numrows['_articles_rubrique']['compteur_boucle'] = $debut_boucle;
}
lang_select($GLOBALS['spip_lang']);
$SP++;
// RESULTATS
while ($Pile[$SP] = $iter->fetch()) {
$Numrows['_articles_rubrique']['compteur_boucle']++;
if ($Numrows['_articles_rubrique']['compteur_boucle'] <= $debut_boucle) {
continue;
}
if ($Numrows['_articles_rubrique']['compteur_boucle'] - 1 > $fin_boucle) {
break;
}
lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
$t0 .= '
<br class="nettoyeur" />
' . (($t1 = strval(filtrer('image_graver', filtrer('image_reduire', strlen($logo = !is_array($l = quete_logo('id_article', 'ON', $Pile[$SP]['id_article'], '', 0)) ? '' : "<img class=\"spip_logo spip_logos\" alt=\"\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />') ? '<a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) . '">' . $logo . '</a>' : '', '120', '0')))) !== '' ? '<div class="logo-liste-art">
' . $t1 . '
</div>' : '') . '
' . (($t1 = strval(interdire_scripts(typo($Pile[$SP]['surtitre'], "TYPO", $connect, $Pile[0])))) !== '' ? '<div class="surtitre">' . $t1 . '</div>' : '') . '
<h3>
<a href="' . spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'], '.')) . '/' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) . '" ' . (($t1 = strval(interdire_scripts(entites_html(textebrut(propre($Pile[$SP]['descriptif'], $connect, $Pile[0])))))) !== '' ? 'title="' . $t1 . '"' : '') . '>' . interdire_scripts(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]))) . '</a>
' . BOUCLE_articles_rubrique_nomhtml_8bf8bdc0aa13e79e11d908f1699ff96f($Cache, $Pile, $doublons, $Numrows, $SP) . '
</h3>
' . (($t1 = strval(interdire_scripts(typo($Pile[$SP]['soustitre'], "TYPO", $connect, $Pile[0])))) !== '' ? '<div class="sous-titre">' . $t1 . '</div>' : '') . '
<div class="detail">
' . (($t1 = strval(interdire_scripts(nom_jour(normaliser_date($Pile[$SP]['date']))))) !== '' ? '<span class="date">' . $t1 : '') . ' ' . (($t1 = strval(interdire_scripts(affdate(normaliser_date($Pile[$SP]['date']))))) !== '' ? $t1 . '</span>' : '') . '
' . (($t1 = strval(recuperer_fond('modeles/lesauteurs', array('objet' => 'article', 'id_objet' => $Pile[$SP]['id_article'], 'id_article' => $Pile[$SP]['id_article']), array('trim' => true, 'compil' => array('squelettes/inc/inc-rub-articles.html', 'html_8bf8bdc0aa13e79e11d908f1699ff96f', '_articles_rubrique', 17, $GLOBALS['spip_lang'])), ''))) !== '' ? '<span class="auteurs">' . _T('public|spip|ecrire:par_auteur') . ' ' . $t1 . '</span>' : '') . '
</div><!-- detail -->
<div class="texte">
' . (($t1 = strval(interdire_scripts(filtrer('image_graver', filtrer('image_reduire', propre($Pile[$SP]['descriptif'], $connect, $Pile[0]), '552', '0')) ? (($t2 = strval(interdire_scripts(filtrer('image_graver', filtrer('image_reduire', propre($Pile[$SP]['descriptif'], $connect, $Pile[0]), '552', '0'))))) !== '' ? '<div class="">' . $t2 . ('</div>
<div class="suite"><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) . '" title="...' . _T('public|spip|ecrire:suite') . ' : ' . interdire_scripts(attribut_html(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))) . '" >' . _T('public|spip|ecrire:suite') . '</a></div>') : '') . '
' : interdire_scripts(propre($Pile[$SP]['chapo'], $connect, $Pile[0]) ? (($t3 = strval(interdire_scripts(filtrer('image_graver', filtrer('image_reduire', propre($Pile[$SP]['chapo'], $connect, $Pile[0]), '552', '0'))))) !== '' ? '<div class="">' . $t3 . ('</div>
<div class="suite"><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) . '" title="...' . _T('public|spip|ecrire:suite') . ' : ' . interdire_scripts(attribut_html(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))) . '" >' . _T('public|spip|ecrire:suite') . '</a></div>') : '') . '
' : (($t3 = strval(interdire_scripts(couper(propre($Pile[$SP]['texte'], $connect, $Pile[0]), '300')))) !== '' ? '<div class="">' . $t3 . ('</div>
<div class="suite"><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) . '" title="...' . _T('public|spip|ecrire:suite') . ' : ' . interdire_scripts(attribut_html(supprimer_numero(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))) . '" >' . _T('public|spip|ecrire:suite') . '</a></div>') : '') . '
') . '
'))) !== '' ? '<div class="extrait">' . $t1 . '</div><!-- fin extrait -->' : '') . '
</div><!-- fin texte -->
<br class="nettoyeur" />
';
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_rubrique @ squelettes/inc/inc-rub-articles.html", "profiler" . _LOG_AVERTISSEMENT);
}
return $t0;
}
示例13: BOUCLE_documents_jointshtml_4dc0f36e18dd7a26ebc382429cbc9835
function BOUCLE_documents_jointshtml_4dc0f36e18dd7a26ebc382429cbc9835(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$in = array();
$in[] = 'gif';
$in[] = 'jpg';
$in[] = 'png';
if (!isset($command['table'])) {
$command['table'] = 'documents';
$command['id'] = '_documents_joints';
$command['from'] = array('documents' => 'spip_documents', 'L1' => 'spip_documents_liens', 'L2' => 'spip_types_documents');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("0+documents.titre AS num", "documents.date", "documents.titre", "documents.id_document", "L2.titre AS type_document", "documents.taille", "documents.descriptif");
$command['orderby'] = array('num', 'documents.date DESC');
$command['join'] = array('L1' => array('documents', 'id_document'), 'L2' => array('documents', 'extension'));
$command['limit'] = '';
$command['having'] = array();
}
$command['where'] = array(quete_condition_statut('documents.statut', 'publie,prop,prepa', 'publie', ''), array('IN', 'documents.mode', '(\'image\',\'document\')'), array('(documents.taille > 0 OR documents.distant=\'oui\')'), array('=', 'L1.id_objet', sql_quote(@$Pile[0]['id_rubrique'], '', 'bigint(21) NOT NULL DEFAULT \'0\'')), array('=', 'L1.objet', sql_quote('rubrique')), sql_in('documents.extension', sql_quote($in), 'NOT'), array('=', 'L1.vu', "'non'"));
if (defined("_BOUCLE_PROFILER")) {
$timer = time() + microtime();
}
$t0 = "";
// REQUETE
$iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-rub-documents.html', 'html_4dc0f36e18dd7a26ebc382429cbc9835', '_documents_joints', 39, $GLOBALS['spip_lang']));
if (!$iter->err()) {
$l1 = _T('spip:info_document');
$SP++;
// RESULTATS
while ($Pile[$SP] = $iter->fetch()) {
$t1 = '
' . (($t1 = strval(interdire_scripts(supprimer_numero(traiter_doublons_documents($doublons, typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))))) !== '' ? '<h3 class="" style="margin-bottom: .6em;"><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_document'], 'document', '', '', true))) . '">' . $t1 . '</a></h3>' : '') . '
' . (($t1 = strval(filtrer('image_graver', filtrer('image_reduire', ($doublons["documents"] .= "," . $Pile[$SP]['id_document']) ? quete_logo_document(quete_document($Pile[$SP]['id_document'], ''), vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_document'], 'document', '', '', true))), '', '', 0, 0, '') : '', '60', '0')))) !== '' ? '<div style="float:left;padding-right: .5em; width:36%;">
<div style="float:left; margin-right: .5em;">' . $t1 . ('</div>
<small>
' . (($t2 = strval(interdire_scripts(affdate(normaliser_date($Pile[$SP]['date']))))) !== '' ? $t2 . '<br />' : '') . '
' . (($t2 = strval(interdire_scripts($Pile[$SP]['type_document']))) !== '' ? $l1 . ' : ' . $t2 . '<br />' : '') . '
' . interdire_scripts(taille_en_octets($Pile[$SP]['taille'])) . '
</small>
</div>') : '') . '
' . (($t1 = strval(interdire_scripts(traiter_doublons_documents($doublons, propre($Pile[$SP]['descriptif'], $connect, $Pile[0]))))) !== '' ? '<div class="" style="margin: 0 0 0 40%; border-left: 1px gray dotted;padding-left: 1em">' . $t1 . '</div>' : '') . '
';
$t0 .= (strlen($t1) && strlen($t0) ? '<hr style=\'clear:both\' />' : '') . $t1;
}
$iter->free();
}
if (defined("_BOUCLE_PROFILER") and 1000 * ($timer = time() + microtime() - $timer) > _BOUCLE_PROFILER) {
spip_log(intval(1000 * $timer) . "ms BOUCLE_documents_joints @ squelettes/inc/inc-rub-documents.html", "profiler" . _LOG_AVERTISSEMENT);
}
return $t0;
}
示例14: BOUCLE_annonces_arthtml_d7ab7eee0b09f43b71ae8cf8a6406a91
function BOUCLE_annonces_arthtml_d7ab7eee0b09f43b71ae8cf8a6406a91(&$Cache, &$Pile, &$doublons, &$Numrows, $SP)
{
static $command = array();
static $connect;
$command['connect'] = $connect = '';
if (!isset($command['table'])) {
$command['table'] = 'articles';
$command['id'] = '_annonces_art';
$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", "articles.id_article", "articles.descriptif", "articles.titre", "articles.surtitre", "articles.soustitre", "articles.lang");
$command['orderby'] = array('articles.date DESC');
$command['join'] = array('L1' => array('articles', 'id_objet', 'id_article', 'L1.objet=' . sql_quote('article')), 'L2' => array('L1', 'id_mot'));
$command['limit'] = '';
$command['having'] = array();
}
$command['where'] = array(quete_condition_statut('articles.statut', 'publie,prop,prepa/auteur', 'publie', ''), array('=', 'articles.lang', sql_quote($GLOBALS['spip_lang'], '', 'varchar(10) NOT NULL DEFAULT \'\'')), array('=', 'L2.titre', "'Annonce'"));
if (defined("_BOUCLE_PROFILER")) {
$timer = time() + microtime();
}
$t0 = "";
// REQUETE
$iter = IterFactory::create("SQL", $command, array('squelettes/inc/inc-annonces.html', 'html_d7ab7eee0b09f43b71ae8cf8a6406a91', '_annonces_art', 97, $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 class="annonce">
' . (!is_array($l = quete_logo('id_article', 'ON', $Pile[$SP]['id_article'], '', 0)) ? '' : "<img class=\"spip_logo spip_logos\" alt=\"\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />' ? '<a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) . '"' . (($t2 = strval(interdire_scripts(attribut_html(propre($Pile[$SP]['descriptif'], $connect, $Pile[0]))))) !== '' ? ' title="' . $t2 . '"' : '') . ' style="text-align:center;">
' . inserer_attribut(inserer_attribut(filtrer('image_graver', filtrer('image_reduire', !is_array($l = quete_logo('id_article', 'ON', $Pile[$SP]['id_article'], '', 0)) ? '' : "<img class=\"spip_logo spip_logos\" alt=\"\" src=\"{$l['0']}\"" . $l[2] . ($l[1] ? " onmouseover=\"this.src='{$l['1']}'\" onmouseout=\"this.src='{$l['0']}'\"" : "") . ' />', '150', '0')), 'alt', interdire_scripts(attribut_html(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))), 'title', interdire_scripts(attribut_html(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))) . '
</a>
' : '<p>
' . (($t2 = strval(interdire_scripts(typo($Pile[$SP]['surtitre'], "TYPO", $connect, $Pile[0])))) !== '' ? '<small style="text-transform:uppercase">' . $t2 . '</small>' : '') . '
' . (($t2 = strval(interdire_scripts(typo(supprimer_numero($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])))) !== '' ? '<big style="text-align:center;"><a href="' . vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_article'], 'article', '', '', true))) . '"' . (($t3 = strval(interdire_scripts(attribut_html(propre($Pile[$SP]['descriptif'], $connect, $Pile[0]))))) !== '' ? ' title="' . $t3 . '"' : '') . ' style="text-align:center;">' . $t2 . '</a></big>' : '') . '
' . (($t2 = strval(interdire_scripts(typo($Pile[$SP]['soustitre'], "TYPO", $connect, $Pile[0])))) !== '' ? '<span>' . $t2 . '</span>' : '') . '
<br />
</p>
') . '
</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_annonces_art @ squelettes/inc/inc-annonces.html", "profiler" . _LOG_AVERTISSEMENT);
}
return $t0;
}
示例15: action_editer_site_dist
function action_editer_site_dist($arg=null) {
if (is_null($arg)){
$securiser_action = charger_fonction('securiser_action', 'inc');
$arg = $securiser_action();
}
$resyndiquer = false;
include_spip('inc/filtres'); // pour vider_url()
if (preg_match(',options/(\d+),',$arg, $r)) {
$id_syndic = $r[1];
$resyndiquer = editer_site_options($id_syndic);
// Envoi depuis le formulaire d'edition d'un site existant
} else if ($id_syndic = intval($arg)) {
// reload si on change une des valeurs de syndication
if (
(_request('url_syndic') OR _request('resume') OR _request('syndication'))
AND $t = sql_fetsel('url_syndic,syndication,resume', 'spip_syndic', "id_syndic=".sql_quote($id_syndic))
AND (
(_request('url_syndic') AND _request('url_syndic') != $t['url_syndic'])
OR
(_request('syndication') AND _request('syndication') != $t['syndication'])
OR
(_request('resume') AND _request('resume') != $t['resume'])
)
)
set_request('reload', 'oui');
revisions_sites($id_syndic);
// Envoi normal depuis le formulaire de creation d'un site
}
elseif (strlen(vider_url(_request('url_site')))
AND strlen(_request('nom_site'))) {
set_request('reload', 'oui');
$id_syndic = insert_syndic(_request('id_parent'));
revisions_sites($id_syndic);
if ($logo = _request('logo')
AND $format_logo = _request('format_logo')){
include_spip('inc/distant');
@rename(copie_locale($logo),
_DIR_IMG . 'siteon'.$id_syndic.'.'.$format_logo);
}
}
// Erreur
else {
include_spip('inc/headers');
redirige_url_ecrire();
}
// Re-syndiquer le site
if (_request('reload') == 'oui') {
// Effacer les messages si on supprime la syndication
if (_request('syndication') == 'non')
sql_delete("spip_syndic_articles", "id_syndic=".sql_quote($id_syndic));
$t = sql_getfetsel('descriptif', 'spip_syndic', "id_syndic=$id_syndic AND syndication IN ('oui', 'sus', 'off')", '','', 1);
if ($t !== NULL) {
// Si descriptif vide, chercher le logo si pas deja la
$chercher_logo = charger_fonction('chercher_logo', 'inc');
if (!$logo = $chercher_logo($id_syndic, 'id_syndic', 'on')
OR !$t) {
if ($auto = vider_url(_request('url_auto'))) {
$auto = analyser_site($auto);
if (!strlen($t) AND strlen($auto['descriptif']))
revisions_sites($id_syndic, array('descriptif' => $auto['descriptif']));
}
if (!$logo
AND $auto['logo'] AND $auto['format_logo'])
@rename($auto['logo'],
_DIR_IMG . 'siteon'.$id_syndic.'.'.$auto['format_logo']);
}
$resyndiquer = true;
}
}
if ($resyndiquer) {
// ah si PHP connaisait les fermetures...
// A la place, une constante utilisee exclusivement
// dans la fct suivante.
define('_GENIE_SYNDIC_NOW', $id_syndic);
// forcer l'execution immediate de cette tache
// (i.e. appeler la fct suivante avec gestion du verrou)
cron(0, array('syndic' => -91));
}
if (_request('redirect')) {
$redirect = parametre_url(urldecode(_request('redirect')),
'id_syndic', $id_syndic, '&');
include_spip('inc/headers');
redirige_par_entete($redirect);
}
else
return array($id_syndic,'');
}