<?php

/*
 * Squelette : ../plugins/champs_extras3_interface/champs_extras3_interface/prive/objets/liste/champs_extras_objets.html
 * Date :      Wed, 23 Dec 2015 12:09:00 GMT
 * Compile :   Fri, 15 Jul 2016 07:46:30 GMT
 * Boucles :   _saisies, _cond, _objets
 */ 

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

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	$command['sourcemode'] = 'tableau';

	$command['source'] = array(interdire_scripts(iextras_champs_extras_definis($Pile[$SP-1]['cle'])));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_saisies';
		$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()+microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"DATA",
		$command,
		array('../plugins/champs_extras3_interface/champs_extras3_interface/prive/objets/liste/champs_extras_objets.html','html_29b3f4fd109f25e6a3c47c57306b06b9','_saisies',20,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$Numrows['_saisies']['total'] = @intval($iter->count());
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
				<li class=\'item' .
((($Numrows['_saisies']['total'] == '1'))  ?
		(' ' . 'solo') :
		'') .
'\'>
					<span title="' .
attribut_html(_T((	'saisies:saisie_' .
	interdire_scripts(safehtml(table_valeur($Pile[$SP]['valeur'], 'saisie'))) .
	'_titre'))) .
'">
						' .
(($t1 = strval(interdire_scripts(filtre_balise_img_dist(((($a = chemin_image((	'saisies_' .
	interdire_scripts(safehtml(table_valeur($Pile[$SP]['valeur'], 'saisie')))))) OR (is_string($a) AND strlen($a))) ? $a : find_in_path('images/formulaire-saisie-defaut.png')),interdire_scripts(safehtml(table_valeur($Pile[$SP]['valeur'], 'saisie')))))))!=='' ?
		($t1 . ' ') :
		'') .
'
						' .
interdire_scripts(_T_ou_typo(((($a = ((($a = table_valeur($Pile[$SP]['valeur'], 'options/label')) OR (is_string($a) AND strlen($a))) ? $a : interdire_scripts(table_valeur($Pile[$SP]['valeur'], 'options/label_case')))) OR (is_string($a) AND strlen($a))) ? $a : interdire_scripts(couper(_T_ou_typo(table_valeur($Pile[$SP]['valeur'], 'options/texte')),'30'))))) .
'
					</span>
				</li>
			');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_saisies @ ../plugins/champs_extras3_interface/champs_extras3_interface/prive/objets/liste/champs_extras_objets.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


function BOUCLE_condhtml_29b3f4fd109f25e6a3c47c57306b06b9(&$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(is_string(safehtml($Pile[$SP]['cle'])));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_cond';
		$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()+microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"CONDITION",
		$command,
		array('../plugins/champs_extras3_interface/champs_extras3_interface/prive/objets/liste/champs_extras_objets.html','html_29b3f4fd109f25e6a3c47c57306b06b9','_cond',12,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
	<tr>
		<td>
			' .
interdire_scripts(filtre_icone_horizontale_dist(parametre_url(entites_html(sinon(table_valeur(@$Pile[0], (string)'lien', null), self()),true),'objet',interdire_scripts(table_valeur($Pile[$SP-1]['valeur'], 'type'))),interdire_scripts(_T(table_valeur($Pile[$SP-1]['valeur'], 'texte_objets'))),(	interdire_scripts(table_valeur($Pile[$SP-1]['valeur'], 'icone_objet')) .
	' '))) .
'
		</td>
		<td>
			' .
(($t1 = BOUCLE_saisieshtml_29b3f4fd109f25e6a3c47c57306b06b9($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
		('
			<ul class=\'saisies_objet\'>
			' . $t1 . '
			</ul>
			') :
		'') .
'
		</td>
	</tr>
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_cond @ ../plugins/champs_extras3_interface/champs_extras3_interface/prive/objets/liste/champs_extras_objets.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


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

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	$command['sourcemode'] = 'tableau';

	$command['source'] = array(lister_tables_objets_sql(''));

	if (!isset($command['table'])) {
		$command['table'] = '';
		$command['id'] = '_objets';
		$command['from'] = array();
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array(".valeur",
		".cle");
		$command['orderby'] = array('.cle');
		$command['where'] = 
			array(
			array('=', 'editable', "'oui'"));
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	if (defined("_BOUCLE_PROFILER")) $timer = time()+microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"DATA",
		$command,
		array('../plugins/champs_extras3_interface/champs_extras3_interface/prive/objets/liste/champs_extras_objets.html','html_29b3f4fd109f25e6a3c47c57306b06b9','_objets',1,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t0 .= (
'
' .
BOUCLE_condhtml_29b3f4fd109f25e6a3c47c57306b06b9($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_objets @ ../plugins/champs_extras3_interface/champs_extras3_interface/prive/objets/liste/champs_extras_objets.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}

//
// Fonction principale du squelette ../plugins/champs_extras3_interface/champs_extras3_interface/prive/objets/liste/champs_extras_objets.html
// Temps de compilation total: 40.186 ms
//

function html_29b3f4fd109f25e6a3c47c57306b06b9($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 = BOUCLE_objetshtml_29b3f4fd109f25e6a3c47c57306b06b9($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
		((	'
<div class=\'champs_extras_objets\'>
	<table>
		<thead>
			<tr>
				<th>' .
		_T('iextras:label_table') .
		'</th>
				<th>' .
		_T('iextras:champs_extras') .
		'</th>
			</tr>
		</thead>
		<tbody>
') . $t1 . '
		</tbody>
	</table>
</div>
') :
		'') .
'
');

	return analyse_resultat_skel('html_29b3f4fd109f25e6a3c47c57306b06b9', $Cache, $page, '../plugins/champs_extras3_interface/champs_extras3_interface/prive/objets/liste/champs_extras_objets.html');
}
?>