<?php

/*
 * Squelette : ../plugins-dist/medias/prive/squelettes/inclure/mediatheque-choisir.html
 * Date :      Sun, 21 Jun 2020 17:05:40 GMT
 * Compile :   Thu, 16 Jul 2020 08:04:16 GMT
 * Boucles :   _liens, _galerie
 */ 

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

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	if (!isset($command['table'])) {
		$command['table'] = 'documents_liens';
		$command['id'] = '_liens';
		$command['from'] = array('documents_liens' => 'spip_documents_liens');
		$command['type'] = array();
		$command['groupby'] = array();
		$command['select'] = array("documents_liens.id_objet",
		"documents_liens.objet");
		$command['orderby'] = array();
		$command['join'] = array();
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	$command['where'] = 
			array(
			array('=', 'documents_liens.id_document', sql_quote($Pile[$SP]['id_document'], '','bigint(21) NOT NULL DEFAULT \'0\'')));
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('../plugins-dist/medias/prive/squelettes/inclure/mediatheque-choisir.html','html_0dcec7edca0756181350dfa18ab3d8e1','_liens',56,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	$Numrows['_liens']['total'] = @intval($iter->count());
	$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$t1 = (
'
			' .
inserer_attribut(generer_lien_entite($Pile[$SP]['id_objet'],interdire_scripts($Pile[$SP]['objet'])),'target','_blank') .
'
			');
		$t0 .= ((strlen($t1) && strlen($t0)) ? '<br />' : '') . $t1;
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_liens @ ../plugins-dist/medias/prive/squelettes/inclure/mediatheque-choisir.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}


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

	static $command = array();
	static $connect;
	$command['connect'] = $connect = '';
	$in = array();
	if (!(is_array($a = (@$Pile[0]['id_rubrique']))))
		$in[]= $a;
	else $in = array_merge($in, $a);
	$in1 = array();
	if (!(is_array($a = (@$Pile[0]['id_article']))))
		$in1[]= $a;
	else $in1 = array_merge($in1, $a);
	$in2 = array();
	if (!(is_array($a = (@$Pile[0]['id_breve']))))
		$in2[]= $a;
	else $in2 = array_merge($in2, $a);
	$in3 = array();
	if (!(is_array($a = (@$Pile[0]['id_document']))))
		$in3[]= $a;
	else $in3 = array_merge($in3, $a);
	$in4 = array();
	if (!(is_array($a = (@$Pile[0]['media']))))
		$in4[]= $a;
	else $in4 = array_merge($in4, $a);
	$in5 = array();
	if (!(is_array($a = (@$Pile[0]['extension']))))
		$in5[]= $a;
	else $in5 = array_merge($in5, $a);
	$in6 = array();
	if (!(is_array($a = (@$Pile[0]['distant']))))
		$in6[]= $a;
	else $in6 = array_merge($in6, $a);
	$in7 = array();
	if (!(is_array($a = (@$Pile[0]['brise']))))
		$in7[]= $a;
	else $in7 = array_merge($in7, $a);
	// RECHERCHE
	if (!strlen((isset($Pile[0]["recherche"])?$Pile[0]["recherche"]:(isset($GLOBALS["recherche"])?$GLOBALS["recherche"]:"")))){
		list($rech_select, $rech_where) = array("0 as points","");
	} else
	{
		$prepare_recherche = charger_fonction('prepare_recherche', 'inc');
		list($rech_select, $rech_where) = $prepare_recherche((isset($Pile[0]["recherche"])?$Pile[0]["recherche"]:(isset($GLOBALS["recherche"])?$GLOBALS["recherche"]:"")), "documents", "?","",array (
  'lien' => true,
  'criteres' => 
  array (
    'id_document' => true,
  ),
),"id_document");
	}
	
	$senstri = '';
	$tri = (($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'');
	if ($tri){
		$senstri = ((intval($t=(isset($Pile[0]['sens'.'_galerie']))?$Pile[0]['sens'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('sens'.'_galerie'))?session_get('sens'.'_galerie'):(is_array($s='inverse')?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s)))==-1 OR $t=='inverse')?-1:1);
		$senstri = ($senstri<0)?' DESC':'';
	};
	
	$command['pagination'] = array((isset($Pile[0]['debut_galerie']) ? $Pile[0]['debut_galerie'] : null), 10);
	if (!isset($command['table'])) {
		$command['table'] = 'documents';
		$command['id'] = '_galerie';
		$command['from'] = array('documents' => 'spip_documents','L1' => 'spip_documents_liens','L2' => 'spip_documents_liens','L3' => 'spip_documents_liens','resultats' => 'spip_resultats');
		$command['type'] = array();
		$command['groupby'] = array("documents.id_document");
		$command['join'] = array('L1' => array('documents','id_document'), 'L2' => array('documents','id_document'), 'L3' => array('documents','id_document'), 'resultats' => array('documents','id','id_document'));
		$command['limit'] = '';
		$command['having'] = 
			array();
	}
	$command['select'] = array("documents.id_document",
		"$rech_select",
		"".tri_champ_select($tri)."",
		"documents.media",
		"documents.distant",
		"documents.fichier",
		"documents.statut",
		"documents.titre",
		"documents.extension",
		"documents.largeur",
		"documents.hauteur",
		"documents.taille",
		"documents.date",
		"documents.descriptif",
		"documents.credits");
	$command['orderby'] = array(tri_champ_order($tri,$command['from']).$senstri);
	$command['where'] = 
			array(
			array('IN', 'documents.mode', '(\'image\',\'document\')'), 
			array('(documents.taille > 0 OR documents.distant=\'oui\')'), (!(is_array(@$Pile[0]['id_rubrique'])?count(@$Pile[0]['id_rubrique']):strlen(@$Pile[0]['id_rubrique'])) ? '' : ((is_array(@$Pile[0]['id_rubrique'])) ? sql_in('L1.id_objet',sql_quote($in)) : 
			array('=', 'L1.id_objet', sql_quote(@$Pile[0]['id_rubrique'], '','bigint(21) NOT NULL DEFAULT \'0\'')))), (!(is_array(@$Pile[0]['id_rubrique'])?count(@$Pile[0]['id_rubrique']):strlen(@$Pile[0]['id_rubrique'])) ? '' : 
			array('=', 'L1.objet', sql_quote('rubrique'))), (!(is_array(@$Pile[0]['id_article'])?count(@$Pile[0]['id_article']):strlen(@$Pile[0]['id_article'])) ? '' : ((is_array(@$Pile[0]['id_article'])) ? sql_in('L2.id_objet',sql_quote($in1)) : 
			array('=', 'L2.id_objet', sql_quote(@$Pile[0]['id_article'], '','bigint(21) NOT NULL DEFAULT \'0\'')))), (!(is_array(@$Pile[0]['id_article'])?count(@$Pile[0]['id_article']):strlen(@$Pile[0]['id_article'])) ? '' : 
			array('=', 'L2.objet', sql_quote('article'))), (!(is_array(@$Pile[0]['id_breve'])?count(@$Pile[0]['id_breve']):strlen(@$Pile[0]['id_breve'])) ? '' : ((is_array(@$Pile[0]['id_breve'])) ? sql_in('L3.id_objet',sql_quote($in2)) : 
			array('=', 'L3.id_objet', sql_quote(@$Pile[0]['id_breve'], '','bigint(21) NOT NULL DEFAULT \'0\'')))), (!(is_array(@$Pile[0]['id_breve'])?count(@$Pile[0]['id_breve']):strlen(@$Pile[0]['id_breve'])) ? '' : 
			array('=', 'L3.objet', sql_quote('breve'))), (!(is_array(@$Pile[0]['id_document'])?count(@$Pile[0]['id_document']):strlen(@$Pile[0]['id_document'])) ? '' : ((is_array(@$Pile[0]['id_document'])) ? sql_in('documents.id_document',sql_quote($in3)) : 
			array('=', 'documents.id_document', sql_quote(@$Pile[0]['id_document'], '','bigint(21) NOT NULL AUTO_INCREMENT')))), $rech_where?$rech_where:'', (!(is_array(@$Pile[0]['media'])?count(@$Pile[0]['media']):strlen(@$Pile[0]['media'])) ? '' : ((is_array(@$Pile[0]['media'])) ? sql_in('documents.media',sql_quote($in4)) : 
			array('=', 'documents.media', sql_quote(@$Pile[0]['media'], '','varchar(10) NOT NULL DEFAULT \'file\'')))), (!(is_array(@$Pile[0]['extension'])?count(@$Pile[0]['extension']):strlen(@$Pile[0]['extension'])) ? '' : ((is_array(@$Pile[0]['extension'])) ? sql_in('documents.extension',sql_quote($in5)) : 
			array('=', 'documents.extension', sql_quote(@$Pile[0]['extension'], '','varchar(10) NOT NULL DEFAULT \'\'')))), (!(is_array(@$Pile[0]['distant'])?count(@$Pile[0]['distant']):strlen(@$Pile[0]['distant'])) ? '' : ((is_array(@$Pile[0]['distant'])) ? sql_in('documents.distant',sql_quote($in6)) : 
			array('=', 'documents.distant', sql_quote(@$Pile[0]['distant'], '','varchar(3) DEFAULT \'non\'')))), (!(is_array(@$Pile[0]['brise'])?count(@$Pile[0]['brise']):strlen(@$Pile[0]['brise'])) ? '' : ((is_array(@$Pile[0]['brise'])) ? sql_in('documents.brise',sql_quote($in7)) : 
			array('=', 'documents.brise', sql_quote(@$Pile[0]['brise'], '','tinyint(4) DEFAULT \'0\'')))), 
			array('REGEXP', 'documents.statut', sql_quote(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'statut', null), '.*'),true)), '', 'char')), (@$Pile[0]["orphelins"])?'documents.id_document NOT IN (
