<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- $Id: search_fields.xml,v 1.85.2.19 2016-11-16 07:59:22 jpermanne Exp $ -->
<pmbfields>

	<!-- Zone fixedFields :
		Liste des champs de recherche possibles de la base de données
		Chaque champ est modélisé par le tag <field> :
		<field @att=id,title,memoryEngineForbidden> 
			-id : numéro unique arbitraire
			-title : Texte qui sera affiché dans l'écran de recherche
			-memoryEngineForbidden : "yes" interdit l'utilisation du moteur memory pour la création des tables temporaires
			<field> contient les sous tags :
				<input @type> : type de saisie
					-type (text|list) : 
						@type=list (dans le cas d'une saisie par liste), input contient les sous champs :
						 	<queryList> : requete pour récupérer les values de la liste. La requete doit avoir 2 colonnes
										  -la première donne le code à retourner
										  -la deuxième donne le libellé dans la liste
										  
				<query> : requete associée au champ et à l'opérateur
				<query @att=for,multipleWords,regDiacrit>
					-for : nom de l'opérateur auquel correspond la requete 
					 (les opérateurs non listés ne seront pas pris en compte), 
					-multipleWords (yes|no) : la requete tient compte de plusieurs termes saisis avec des espaces
					-regDiacrit (yes|no) : les termes sont passés par la fonction de nettoyage des mots vides et des accents
			 		<query> contient les sous tags :
					
						<main> : Corps principal de la requete, 
							-!!p!! sera remplacé dans la requete par le texte saisi pour la recherche, 
							-!!multiple_term!! (uniquement si multipleWords="yes") sera remplacé par la série 
							 de tests de la clause where pour chaque mot saisi
						
						<multipleTerm> : terme de condition utilisé pour remplacer !!multiple_term!!
						<multipleOperator> : opérateur utilisé entre les termes de conditions 
	-->
	<memoryEngineAllowed>yes</memoryEngineAllowed>
	<fixedFields>
		<field title="msg:233" id="1" separator="msg:champs_principaux_query" >
			<input type="text"/>
			<query for="BOOLEAN" booleanSearch="yes" >
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices where !!where_term!! group by notice_id order by pert desc, index_serie, tnvol, index_sew]]></main>
				<table>notices</table>
				<index_l>index_wew</index_l>
				<index_i>index_sew</index_i>
				<id_field>notice_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_sew like ' !!p!!%') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_sew like '%!!p!! ') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_sew=' !!p!! ') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:global_search" id="42">
			<input type="text"/>
			<variable name="pmb_indexation_docnum_allfields" type="global" />
			<variable name="ck_affiche" type="input">
				<var name="pmb_indexation_docnum" visibility="yes" hidden="no">
					<value visibility="no">0</value>
				</var>
				<default type="value">0</default>
				<input type="hidden">
					<value>1</value>
				</input> 
			</variable>
			<variable name= "is_num" type="input" comment="msg:docnum_indexation">
				<var name="pmb_indexation_docnum" visibility="yes" hidden="no">
					<value visibility="no">0</value>
				</var>
				<default type="var">pmb_indexation_docnum_allfields</default>
				<input type="checkbox" default_on="ck_affiche">
					<value>1</value>
					<comments>
						<label value="1">oui</label>
						<label value="0">non</label>
					</comments>
				</input>
			</variable>
			<query for="BOOLEAN"  conditional="yes">
				<var name="is_num" booleanSearch="yes">
					<value>default</value>
					<main><![CDATA[select notice_id, ((!!pert_term_1!!)+(!!pert_term_3!!)*0.5) as pert from notices_global_index,notices where ((!!where_term_1!!) or (!!where_term_2!!)) and notice_id=num_notice and no_index=1 group by notice_id order by pert desc, index_serie, tnvol, index_sew]]></main>
					<boolean>
						<table>notices_global_index</table>
						<index_l>infos_global</index_l>
						<index_i>index_infos_global</index_i>
						<id_field>num_notice</id_field>
						<keep_empty_words>yes</keep_empty_words>
					</boolean>
					<boolean>
						<table>notices_global_index</table>
						<index_l>infos_global</index_l>
						<index_i>index_infos_global</index_i>
						<id_field>num_notice</id_field>
					</boolean>
					<boolean>
						<table>notices</table>
						<index_l>index_wew</index_l>
						<index_i>index_sew</index_i>
						<id_field>notice_id</id_field>
					</boolean>
				</var>
				<var name="is_num" booleanSearch="yes">
					<value>1</value>
					<main><![CDATA[select uni.notice_id, sum(pert) as pert from (	
						(
							select notice_id,((!!pert_term_2!!)+(!!pert_term_1!!)) as pert
							from notices join notices_global_index on num_notice=notice_id  
							where (!!where_term_2!!)
						) union (
							select notice_id, !!pert_term_3!! as pert
                       		from notices join explnum on explnum_notice=notice_id  
                       		where (!!where_term_3!!)
						) union (
							select if(num_notice,num_notice,bulletin_notice) as notice_id, ifnull((!!pert_term_3!!),0) 
                       		from explnum join bulletins on explnum_bulletin=bulletin_id ,notices  
                       		where (!!where_term_3!!)
						)
					) as uni join notices n on n.notice_id=uni.notice_id group by uni.notice_id order by pert desc, index_serie, tnvol, index_sew 
					]]></main>
					<boolean>
						<table>notices</table>
						<index_l>index_wew</index_l>
						<index_i>index_sew</index_i>
						<id_field>notice_id</id_field>
					</boolean>
					<boolean>
						<table>notices_global_index</table>
						<index_l>infos_global</index_l>
						<index_i>index_infos_global</index_i>
						<id_field>num_notice</id_field>
					</boolean>
					<boolean>
						<table>explnum</table>
						<index_l>explnum_index_wew</index_l>
						<index_i>explnum_index_sew</index_i>
						<id_field>explnum_notice</id_field>
						<fulltext>yes</fulltext>
					</boolean>
				</var>
			</query>
		</field>
		<field title="msg:234" id="2">
			<input type="authoritie" ajax="authors" selector="auteur" p1="param1" p2="param2"/>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select responsability_notice as notice_id, !!pert_term!! as pert from responsability, authors where (!!where_term!!) and responsability_author=author_id group by notice_id order by pert desc, index_author]]></main>
				<table>authors</table>
				<index_l>concat(author_name,', ',author_rejete)</index_l>
				<index_i>index_author</index_i>
				<id_field>author_id</id_field>
				<keep_empty_words>yes</keep_empty_words>
			</query>
			<query for="STARTWITH" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct responsability_notice as notice_id from responsability, authors where index_author like ' !!p!!%' and responsability_author=author_id order by index_author]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct responsability_notice as notice_id from responsability, authors where index_author like '%!!p!! ' and responsability_author=author_id order by index_author]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct responsability_notice as notice_id from responsability, authors where index_author=' !!p!! ' and responsability_author=author_id order by index_author]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct responsability_notice as notice_id from responsability,authors where responsability_author=' !!p!! ' and responsability_author=author_id order by index_author]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[SELECT distinct notice_id from notices left join responsability on responsability_notice = notice_id where responsability_author is null order by index_sew]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[SELECT distinct notice_id from notices join responsability on responsability_notice = notice_id join authors on responsability_author=author_id order by index_sew,index_author]]></main>
			</query>			
		</field>	
		<field title="msg:recherche_fonction_auteur" id="49">
			<input type="marc_list">
				<name>function</name>
				<restrictquery>SELECT group_concat(distinct responsability_fonction SEPARATOR ',') as all_responsability_fonction from responsability</restrictquery>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct responsability_notice as notice_id from responsability where responsability_fonction='!!p!!']]></main>
			</query>
			<query for="ISEMPTY">
				<main><![CDATA[SELECT distinct responsability_notice as notice_id from responsability where responsability_fonction='']]></main>
			</query>
			<query for="ISNOTEMPTY">
				<main><![CDATA[SELECT distinct responsability_notice as notice_id from responsability where responsability_fonction!='']]></main>
			</query>
		</field>
		<field title="msg:recherche_type_auteur" id="70">
			<input type="list">
				<options>
					<option value="70">msg:203</option>
					<option value="71">msg:204</option>
					<option value="72">msg:congres_libelle</option>
				</options>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct responsability_notice as notice_id from responsability, authors where responsability_author=author_id and author_type='!!p!!']]></main>
			</query>
		</field>	
		<field title="msg:searcher_publisher" id="3">
			<input type="authoritie" ajax="publishers" selector="editeur" p1="p1" p2="p2"/>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices, publishers where (!!where_term!!) and (ed_id=ed1_id or ed_id=ed2_id) group by notice_id order by pert desc,index_publisher]]></main>
				<table>publishers</table>
				<index_l>ed_name</index_l>
				<index_i>index_publisher</index_i>
				<id_field>ed_id</id_field>
				<keep_empty_words>yes</keep_empty_words>
			</query>
			<query for="STARTWITH" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct notice_id from notices, publishers where (index_publisher like ' !!p!!%') and (ed_id=ed1_id or ed_id=ed2_id) order by index_publisher]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes" Keep_EmptyWord="yes">
				<main><![CDATA[select distinct notice_id from notices, publishers where (index_publisher like '%!!p!! ') and (ed_id=ed1_id or ed_id=ed2_id) order by index_publisher]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[select distinct notice_id from notices, publishers where (ed_name like '!!p!!') and (ed_id=ed1_id or ed_id=ed2_id) order by index_publisher]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices, publishers where (ed_id=ed1_id or ed_id=ed2_id)  and ed_id = !!p!! order by index_publisher]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where ed1_id = 0 and ed2_id = 0 order by index_sew]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct notice_id from (select notice_id,index_sew,index_publisher from notices join publishers on ed1_id=ed_id union select notice_id,index_sew,index_publisher from notices join publishers on ed2_id=ed_id) as t2 order by index_publisher,index_sew]]></main>
			</query>	
		</field>
		<field title="msg:date_publication_or_annee_edition" id="23">
			<input type="text" placeholder="msg:format_date_input_text_placeholder" />
			<query for="EQ" detectDate="__">
				<main><![CDATA[select distinct notice_id from notices where date_parution like '!!p!!' order by year, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="LT" detectDate="min">
				<main><![CDATA[select distinct notice_id from notices where (date_parution<'!!p!!' and date_parution>'0000-00-00') order by year, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="GT" detectDate="max">
				<main><![CDATA[select distinct notice_id from notices where date_parution>'!!p!!' order by year, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="LTEQ" detectDate="max">
				<main><![CDATA[select distinct notice_id from notices where (date_parution<='!!p!!' and date_parution>'0000-00-00') order by year, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="GTEQ" detectDate="min">
				<main><![CDATA[select distinct notice_id from notices where date_parution>='!!p!!' order by year, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" detectDate="01">
				<main><![CDATA[select distinct notice_id from notices where date_parution like '0000-00-00' order by year, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" detectDate="01">
				<main><![CDATA[select distinct notice_id from notices where date_parution not like '0000-00-00' order by year, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS_AT_LEAST" multipleWords="yes" regdiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (!!multiple_term!!) order by year, index_serie, tnvol, index_sew]]></main>
				<multipleTerm>year like '%!!p!!%'</multipleTerm>
				<multipleOperator>or</multipleOperator>
			</query>
			<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (!!multiple_term!!) order by year, index_serie, tnvol, index_sew]]></main>
				<multipleTerm>year like '%!!p!!%'</multipleTerm>
				<multipleOperator>and</multipleOperator>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (year like '!!p!!%') order by year, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (year like '%!!p!!') order by year, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (year='!!p!!') order by year, index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:searcher_coll" id="4">
			<input type="authoritie" ajax="collections" selector="collection" p1="p1" p2="p2"/>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id,!!pert_term!! as pert from notices, collections where (!!where_term!!) and (coll_id=collection_id) group by notice_id order by pert desc,index_coll]]></main>
				<table>collections</table>
				<index_l>collection_name</index_l>
				<index_i>index_coll</index_i>
				<id_field>collection_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, collections where (index_coll like ' !!p!!%') and (coll_id=collection_id) order by index_coll]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, collections where (collection_name like '%!!p!!') and (coll_id=collection_id) order by index_coll]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[select distinct notice_id from notices, collections where (collection_name like '!!p!!') and (coll_id=collection_id) order by index_coll]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices, collections where collection_id=!!p!! and coll_id=collection_id order by index_coll]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where coll_id = 0 order by index_sew]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct notice_id from notices join collections on collection_id = coll_id order by index_coll, index_sew]]></main>
			</query>
		</field>
		<field title="msg:searcher_subcoll" id="5">
			<input type="authoritie" ajax="subcollections" selector="subcollection" p1="p1" p2="p2"/>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices, sub_collections where (!!where_term!!) and (subcoll_id=sub_coll_id) group by notice_id order by pert desc, index_sub_coll]]></main>
				<table>sub_collections</table>
				<index_l>sub_coll_name</index_l>
				<index_i>index_sub_coll</index_i>
				<id_field>sub_coll_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, sub_collections where (index_sub_coll like ' !!p!!%') and (subcoll_id=sub_coll_id) order by index_sub_coll]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, sub_collections where (sub_coll_name like '%!!p!!') and (subcoll_id=sub_coll_id) order by index_sub_coll]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[select distinct notice_id from notices, sub_collections where (sub_coll_name like '!!p!!') and (subcoll_id=sub_coll_id) order by index_sub_coll]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices, sub_collections where subcoll_id=!!p!! and subcoll_id=sub_coll_id order by index_sub_coll]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where subcoll_id = 0 order by index_sew]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct notice_id from notices join sub_collections on sub_coll_id = subcoll_id order by index_sub_coll, index_sew]]></main>
			</query>
		</field>
		<field title="msg:serie_query" id="6">
			<input type="authoritie" ajax="serie" selector="serie" p1="param1" p2="param2"/>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices, series where (!!where_term!!) and (tparent_id=serie_id) group by notice_id order by pert desc, serie_index, tnvol, index_sew]]></main>
				<table>series</table>
				<index_l>serie_name</index_l>
				<index_i>serie_index</index_i>
				<id_field>serie_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, series where (serie_index like ' !!p!!%') and (tparent_id=serie_id) order by serie_index, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, series where (serie_index like '%!!p!! ') and (tparent_id=serie_id) order by serie_index, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, series where (serie_index=' !!p!! ') and (tparent_id=serie_id) order by serie_index, tnvol, index_sew]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices, series where tparent_id='!!p!!' and tparent_id=serie_id order by serie_index, tnvol, index_sew]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices where tparent_id = 0 order by index_sew]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct notice_id from notices join series on serie_id = tparent_id order by serie_index, index_sew]]></main>
			</query>
		</field>
		<field title="msg:isbn_query" id="22">
			<input type="text"/>
			<query for="STARTWITH" isbnSearch="yes">
				<main><![CDATA[SELECT distinct notice_id from notices where !!multiple_term!! order by code]]></main>
				<multipleTerm>code like '!!p!!%'</multipleTerm>
				<multipleOperator>or</multipleOperator>
			</query>
			<query for="ISEMPTY">
				<main><![CDATA[SELECT distinct notice_id from notices where code ='' or code is null order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY">
				<main><![CDATA[SELECT distinct notice_id from notices where code!='' and code is not null order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:titre_uniforme_search" id="51">
			<input type="authoritie" ajax="titre_uniforme" selector="titre_uniforme" p1="param1" p2="param2"/>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select ntu_num_notice as notice_id, !!pert_term!! as pert from notices_titres_uniformes, titres_uniformes where (!!where_term!!) and ntu_num_tu=tu_id group by notice_id order by pert desc, index_tu]]></main>
				<table>titres_uniformes</table>
				<index_l>tu_name</index_l>
				<index_i>index_tu</index_i>
				<id_field>tu_id</id_field>
				<keep_empty_words>yes</keep_empty_words>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct ntu_num_notice as notice_id from  notices_titres_uniformes, titres_uniformes where tu_name like '!!p!!%' and ntu_num_tu=tu_id order by index_tu]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct ntu_num_notice as notice_id from  notices_titres_uniformes, titres_uniformes where tu_name like '%!!p!!' and ntu_num_tu=tu_id order by index_tu]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[select distinct ntu_num_notice as notice_id from  notices_titres_uniformes, titres_uniformes where tu_name like '!!p!!' and ntu_num_tu=tu_id order by index_tu]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct ntu_num_notice as notice_id from  notices_titres_uniformes, titres_uniformes where ntu_num_tu='!!p!!' and ntu_num_tu=tu_id order by index_tu]]></main>
			</query>
			<query for='ISEMPTY'>
				<main><![CDATA[select distinct notice_id from notices left join notices_titres_uniformes on notice_id = ntu_num_notice where ntu_num_notice is null order by index_sew]]></main>
			</query>
			<query for='ISNOTEMPTY'>
				<main><![CDATA[select distinct ntu_num_notice as notice_id from notices_titres_uniformes join titres_uniformes on ntu_num_tu=tu_id order by index_tu]]></main>
			</query>
		</field>	
		<field title="msg:docnum_indexation_contenu" id="52">
			<input type="text"/>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select distinct uni.notice_id, pert from (
				select notice_id, !!pert_term!! as pert from notices, explnum 
				where (!!where_term!!) and explnum_notice=notice_id
				UNION
				select notice_id, !!pert_term!! as pert from notices, explnum, bulletins
				where (!!where_term!!) and (explnum_bulletin=bulletin_id and bulletin_notice=notice_id)
				) as uni join notices n on uni.notice_id=n.notice_id order by pert desc, index_serie, tnvol, index_sew 
				]]></main>
				<table>explnum</table>
				<index_l>explnum_index_wew</index_l>
				<index_i>explnum_index_sew</index_i>
				<id_field>explnum_notice</id_field>
				<fulltext>yes</fulltext>
			</query>
		</field>
		<field title="msg:265" id="7" separator="msg:264">
			<input type="text"/>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices where !!where_term!! group by notice_id order by pert desc, index_serie, tnvol, index_sew]]></main>
				<table>notices</table>
				<index_l>n_gen</index_l>
				<index_i>index_n_gen</index_i>
				<id_field>notice_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_gen like '!!p!!%') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_gen like '%!!p!!') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_gen like '!!p!!') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_gen like '' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_gen not like '' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:266" id="8">
			<input type="text"/>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices where !!where_term!! group by notice_id order by pert desc, index_serie, tnvol, index_sew]]></main>
				<table>notices</table>
				<index_l>n_contenu</index_l>
				<index_i>index_n_contenu</index_i>
				<id_field>notice_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_contenu like '!!p!!%') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_contenu like '%!!p!!') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_contenu like '!!p!!') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_contenu like '' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_contenu not like '' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:note_resume_query" id="9">
			<input type="text"/>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices where !!where_term!! group by notice_id order by pert desc, index_serie, tnvol, index_sew]]></main>
				<table>notices</table>
				<index_l>n_resume</index_l>
				<index_i>index_n_resume</index_i>
				<id_field>notice_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_resume like '!!p!!%') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_resume like '%!!p!!') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (n_resume like '!!p!!') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_resume like '' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where n_resume not like '' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:toutes_notes_query" id="10">
			<input type="text"/>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices where !!where_term!! group by notice_id order by pert desc, index_serie, tnvol, index_sew]]></main>
				<table>notices</table>
				<index_l>concat(n_gen,' ',n_contenu,' ',n_resume)</index_l>
				<index_i>concat(index_n_gen,index_n_contenu,index_n_resume)</index_i>
				<id_field>notice_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (concat(index_n_gen,index_n_contenu,index_n_resume) like ' !!p!!%')  order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (concat(index_n_gen,index_n_contenu,index_n_resume) like '%!!p!! ')  order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (concat(index_n_gen,index_n_contenu,index_n_resume) like ' !!p!! ')  order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where concat(index_n_gen,index_n_contenu,index_n_resume) like '' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where concat(index_n_gen,index_n_contenu,index_n_resume) not like '' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:134" id="11" separator="msg:indexations_query">
			<input type="authoritie" ajax="categories_mul" selector="categorie" p1="p1" p2="p2"/>
			<variable name="lang" type="global"/>
			<variable name="opac_thesaurus_defaut" type="global"/>
			<variable name="id_thesaurus" type="input" comment="Thésaurus">
				<var name="thesaurus_mode_pmb" visibility="yes">
					<value visibility="no">0</value>
				</var>
				<default type="var">opac_thesaurus_defaut</default>
				<input type="query_list">
					<query allChoice="yes" titleAllChoice="msg:thes_all">select id_thesaurus, libelle_thesaurus from thesaurus order by libelle_thesaurus</query>
				</input>
			</variable>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<variable name="langue_defaut" type="calculated">
				<calc type="value_from_query">
					<query>select group_concat(langue_defaut SEPARATOR "','") as langue_defaut, 1 from thesaurus where id_thesaurus in (!!id_thesaurus!!) group by 2</query>
				</calc>
			</variable>
			<query for="BOOLEAN" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,libelle_categorie,index_categorie from noeuds, categories where categories.langue in ('!!langue_defaut!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,libelle_categorie, index_categorie from noeuds, categories where categories.langue in ('!!lang!!') and noeuds.num_thesaurus  in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part booleanSearch="yes">
					<main>select notcateg_notice as notice_id,if(catlg.num_noeud is null, !!pert_term_2!!, !!pert_term_1!!) as pert from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((!!where_term_1!!) or (catlg.num_noeud is null and !!where_term_2!!)) group by notice_id order by pert desc</main>
					<boolean>
						<table>catlg.categories</table>
						<index_l>catlg.libelle_categorie</index_l>
						<index_i>catlg.index_categorie</index_i>
						<id_field>catlg.num_noeud</id_field>
					</boolean>
					<boolean>
						<table>catdef.categories</table>
						<index_l>catdef.libelle_categorie</index_l>
						<index_i>catdef.index_categorie</index_i>
						<id_field>catdef.num_noeud</id_field>
					</boolean>
				</part>
			</query>
			<query for="STARTWITH" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,libelle_categorie,index_categorie from noeuds, categories where categories.langue in ('!!langue_defaut!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,libelle_categorie, index_categorie from noeuds, categories where categories.langue in ('!!lang!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part>
					<main>select notcateg_notice as notice_id from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((catlg.libelle_categorie like '!!p!!%') or (catlg.num_noeud is null and catdef.libelle_categorie like '!!p!!%')) group by notice_id</main>
				</part>
			</query>
			<query for="ENDWITH" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,libelle_categorie,index_categorie from noeuds, categories where categories.langue in ('!!langue_defaut!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,libelle_categorie, index_categorie from noeuds, categories where categories.langue in ('!!lang!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part>
					<main>select notcateg_notice as notice_id from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((catlg.libelle_categorie like '%!!p!!') or (catlg.num_noeud is null and catdef.libelle_categorie like '%!!p!!')) group by notice_id</main>
				</part>
			</query>
			<query for="EXACT" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,libelle_categorie,index_categorie from noeuds, categories where categories.langue in ('!!langue_defaut!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,libelle_categorie, index_categorie from noeuds, categories where categories.langue in ('!!lang!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part>
					<main>select notcateg_notice as notice_id from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((catlg.libelle_categorie='!!p!!') or (catlg.num_noeud is null and catdef.libelle_categorie='!!p!!')) group by notice_id</main>
				</part>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices_categories join notices on notcateg_notice = notice_id where notices_categories.num_noeud = !!p!! order by index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices left join notices_categories on notcateg_notice = notice_id where notices_categories.num_noeud is null order by index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices join notices_categories on notcateg_notice = notice_id order by index_sew]]></main>
			</query>
		</field>		
		<field title="msg:search_autopostage_multicritere" id="54">
			<var name="thesaurus_auto_postage_search" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="authoritie" ajax="categories_mul" selector="categorie" p1="p1" p2="p2"/>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<variable name="lang" type="global"/>
			<variable name="opac_thesaurus_defaut" type="global"/>
			<variable name="id_thesaurus" type="input" comment="Thésaurus">
				<var name="thesaurus_mode_pmb" visibility="yes">
					<value visibility="no">0</value>
				</var>
				<default type="var">opac_thesaurus_defaut</default>
				<input type="query_list">
					<query allChoice="yes" titleAllChoice="msg:thes_all">select id_thesaurus, libelle_thesaurus from thesaurus order by libelle_thesaurus</query>
				</input>
			</variable>
			<variable name="langue_defaut" type="calculated">
				<calc type="value_from_query">
					<query>select group_concat(langue_defaut SEPARATOR "','") as langue_defaut, 1 from thesaurus where id_thesaurus in (!!id_thesaurus!!) group by 2</query>
				</calc>
			</variable>
			<!-- variables pour la recherche autorité... -->
			<variable name="limit_montant" type="calculated">
				<calc type="value_from_query">
					<query>select case valeur_param when '0' then '{0,0}' when '*' then '*' else concat('{0,',valeur_param,'}') end  as limit_montant from parametres where sstype_param='auto_postage_search_nb_montant' and type_param='thesaurus'</query>
				</calc>			
			</variable>
			<variable name="limit_descendant" type="calculated">
				<calc type="value_from_query">
					<query>select case valeur_param when '0' then '{0,0}' when '*' then '*' else concat('{0,',valeur_param,'}') end  as limit_montant from parametres where sstype_param='auto_postage_search_nb_descendant' and type_param='thesaurus'</query>
				</calc>			
			</variable>
			<query for="BOOLEAN" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>
				<part>
					<main>create temporary table catdef as select num_noeud,path_word_categ,index_path_word_categ from noeuds, categories where categories.langue in ('!!langue_defaut!!') and noeuds.num_thesaurus in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catdef add key (num_noeud)</main>
				</part>
				<part>
					<main>drop table if exists catlg</main>
				</part>
				<part>
					<main>create temporary table catlg as select num_noeud,path_word_categ, index_path_word_categ from noeuds, categories where categories.langue in ('!!lang!!') and noeuds.num_thesaurus  in (!!id_thesaurus!!) and noeuds.id_noeud = categories.num_noeud</main>
				</part>
				<part>
					<main>alter table catlg add key (num_noeud)</main>
				</part>
				<part booleanSearch="yes">
					<main>select notcateg_notice as notice_id,if(catlg.num_noeud is null, !!pert_term_2!!, !!pert_term_1!!) as pert from catdef left join catlg on catdef.num_noeud = catlg.num_noeud, notices_categories where notices_categories.num_noeud=catdef.num_noeud and ((!!where_term_1!!) or (catlg.num_noeud is null and !!where_term_2!!)) group by notice_id order by pert desc</main>
					<boolean>
						<table>catlg.categories</table>
						<index_l>catlg.path_word_categ</index_l>
						<index_i>catlg.index_path_word_categ</index_i>
						<id_field>catlg.num_noeud</id_field>
					</boolean>
					<boolean>
						<table>catdef.categories</table>
						<index_l>catdef.path_word_categ</index_l>
						<index_i>catdef.index_path_word_categ</index_i>
						<id_field>catdef.num_noeud</id_field>
					</boolean>
				</part>
			</query>
			<query for="AUTHORITY" multiple="yes">
				<part>
					<main>drop table if exists catdef</main>
				</part>	
				<part>
					<main>create temporary table catdef as select uni.* from (select n.id_noeud,n.path from noeuds as n join noeuds as term on n.path like concat(term.path,'%') where n.path regexp concat('^',term.path,'(\/[0-9]+)!!limit_descendant!!$') and term.id_noeud = !!p!! union select n.id_noeud,n.path from noeuds as n join noeuds as term on term.path like concat(n.path,'%') where n.path != 0 and term.path regexp concat('^',n.path,'(\/[0-9]+)!!limit_montant!!$') and term.id_noeud = !!p!!)as uni</main>
				</part>		
				<part>
					<main>select distinct notcateg_notice as notice_id from catdef join notices_categories on catdef.id_noeud = notices_categories.num_noeud</main>
				</part>	
			</query>
		</field>
		<field title="msg:ontology_skos_concept" id="1000">
			<var name="thesaurus_concepts_active" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="authoritie" ajax="onto" selector="ontology" p1="param1" p2="param2" />
			<variable name="deflt_concept_scheme" type="global"/>
			<variable name="id_scheme" type="input" comment="Schéma">
				<default type="var">deflt_concept_scheme</default>
				<input type="query_list">
					<query allChoice="yes" titleAllChoice="msg:thes_all">SELECT id_item as id, value as lib FROM skos_fields_global_index WHERE code_champ=100 group by 1 order by 2</query>
				</input>
			</variable>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_records_concepts</class>
			</query>
			<query for="STARTWITH">
				<main><![CDATA[select distinct num_object as notice_id from index_concept join skos_fields_global_index on num_concept = id_item and code_champ = 1 where type_object = 1 and value like '!!p!!%' and id_item in (select id_item from skos_fields_global_index where code_champ = 4 and authority_num IN (!!id_scheme!!))]]></main>
			</query>
			<query for="ENDWITH">
				<main><![CDATA[select distinct num_object as notice_id from index_concept join skos_fields_global_index on num_concept = id_item and code_champ = 1 where type_object = 1 and value like '%!!p!!' and id_item in (select id_item from skos_fields_global_index where code_champ = 4 and authority_num IN (!!id_scheme!!))]]></main>
			</query>
			<query for="EXACT">
				<main><![CDATA[select distinct num_object as notice_id from index_concept join skos_fields_global_index on num_concept = id_item and code_champ = 1 where type_object = 1 and value like '!!p!!' and id_item in (select id_item from skos_fields_global_index where code_champ = 4 and authority_num IN (!!id_scheme!!))]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct num_object as notice_id from index_concept where type_object = 1 and num_concept = !!p!!]]></main>
			</query>
			<query for="ISEMPTY">
				<main><![CDATA[select distinct notice_id from notices where notice_id not in (select distinct num_object as notice_id from index_concept join skos_fields_global_index on num_concept = id_item and code_champ = 1 where type_object = 1 and id_item in (select id_item from skos_fields_global_index where code_champ = 4 and authority_num IN (!!id_scheme!!)))]]></main>
			</query>
			<query for="ISNOTEMPTY">
				<main><![CDATA[select distinct num_object as notice_id from index_concept join skos_fields_global_index on num_concept = id_item and code_champ = 1 where type_object = 1 and id_item in (select id_item from skos_fields_global_index where code_champ = 4 and authority_num IN (!!id_scheme!!))]]></main>
			</query>
		</field>
		<field title="msg:indexint_menu_title" id="12">
			<input type="authoritie" ajax="indexint_mul" selector="indexint" p1="param1" p2="param2"/>
			<variable name= "operator_between_multiple_authorities" type="input" comment="msg:operator_between_multiple_authorities">
				<default type="value">or</default>
				<input type="radio">
					<options>
						<label value="or">msg:operator_between_multiple_authorities_or</label>
						<label value="and">msg:operator_between_multiple_authorities_and</label>
					</options>
				</input>
			</variable>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices, indexint where (!!where_term!!) and (indexint=indexint_id) group by notice_id order by pert desc, index_serie, tnvol, index_sew]]></main>
				<table>indexint</table>
				<index_l>concat(indexint_name,' ',indexint_comment)</index_l>
				<index_i>index_indexint</index_i>
				<id_field>indexint_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, indexint where (index_indexint like ' !!p!!%') and (indexint=indexint_id) order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, indexint where (index_indexint like '%!!p!! ') and (indexint=indexint_id) order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices, indexint where ((index_indexint=' !!p!! ') or (indexint_name='!!p!!')) and (indexint=indexint_id) order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="AUTHORITY">
				<main><![CDATA[select distinct notice_id from notices, indexint where (indexint='!!p!!') and (indexint=indexint_id) order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where indexint=0 order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where indexint!=0 order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:324" id="13">
			<input type="text"/>
			<query for="BOOLEAN" booleanSearch="yes">
				<main><![CDATA[select notice_id, !!pert_term!! as pert from notices where !!where_term!! group by notice_id order by pert desc, index_serie, tnvol, index_sew]]></main>
				<table>notices</table>
				<index_l>index_l</index_l>
				<index_i>index_matieres</index_i>
				<id_field>notice_id</id_field>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l like '!!p!!%') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l like '%!!p!!') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l like '!!p!!') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (index_l not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:langue_publication_query" id="20" separator='msg:537'>
			<input type="marc_list">
				<name>lang</name>
				<restrictquery>SELECT group_concat(distinct code_langue SEPARATOR ',') as all_languages from notices_langues where type_langue=0</restrictquery>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices, notices_langues where code_langue='!!p!!' and type_langue=0 and notice_id=num_notice order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY">
				<main><![CDATA[select distinct notice_id from notices left join notices_langues on type_langue=0 and num_notice = notice_id where code_langue is null order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY">
				<main><![CDATA[select distinct notice_id from notices join notices_langues on type_langue=0 and num_notice = notice_id order by index_serie, tnvol, index_sew]]></main>
			</query>
 
		</field>
		<field title="msg:langue_originale_query" id="21">
			<input type="marc_list">
				<name>lang</name>
				<restrictquery>SELECT group_concat(distinct code_langue SEPARATOR ',') as all_languages from notices_langues where type_langue=1</restrictquery>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices, notices_langues where code_langue='!!p!!' and type_langue=1 and notice_id=num_notice order by index_serie, tnvol, index_sew]]></main>
			</query>
	 		<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices left join notices_langues on type_langue=1 and num_notice = notice_id where code_langue is null order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices join notices_langues on type_langue=1 and num_notice = notice_id order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:doc_perio_art_query" id="14" separator="msg:130">
			<input type="list">
				<options>
					<option value="m">msg:4057</option>
					<option value="s">msg:4010</option>
					<option value="b">msg:bulletin_query</option>
					<option value="a">msg:articles_query</option>
				</options>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices where niveau_biblio='!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:type_doc_sort" id="15">
			<input type="marc_list">
				<name>doctype</name>
				<restrictquery>SELECT group_concat(distinct typdoc SEPARATOR ',') as all_typdoc from notices order by all_typdoc</restrictquery>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices where typdoc='!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:origine_notice_query" id="36">
			<input type="query_list">
				<query>select orinot_id, orinot_nom from origine_notice order by orinot_nom</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices where origine_catalogage='!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:statut_notice_sort" id="31">
			<input type="query_list">
				<query>select id_notice_statut, gestion_libelle from notice_statut order by gestion_libelle</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices where statut='!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:comment_gestion_query" id="33">
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from notices where commentaire_gestion like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from notices where commentaire_gestion like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from notices where commentaire_gestion like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from notices where commentaire_gestion like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes">
				<main><![CDATA[SELECT distinct notice_id from notices where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
				<multipleTerm>commentaire_gestion like '%!!p!!%'</multipleTerm>
				<multipleOperator>or</multipleOperator>
			</query>
			<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from notices where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
				<multipleTerm>commentaire_gestion like '%!!p!!%'</multipleTerm>
				<multipleOperator>and</multipleOperator>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (commentaire_gestion like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (commentaire_gestion not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:date_creation_query" id="41">
			<input type='date' placeholder='msg:format_date_input_placeholder'/>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices where create_date>='!!p!!' and create_date<='!!p!! 23:59:59']]></main>
			</query>
			<query for="LT">
				<main><![CDATA[SELECT distinct notice_id from notices where create_date<'!!p!!']]></main>
			</query>
			<query for="GT">
				<main><![CDATA[SELECT distinct notice_id from notices where create_date>'!!p!! 23:59:59']]></main>
			</query>
			<query for="LTEQ">
				<main><![CDATA[SELECT distinct notice_id from notices where create_date<='!!p!! 23:59:59']]></main>
			</query>
			<query for="GTEQ">
				<main><![CDATA[SELECT distinct notice_id from notices where create_date>='!!p!!']]></main>
			</query>
		</field>
		<field title="msg:date_update_query" id="67">
			<input type='date' placeholder='msg:format_date_input_placeholder'/>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices where update_date>='!!p!!' and update_date<='!!p!! 23:59:59']]></main>
			</query>
			<query for="LT">
				<main><![CDATA[SELECT distinct notice_id from notices where update_date<'!!p!!']]></main>
			</query>
			<query for="GT">
				<main><![CDATA[SELECT distinct notice_id from notices where update_date>'!!p!! 23:59:59']]></main>
			</query>
			<query for="LTEQ">
				<main><![CDATA[SELECT distinct notice_id from notices where update_date<='!!p!! 23:59:59']]></main>
			</query>
			<query for="GTEQ">
				<main><![CDATA[SELECT distinct notice_id from notices where update_date>='!!p!!']]></main>
			</query>
		</field>
		<field title="msg:print_numeric_ex_title" id="44">
			<input type="query_list">
				<query>select distinct if(if(explnum_url,'URL',explnum_mimetype)!='',if(explnum_url,'URL',explnum_mimetype),''),if(if(explnum_url,'URL',explnum_mimetype)!='',if(explnum_url,'URL',explnum_mimetype),'Undefined') from explnum order by 1</query>
			</input>
			<query for="EQ">
				<main><![CDATA[(select distinct ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((explnum left join notices AS notices_m ON (explnum_notice = notices_m.notice_id))
					LEFT JOIN bulletins ON (explnum_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON (bulletin_notice = notices_s.notice_id))
					WHERE if('!!p!!'='URL',explnum_url!='',explnum_mimetype='!!p!!') ORDER BY notices_m.index_serie, notices_m.tnvol, notices_m.index_sew) 
					union
					(select distinct notice_id FROM explnum JOIN bulletins ON (explnum_bulletin = bulletins.bulletin_id AND explnum_notice = 0)
				    JOIN notices ON (num_notice = notice_id AND num_notice!=0)
				    WHERE if('!!p!!'='URL',explnum_url!='',explnum_mimetype='!!p!!') ORDER BY index_serie, tnvol, index_sew)]]></main>
			</query>
		</field>	
		<field title="msg:statut_explnum_sort" id="73">
			<input type="query_list">
				<query>select id_explnum_statut, gestion_libelle from explnum_statut order by gestion_libelle</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN explnum ON ( notice_id = explnum_notice ) 
				WHERE explnum_docnum_statut='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN explnum ON explnum_bulletin = bulletin_id 
				WHERE explnum_docnum_statut='!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM explnum JOIN analysis ON (explnum_bulletin = analysis_bulletin AND explnum_bulletin !=0) 
				WHERE explnum_docnum_statut='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM explnum JOIN bulletins ON (explnum_bulletin=bulletins.bulletin_id AND explnum_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE explnum_docnum_statut='!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>	
		<field title="msg:274" id="45">
			<input type="text"/>
			<query for="CONTAINS">
				<main>select distinct notice_id from notices where lien like concat('%',replace('!!p!!','*','%'),'%') and lien!='' order by index_serie, tnvol, index_sew</main>
			</query>
		</field>
		<field title="msg:recherche_format_electronique" id="46">
			<input type="text"/>
			<query for="CONTAINS_AT_LEAST" multipleWords="yes" regdiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (!!multiple_term!!) order by eformat]]></main>
				<multipleTerm>eformat like '%!!p!!%'</multipleTerm>
				<multipleOperator>or</multipleOperator>
			</query>
			<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (!!multiple_term!!) order by eformat]]></main>
				<multipleTerm>eformat like '%!!p!!%'</multipleTerm>
				<multipleOperator>and</multipleOperator>
			</query>
			<query for="STARTWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (eformat like '!!p!!%') order by eformat]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (eformat like '%!!p!!') order by eformat]]></main>
			</query>
			<query for="EXACT" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (eformat='!!p!!') order by eformat]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where (eformat like '') order by eformat]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices  where (eformat not like '') order by eformat]]></main>
			</query>
		</field>
		<field title="msg:notice_is_new_search" id="91">
			<input type="list">
				<options>
					<option value="0">msg:39</option>
					<option value="1">msg:40</option>										
				</options>	
			</input>
			<query for="EQ" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from notices where notice_is_new = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:search_record_creator" id="92">
			<var name="pmb_type_audit" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select distinct userid, CONCAT(nom, ' ', prenom) from users order by 1</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT DISTINCT notice_id FROM notices JOIN audit ON object_id = notice_id AND type_obj=1 AND type_modif=1 WHERE user_id=!!p!! ORDER BY index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:map_echelle" id="74" separator="msg:map_search">
			<var name="pmb_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var> 
			<input type="query_list">
				<query>select map_echelle_id, map_echelle_name from map_echelles order by map_echelle_name</query>
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices where map_echelle_num=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:map_projection" id="75">
			<var name="pmb_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select map_projection_id, map_projection_name from map_projections order by map_projection_name</query>
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices where map_projection_num=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:map_ref" id="76">
			<var name="pmb_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select map_ref_id, map_ref_name from map_refs order by map_ref_name</query>
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices where map_ref_num=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:map_equinoxe" id="77">
			<var name="pmb_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="text"/>
			<query for="BOOLEAN" wordSearch="yes">
				<class>searcher_records_map_equinoxe</class>
			</query>
		</field>
		<field title="msg:map_emprise" id="78">
			<var name="pmb_map_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="map"/>
			<query for="CONTAINS">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 and contains(geomfromtext('!!p!!'),map_emprise_data) = 1 union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2 and contains(geomfromtext('!!p!!'),map_emprise_data) = 1</main>
			</query>
			<query for="AERASUP">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 and Area((map_emprise_data)) &gt; Area(geomfromtext('!!p!!')) union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2 and Area((map_emprise_data)) &gt; Area(geomfromtext('!!p!!'))</main>
			</query>
			<query for="AERAINF">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 and Area((map_emprise_data)) &lt; Area(geomfromtext('!!p!!')) union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2 and Area((map_emprise_data)) &lt; Area(geomfromtext('!!p!!'))</main>
			</query>
			<query for="INTERSECTS">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 and intersects(geomfromtext('!!p!!'),map_emprise_data) = 1 union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2 and intersects(geomfromtext('!!p!!'),map_emprise_data)</main>
			</query>
			<query for="ISEMPTY">
				<main>select notice_id from notices where notice_id not in (select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11) and notice_id not in (select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2)</main>
			</query>
			<query for="ISNOTEMPTY">
				<main>select distinct map_emprise_obj_num as notice_id from map_emprises where map_emprise_type=11 union select distinct notcateg_notice as notice_id from notices_categories join map_emprises on num_noeud = map_emprises.map_emprise_obj_num where map_emprise_type = 2</main>
			</query>
		</field>
		
		<field title="msg:nomenclature_search_formations" id="79" separator="msg:nomenclature_search">
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select id_formation, formation_name from nomenclature_formations order by formation_order</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_num_formation='!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>

		<field title="msg:nomenclature_search_types" id="80" >
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select id_type, type_name from nomenclature_types order by type_order</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT notice_id from nomenclature_notices_nomenclatures, notices, nomenclature_types where notice_id=notice_nomenclature_num_notice and notice_nomenclature_num_formation=type_formation_num and id_type='!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>	
		<field title="msg:nomenclature_search_formation_label" id="81">	
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_label like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_label like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_label like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_label like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (notice_nomenclature_label like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (notice_nomenclature_label not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>	
		<field title="msg:nomenclature_search_workshop_label" id="82">	
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, nomenclature_workshops, notices where workshop_num_nomenclature= id_notice_nomenclature and notice_id=notice_nomenclature_num_notice and workshop_label like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, nomenclature_workshops, notices where workshop_num_nomenclature= id_notice_nomenclature and notice_id=notice_nomenclature_num_notice and workshop_label like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, nomenclature_workshops, notices where workshop_num_nomenclature= id_notice_nomenclature and notice_id=notice_nomenclature_num_notice and workshop_label like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, nomenclature_workshops, notices where workshop_num_nomenclature= id_notice_nomenclature and notice_id=notice_nomenclature_num_notice and workshop_label like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, nomenclature_workshops, notices where workshop_num_nomenclature= id_notice_nomenclature and notice_id=notice_nomenclature_num_notice and (workshop_label like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, nomenclature_workshops, notices where workshop_num_nomenclature= id_notice_nomenclature and notice_id=notice_nomenclature_num_notice and (workshop_label not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>		
		<field title="msg:nomenclature_search_nomenclature_notes" id="84">	
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_notes like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_notes like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_notes like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_notes like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (notice_nomenclature_notes like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (notice_nomenclature_notes not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>			
		<field title="msg:nomenclature_search_nomenclature_abbreviation" id="83">
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>	
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_abbreviation like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_abbreviation like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_abbreviation like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and notice_nomenclature_abbreviation like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (notice_nomenclature_abbreviation like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (notice_nomenclature_abbreviation not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>		
		<field title="msg:nomenclature_search_nomenclature_abbreviation_cuivres" id="85">	
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>		
		<field title="msg:nomenclature_search_nomenclature_abbreviation_bois" id="93">	
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',1) not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>		
		<field title="msg:nomenclature_search_nomenclature_abbreviation_cuivres" id="86">	
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',2),'-',-1) like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',2),'-',-1) like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',2),'-',-1) like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',2),'-',-1) like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',2),'-',-1) like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',2),'-',-1) not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>		
		<field title="msg:nomenclature_search_nomenclature_abbreviation_percussions" id="87">	
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',3),'-',-1) like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',3),'-',-1) like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',3),'-',-1) like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',3),'-',-1) like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',3),'-',-1) like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',3),'-',-1) not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>		
		<field title="msg:nomenclature_search_nomenclature_abbreviation_cordes" id="88">	
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',-1) like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',-1) like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',-1) like '!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',-1) like '%!!p!!%' order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',-1) like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ISNOTEMPTY" regDiacrit="yes">
				<main><![CDATA[select distinct notice_id from nomenclature_notices_nomenclatures, notices where notice_id=notice_nomenclature_num_notice and (SUBSTRING_INDEX(notice_nomenclature_abbreviation,'-',-1) not like '') order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:nomenclature_search_instruments_no_standard" id="89" >
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select id_instrument, instrument_code from nomenclature_instruments where instrument_standard=0  order by instrument_code, instrument_name</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT notice_id from nomenclature_notices_nomenclatures, notices, nomenclature_exotic_instruments where notice_id=notice_nomenclature_num_notice and id_notice_nomenclature=exotic_instrument_num_nomenclature and exotic_instrument_num_instrument='!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:nomenclature_search_instruments_workshop" id="90" >
			<var name="pmb_nomenclature_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select id_instrument, instrument_code from nomenclature_instruments where instrument_standard=1  order by instrument_code, instrument_name</query>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT notice_id from nomenclature_notices_nomenclatures, notices, nomenclature_workshops,nomenclature_workshops_instruments where notice_id=notice_nomenclature_num_notice and id_notice_nomenclature=workshop_num_nomenclature and id_workshop=workshop_instrument_num_workshop and workshop_instrument_num_instrument='!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>		
						
		<field title="msg:recherche_relationtypeup" id="47" separator="msg:recherche_relation">
			<input type="marc_list">
				<name>relationtypedown</name>
				<restrictquery>SELECT group_concat(distinct relation_type SEPARATOR ',') as all_relation_type from notices,notices_relations where linked_notice=notice_id </restrictquery>				
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices,notices_relations where linked_notice=notice_id and relation_type='!!p!!' order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:recherche_relationtypedown" id="48">
			<input type="marc_list">
				<name>relationtypeup</name>
				<restrictquery>SELECT group_concat(distinct relation_type SEPARATOR ',') as all_relation_type from notices,notices_relations where linked_notice=notice_id order by </restrictquery>
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id from notices,notices_relations where num_notice=notice_id and relation_type='!!p!!' order by index_serie, tnvol, index_sew]]></main>			
			</query>
		</field>
		<field title="msg:recherche_exemplaires" id="71">
			<input type="list">
				<options>
					<option value="not in">msg:39</option>
					<option value="in">msg:40</option>
				</options>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM notices WHERE notice_id !!p!! (
				SELECT notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) GROUP BY notice_id)) AS sub1) ORDER BY notice_id DESC]]></main>			
			</query>
		</field>	
		<field title="msg:localisation_sort" id="16" separator="msg:exemplaires_query">
			<input type="query_list">
				<query>select idlocation,location_libelle from docs_location order by location_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_location = '!!p!!' GROUP BY notice_id) 
				UNION  (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_location = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_location = '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_location = '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>		
		<field title="msg:sur_location_sort" id="55" >
			<var name="pmb_sur_location_activate" visibility="yes">
				<value visibility="no">0</value>
			</var> 
			<input type="query_list">
				<query>select surloc_id,surloc_libelle from sur_location order by surloc_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_location in(select idlocation from docs_location where surloc_num='!!p!!') GROUP BY notice_id) 
				UNION  (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_location in(select idlocation from docs_location where surloc_num='!!p!!') GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_location in(select idlocation from docs_location where surloc_num='!!p!!') GROUP BY notice_id ORDER BY expl_location,analysis_notice) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_location in(select idlocation from docs_location where surloc_num='!!p!!') GROUP BY notice_id ORDER BY expl_location, notices.index_serie, notices.tnvol, notices.index_sew)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>			
		<field title="msg:4018" id="17">
			<input type="query_list">
				<query>select idsection,section_libelle from docs_section order by section_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_section='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_section='!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_section='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_section='!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:651" id="18">
			<input type="query_list">
				<query>select idlender,lender_libelle from lenders order by lender_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_owner='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_owner='!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_owner='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_owner='!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:294" id="19">
			<input type="query_list">
				<query>select idtyp_doc,tdoc_libelle from docs_type order by tdoc_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_typdoc='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_typdoc='!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_typdoc='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_typdoc='!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:296" id="24">
			<input type="text"/>
			<query for="STARTWITH">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_cote like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_cote like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_cote like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_cote like '!!p!!%' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="CONTAINS">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_cote like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_cote like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_cote like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_cote like '%!!p!!%' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="EXACT">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_cote like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_cote like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_cote like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_cote like '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="ENDWITH">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_cote like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_cote like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_cote like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_cote like '%!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:codes_barres_query" id="29">
			<input type="text"/>
			<query for="STARTWITH">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_cb like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_cb like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_cb like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_cb like '!!p!!%' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="CONTAINS">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_cb like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_cb like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_cb like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_cb like '%!!p!!%' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="ENDWITH">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_cb like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_cb like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_cb like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_cb like '%!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:297" id="30">
			<input type="query_list">
				<query>select idstatut,statut_libelle from docs_statut order by statut_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_statut='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_statut='!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_statut='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_statut='!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:299" id="32">
			<input type="query_list">
				<query>select idcode,codestat_libelle from docs_codestat order by codestat_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) 
				WHERE expl_codestat='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_codestat='!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_codestat='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_codestat='!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:expl_message" id="43">
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_note like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_note like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_note like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_note like '!!p!!%' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_note like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_note like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_note like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_note like '%!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_note like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_note like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_note like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_note like '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_note like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_note like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_note like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_note like '%!!p!!%' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE !!multiple_term!! GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
				<multipleTerm>expl_note like '%!!p!!%'</multipleTerm>
				<multipleOperator>or</multipleOperator>
			</query>
			<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE !!multiple_term!! GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
				<multipleTerm>expl_note like '%!!p!!%'</multipleTerm>
				<multipleOperator>and</multipleOperator>
			</query>
		</field>
		<field title="msg:expl_zone_comment" id="53">
			<input type='text'/>
			<query for="STARTWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_comment like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_comment like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_comment like '!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_comment like '!!p!!%' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="ENDWITH" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_comment like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_comment like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_comment like '%!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_comment like '%!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="EXACT" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_comment like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_comment like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_comment like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_comment like '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="CONTAINS" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_comment like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_comment like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_comment like '%!!p!!%' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_comment like '%!!p!!%' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE !!multiple_term!! GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
				<multipleTerm>expl_comment like '%!!p!!%'</multipleTerm>
				<multipleOperator>or</multipleOperator>
			</query>
			<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="no">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE !!multiple_term!! GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE !!multiple_term!! GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
				<multipleTerm>expl_comment like '%!!p!!%'</multipleTerm>
				<multipleOperator>and</multipleOperator>
			</query>
		</field>
		<field title="msg:date_creation_query" id="50">
			<input type='date' placeholder='msg:format_date_input_placeholder'/>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE exemplaires.create_date>='!!p!!' and exemplaires.create_date<='!!p!! 23:59:59' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE exemplaires.create_date>='!!p!!' and exemplaires.create_date<='!!p!! 23:59:59' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE exemplaires.create_date>='!!p!!' and exemplaires.create_date<='!!p!! 23:59:59' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE exemplaires.create_date>='!!p!!' and exemplaires.create_date<='!!p!! 23:59:59' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="LT">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE exemplaires.create_date<'!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE exemplaires.create_date<'!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE exemplaires.create_date<'!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE exemplaires.create_date<'!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="GT">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE exemplaires.create_date>'!!p!! 23:59:59' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE exemplaires.create_date>'!!p!! 23:59:59' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE exemplaires.create_date>'!!p!! 23:59:59' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE exemplaires.create_date>'!!p!! 23:59:59' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="LTEQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE exemplaires.create_date<='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE exemplaires.create_date<='!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE exemplaires.create_date<='!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE exemplaires.create_date<='!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="GTEQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE exemplaires.create_date>='!!p!! 23:59:59' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE exemplaires.create_date>='!!p!! 23:59:59' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE exemplaires.create_date>='!!p!! 23:59:59' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE exemplaires.create_date>='!!p!! 23:59:59' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:filing_date" id="68">
			<input type='date' placeholder='msg:format_date_input_placeholder'/>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_depot like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_depot like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_depot like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_depot like '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="LT">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_depot < '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_depot < '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_depot < '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_depot < '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="GT">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_depot > '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_depot > '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_depot > '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_depot > '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="LTEQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_depot <= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_depot <= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_depot <= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_depot <= '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="GTEQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_depot >= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_depot >= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_depot >= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_depot >= '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:return_date" id="69">
			<input type='date' placeholder='msg:format_date_input_placeholder'/>
			<query for="EQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_retour like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_retour like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_retour like '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_retour like '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="LT">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_retour < '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_retour < '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_retour < '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_retour < '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="GT">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_retour > '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_retour > '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_retour > '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_retour > '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="LTEQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_retour <= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_retour <= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_retour <= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_retour <= '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
			<query for="GTEQ">
				<main><![CDATA[SELECT distinct notice_id FROM ((SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice )
				WHERE expl_date_retour >= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id 
				WHERE expl_date_retour >= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) 
				WHERE expl_date_retour >= '!!p!!' GROUP BY notice_id) 
				UNION (SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) 
				WHERE expl_date_retour >= '!!p!!' GROUP BY notice_id)) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:search_item_creator" id="93">
			<var name="pmb_type_audit" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select distinct userid, CONCAT(nom, ' ', prenom) from users order by 1</query>
			</input>
			<query for="EQ">		
				<main><![CDATA[SELECT distinct notice_id FROM (
				(SELECT notice_id FROM notices JOIN exemplaires ON ( notice_id = expl_notice ) JOIN audit ON object_id = expl_id AND type_obj=2 AND type_modif=1 WHERE user_id=!!p!! GROUP BY notice_id) 
				UNION 
				(SELECT notice_id FROM notices JOIN bulletins ON bulletin_notice = notice_id JOIN exemplaires ON expl_bulletin = bulletin_id JOIN audit ON object_id = expl_id AND type_obj=2 AND type_modif=1 WHERE user_id=!!p!! GROUP BY notice_id) 
				UNION
				(SELECT analysis_notice AS notice_id FROM exemplaires JOIN analysis ON (expl_bulletin = analysis_bulletin AND expl_bulletin !=0) JOIN audit ON object_id = expl_id AND type_obj=2 AND type_modif=1 WHERE user_id=!!p!! GROUP BY notice_id) 
				UNION
				(SELECT notices.notice_id FROM exemplaires JOIN bulletins ON (expl_bulletin=bulletins.bulletin_id AND expl_bulletin!=0) JOIN notices ON (bulletins.num_notice=notices.notice_id AND bulletins.num_notice!=0) JOIN audit ON object_id = expl_id AND type_obj=2 AND type_modif=1 WHERE user_id=!!p!! GROUP BY notice_id)
				) AS sub1 ORDER BY notice_id DESC]]></main>
			</query>
		</field>
		<field title="msg:date_parution_bulletin_query" id="28" separator="msg:4010">
			<input type="date" placeholder='msg:format_date_input_placeholder'/>
			<query for="GT">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date>'!!p!!' order by index_serie, tnvol, index_sew) union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date>'!!p!!' order by index_serie, tnvol, index_sew)]]></main>
			</query>
			<query for="GTEQ">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date>='!!p!!' order by index_serie, tnvol, index_sew) union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date>='!!p!!' order by index_serie, tnvol, index_sew)]]></main>
			</query>
			<query for="EQ">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date='!!p!!' order by index_serie, tnvol, index_sew) union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date='!!p!!' order by index_serie, tnvol, index_sew)]]></main>
			</query>
			<query for="LTEQ">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date<='!!p!!' order by index_serie, tnvol, index_sew) union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date<='!!p!!' order by index_serie, tnvol, index_sew)]]></main>
			</query>
			<query for="LT">
				<main><![CDATA[(select distinct notice_id from bulletins join analysis on analysis_bulletin=bulletin_id join notices nota on analysis_notice=nota.notice_id where date_date<'!!p!!' order by index_serie, tnvol, index_sew) union (select distinct notice_id from bulletins join notices notb on num_notice=notb.notice_id where date_date<'!!p!!' order by index_serie, tnvol, index_sew)]]></main>
			</query>
		</field>
		<field title="msg:titre_perio_query" id="34">
			<input type="query_list">
				<query>select notice_id, tit1 from notices, notice_statut where statut=id_notice_statut and niveau_biblio='s' and notice_visible_gestion=1 order by tit1, index_sew</query>
			</input>
			<query for="EQ">
				<main><![CDATA[(select distinct notice_id from notices where niveau_biblio='s' and notice_id = !!p!! order by index_serie, tnvol, index_sew) union (select distinct notice_id from notices, bulletins where bulletin_notice in (!!p!!) and num_notice = notice_id order by index_serie, tnvol, index_sew) union (select distinct notice_id from notices, analysis, bulletins where bulletin_notice in (!!p!!) and analysis_bulletin=bulletin_id and analysis_notice=notice_id order by index_serie, tnvol, index_sew)]]></main>
			</query>
		</field>
		<field title="msg:num_bull_query" id="35">
			<input type="text"/>
			<query for="CONTAINS">
				<main><![CDATA[select distinct notice_id from bulletins, analysis, notices where analysis_bulletin=bulletin_id and bulletin_numero like '%!!p!!%' and analysis_notice=notice_id order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		
		<field title="msg:collection_state_search_loc" id="56" separator='msg:collection_state_search'>
			<input type="query_list">
				<query>select idlocation,location_libelle from docs_location order by location_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices join collections_state on (notice_id=id_serial) where location_id=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:collection_state_search_surloc" id="57">
			<var name="pmb_sur_location_activate" visibility="yes">
				<value visibility="no">0</value>
			</var>
			<input type="query_list">
				<query>select surloc_id,surloc_libelle from sur_location order by surloc_libelle</query>	
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices join collections_state on (notice_id=id_serial) join docs_location on (location_id=idlocation and surloc_num=!!p!!) order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:collection_state_search_emp" id="58">
			<input type="query_list">
				<query>select archempla_id, archempla_libelle from arch_emplacement order by archempla_libelle</query>
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_emplacement=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		
		<field title="msg:collection_state_search_sup" id="59">
			<input type="query_list">
				<query>select archtype_id, archtype_libelle from arch_type order by archtype_libelle</query>
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_type=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>

		<field title="msg:collection_state_search_sta" id="60">
			<input type="query_list">
				<query>select archstatut_id, archstatut_gestion_libelle from arch_statut order by archstatut_gestion_libelle</query>
			</input>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_statut=!!p!! order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>

		<field title="msg:collection_state_search_col" id="61">
			<input type="text"/>
			<query for="CONTAINS">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where state_collections like '%!!p!!%' group by notice_id order by state_collections, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="STARTWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where state_collections like '!!p!!%' group by notice_id order by state_collections, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where state_collections like '%!!p!!' group by notice_id order by state_collections, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where state_collections like '!!p!!' group by notice_id order by state_collections, index_serie, tnvol, index_sew]]></main>
			</query>
		</field>

		<field title="msg:collection_state_search_cote" id="62">
			<input type="text"/>
			<query for="CONTAINS">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_cote like '%!!p!!%' group by notice_id order by collstate_cote, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="STARTWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_cote like '!!p!!%' group by notice_id order by collstate_cote, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_cote like '%!!p!!' group by notice_id order by collstate_cote, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_cote like '!!p!!' group by notice_id order by collstate_cote, index_serie, tnvol, index_sew]]></main>
			</query>
		</field>

		<field title="msg:collection_state_search_arc" id="63">
			<input type="text"/>
			<query for="CONTAINS">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_archive like '%!!p!!%' group by notice_id order by collstate_archive, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="STARTWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_archive like '!!p!!%' group by notice_id order by collstate_archive, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_archive like '%!!p!!' group by notice_id order by collstate_archive, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_archive like '!!p!!' group by notice_id order by collstate_archive, index_serie, tnvol, index_sew]]></main>
			</query>
		</field>

		<field title="msg:collection_state_search_org" id="64">
			<input type="text"/>
			<query for="CONTAINS">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_origine like '%!!p!!%' group by notice_id order by collstate_origine, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="STARTWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_origine like '!!p!!%' group by notice_id order by collstate_origine, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_origine like '%!!p!!' group by notice_id order by collstate_origine, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_origine like '!!p!!' group by notice_id order by collstate_origine, index_serie, tnvol, index_sew]]></main>
			</query>
		</field>

		<field title="msg:collection_state_search_note" id="65">
			<input type="text"/>
			<query for="CONTAINS">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_note like '%!!p!!%' group by notice_id order by collstate_note, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="STARTWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_note like '!!p!!%' group by notice_id order by collstate_note, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_note like '%!!p!!' group by notice_id order by collstate_note, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_note like '!!p!!' group by notice_id order by collstate_note, index_serie, tnvol, index_sew]]></main>
			</query>
		</field>

		<field title="msg:collection_state_search_lac" id="66">
			<input type="text"/>
			<query for="CONTAINS">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_lacune like '%!!p!!%' group by notice_id order by collstate_lacune, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="STARTWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_lacune like '!!p!!%' group by notice_id order by collstate_lacune, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="ENDWITH">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_lacune like '%!!p!!' group by notice_id order by collstate_lacune, index_serie, tnvol, index_sew]]></main>
			</query>
			<query for="EXACT">
				<main><![CDATA[SELECT distinct notice_id from notices join collections_state on (notice_id=id_serial) where collstate_lacune like '!!p!!' group by notice_id order by collstate_lacune, index_serie, tnvol, index_sew]]></main>
			</query>
		</field>

		<field title="msg:caddie_de_NOTI" id="25" separator="msg:caddie_menu">
			<input type="query_list">
				<query>select idcaddie,name from caddie where type='NOTI' order by name</query>
			</input>
			<variable name="ck_affiche" type="input">
				<default type="value">0</default>
				<input type="hidden">
					<value>1</value>
				</input> 
			</variable>
			<variable name= "is_pointed" type="input" comment="msg:caddie_item_marque">
				<default type="value">1</default>
				<input type="checkbox" default_on="ck_affiche">
					<value>1</value>
					<comments>
						<label value="1">Oui</label>
						<label value="0">non</label>
					</comments>
				</input>
			</variable>
			<variable name= "is_no_pointed" type="input" comment="msg:caddie_item_NonMarque">
				<default type="value">1</default>
				<input type="checkbox" default_on="ck_affiche">
					<value>1</value>
					<comments>
						<label value="1">Oui</label>
						<label value="0">non</label>
					</comments>
				</input>
			</variable>
			<query for="EQ">
				<main><![CDATA[select distinct object_id as notice_id from caddie_content,notices where caddie_id='!!p!!' and object_id=notices.notice_id and ((flag is not null && '!!is_pointed!!') or (flag is null && '!!is_no_pointed!!')) order by index_serie, tnvol, index_sew]]></main>
			</query>
		</field>
		<field title="msg:caddie_de_EXPL" id="26">
			<input type="query_list">
				<query>select idcaddie,name from caddie where type='EXPL' order by name</query>
			</input>
			<variable name="ck_affiche" type="input">
				<default type="value">0</default>
				<input type="hidden">
					<value>1</value>
				</input> 
			</variable>
			<variable name= "is_pointed" type="input" comment="msg:caddie_item_marque">
				<default type="value">1</default>
				<input type="checkbox" default_on="ck_affiche">
					<value>1</value>
					<comments>
						<label value="1">Oui</label>
						<label value="0">non</label>
					</comments>
				</input>
			</variable>
			<variable name= "is_no_pointed" type="input" comment="msg:caddie_item_NonMarque">
				<default type="value">1</default>
				<input type="checkbox" default_on="ck_affiche">
					<value>1</value>
					<comments>
						<label value="1">Oui</label>
						<label value="0">non</label>
					</comments>
				</input>
			</variable>
			<query for="EQ">
				<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM (((exemplaires LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id),caddie_content where expl_id=object_id and caddie_id='!!p!!' and ((flag is not null && '!!is_pointed!!') or (flag is null && '!!is_no_pointed!!')) group by notice_id]]></main>
			</query>
		</field>
		<field title="msg:caddie_de_BULL" id="27">
			<input type="query_list">
				<query>select idcaddie,name from caddie where type='BULL' order by name</query>
			</input>
			<variable name="ck_affiche" type="input">
				<default type="value">0</default>
				<input type="hidden">
					<value>1</value>
				</input> 
			</variable>
			<variable name= "is_pointed" type="input" comment="msg:caddie_item_marque">
				<default type="value">1</default>
				<input type="checkbox" default_on="ck_affiche">
					<value>1</value>
					<comments>
						<label value="1">Oui</label>
						<label value="0">non</label>
					</comments>
				</input>
			</variable>
			<variable name= "is_no_pointed" type="input" comment="msg:caddie_item_NonMarque">
				<default type="value">1</default>
				<input type="checkbox" default_on="ck_affiche">
					<value>1</value>
					<comments>
						<label value="1">Oui</label>
						<label value="0">non</label>
					</comments>
				</input>
			</variable>
			<query for="EQ">
				<main><![CDATA[select distinct notice_id from notices, bulletins, caddie_content where caddie_id='!!p!!' and bulletin_id=object_id and bulletin_notice=notice_id and ((flag is not null && '!!is_pointed!!') or (flag is null && '!!is_no_pointed!!'))]]></main>
			</query>
		</field>	
	</fixedFields>
	
	<!-- Zone dynamicFields :
		Liste des champs personalisés par type de données
			<field @att=id,dataType,memoryEngineForbidden> 
			-id : numéro unique arbitraire
			-dataType : type de données du champ personalisé
			-memoryEngineForbidden : "yes" interdit l'utilisation du moteur memory pour la création des tables temporaires
			<field> contient les sous tags :
			
				<query> : requete associée au champ et à l'opérateur
				<query @att=for,multipleWords,regDiacrit>
					-for : nom de l'opérateur auquel correspond la requete 
					 (les opérateurs non listés ne seront pas pris en compte), 
					-multipleWords (yes|no) : la requete tient compte de plusieurs termes saisis avec des espaces
					-regDiacrit (yes|no) : les termes sont passés par la fonction de nettoyage des mots vides et des accents
			 		<query> contient les sous tags :
					
						<main> : Corps principal de la requete, 
							-!!p!! sera remplacé dans la requete par le texte saisi pour la recherche, 
							-!!multiple_term!! (uniquement si multipleWords="yes") sera remplacé par la série  
							 de tests de la clause where pour chaque mot saisi
							-!!field!! sera remplacé par le numéro de champ personalisé
						
						<multipleTerm> : terme de condition utilisé pour remplacer !!multiple_term!!
						<multipleOperator> : opérateur utilisé entre les termes de conditions 
	-->
	
	<dynamicFields>
		<option order="" />
		<fieldType type="notices" prefix="d" >
			<field dataType="small_text" id="1">
				<query for="BOOLEAN" wordSearch="yes" searchableOnly="yes" notAllowedFor="list,query_list,date,external,resolve,marclist,query_auth">
					<class>searcher_records_pfield</class>
				</query>
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_small_text like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_small_text like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_small_text='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_small_text='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_small_text='' or notices_custom_small_text is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_small_text!='' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
			<field dataType="text" id="2">
				<query for="BOOLEAN" wordSearch="yes" searchableOnly="yes" notAllowedFor="list,query_list,date,external,resolve,marclist,query_auth">
					<class>searcher_records_pfield</class>
				</query>
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_text like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_text like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_text='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_text='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_text='' or notices_custom_text is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_text!='' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
			<field dataType="integer" id="3">
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_integer='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_integer<'!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_integer>'!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_integer<='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_integer>='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_integer='' or notices_custom_integer is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_integer!='' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
			<field dataType="float" id="4">
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))<'!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))>'!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))<='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and round(notices_custom_float,LENGTH(SUBSTRING_INDEX('!!p!!','.',-1)))>='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_float='' or notices_custom_float is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_float!='' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
			<field dataType="date" id="5">
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_date='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_date<'!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_date>'!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_date<='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_date>='!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices left join notices_custom_values on notices_custom_origine=notice_id and notices_custom_champ=!!field!! where (notices_custom_date='' or notices_custom_date='0000-00-00' or notices_custom_date is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices,notices_custom_values where notices_custom_champ=!!field!! and notices_custom_origine=notice_id and notices_custom_date!='' and notices_custom_date!=0 order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
		</fieldType>
		<fieldType type="expl" prefix="e">
			<field dataType="small_text" id="1">
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND (!!multiple_term!!) AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
					<multipleTerm>expl_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND (!!multiple_term!!) AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
					<multipleTerm>expl_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_small_text like '!!p!!%' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_small_text like '%!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_small_text = '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="EQ">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_small_text = '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires LEFT JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) WHERE (expl_custom_small_text='' or expl_custom_small_text is null) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id AND expl_custom_small_text!='') LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
			</field>
			<field dataType="text" id="2">
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND (!!multiple_term!!) AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
					<multipleTerm>expl_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND (!!multiple_term!!) AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
					<multipleTerm>expl_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_text like '!!p!!%' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_text like '%!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_text = '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="EQ">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_text = '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires LEFT JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) WHERE (expl_custom_text='' or expl_custom_text is null) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id AND expl_custom_text !='') LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
			</field>
			<field dataType="integer" id="3">
				<query for="EQ">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_integer = '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_integer < '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_integer > '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_integer <= '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_integer >= '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires LEFT JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) WHERE (expl_custom_integer='' or expl_custom_integer is null) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id AND expl_custom_integer !='') LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
			</field>
			<field dataType="float" id="4">
				<query for="EQ">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_float = '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_float < '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_float > '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_float <= '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_float >= '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires LEFT JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) WHERE (expl_custom_float='' or expl_custom_float is null) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id AND expl_custom_float !='') LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
			</field>
			<field dataType="date" id="5">
				<query for="EQ">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_date = '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_date < '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_date > '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_date <= '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_date >= '!!p!!' AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires LEFT JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id) LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) WHERE (expl_custom_date='' or expl_custom_date is null OR expl_custom_date ='0000-00-00') GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[SELECT ifnull(notices_m.notice_id,notices_s.notice_id) as notice_id FROM ((((exemplaires JOIN expl_custom_values ON expl_custom_champ=!!field!! AND expl_custom_origine=expl_id AND expl_custom_date !='' AND expl_custom_date !='0000-00-00') LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id) GROUP BY notice_id order by expl_cb, notices_m.index_serie, notices_m.tnvol, notices_m.index_sew, notices_s.index_serie, notices_s.tnvol, notices_s.index_sew]]></main>
				</query>
			</field>
		</fieldType>		
		<fieldType type="authperso" prefix="a">
			<field dataType="all_fields" id="10">
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE authperso_index_infos_global like ' !!p!!%' AND authperso_authority_authperso_num = !!autperso_type_num!! ORDER BY authperso_index_infos_global]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE authperso_index_infos_global like '%!!p!! ' AND authperso_authority_authperso_num = !!autperso_type_num!! ORDER BY authperso_index_infos_global]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE authperso_index_infos_global like ' !!p!! ' AND authperso_authority_authperso_num = !!autperso_type_num!! ORDER BY authperso_index_infos_global]]></main>
				</query>
				<query for="CONTAINS" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE authperso_index_infos_global like '%!!p!!%' AND authperso_authority_authperso_num = !!autperso_type_num!! ORDER BY authperso_index_infos_global]]></main>
				</query>
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE !!multiple_term!! AND authperso_authority_authperso_num = !!autperso_type_num!! ORDER BY authperso_index_infos_global]]></main>
					<multipleTerm>authperso_index_infos_global LIKE '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="no">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = id_authperso_authority WHERE !!multiple_term!! AND authperso_authority_authperso_num = !!autperso_type_num!! ORDER BY authperso_index_infos_global]]></main>
					<multipleTerm>authperso_index_infos_global LIKE '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>
				<query for="ISEMPTY" regDiacrit="yes">
					<main><![CDATA[SELECT DISTINCT notice_id FROM notices WHERE notice_id NOT IN (SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = authperso_authority_authperso_num WHERE authperso_index_infos_global NOT like '' AND authperso_authority_authperso_num = !!autperso_type_num!!) ORDER BY 1]]></main>
				</query>
				<query for="ISNOTEMPTY" regDiacrit="yes">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM authperso_authorities JOIN notices_authperso ON notice_authperso_authority_num = authperso_authority_authperso_num WHERE authperso_index_infos_global NOT like '' AND authperso_authority_authperso_num = !!autperso_type_num!! ORDER BY authperso_index_infos_global]]></main>
				</query>				
				<query for="AUTHORITY">
					<main><![CDATA[SELECT DISTINCT notice_authperso_notice_num as notice_id FROM notices_authperso WHERE notice_authperso_authority_num = '!!p!!' ORDER BY 1]]></main>
				</query>
			</field>
			<field dataType="small_text" id="1">			    
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>				
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
				    <main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				 </query>				
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_small_text='' or authperso_custom_small_text is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_small_text != '' order by index_serie, tnvol, index_sew]]></main>					  
				</query>
			</field>
			<field dataType="text" id="2">			    			    
				<query for="CONTAINS_AT_LEAST" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>or</multipleOperator>
				</query>
				<query for="CONTAINS_ALL" multipleWords="yes" regDiacrit="yes" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where !!multiple_term!! order by index_serie, tnvol, index_sew]]></main>
					<multipleTerm>notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text like '%!!p!!%'</multipleTerm>
					<multipleOperator>and</multipleOperator>
				</query>				
				<query for="STARTWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text like '!!p!!%' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ENDWITH" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text like '%!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="EXACT" notAllowedFor="list,query_list,marclist,query_auth" regDiacrit="no">
				    <main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				 </query>				
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_text='' or authperso_custom_text is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_text != '' order by index_serie, tnvol, index_sew]]></main>					  
				</query>
			</field>			
			<field dataType="integer" id="3">
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer < '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer > '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer <= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer >= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_integer='' or authperso_custom_integer is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_integer != '' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
			<field dataType="float" id="4">
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float < '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float > '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float <= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float >= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_float='' or authperso_custom_float is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_float != '' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
			<field dataType="date" id="5">
				<query for="EQ">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date = '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date < '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GT" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date > '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="LTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date <= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="GTEQ" notAllowedFor="list,query_list,marclist,query_auth">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date >= '!!p!!' order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and (authperso_custom_date='' or authperso_custom_date is null) order by index_serie, tnvol, index_sew]]></main>
				</query>
				<query for="ISNOTEMPTY">
					<main><![CDATA[select distinct notice_id from notices, notices_authperso, authperso_authorities, authperso_custom_values where
					    notice_authperso_notice_num=notice_id and notice_authperso_authority_num = id_authperso_authority AND id_authperso_authority=authperso_custom_origine and
					    authperso_custom_champ=!!field!! and authperso_custom_date != '' order by index_serie, tnvol, index_sew]]></main>
				</query>
			</field>
		</fieldType>
	</dynamicFields>
	
	<specialFields>
		<field type="combine" title="msg:histo_title" id="1" separator="msg:recherches_query"/>
		<field type="openurl" title="msg:special_search_openurl" id="2" delnotallowed="yes" opacVisibility="no" visible="no"/>
		<field type="facette" title="msg:search_facette" id="3" opacVisibility="no" visible="no"/>
		<field type="simple_search" title="msg:search_persopac_table_humanquery" id="4" opacVisibility="no" visible="no"/>
		<field type="last_import_isbn_doublons" title="msg:last_import_isbn_doublons" id="5" opacVisibility="no"/>
	</specialFields>
	
	<operators>
		<operator name="BOOLEAN">msg:expr_bool_query</operator>
		<operator name="CONTAINS">msg:284</operator>
		<operator name="CONTAINS_ALL">msg:contient_tous_mots_query</operator>
		<operator name="CONTAINS_AT_LEAST">msg:contient_plus_un_mot_query</operator>
		<operator name="STARTWITH">msg:commence_par_query</operator>
		<operator name="ENDWITH">msg:finit_par_query</operator>
		<operator name="EXACT">msg:exactement_comme_query</operator>
		<operator name="EQ">=</operator>
		<operator name="GT">&gt;</operator>
		<operator name="LT">&lt;</operator>
		<operator name="GTEQ">&gt;=</operator>
		<operator name="LTEQ">&lt;=</operator>
		<operator name="ISEMPTY" emptyAllowed="yes">msg:est_vide_query</operator>
		<operator name="ISNOTEMPTY" emptyAllowed="yes">msg:pas_vide_query</operator>
		<operator name="AUTHORITY">msg:authority_query</operator>
		<operator name="AERASUP">msg:map_multisearch_aerasup</operator>
		<operator name="AERAINF">msg:map_multisearch_aerainf</operator>
		<operator name="INTERSECTS">msg:map_multisearch_intersects</operator>
	</operators>
</pmbfields>