link = './catalog.php?categ=isbd&id=!!id!!';
$sc->link_expl = './catalog.php?categ=edit_expl&id=!!notice_id!!&cb=!!expl_cb!!&expl_id=!!expl_id!!';
$sc->link_expl_bull = './catalog.php?categ=serials&sub=bulletinage&action=expl_form&bul_id=!!bulletin_id!!&expl_id=!!expl_id!!';
$sc->link_explnum = './catalog.php?categ=edit_explnum&id=!!notice_id!!&explnum_id=!!explnum_id!!';
$sc->link_serial = './catalog.php?categ=serials&sub=view&serial_id=!!id!!';
$sc->link_analysis = './catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=!!bul_id!!&art_to_show=!!id!!';
$sc->link_bulletin = './catalog.php?categ=serials&sub=bulletinage&action=view&bul_id=!!id!!';
$sc->link_explnum_serial = "./catalog.php?categ=serials&sub=explnum_form&serial_id=!!serial_id!!&explnum_id=!!explnum_id!!";
$sc->link_explnum_analysis = "./catalog.php?categ=serials&sub=analysis&action=explnum_form&bul_id=!!bul_id!!&analysis_id=!!analysis_id!!&explnum_id=!!explnum_id!!";
$sc->link_explnum_bulletin = "./catalog.php?categ=serials&sub=bulletinage&action=explnum_form&bul_id=!!bul_id!!&explnum_id=!!explnum_id!!";
switch ($sub) {
case "launch":
if ((string)$page=="") {
$_SESSION["CURRENT"]=count($_SESSION["session_history"]);
$_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["URI"]="./catalog.php?categ=search&mode=8";
$_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["POST"]=$_POST;
$_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["GET"]=$_GET;
$_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["GET"]["sub"]="";
$_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["POST"]["sub"]="";
$_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["HUMAN_QUERY"]=$sc->make_human_query();
$_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["HUMAN_TITLE"]=$msg["search_exemplaire"];
$_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["SEARCH_TYPE"]="EXPL";
$_POST["page"]=0;
$page=0;
}
$table=$sc->get_results("./catalog.php?categ=search&mode=8&sub=launch","./catalog.php?categ=search&mode=8&option_show_notice_fille=$option_show_notice_fille&option_show_expl=$option_show_expl",true);
print_results($sc,$table,"./catalog.php?categ=search&mode=8&sub=launch&option_show_notice_fille=$option_show_notice_fille&option_show_expl=$option_show_expl","./catalog.php?categ=search&mode=8&option_show_notice_fille=$option_show_notice_fille&option_show_expl=$option_show_expl",true);
if ($_SESSION["CURRENT"]!==false) {
$_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["URI"]="./catalog.php?categ=search&mode=8";
$_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["POST"]=$_POST;
$_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["GET"]=$_GET;
$_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["PAGE"]=$page+1;
$_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["HUMAN_QUERY"]=$sc->make_human_query();
$_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["SEARCH_TYPE"]="expl";
$_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["TEXT_QUERY"]="";
}
break;
default:
print $sc->show_form("./catalog.php?categ=search&mode=8&option_show_notice_fille=$option_show_notice_fille&option_show_expl=$option_show_expl","./catalog.php?categ=search&mode=8&sub=launch");
break;
}
function print_results($sc,$table,$url,$url_to_search_form,$hidden_form=true,$search_target="") {
global $dbh;
global $begin_result_liste;
global $nb_per_page_search;
global $page;
global $charset;
global $search;
global $msg;
global $pmb_nb_max_tri;
global $affich_tris_result_liste;
global $pmb_allow_external_search;
global $show_results_data;
global $option_show_expl,$option_show_notice_fille;
global $gestion_acces_active, $gestion_acces_user_notice;
global $PMBuserid;
global $explr_invisible, $pmb_droits_explr_localises;
//droits d'acces lecture notice
if ($gestion_acces_active==1 && $gestion_acces_user_notice==1) {
$ac= new acces();
$dom_1= $ac->setDomain(1);
$usr_prf = $dom_1->getUserProfile($PMBuserid);
$requete = "delete from $table using $table, exemplaires, acces_res_1 ";
$requete.= "where ";
$requete.= "$table.expl_id=exemplaires.expl_id ";
$requete.= "and expl_bulletin=0 ";
$requete.= "and expl_notice = res_num ";
$requete.= "and usr_prf_num=".$usr_prf." and (((res_rights ^ res_mask) & 4)=0) ";
mysql_query($requete, $dbh);
$requete = "delete from $table using $table, exemplaires, bulletins, acces_res_1 ";
$requete.= "where ";
$requete.= "$table.expl_id=exemplaires.expl_id ";
$requete.= "and expl_notice=0 ";
$requete.= "and expl_bulletin=bulletin_id ";
$requete.= "and bulletin_notice=res_num ";
$requete.= "and usr_prf_num=".$usr_prf." and (((res_rights ^ res_mask) & 4)=0) ";
mysql_query($requete, $dbh);
}
//visibilité des exemplaires
if ($pmb_droits_explr_localises && $explr_invisible) {
$requete = "delete from $table using $table, exemplaires ";
$requete.= "where ";
$requete.= "$table.expl_id=exemplaires.expl_id ";
$requete.= "and expl_location in ($explr_invisible)";
mysql_query($requete, $dbh);
}
$start_page=$nb_per_page_search*$page;
$requete="select count(1) from $table";
$res = mysql_query($requete);
if($res)
$nb_results=mysql_result(mysql_query($requete),0,0);
else $nb_results=0;
$requete="select $table.* from ".$table.", exemplaires where exemplaires.expl_id=$table.expl_id";
if ( $nb_results > $sc->nb_per_page ) {
$requete .= " limit ".$start_page.", ".$nb_per_page_search;
}
//Y-a-t-il une erreur lors de la recherche ?
if ($sc->error_message) {
error_message_history("", $sc->error_message, 1);
exit();
}
if ($hidden_form) print $sc->make_hidden_search_form($url);
$resultat=mysql_query($requete,$dbh);
$human_requete = $sc->make_human_query();
print "".$msg["search_search_exemplaire"]." : ".$human_requete ;
if ($nb_results) {
print " => ".$nb_results." ".$msg["search_expl_nb_result"]."
\n";
print $begin_result_liste;
if ($sc->rec_history) {
//Affichage des liens paniers et impression
$current=$_SESSION["CURRENT"];
if ($current!==false) {
print " ";
// if ($nb_results<=$pmb_nb_max_tri) print $affich_tris_result_liste;
}
}
} else print "
".$msg["1915"]." ";
print "";
// transformation de la recherche en multicritères: on reposte tout avec mode=6
print " ";
print "