SELECT DISTINCT id_document
FROM spip_documents_liens as oooo)':'', 
			array('REGEXP', 'documents.titre', sql_quote(interdire_scripts((entites_html(table_valeur(@$Pile[0], (string)'sanstitre', null),true) ? '^$':'.*')), '', 'char')));
	if (defined("_BOUCLE_PROFILER")) $timer = time()+(float)microtime();
	$t0 = "";
	// REQUETE
	$iter = IterFactory::create(
		"SQL",
		$command,
		array('../plugins-dist/medias/prive/squelettes/inclure/mediatheque-choisir.html','html_0dcec7edca0756181350dfa18ab3d8e1','_galerie',3,$GLOBALS['spip_lang'])
	);
	if (!$iter->err()) {
	
	// COMPTEUR
	$Numrows['_galerie']['compteur_boucle'] = 0;
	$Numrows['_galerie']['total'] = @intval($iter->count());
	$debut_boucle = isset($Pile[0]['debut_galerie']) ? $Pile[0]['debut_galerie'] : _request('debut_galerie');
	if(substr($debut_boucle,0,1)=='@'){
		$debut_boucle = $Pile[0]['debut_galerie'] = quete_debut_pagination('id_document',$Pile[0]['@id_document'] = substr($debut_boucle,1),10,$iter);
		$iter->seek(0);
	}
	$debut_boucle = intval($debut_boucle);
	$debut_boucle = (($tout=($debut_boucle == -1))?0:($debut_boucle));
	$debut_boucle = max(0,min($debut_boucle,floor(($Numrows['_galerie']['total']-1)/(10))*(10)));
	$debut_boucle = intval($debut_boucle);
	$fin_boucle = min(($tout ? $Numrows['_galerie']['total'] : $debut_boucle + 9), $Numrows['_galerie']['total'] - 1);
	$Numrows['_galerie']['grand_total'] = $Numrows['_galerie']['total'];
	$Numrows['_galerie']["total"] = max(0,$fin_boucle - $debut_boucle + 1);
	if ($debut_boucle>0 AND $debut_boucle < $Numrows['_galerie']['grand_total'] AND $iter->seek($debut_boucle,'continue'))
		$Numrows['_galerie']['compteur_boucle'] = $debut_boucle;
	
	
	$l1 = _T('medias:fichier_manquant');
	$l2 = _T('medias:fichier_distant');
	$l3 = _T('public|spip|ecrire:info_sans_titre');
	$l4 = _T('public|spip|ecrire:bouton_choisir');$SP++;
	// RESULTATS
	while ($Pile[$SP]=$iter->fetch()) {

		$Numrows['_galerie']['compteur_boucle']++;
		if ($Numrows['_galerie']['compteur_boucle'] <= $debut_boucle) continue;
		if ($Numrows['_galerie']['compteur_boucle']-1 > $fin_boucle) break;
		$t0 .= (
'
	<tr class="' .
(($t1 = strval(interdire_scripts(((entites_html(table_valeur(@$Pile[0], (string)'media', null),true)) ?'' :' '))))!=='' ?
		($t1 . (($t2 = strval(interdire_scripts($Pile[$SP]['media'])))!=='' ?
			(' media-' . $t2) :
			'')) :
		'') .
'" id="' .
interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'iddoc', null), 'media'),true)) .
$Pile[$SP]['id_document'] .
'">
		<td class=\'infos\'>
		' .
