".$msg['resa_menu_alert'].$temp_aff."" ; function resa_a_traiter() { global $msg; global $pmb_transferts_actif,$transferts_choix_lieu_opac,$deflt_docs_location, $pmb_location_reservation,$transferts_site_fixe,$pmb_lecteurs_localises; $sql="SELECT resa_idnotice, resa_idbulletin FROM resa, exemplaires, docs_statut WHERE (resa_cb is null OR resa_cb='') and resa_idnotice=expl_notice and resa_idbulletin=expl_bulletin and expl_statut=idstatut AND pret_flag=1 limit 1"; if($pmb_lecteurs_localises && $deflt_docs_location){ $sql="SELECT resa_idnotice, resa_idbulletin FROM resa, exemplaires, docs_statut WHERE (resa_cb is null OR resa_cb='') and resa_idnotice=expl_notice and resa_idbulletin=expl_bulletin and expl_location='".$deflt_docs_location."' and expl_statut=idstatut AND pret_flag=1 limit 1"; } // respecter les droits de réservation du lecteur if($pmb_location_reservation) $sql="SELECT resa_idnotice, resa_idbulletin FROM resa, empr, resa_loc, exemplaires , docs_statut WHERE resa_idnotice=expl_notice and resa_idbulletin=expl_bulletin and expl_location='".$deflt_docs_location."' and expl_statut=idstatut AND pret_flag=1 and resa_idempr = id_empr AND (resa_cb is null OR resa_cb='') and empr_location=resa_emprloc and resa_loc='$deflt_docs_location' limit 1"; if ($pmb_transferts_actif=="1") { switch ($transferts_choix_lieu_opac) { case "1": //retrait de la resa sur lieu choisi par le lecteur $sql="SELECT resa_idnotice, resa_idbulletin FROM resa, empr WHERE resa_idempr = id_empr AND (resa_cb is null OR resa_cb='') AND resa_loc_retrait='".$deflt_docs_location."' limit 1"; break; case "2": //retrait de la resa sur lieu fixé if ($deflt_docs_location==$transferts_site_fixe) $sql="SELECT resa_idnotice, resa_idbulletin FROM resa WHERE (resa_cb is null OR resa_cb='') limit 1"; else return ""; break; case "3": //retrait de la resa sur lieu exemplaire // respecter les droits de réservation du lecteur if($pmb_location_reservation) $sql = "select resa_idnotice, resa_idbulletin from resa, exemplaires,empr, resa_loc where resa_idempr = id_empr AND (resa_cb is null OR resa_cb='') and empr_location=resa_emprloc and resa_loc='$deflt_docs_location' and resa_idnotice=expl_notice and resa_idbulletin=expl_bulletin and expl_location=resa_loc limit 1"; else $sql = "select resa_idnotice, resa_idbulletin from resa, exemplaires,empr where resa_idempr = id_empr AND (resa_cb is null OR resa_cb='') and resa_idnotice=expl_notice and resa_idbulletin=expl_bulletin and expl_location='".$deflt_docs_location."' limit 1"; break; default: //retrait de la resa sur lieu lecteur $sql="SELECT resa_idnotice, resa_idbulletin FROM resa, empr WHERE resa_idempr = id_empr AND (resa_cb is null OR resa_cb='') AND empr_location='".$deflt_docs_location."' limit 1"; break; } } $result = pmb_mysql_query($sql); if($result && pmb_mysql_num_rows($result)) { return "