'notice', 1=>'bulletin', 2=>'abt', 3=>'article', 4=>'frais');
switch ($typ_query) {
case 'notice' :
$sh=new sel_searcher_notice_mono($base_url);
$sh->tab_choice = $tab_choice;
$sh->elt_b_list = $elt_b_list_notice;
$sh->elt_r_list = $elt_r_list_notice;
$sh->elt_r_list_values = array(0=>'result', 1=>'nb_expl');
$sh->action = "!!display!! ";
$sh->action_values = array(0=>'notice_id', 1=>'code', 2=>'titre', 3=>'auteur1', 4=>'editeur1', 5=>'ed_date', 6=>'collection', 7=>'prix');
$sh->back_script = "
";
$sh->back_script_show_all = "
";
//extension de la recherche
//statut
$q ="select distinct id_notice_statut, gestion_libelle from notice_statut order by 2 " ;
if (!isset($notice_statut_query) || !$notice_statut_query) {
$notice_statut_query=$deflt_notice_statut;
}
$notice_statut_form = gen_liste($q, 'id_notice_statut', 'gestion_libelle', 'notice_statut_query', '', $notice_statut_query, '', '', '-1', $msg['tous_statuts_notice'] , 0);
$extended_query=$notice_statut_form;
//type document
if (!isset($doctype_query) || !$doctype_query) {
$doctype_query=$xmlta_doctype;
}
$doctype_form = new marc_select('doctype', 'doctype_query', $doctype_query, '', '-1', $msg['tous_types_docs']);
$extended_query.=$doctype_form->display;
$extended_query.="";
if ($deb_rech!='') {
$elt_query=$deb_rech;
$sh->etat='first_search';
}
$sh->run();
break;
case 'article' :
$sh=new sel_searcher_notice_article($base_url);
$sh->tab_choice = $tab_choice;
$sh->elt_b_list = $elt_b_list_article;
$sh->elt_r_list = $elt_r_list_article;
$sh->elt_r_list_values = array(0=>'result');
$sh->action = "!!display!! ";
$sh->action_values = array(0=>'notice_id', 1=>'titre', 3=>'auteur1', 4=>'in_bull', 5=>'prix');
$sh->back_script = "
";
$sh->back_script_show_all = "
";
//extension de la recherche
//statut
$q ="select distinct id_notice_statut, gestion_libelle from notice_statut order by 2 " ;
if (!$notice_statut_query) {
$notice_statut_query=$deflt_notice_statut;
}
$notice_statut_form = gen_liste($q, 'id_notice_statut', 'gestion_libelle', 'notice_statut_query', '', $notice_statut_query, '', '', '-1', $msg['tous_statuts_notice'] , 0);
$extended_query=$notice_statut_form;
//type document
if (!$doctype_query) {
$doctype_query=$xmlta_doctype;
}
$doctype_form = new marc_select('doctype', 'doctype_query', $doctype_query, '', '-1', $msg['tous_types_docs']);
$extended_query.=$doctype_form->display;
$extended_query.="";
if ($deb_rech!='') {
$elt_query=$deb_rech;
$sh->etat='first_search';
}
$sh->run();
break;
case 'bulletin' :
$sh=new sel_searcher_bulletin($base_url);
$sh->tab_choice = $tab_choice;
$sh->elt_b_list = $elt_b_list_bulletin;
$sh->elt_r_list = $elt_r_list_bulletin;
$sh->elt_r_list_values = array(0=>'result', 1=>'nb_expl');
$sh->action = "!!display!! ";
$sh->action_values = array(0=>'bulletin_id', 1=>'titre', 2=>'editeur1', 3=>'numero', 4=>'aff_date', 5=>'prix', 6=>'code');
$sh->back_script = "
";
if(!$aut_id){
$sh->back_script_show_all = "
";
}else{
$sh->back_script_show_all = "
";
}
$sh->aut_b_list=$aut_b_list_bulletin;
$sh->aut_r_list=$aut_r_list_bulletin;
$sh->aut_r_list_values = array(0=>'result', 1=>'nb_bull');
$extended_query="";
if ($deb_rech!='') {
$elt_query=$deb_rech;
$sh->etat='first_search';
}
$sh->run();
break;
case 'frais' :
$sh=new sel_searcher_frais($base_url);
$sh->tab_choice = $tab_choice;
$sh->elt_b_list= $elt_b_list_frais;
$sh->elt_r_list= $elt_r_list_frais;
$sh->elt_r_list_values = array(0=>'result', 1=>'lib_montant');
$sh->action = "!!display!! ";
$sh->action_values = array(0=>'id_frais', 1=>'libelle', 2=>'montant', 3=>'taux_tva');
$sh->back_script = "
";
$sh->back_script_show_all = "
";
if (isset($elt_query) && $elt_query == '') {
$elt_query = '*';
$sh->etat = 'first_search';
}
$extended_query="";
$sh->run();
break;
case 'abt' :
if($autorun==1){
$deb_rech="*";
}
$sh=new sel_searcher_abt($base_url);
$sh->tab_choice = $tab_choice;
$sh->elt_b_list = $elt_b_list_abt;
$sh->elt_r_list = $elt_r_list_abt;
$sh->elt_r_list_values = array(0=>'result', 1=>'aff_date_echeance', 2=>'aff_nb_recipients');
$sh->action = "!!display!! ";
$sh->action_values = array(0=>'abt_id', 1=>'code', 2=>'titre', 3=>'editeur1', 4=>'periodicite', 5=>'duree', 6=>'aff_date_debut', 7=>'prix', 8=>'abt_name');
$sh->back_script = "
";
$sh->back_script_show_all = "
";
$sh->back_script_order = "
";
//extension de la recherche
//localisation
$q ="select distinct idlocation, location_libelle from docs_location, docsloc_section where num_location=idlocation order by 2 " ;
if (!isset($location_query) || !$location_query) {
$location_query=$deflt_bulletinage_location;
}
$location_form = gen_liste($q, "idlocation", "location_libelle", 'location_query', "", $location_query, "", "", '-1', $msg['all_location'] , 0);
$extended_query=$location_form;
//echeance
if (isset($date_ech_query) && $date_ech_query=='-1') {
$date_ech_query_lib=$msg['parperso_nodate'];
} elseif (empty($date_ech_query)) {
$q = "select date_add(curdate(), interval ".$pmb_abt_end_delay." day) ";
$r = pmb_mysql_query($q, $dbh);
$date_ech_query=pmb_mysql_result($r, 0, 0);
$date_ech_query_lib=format_date($date_ech_query);
} else {
$date_ech_query_lib=format_date($date_ech_query);
}
$date_ech_form =htmlentities($msg['acquisition_abt_ech'], ENT_QUOTES, $charset)." <
";
$extended_query.=$date_ech_form;
$extended_query.="";
if (empty($specific_order)) {
$specific_order = 0;
}
$extended_query.="";
if ($deb_rech!='') {
$elt_query=$deb_rech;
$sh->etat='first_search';
}
$sh->run();
break;
case 'panier' :
break;
default :
print 'No query type defined
';
break;
}
?>