(($t1 = strval(interdire_scripts(((($Pile[$SP]['distant'] == 'oui')) ?'' :' '))))!=='' ?
		($t1 . vide($Pile['vars'][$_zzz=(string)'missing'] = interdire_scripts(((file_exists(get_spip_doc($Pile[$SP]['fichier']))) ?'' :' ')))) :
		'') .
'
		' .
(($t1 = strval(interdire_scripts((((((entites_html(table_valeur(@$Pile[0], (string)'media', null),true)) ?'' :' ')) AND (interdire_scripts(($Pile[$SP]['media'] != 'file')))) ?' ' :''))))!=='' ?
		($t1 . interdire_scripts(inserer_attribut(inserer_attribut(filtre_balise_img_dist(chemin_image((	'media-' .
		interdire_scripts(concat($Pile[$SP]['media'],'-32.png'))))),'alt',_T((	'medias:media_' .
			interdire_scripts($Pile[$SP]['media'])))),'title',_T((	'medias:media_' .
			interdire_scripts($Pile[$SP]['media'])))))) :
		'') .
'
		' .
((table_valeur($Pile["vars"], (string)'missing', null))  ?
		(' ' . (	'<img src=\'' .
	interdire_scripts(chemin_image('document-manquant-24.png')) .
	'\' width=\'24\' height=\'24\' alt=\'' .
	$l1 .
	'\' />')) :
		'') .
