<?php

/*
 * Squelette : plugins/ckeditor-spip-plugin/select_documents.html
 * Date :      Fri, 03 Jul 2020 11:43:34 GMT
 * Compile :   Thu, 16 Jul 2020 07:08:35 GMT
 * Boucles :   _t2, _t1, _si
 */ 

function BOUCLE_t2html_6ee4f27a4088840fe760a900cdd5e48f(&$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(sinon(table_valeur(@$Pile[0], (string)'rubrique', null), 'XXX'),true) == 'XXX'));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_t2';
		$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/select_documents.html','html_6ee4f27a4088840fe760a900cdd5e48f','_t2',23,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .

'<'.'?php echo recuperer_fond( ' . argumenter_squelette('modeles/inc-documents-articles') . ', array_merge('.var_export($Pile[0],1).',array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . ')), array("compil"=>array(\'plugins/ckeditor-spip-plugin/select_documents.html\',\'html_6ee4f27a4088840fe760a900cdd5e48f\',\'\',24,$GLOBALS[\'spip_lang\']),\'ajax\' => ($v=( ' . argumenter_squelette(@$Pile[0]['ajax']) . '))?$v:true), _request("connect"));
?'.'>
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_t2 @ plugins/ckeditor-spip-plugin/select_documents.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_t1html_6ee4f27a4088840fe760a900cdd5e48f(&$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'][] = (table_valeur($Pile["vars"], (string)'type', null) == 'tout');

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_t1';
		$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/select_documents.html','html_6ee4f27a4088840fe760a900cdd5e48f','_t1',20,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	' .

'<'.'?php echo recuperer_fond( ' . argumenter_squelette('modeles/inc-documents-tous') . ', array_merge('.var_export($Pile[0],1).',array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . ')), array("compil"=>array(\'plugins/ckeditor-spip-plugin/select_documents.html\',\'html_6ee4f27a4088840fe760a900cdd5e48f\',\'\',21,$GLOBALS[\'spip_lang\']),\'ajax\' => ($v=( ' . argumenter_squelette(@$Pile[0]['ajax']) . '))?$v:true), _request("connect"));
?'.'>
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_t1 @ plugins/ckeditor-spip-plugin/select_documents.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_sihtml_6ee4f27a4088840fe760a900cdd5e48f(&$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/select_documents.html','html_6ee4f27a4088840fe760a900cdd5e48f','_si',3,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
<!DOCTYPE html PUBLIC \'-//W3C//DTD XHTML 1.0 Strict//EN\' \'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\'>
<html>
	<head>
		<title>' .
_T('ckeditor:selection_document_spip') .
'</title>
		<script type="text/javascript">  
			function SelectFile(url) {  
				var parent_window = (window.parent == window) ? window.opener : window.parent ;  
				parent_window.CKEDITOR.tools.callFunction( <?php echo intval(_request(\'CKEditorFuncNum\')); ?>, url, \'\');  
				window.close();  
			}  
		</script>  
		<link rel="stylesheet" type="text/css" href="' .
find_in_path('css/filebrowser.css') .
'" />
	</head>
<body>
	<form name=\'selectdoc\' action=\'#\' method=\'post\'>
' .
vide($Pile['vars'][$_zzz=(string)'type'] = interdire_scripts(eval('return '.'$_REQUEST[\'type\']'.';'))) .
(($t1 = BOUCLE_t1html_6ee4f27a4088840fe760a900cdd5e48f($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
		$t1 :
		((	'
' .
	(($t2 = BOUCLE_t2html_6ee4f27a4088840fe760a900cdd5e48f($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
			$t2 :
			((	'
	' .
		
'<'.'?php echo recuperer_fond( ' . argumenter_squelette('modeles/inc-documents-rubriques') . ', array_merge('.var_export($Pile[0],1).',array(\'lang\' => ' . argumenter_squelette($GLOBALS["spip_lang"]) . ')), array("compil"=>array(\'plugins/ckeditor-spip-plugin/select_documents.html\',\'html_6ee4f27a4088840fe760a900cdd5e48f\',\'\',26,$GLOBALS[\'spip_lang\']),\'ajax\' => ($v=( ' . argumenter_squelette(@$Pile[0]['ajax']) . '))?$v:true), _request("connect"));
?'.'>
'))) .
	'
'))) .
'
	</form>
</body>
</html>
');
	}
	$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/select_documents.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}

//
// Fonction principale du squelette plugins/ckeditor-spip-plugin/select_documents.html
// Temps de compilation total: 5.903 ms
//

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

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