File "html_74717e8397dd5fb1811cc00fdb21aee2.php"
Full path: /home/argothem/www/cache/skel/html_74717e8397dd5fb1811cc00fdb21aee2.php
File size: 15.65 KB
MIME-type: text/x-php
Charset: utf-8
<?php
/*
* Squelette : plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html
* Date : Mon, 11 Dec 2023 09:16:22 GMT
* Compile : Sat, 24 Feb 2024 20:11:05 GMT
* Boucles : _maj, _r, _mesimages, _a, _s, _objets
*/
function BOUCLE_majhtml_74717e8397dd5fb1811cc00fdb21aee2(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
if (!isset($command['table'])) {
$command['table'] = 'articles';
$command['id'] = '_maj';
$command['from'] = array('articles' => 'spip_articles');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("articles.date_modif",
"articles.lang",
"articles.titre");
$command['orderby'] = array('articles.date_modif DESC');
$command['where'] =
array();
$command['join'] = array();
$command['limit'] = '0,1';
$command['having'] =
array();
}
if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
$t0 = "";
// REQUETE
$iter = Spip\Compilateur\Iterateur\Factory::create(
"SQL",
$command,
array('plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html','html_74717e8397dd5fb1811cc00fdb21aee2','_maj',28,$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 .= (normaliser_date($Pile[$SP]['date_modif']) ? (($t2 = strval(date_iso(normaliser_date($Pile[$SP]['date_modif']))))!=='' ?
('<lastmod>' . $t2 . '</lastmod>') :
''):'');
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_maj @ plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_rhtml_74717e8397dd5fb1811cc00fdb21aee2(&$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'][] = 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('plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html','html_74717e8397dd5fb1811cc00fdb21aee2','_r',34,$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(url_absolue(vider_url(urlencode_1738(generer_objet_url($Pile[$SP]['id_rubrique'], 'rubrique', '', '', true))))))!=='' ?
('<loc>' . $t1 . '</loc>') :
'') .
'
' .
(($t1 = strval(supprimer_timestamp(extraire_attribut(quete_html_logo(quete_logo('id_rubrique', 'ON', $Pile[$SP]['id_rubrique'], quete_parent($Pile[$SP]['id_rubrique'])), '', ''),'src'))))!=='' ?
(( '<image:image>
<image:loc>' .
spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'],'.')) .
'/') . $t1 . '</image:loc>
</image:image>') :
'') .
'
</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 @ plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_mesimageshtml_74717e8397dd5fb1811cc00fdb21aee2(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$doublons_index = array();
$in = array();
$in[]= 'jpg';
$in[]= 'gif';
$in[]= 'png';
$in[]= 'webp';
$in[]= 'avif';
// Initialise le(s) critère(s) doublons
if (!isset($doublons[$d = 'documents'])) { $doublons[$d] = ''; }
if (!isset($command['table'])) {
$command['table'] = 'documents';
$command['id'] = '_mesimages';
$command['from'] = array('documents' => 'spip_documents','L1' => 'spip_documents_liens');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("documents.id_document");
$command['join'] = array('L1' => array('documents','id_document'));
$command['limit'] = '0,1000';
$command['having'] =
array();
}
$command['orderby'] = array(((!$zqv=sql_quote($in) OR $zqv==="''") ? 0 : ('FIELD(documents.extension,' . $zqv . ')')));
$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[$SP]['id_article'], '','bigint(21) NOT NULL DEFAULT \'0\'')),
array('=', 'L1.objet', sql_quote('article')), sql_in('documents.extension', $in),
array(sql_in('documents.id_document', $doublons[$doublons_index[]= ('documents')], 'NOT')));
if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
$t0 = "";
// REQUETE
$iter = Spip\Compilateur\Iterateur\Factory::create(
"SQL",
$command,
array('plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html','html_74717e8397dd5fb1811cc00fdb21aee2','_mesimages',54,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
foreach($doublons_index as $k) $doublons[$k] .= "," . $Pile[$SP]['id_document']; // doublons
$t0 .= (
'<image:image>
<image:loc>' .
url_absolue(vider_url(urlencode_1738(generer_objet_url($Pile[$SP]['id_document'], 'document', '', '', true)))) .
'</image:loc>
</image:image>');
}
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_mesimages @ plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_ahtml_74717e8397dd5fb1811cc00fdb21aee2(&$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_article",
"articles.date_modif",
"articles.date",
"articles.popularite",
"articles.titre",
"articles.lang");
$command['orderby'] = array('articles.date_modif DESC', 'articles.date DESC');
$command['join'] = array();
$command['limit'] = '0,3000';
$command['having'] =
array();
}
$command['where'] =
array(
quete_condition_statut('articles.statut','publie,prop,prepa/auteur','publie',''), (!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\'')))),
array('>', 'articles.id_rubrique', '"0"'));
if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
$t0 = "";
// REQUETE
$iter = Spip\Compilateur\Iterateur\Factory::create(
"SQL",
$command,
array('plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html','html_74717e8397dd5fb1811cc00fdb21aee2','_a',44,$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>
<loc>' .
url_absolue(vider_url(urlencode_1738(generer_objet_url($Pile[$SP]['id_article'], 'article', '', '', true)))) .
'</loc>
<lastmod>' .
date_iso(normaliser_date($Pile[$SP]['date_modif'])) .
'</lastmod>
<changefreq>weekly</changefreq>
<priority>' .
div((ceil(min(100, 100 * $Pile[$SP]['popularite']
/ max(1 , 0 + $GLOBALS['meta']['popularite_max'])))),'100') .
'</priority>
' .
(($t1 = strval(supprimer_timestamp(extraire_attribut(quete_html_logo(quete_logo('id_article', 'ON', $Pile[$SP]['id_article'], ''), '', ''),'src'))))!=='' ?
(( '<image:image>
<image:loc>' .
spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'],'.')) .
'/') . $t1 . ( '</image:loc>
' .
(($t2 = strval(interdire_scripts(textebrut(trim(traiter_doublons_documents($doublons, supprimer_numero(typo($Pile[$SP]['titre'], "TYPO", $connect, $Pile[0]))))))))!=='' ?
('<image:title>' . $t2 . '</image:title>') :
'') .
'
</image:image>')) :
'') .
'
' .
BOUCLE_mesimageshtml_74717e8397dd5fb1811cc00fdb21aee2($Cache, $Pile, $doublons, $Numrows, $SP) .
'
</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 @ plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_shtml_74717e8397dd5fb1811cc00fdb21aee2(&$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'] = 'syndic';
$command['id'] = '_s';
$command['from'] = array('syndic' => 'spip_syndic');
$command['type'] = array();
$command['groupby'] = array();
$command['select'] = array("syndic.date",
"syndic.id_syndic");
$command['orderby'] = array('syndic.date DESC');
$command['join'] = array();
$command['limit'] = '0,50';
$command['having'] =
array();
}
$command['where'] =
array(
quete_condition_statut('syndic.statut','publie,prop','publie',''), (!is_whereable(($Pile[0]['annee'] ?? null)) ? '' : ((is_array(($Pile[0]['annee'] ?? null))) ? sql_in('YEAR(syndic.date)', $in) :
array('=', 'YEAR(syndic.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('plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html','html_74717e8397dd5fb1811cc00fdb21aee2','_s',61,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
$t0 .= (
'
<url>
' .
(($t1 = strval(url_absolue(generer_url_entite($Pile[$SP]['id_syndic'],'site'))))!=='' ?
('<loc>' . $t1 . '</loc>') :
'') .
'
' .
(($t1 = strval(supprimer_timestamp(extraire_attribut(quete_html_logo(quete_logo('id_syndic', 'ON', $Pile[$SP]['id_syndic'], ''), '', ''),'src'))))!=='' ?
(( '<image:image>
<image:loc>' .
spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'],'.')) .
'/') . $t1 . '</image:loc>
</image:image>') :
'') .
'
</url>
');
}
$iter->free();
}
if (defined("_BOUCLE_PROFILER")
AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
spip_log(intval(1000*$timer)."ms BOUCLE_s @ plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
function BOUCLE_objetshtml_74717e8397dd5fb1811cc00fdb21aee2(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
static $command = array();
static $connect;
$command['connect'] = $connect = '';
$command['sourcemode'] = 'table';
$command['source'] = array(lister_tables_objets_sql(''));
if (!isset($si_init)) { $command['si'] = array(); $si_init = true; }
$command['si'][] = 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('plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html','html_74717e8397dd5fb1811cc00fdb21aee2','_objets',71,$GLOBALS['spip_lang'])
);
if (!$iter->err()) {
$SP++;
// RESULTATS
while ($Pile[$SP]=$iter->fetch()) {
$t0 .= (
'
' .
vide($Pile['vars'][$_zzz=(string)'fond'] = concat('sitemap-',interdire_scripts(safehtml(table_valeur($Pile[$SP]['valeur'], 'table_objet'))))) .
((trouver_fond(table_valeur($Pile["vars"]??[], (string)'fond', null))) ?
(' ' . recuperer_fond( table_valeur($Pile["vars"]??[], (string)'fond', null) , array(), array('etoile'=>true,'compil'=>array('plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html','html_74717e8397dd5fb1811cc00fdb21aee2','_objets',73,$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 @ plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html","profiler"._LOG_AVERTISSEMENT);
return $t0;
}
//
// Fonction principale du squelette plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html
// Temps de compilation total: 16.265 ms
//
function html_74717e8397dd5fb1811cc00fdb21aee2($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 = (
'<'.'?php header("X-Spip-Cache: 0"); ?'.'>'.'<'.'?php header("Cache-Control: no-cache, must-revalidate"); ?'.'><'.'?php header("Pragma: no-cache"); ?'.'>' .
'<'.'?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:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>' .
spip_htmlspecialchars(sinon($GLOBALS['meta']['adresse_site'],'.')) .
'</loc>
' .
BOUCLE_majhtml_74717e8397dd5fb1811cc00fdb21aee2($Cache, $Pile, $doublons, $Numrows, $SP) .
'
<changefreq>hourly</changefreq>
<priority>1.0</priority>
</url>
' .
BOUCLE_rhtml_74717e8397dd5fb1811cc00fdb21aee2($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_ahtml_74717e8397dd5fb1811cc00fdb21aee2($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_shtml_74717e8397dd5fb1811cc00fdb21aee2($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_objetshtml_74717e8397dd5fb1811cc00fdb21aee2($Cache, $Pile, $doublons, $Numrows, $SP) .
'
</urlset>
');
return analyse_resultat_skel('html_74717e8397dd5fb1811cc00fdb21aee2', $Cache, $page, 'plugins/auto/sitemap_images/v1.4.0/sitemap-images.xml.html');
}