'
		' .
(($t1 = strval(interdire_scripts(((($Pile[$SP]['distant'] == 'oui')) ?' ' :''))))!=='' ?
		($t1 . (	'<img src=\'' .
	interdire_scripts(chemin_image('document-distant-24.png')) .
	'\' width=\'24\' height=\'24\' alt=\'' .
	$l2 .
	'\' />')) :
		'') .
'
		</td>
		<td class="id">
			<strong>' .
$Pile[$SP]['id_document'] .
'</strong>
		</td>
		<td class=\'statut\'>
		' .
medias_puce_statut_document($Pile[$SP]['id_document'],interdire_scripts($Pile[$SP]['statut'])) .
'
		</td>
		<td class="logo">
		' .
vide($Pile['vars'][$_zzz=(string)'fichier'] = interdire_scripts((($Pile[$SP]['distant'] == 'oui') ? interdire_scripts(get_spip_doc($Pile[$SP]['fichier'])):interdire_scripts(basename(get_spip_doc($Pile[$SP]['fichier'])))))) .
(($t1 = strval(interdire_scripts(((($Pile[$SP]['media'] == 'image')) ?' ' :''))))!=='' ?
		($t1 . (($t2 = strval(inserer_attribut(filtrer('image_graver',filtrer('image_reduire',quete_logo_document(quete_document($Pile[$SP]['id_document'], ''), '', '', 'apercu', 200, 100, ''), '200', '100')),'alt',interdire_scripts(texte_backend(couper(supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]),'60'))))))!=='' ?
			('
			' . $t2 . '
		') :
			'')) :
		'') .
'
		' .
(($t1 = strval(interdire_scripts(((($Pile[$SP]['media'] == 'image')) ?'' :' '))))!=='' ?
		($t1 . (($t2 = strval(inserer_attribut(filtrer('image_graver',filtrer('image_reduire',quete_logo_document(quete_document($Pile[$SP]['id_document'], ''), '', '', 'auto', 200, 100, ''), '200', '100')),'alt',interdire_scripts(texte_backend(couper(supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0]),'60'))))))!=='' ?
			((	'<div class="resize-250">
			') . $t2 . '
		</div>') :
			'')) :
		'') .
'
		<div class="fichier">' .
table_valeur($Pile["vars"], (string)'fichier', null) .
'</div>
		</td>
		<td class="exif">
			' .
(($t1 = strval(interdire_scripts($Pile[$SP]['extension'])))!=='' ?
		('<strong class="extension">' . $t1 . '</strong>') :
		'') .
