File "html_0196c024d30fc862d54cc3337a5a128b.php"
Full Path: /home/spiraleeea/www/spirale/tmp/cache/skel/html_0196c024d30fc862d54cc3337a5a128b.php
File size: 11.77 KB
MIME-type: text/x-php
Charset: utf-8
<?php
/*
* Squelette : squelettes/sitemap.xml.html
* Date : Sat, 06 Dec 2025 01:05:23 GMT
* Compile : Wed, 26 Aug 2026 19:10:23 GMT
* Boucles : _r, _a_trad, _a, _b, _objets
*/
function BOUCLE_rhtml_0196c024d30fc862d54cc3337a5a128b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
if (!isset($si_init)) { $command['si'] = array(); $si_init = true; }
$command['si'][] = retablir_echappements_modeles(interdire_scripts(((entites_html(table_valeur($Pile[0]??[], (string)'annee', null),true)) ?'' :' ')));
if (!isset($command['table'])) {
$command['table'] = 'rubriques';
$command['id'] = '_r';
$command['from'] = array('rubriques' => 'spip_rubriques');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("rubriques.date",
"rubriques.id_rubrique",
"rubriques.lang",
"rubriques.titre");
$command['orderby'] = array('rubriques.date DESC');
$command['where'] =
array(
quete_condition_statut('rubriques.statut','!','publie',''));
$command['join'] = array();
$command['limit'] = '0,1000';
$command['having'] =
array();
}
if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
$t0 = "";
// REQUETE
$iter = Spip\Compilateur\Iterateur\Factory::create(
"SQL",
$command,
array('squelettes/sitemap.xml.html','html_0196c024d30fc862d54cc3337a5a128b','_r',32,$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 .= (
'
<url>
' .
(($t1 = strval(retablir_echappements_modeles(url_absolue(vider_url(urlencode_1738(generer_objet_url($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true)))))))!=='' ?
('<loc>' . $t1 . '</loc>') :
'') .
'
</url>
');
lang_select();
}
lang_select();
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_r @ squelettes/sitemap.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_a_tradhtml_0196c024d30fc862d54cc3337a5a128b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
if (!isset($command['table'])) {
$command['table'] = 'articles';
$command['id'] = '_a_trad';
$command['from'] = array('articles' => 'spip_articles');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("articles.lang",
"articles.id_article",
"articles.titre");
$command['orderby'] = array();
$command['join'] = array();
$command['limit'] = '';
$command['having'] =
array();
}
$command['where'] =
array(
quete_condition_statut('articles.statut','publie,prop,prepa/auteur','publie',''),
quete_condition_postdates('articles.date',''),
array('OR',
array('AND',
array('=', 'articles.id_trad', 0),
array('=', 'articles.id_article', sql_quote($Pile[$SP]['id_article'], '', ''))),
array('AND',
array('>', 'articles.id_trad', 0),
array('=', 'articles.id_trad', sql_quote($Pile[$SP]['id_trad'], '', '')))));
if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
$t0 = "";
// REQUETE
$iter = Spip\Compilateur\Iterateur\Factory::create(
"SQL",
$command,
array('squelettes/sitemap.xml.html','html_0196c024d30fc862d54cc3337a5a128b','_a_trad',43,$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 .= (
'
<xhtml:link rel="alternate" hreflang="' .
retablir_echappements_modeles(spip_htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang'])) .
'" href="' .
retablir_echappements_modeles(url_absolue(vider_url(urlencode_1738(generer_objet_url($Pile[$SP]['id_article'], 'article', '', '', true))))) .
'" />
');
lang_select();
}
lang_select();
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_a_trad @ squelettes/sitemap.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_ahtml_0196c024d30fc862d54cc3337a5a128b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$in = array();
if (!(is_array($a = (($Pile[0]['annee'] ?? null)))))
$in[]= $a;
else $in = array_merge($in, $a);
if (!isset($command['table'])) {
$command['table'] = 'articles';
$command['id'] = '_a';
$command['from'] = array('articles' => 'spip_articles');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("articles.id_trad",
"articles.id_article",
"articles.date_modif",
"articles.date",
"articles.lang",
"articles.titre");
$command['orderby'] = array('articles.date_modif DESC', 'articles.date DESC');
$command['join'] = array();
$command['limit'] = '0,2000';
$command['having'] =
array();
}
$command['where'] =
array(
quete_condition_statut('articles.statut','publie,prop,prepa/auteur','publie',''),
quete_condition_postdates('articles.date',''), (!is_whereable(($Pile[0]['annee'] ?? null)) ? '' : ((is_array(($Pile[0]['annee'] ?? null))) ? sql_in('YEAR(articles.date)', $in) :
array('=', 'YEAR(articles.date)', sql_quote(($Pile[0]['annee'] ?? null), '','datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\'')))));
if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
$t0 = "";
// REQUETE
$iter = Spip\Compilateur\Iterateur\Factory::create(
"SQL",
$command,
array('squelettes/sitemap.xml.html','html_0196c024d30fc862d54cc3337a5a128b','_a',40,$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 .= (
'
<url>
' .
(($t1 = strval(retablir_echappements_modeles(url_absolue(vider_url(urlencode_1738(generer_objet_url($Pile[$SP]['id_article'], 'article', '', '', true)))))))!=='' ?
('<loc>' . $t1 . '</loc>') :
'') .
'
' .
BOUCLE_a_tradhtml_0196c024d30fc862d54cc3337a5a128b($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
retablir_echappements_modeles((($Pile[$SP]['date_modif'] > (table_valeur($Pile["vars"]??[], (string)'recent', null))) ? (($t2 = strval((date_iso($Pile[$SP]['date_modif']))))!=='' ?
('<lastmod>' . $t2 . '</lastmod>') :
''):'')) .
'
</url>
');
lang_select();
}
lang_select();
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_a @ squelettes/sitemap.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_bhtml_0196c024d30fc862d54cc3337a5a128b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
return '';
}
function BOUCLE_objetshtml_0196c024d30fc862d54cc3337a5a128b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$command['sourcemode'] = 'table';
$command['source'] = array(retablir_echappements_modeles(lister_tables_objets_sql('')));
if (!isset($si_init)) { $command['si'] = array(); $si_init = true; }
$command['si'][] = retablir_echappements_modeles(interdire_scripts(((entites_html(table_valeur($Pile[0]??[], (string)'annee', null),true)) ?'' :' ')));
if (!isset($command['table'])) {
$command['table'] = '';
$command['id'] = '_objets';
$command['from'] = array();
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array(".valeur");
$command['orderby'] = array();
$command['where'] =
array();
$command['join'] = array();
$command['limit'] = '';
$command['having'] =
array();
}
if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
$t0 = "";
// REQUETE
$iter = Spip\Compilateur\Iterateur\Factory::create(
"DATA",
$command,
array('squelettes/sitemap.xml.html','html_0196c024d30fc862d54cc3337a5a128b','_objets',56,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
$t0 .= (
'
' .
retablir_echappements_modeles(vide($Pile['vars'][$_zzz=(string)'fond'] = (concat('sitemap-',(interdire_scripts(safehtml(table_valeur($Pile[$SP]['valeur'], 'table_objet')))))))) .
(($t1 = strval(retablir_echappements_modeles(((trouver_fond(table_valeur($Pile["vars"]??[], (string)'fond', null))) ?' ' :''))))!=='' ?
($t1 . retablir_echappements_modeles(recuperer_fond( (table_valeur($Pile["vars"]??[], (string)'fond', null)) , array(), array('etoile'=>true,'compil'=>array('squelettes/sitemap.xml.html','html_0196c024d30fc862d54cc3337a5a128b','_objets',58,$GLOBALS['spip_lang'])), _request('connect') ?? ''))) :
'') .
'
');
}
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_objets @ squelettes/sitemap.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
//
// Fonction principale du squelette squelettes/sitemap.xml.html
// Temps de compilation total: 52.400 ms
//
function html_0196c024d30fc862d54cc3337a5a128b($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0) {
if (isset($Pile[0]["doublons"]) AND is_array($Pile[0]["doublons"]))
$doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
$connect = '';
$page = (
(($t1 = strval(retablir_echappements_modeles('')))!=='' ?
($t1 . '
Exemple tres simple de sitemap.xml accessible via URL_SITE_SPIP/sitemap.xml
(copier htaccess.txt en .htaccess pour en beneficier)
Ce sitemap affiche la liste des rubriques, breves et articles, en se limitant a 1000 rubriques, 1000 breves et 2000 articles pour des raisons
de performances.
Duree de reindexation et priorite ne sont pas precisees,
sauf pour l\'accueil.
Mais si date_modif est recente (1 jour) on l\'indique, pour que ce
soit reindexe en priorite
un critère annee permet de lister les articles d\'une année pour contourner la limite de 2000 items du sitemap general
sitemap.xml?annee=1981
(On pose un cache a zero pour echapper au test _IS_BOT)
') :
'') .
retablir_echappements_modeles('<'.'?php header(' . _q('Content-Type: text/xml; charset=utf-8') . '); ?'.'>') .
'<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
' .
(($t1 = strval(retablir_echappements_modeles('')))!=='' ?
($t1 . ' Accueil') :
'') .
'
<url>
<loc>' .
retablir_echappements_modeles(spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'],'.'))) .
'/</loc>
<changefreq>hourly</changefreq>
</url>
' .
(($t1 = strval(retablir_echappements_modeles('')))!=='' ?
($t1 . ' Rubriques') :
'') .
'
' .
BOUCLE_rhtml_0196c024d30fc862d54cc3337a5a128b($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
(($t1 = strval(retablir_echappements_modeles('')))!=='' ?
($t1 . ' Articles') :
'') .
'
' .
retablir_echappements_modeles(vide($Pile['vars'][$_zzz=(string)'recent'] = (date('Y-m-d H:i:s',(strtotime('-1 day')))))) .
'
' .
BOUCLE_ahtml_0196c024d30fc862d54cc3337a5a128b($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
(($t1 = strval(retablir_echappements_modeles('')))!=='' ?
($t1 . ' Breves') :
'') .
'
' .
BOUCLE_bhtml_0196c024d30fc862d54cc3337a5a128b($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
(($t1 = strval(retablir_echappements_modeles('')))!=='' ?
($t1 . ' Extensions de sitemap par des plugins') :
'') .
'
' .
BOUCLE_objetshtml_0196c024d30fc862d54cc3337a5a128b($Cache, $Pile, $doublons, $Numrows, $SP) .
'
</urlset>
');
return analyse_resultat_skel('html_0196c024d30fc862d54cc3337a5a128b', $Cache, $page, 'squelettes/sitemap.xml.html');
}