<?php

/*
 * Squelette : plugins/ckeditor-spip-plugin/spiplistes-json.html
 * Date :      Fri, 03 Jul 2020 11:43:34 GMT
 * Compile :   Thu, 15 Feb 2024 08:14:34 GMT
 * Boucles :   _articles, _si_articles, _rubriques, _si_rubriques, _auteurs, _si_auteurs, _mots, _si_mots, _groupes_mots, _si_groupes_mots, _breves, _si_breves, _sites, _si_sites, _documents, _si_documents, _si
 */ 

function BOUCLE_articleshtml_30b6538157c7eedfacffd10af0636ae5(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'articles';
		$command['id'] = '_articles';
		$command['from'] = array('articles' => 'spip_articles');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("articles.date",
		"articles.id_article",
		"articles.titre",
		"articles.lang");
		$command['orderby'] = array('articles.date DESC');
		$command['where'] = 
			array(
quete_condition_statut('articles.statut','publie,prop,prepa/auteur','publie',''), 
quete_condition_postdates('articles.date',''));
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_articles',5,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	
	// COMPTEUR
	$Numrows['_articles']['compteur_boucle'] = 0;
	$Numrows['_articles']['total'] = @intval($iter->count());
	lang_select($GLOBALS['spip_lang']);
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$Numrows['_articles']['compteur_boucle']++;
		lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
		$t0 .= (
'
	"' .
$Pile[$SP]['id_article'] .
'":' .
interdire_scripts(json_encode(replace(couper(supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]),'30'),'&nbsp;',' '))) .
(($Numrows['_articles']['compteur_boucle'] != $Numrows['_articles']['total']) ? ',':'') .
'
	');
		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_articles @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_si_articleshtml_30b6538157c7eedfacffd10af0636ae5(&$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)'doctype', null),true) == 'articles'));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_si_articles';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("1");
		$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 = IterFactory::create(
		"CONDITION",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_si_articles',4,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .
BOUCLE_articleshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_si_articles @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_rubriqueshtml_30b6538157c7eedfacffd10af0636ae5(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'rubriques';
		$command['id'] = '_rubriques';
		$command['from'] = array('rubriques' => 'spip_rubriques');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("rubriques.date",
		"rubriques.id_rubrique",
		"rubriques.titre",
		"rubriques.lang");
		$command['orderby'] = array('rubriques.date DESC');
		$command['where'] = 
			array(
quete_condition_statut('rubriques.statut','!','publie',''));
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_rubriques',10,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	
	// COMPTEUR
	$Numrows['_rubriques']['compteur_boucle'] = 0;
	$Numrows['_rubriques']['total'] = @intval($iter->count());
	lang_select($GLOBALS['spip_lang']);
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$Numrows['_rubriques']['compteur_boucle']++;
		lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
		$t0 .= (
'
	"' .
$Pile[$SP]['id_rubrique'] .
'":' .
interdire_scripts(json_encode(replace(couper(supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]),'30'),'&nbsp;',' '))) .
(($Numrows['_rubriques']['compteur_boucle'] != $Numrows['_rubriques']['total']) ? ',':'') .
'
	');
		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_rubriques @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_si_rubriqueshtml_30b6538157c7eedfacffd10af0636ae5(&$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)'doctype', null),true) == 'rubriques'));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_si_rubriques';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("1");
		$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 = IterFactory::create(
		"CONDITION",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_si_rubriques',9,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .
BOUCLE_rubriqueshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_si_rubriques @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_auteurshtml_30b6538157c7eedfacffd10af0636ae5(&$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','L2' => 'spip_articles');
		$command['type'] = array();
		$command['groupby'] = array("auteurs.id_auteur");
		$command['select'] = array("auteurs.nom",
		"auteurs.id_auteur");
		$command['orderby'] = array('auteurs.nom');
		$command['where'] = 
			array(
quete_condition_statut('L2.statut','!','publie',''), 
quete_condition_postdates('L2.date',''), 
quete_condition_statut('auteurs.statut','!5poubelle','!5poubelle',''));
		$command['join'] = array('L1' => array('auteurs','id_auteur'), 'L2' => array('L1','id_article','id_objet','L1.objet='.sql_quote('article')));
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_auteurs',15,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	
	// COMPTEUR
	$Numrows['_auteurs']['compteur_boucle'] = 0;
	$Numrows['_auteurs']['total'] = @intval($iter->count());
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$Numrows['_auteurs']['compteur_boucle']++;
		$t0 .= (
'
	"' .
$Pile[$SP]['id_auteur'] .
'":' .
interdire_scripts(json_encode(replace(couper(supprimer_numero(typo($Pile[$SP]['nom']), "TYPO", $connect, $Pile[0]),'30'),'&nbsp;',' '))) .
(($Numrows['_auteurs']['compteur_boucle'] != $Numrows['_auteurs']['total']) ? ',':'') .
'
	');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_auteurs @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_si_auteurshtml_30b6538157c7eedfacffd10af0636ae5(&$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)'doctype', null),true) == 'auteurs'));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_si_auteurs';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("1");
		$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 = IterFactory::create(
		"CONDITION",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_si_auteurs',14,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .
BOUCLE_auteurshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_si_auteurs @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_motshtml_30b6538157c7eedfacffd10af0636ae5(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'mots';
		$command['id'] = '_mots';
		$command['from'] = array('mots' => 'spip_mots');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("mots.titre",
		"mots.id_mot");
		$command['orderby'] = array('mots.titre');
		$command['where'] = 
			array();
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_mots',20,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	
	// COMPTEUR
	$Numrows['_mots']['compteur_boucle'] = 0;
	$Numrows['_mots']['total'] = @intval($iter->count());
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$Numrows['_mots']['compteur_boucle']++;
		$t0 .= (
'
	"' .
$Pile[$SP]['id_mot'] .
'":' .
interdire_scripts(json_encode(replace(couper(supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]),'30'),'&nbsp;',' '))) .
(($Numrows['_mots']['compteur_boucle'] != $Numrows['_mots']['total']) ? ',':'') .
'
	');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_mots @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_si_motshtml_30b6538157c7eedfacffd10af0636ae5(&$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)'doctype', null),true) == 'mots'));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_si_mots';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("1");
		$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 = IterFactory::create(
		"CONDITION",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_si_mots',19,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .
BOUCLE_motshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_si_mots @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_groupes_motshtml_30b6538157c7eedfacffd10af0636ae5(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'groupes_mots';
		$command['id'] = '_groupes_mots';
		$command['from'] = array('groupes_mots' => 'spip_groupes_mots');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("groupes_mots.titre",
		"groupes_mots.id_groupe");
		$command['orderby'] = array('groupes_mots.titre');
		$command['where'] = 
			array();
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_groupes_mots',25,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	
	// COMPTEUR
	$Numrows['_groupes_mots']['compteur_boucle'] = 0;
	$Numrows['_groupes_mots']['total'] = @intval($iter->count());
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$Numrows['_groupes_mots']['compteur_boucle']++;
		$t0 .= (
'
	"' .
$Pile[$SP]['id_groupe'] .
'":' .
interdire_scripts(json_encode(replace(couper(supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]),'30'),'&nbsp;',' '))) .
(($Numrows['_groupes_mots']['compteur_boucle'] != $Numrows['_groupes_mots']['total']) ? ',':'') .
'
	');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_groupes_mots @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_si_groupes_motshtml_30b6538157c7eedfacffd10af0636ae5(&$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)'doctype', null),true) == 'groupes_mots'));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_si_groupes_mots';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("1");
		$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 = IterFactory::create(
		"CONDITION",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_si_groupes_mots',24,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .
BOUCLE_groupes_motshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_si_groupes_mots @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_breveshtml_30b6538157c7eedfacffd10af0636ae5(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'breves';
		$command['id'] = '_breves';
		$command['from'] = array('breves' => 'spip_breves');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("breves.titre",
		"breves.id_breve",
		"breves.lang");
		$command['orderby'] = array('breves.titre');
		$command['where'] = 
			array(
quete_condition_statut('breves.statut','publie,prop','publie',''));
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_breves',30,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	
	// COMPTEUR
	$Numrows['_breves']['compteur_boucle'] = 0;
	$Numrows['_breves']['total'] = @intval($iter->count());
	lang_select($GLOBALS['spip_lang']);
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$Numrows['_breves']['compteur_boucle']++;
		lang_select_public($Pile[$SP]['lang'], '', $Pile[$SP]['titre']);
		$t0 .= (
'
	"' .
$Pile[$SP]['id_breve'] .
'":' .
interdire_scripts(json_encode(replace(couper(supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]),'30'),'&nbsp;',' '))) .
(($Numrows['_breves']['compteur_boucle'] != $Numrows['_breves']['total']) ? ',':'') .
'
	');
		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_breves @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_si_breveshtml_30b6538157c7eedfacffd10af0636ae5(&$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)'doctype', null),true) == 'breves'));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_si_breves';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("1");
		$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 = IterFactory::create(
		"CONDITION",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_si_breves',29,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .
BOUCLE_breveshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_si_breves @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_siteshtml_30b6538157c7eedfacffd10af0636ae5(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'syndic';
		$command['id'] = '_sites';
		$command['from'] = array('syndic' => 'spip_syndic');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("syndic.nom_site",
		"syndic.id_syndic",
		"syndic.url_site");
		$command['orderby'] = array('syndic.nom_site');
		$command['where'] = 
			array(
quete_condition_statut('syndic.statut','publie,prop','publie',''));
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_sites',35,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	
	// COMPTEUR
	$Numrows['_sites']['compteur_boucle'] = 0;
	$Numrows['_sites']['total'] = @intval($iter->count());
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$Numrows['_sites']['compteur_boucle']++;
		$t0 .= (
'
	"' .
$Pile[$SP]['id_syndic'] .
'":' .
interdire_scripts(json_encode(replace(couper((typo(supprimer_numero(calculer_url($Pile[$SP]['url_site'],$Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $connect, $Pile[0]) ? interdire_scripts(typo(supprimer_numero(calculer_url($Pile[$SP]['url_site'],$Pile[$SP]['nom_site'], 'titre', $connect, false)), "TYPO", $connect, $Pile[0])):calculer_url($Pile[$SP]['url_site'],'','url', $connect)),'60'),'&nbsp;',' '))) .
(($Numrows['_sites']['compteur_boucle'] != $Numrows['_sites']['total']) ? ',':'') .
'
	');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_sites @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_si_siteshtml_30b6538157c7eedfacffd10af0636ae5(&$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)'doctype', null),true) == 'sites'));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_si_sites';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("1");
		$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 = IterFactory::create(
		"CONDITION",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_si_sites',34,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .
BOUCLE_siteshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_si_sites @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_documentshtml_30b6538157c7eedfacffd10af0636ae5(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'documents';
		$command['id'] = '_documents';
		$command['from'] = array('documents' => 'spip_documents');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("documents.titre",
		"documents.id_document");
		$command['orderby'] = array('documents.titre');
		$command['where'] = 
			array(
			array('(documents.taille > 0 OR documents.distant=\'oui\')'));
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_documents',40,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	
	// COMPTEUR
	$Numrows['_documents']['compteur_boucle'] = 0;
	$Numrows['_documents']['total'] = @intval($iter->count());
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$Numrows['_documents']['compteur_boucle']++;
		$t0 .= (
'
	"' .
$Pile[$SP]['id_document'] .
'":' .
interdire_scripts(json_encode(replace(couper((supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]) ? interdire_scripts(supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])):basename(vider_url(urlencode_1738(generer_url_entite($Pile[$SP]['id_document'], 'document', '', '', true))))),'40'),'&nbsp;',' '))) .
(($Numrows['_documents']['compteur_boucle'] != $Numrows['_documents']['total']) ? ',':'') .
'
	');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_documents @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_si_documentshtml_30b6538157c7eedfacffd10af0636ae5(&$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)'doctype', null),true) == 'documents'));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_si_documents';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("1");
		$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 = IterFactory::create(
		"CONDITION",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_si_documents',39,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .
BOUCLE_documentshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_si_documents @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_sihtml_30b6538157c7eedfacffd10af0636ae5(&$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(invalideur_session($Cache, (table_valeur($GLOBALS["visiteur_session"], (string)'statut', null) < '2')));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_si';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("1");
		$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 = IterFactory::create(
		"CONDITION",
		$command,
		array('plugins/ckeditor-spip-plugin/spiplistes-json.html','html_30b6538157c7eedfacffd10af0636ae5','_si',3,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
{' .
BOUCLE_si_articleshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_si_rubriqueshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_si_auteurshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_si_motshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_si_groupes_motshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_si_breveshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_si_siteshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
' .
BOUCLE_si_documentshtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'}
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_si @ plugins/ckeditor-spip-plugin/spiplistes-json.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}

//
// Fonction principale du squelette plugins/ckeditor-spip-plugin/spiplistes-json.html
// Temps de compilation total: 69.327 ms
//

function html_30b6538157c7eedfacffd10af0636ae5($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: application/json' .
	(($t2 = strval(interdire_scripts($GLOBALS['meta']['charset'])))!=='' ?
			('; charset=' . $t2) :
			''))) . '); ?'.'>
' .
BOUCLE_sihtml_30b6538157c7eedfacffd10af0636ae5($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');

	return analyse_resultat_skel('html_30b6538157c7eedfacffd10af0636ae5', $Cache, $page, 'plugins/ckeditor-spip-plugin/spiplistes-json.html');
}
?>