'
			' .
(($t1 = strval(interdire_scripts(($Pile[$SP]['largeur'] ? (($t2 = strval(interdire_scripts($Pile[$SP]['largeur'])))!=='' ?
			($t2 . (($t3 = strval(interdire_scripts($Pile[$SP]['hauteur'])))!=='' ?
				(' x ' . $t3 . ' pixels') :
				'')) :
			''):''))))!=='' ?
		('<div class="dimensions">' . $t1 . '</div>') :
		'') .
'
			' .
(($t1 = strval(interdire_scripts(taille_en_octets($Pile[$SP]['taille']))))!=='' ?
		('<div class="taille">' . $t1 . '</div>') :
		'') .
'
			' .
(($t1 = strval(interdire_scripts(affdate(normaliser_date($Pile[$SP]['date']),'d/m/Y'))))!=='' ?
		('<div class="date">' . $t1 . '</div>') :
		'') .
'
			' .
(($t1 = BOUCLE_lienshtml_0dcec7edca0756181350dfa18ab3d8e1($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
		((	'
			' .
		((($Numrows['_liens']['total'] > '1'))  ?
				(' ' . (	'
			<a href=\'#\' onclick="jQuery(this).next().show();$(this).hide();return false;">' .
			singulier_ou_pluriel($Numrows['_liens']['total'],'medias:une_utilisation','medias:des_utilisations') .
			'</a><div style=\'display: none;\'>
			')) :
				'') .
		'
			') . $t1 . (	'
			' .
		((($Numrows['_liens']['total'] > '1'))  ?
				(' ' . '</div>') :
				'') .
		'
			')) :
		'') .
'
		</td>
		<td class="descriptif">
			' .
(($t1 = strval(interdire_scripts(((($a = supprimer_numero(typo($Pile[$SP]['titre']), "TYPO", $connect, $Pile[0])) OR (is_string($a) AND strlen($a))) ? $a : concat('<i>',$l3,'</i>')))))!=='' ?
		((	'<strong class="titre ">') . $t1 . '</strong>') :
		'') .
'
			' .
(($t1 = strval(interdire_scripts(propre($Pile[$SP]['descriptif'], $connect, $Pile[0]))))!=='' ?
		((	'<div class="descriptif ">') . $t1 . '</div>') :
		'') .
'
			' .
(($t1 = strval(interdire_scripts($Pile[$SP]['credits'])))!=='' ?
		((	'<p class="credits ">') . $t1 . '</p>') :
		'') .
'
		</td>
		<td>
		
		' .
(($t1 = strval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'selectfunc', null), ''),true))))!=='' ?
		('<span class="choisir"><input type="submit" onclick="' . $t1 . (	'(' .
	$Pile[$SP]['id_document'] .
	');return false;" value="' .
	attribut_html($l4) .
	'" /></span>')) :
		'') .
'
		</td>
	</tr>
	');
	}
	$iter->free();
	}
	if (defined("_BOUCLE_PROFILER")
	AND 1000*($timer = (time()+(float)microtime())-$timer) > _BOUCLE_PROFILER)
		spip_log(intval(1000*$timer)."ms BOUCLE_galerie @ ../plugins-dist/medias/prive/squelettes/inclure/mediatheque-choisir.html","profiler"._LOG_AVERTISSEMENT);
	return $t0;
}

//
// Fonction principale du squelette ../plugins-dist/medias/prive/squelettes/inclure/mediatheque-choisir.html
// Temps de compilation total: 15.866 ms
//

function html_0dcec7edca0756181350dfa18ab3d8e1($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 = (
vide($Pile['vars'][$_zzz=(string)'editable'] = interdire_scripts(((entites_html(sinon(table_valeur(@$Pile[0], (string)'editable', null), ' '),true)) ?' ' :''))) .
'<div class="galerie' .
(($t1 = strval(interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'media', null), ''),true))))!=='' ?
		(' media-' . $t1) :
		'') .
'">
	' .
(($t1 = BOUCLE_galeriehtml_0dcec7edca0756181350dfa18ab3d8e1($Cache, $Pile, $doublons, $Numrows, $SP))!=='' ?
		((	'
	
	<h3>' .
		singulier_ou_pluriel((isset($Numrows['_galerie']['grand_total'])
			? $Numrows['_galerie']['grand_total'] : $Numrows['_galerie']['total']),concat('medias:un_',interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'media', null), 'document'),true))),concat('medias:des_',interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'media', null), 'document'),true)),'s')) .
		'</h3>
	<div class=\'pagination tri\'>
		' .
		(($t3 = strval(lien_ou_expose(parametre_url(parametre_url(self(),(($s=in_array('>',array('>','<')))?'sens':'tri').'_galerie',$s?(strpos('< >','>')-1):'>'),'var_memotri',strncmp('_galerie','session',7)==0?(($s=in_array('>',array('>','<')))?'sens':'tri').'_galerie':''),interdire_scripts(filtre_balise_img_dist(chemin_image('tri-asc-16.png'),_T('public|spip|ecrire:par_tri_croissant'))),$s?(((intval($t=(isset($Pile[0]['sens'.'_galerie']))?$Pile[0]['sens'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('sens'.'_galerie'))?session_get('sens'.'_galerie'):(is_array($s='inverse')?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s)))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','>')-1)):((($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')=='>'))))!=='' ?
				($t3 . ' |') :
				'') .
		'
		' .
		(($t3 = strval(lien_ou_expose(parametre_url(parametre_url(self(),(($s=in_array('<',array('>','<')))?'sens':'tri').'_galerie',$s?(strpos('< >','<')-1):'<'),'var_memotri',strncmp('_galerie','session',7)==0?(($s=in_array('<',array('>','<')))?'sens':'tri').'_galerie':''),interdire_scripts(filtre_balise_img_dist(chemin_image('tri-desc-16.png'),_T('public|spip|ecrire:par_tri_decroissant'))),$s?(((intval($t=(isset($Pile[0]['sens'.'_galerie']))?$Pile[0]['sens'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('sens'.'_galerie'))?session_get('sens'.'_galerie'):(is_array($s='inverse')?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s)))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','<')-1)):((($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')=='<'))))!=='' ?
				($t3 . ' |') :
				'') .
		'
		' .
		(($t3 = strval(lien_ou_expose(parametre_url(parametre_url(self(),(($s=in_array('id_document',array('>','<')))?'sens':'tri').'_galerie',$s?(strpos('< >','id_document')-1):'id_document'),'var_memotri',strncmp('_galerie','session',7)==0?(($s=in_array('id_document',array('>','<')))?'sens':'tri').'_galerie':''),_T('medias:par_id'),$s?(((intval($t=(isset($Pile[0]['sens'.'_galerie']))?$Pile[0]['sens'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('sens'.'_galerie'))?session_get('sens'.'_galerie'):(is_array($s='inverse')?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s)))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','id_document')-1)):((($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')=='id_document'))))!=='' ?
				($t3 . ' |') :
				'') .
		'
		' .
		(($t3 = strval(lien_ou_expose(parametre_url(parametre_url(self(),(($s=in_array('date',array('>','<')))?'sens':'tri').'_galerie',$s?(strpos('< >','date')-1):'date'),'var_memotri',strncmp('_galerie','session',7)==0?(($s=in_array('date',array('>','<')))?'sens':'tri').'_galerie':''),_T('medias:par_date'),$s?(((intval($t=(isset($Pile[0]['sens'.'_galerie']))?$Pile[0]['sens'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('sens'.'_galerie'))?session_get('sens'.'_galerie'):(is_array($s='inverse')?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s)))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','date')-1)):((($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')=='date'))))!=='' ?
				($t3 . ' |') :
				'') .
		'
		' .
		(($t3 = strval(lien_ou_expose(parametre_url(parametre_url(self(),(($s=in_array('taille',array('>','<')))?'sens':'tri').'_galerie',$s?(strpos('< >','taille')-1):'taille'),'var_memotri',strncmp('_galerie','session',7)==0?(($s=in_array('taille',array('>','<')))?'sens':'tri').'_galerie':''),_T('medias:par_taille'),$s?(((intval($t=(isset($Pile[0]['sens'.'_galerie']))?$Pile[0]['sens'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('sens'.'_galerie'))?session_get('sens'.'_galerie'):(is_array($s='inverse')?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s)))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','taille')-1)):((($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')=='taille'))))!=='' ?
				($t3 . ' |') :
				'') .
		'
		' .
		(($t3 = strval(lien_ou_expose(parametre_url(parametre_url(self(),(($s=in_array('largeur',array('>','<')))?'sens':'tri').'_galerie',$s?(strpos('< >','largeur')-1):'largeur'),'var_memotri',strncmp('_galerie','session',7)==0?(($s=in_array('largeur',array('>','<')))?'sens':'tri').'_galerie':''),_T('medias:par_largeur'),$s?(((intval($t=(isset($Pile[0]['sens'.'_galerie']))?$Pile[0]['sens'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('sens'.'_galerie'))?session_get('sens'.'_galerie'):(is_array($s='inverse')?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s)))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','largeur')-1)):((($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')=='largeur'))))!=='' ?
				($t3 . ' |') :
				'') .
		'
		' .
		(($t3 = strval(lien_ou_expose(parametre_url(parametre_url(self(),(($s=in_array('hauteur',array('>','<')))?'sens':'tri').'_galerie',$s?(strpos('< >','hauteur')-1):'hauteur'),'var_memotri',strncmp('_galerie','session',7)==0?(($s=in_array('hauteur',array('>','<')))?'sens':'tri').'_galerie':''),_T('medias:par_hauteur'),$s?(((intval($t=(isset($Pile[0]['sens'.'_galerie']))?$Pile[0]['sens'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('sens'.'_galerie'))?session_get('sens'.'_galerie'):(is_array($s='inverse')?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s)))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','hauteur')-1)):((($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')=='hauteur'))))!=='' ?
				($t3 . ' |') :
				'') .
		'
		' .
		(($t3 = strval(lien_ou_expose(parametre_url(parametre_url(self(),(($s=in_array('titre',array('>','<')))?'sens':'tri').'_galerie',$s?(strpos('< >','titre')-1):'titre'),'var_memotri',strncmp('_galerie','session',7)==0?(($s=in_array('titre',array('>','<')))?'sens':'tri').'_galerie':''),_T('medias:par_titre'),$s?(((intval($t=(isset($Pile[0]['sens'.'_galerie']))?$Pile[0]['sens'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('sens'.'_galerie'))?session_get('sens'.'_galerie'):(is_array($s='inverse')?(isset($s[$st=(($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')])?$s[$st]:reset($s)):$s)))==-1 OR $t=='inverse')?-1:1)==(strpos('< >','titre')-1)):((($t=(isset($Pile[0]['tri'.'_galerie']))?$Pile[0]['tri'.'_galerie']:((strncmp('_galerie','session',7)==0 AND session_get('tri'.'_galerie'))?session_get('tri'.'_galerie'):'id_document'))?tri_protege_champ($t):'')=='titre'))))!=='' ?
				($t3 . ' |') :
				'') .
		'
	</div>
	' .
		(($t3 = strval(filtre_pagination_dist($Numrows["_galerie"]["grand_total"],
 		'_galerie',
		isset($Pile[0]['debut_galerie'])?$Pile[0]['debut_galerie']:intval(_request('debut_galerie')),
		10, true, 'prive', '', array())))!=='' ?
				('<div class="pagination">' . $t3 . '</div>') :
				'') .
		'
	<table>
	<thead>
		<th></th>
		<th class="id">' .
		_T('medias:id') .
		'</th>
		<th></th>
		<th>' .
		_T('medias:logo') .
		'</th>
		<th>' .
		_T('medias:infos') .
		'</th>
		<th>' .
		_T('medias:descriptif') .
		'</th>
		<th></th>
	</thead>
	') . $t1 . (	'
	</table>
	' .
		(($t3 = strval(filtre_pagination_dist($Numrows["_galerie"]["grand_total"],
 		'_galerie',
		isset($Pile[0]['debut_galerie'])?$Pile[0]['debut_galerie']:intval(_request('debut_galerie')),
		10, true, 'prive', '', array())))!=='' ?
				('<p class="pagination">' . $t3 . '</p>') :
				'') .
		'
	')) :
		((	'
	<h3>' .
	_T(concat('medias:aucun_',interdire_scripts(entites_html(sinon(table_valeur(@$Pile[0], (string)'media', null), 'document'),true)))) .
	'</h3>
	'))) .
'
</div><!--#galerie-->
');

	return analyse_resultat_skel('html_0dcec7edca0756181350dfa18ab3d8e1', $Cache, $page, '../plugins-dist/medias/prive/squelettes/inclure/mediatheque-choisir.html');
}
?>