document.location='".$base_path."/index.php';";
break;
}
$id_empr=$_SESSION['id_empr_session'];
if (($pmb_transferts_actif=="1")&&($transferts_choix_lieu_opac=="1")) {
if($idloc==""){
//les transferts sont actifs, avec un choix du lieu de retrait et pas de choix encore fait
//=> on affiche les localisations
if($pmb_location_reservation) {
$loc_req="SELECT idlocation, location_libelle FROM docs_location WHERE location_visible_opac=1 and idlocation in (select resa_loc from resa_loc where resa_emprloc=$empr_location) ORDER BY location_libelle ";
$req_loc_list = "SELECT expl_location FROM exemplaires, docs_statut WHERE expl_notice IN (".implode(",",$notices).") and expl_statut=idstatut
and transfert_flag=1 and statut_allow_resa=1
AND expl_bulletin='0' and expl_location in (select resa_loc from resa_loc where resa_emprloc=$empr_location)";
} else {
$loc_req="SELECT idlocation, location_libelle FROM docs_location WHERE location_visible_opac=1 ORDER BY location_libelle";
$req_loc_list = "SELECT expl_location FROM exemplaires, docs_statut WHERE expl_noticeIN (".implode(",",$notices).") and expl_statut=idstatut
and transfert_flag=1 and statut_allow_resa=1 AND expl_bulletin='0' ";
}
$loc_list=array();
$flag_transferable=0;
$res_loc_list = pmb_mysql_query($req_loc_list);
if(pmb_mysql_num_rows($res_loc_list)){
while ($r = pmb_mysql_fetch_object($res_loc_list)){
$loc_list[]=$r->expl_location;
// au moins un expl transférable
$flag_transferable=1;
}
}
$res = pmb_mysql_query($loc_req);$tmpHtml = "
";
echo $tmpHtml;
}else{
$notices=explode(",",$listeNotices);
$resa_cart_display="".$msg["empr_menu_resa"]." : |
";
foreach($notices as $notice_id){
$resa_cart_display.="";
$bulletin_id=0;
//On vérifi si notre notice n'est pas une notice de bulletin.
$query='SELECT bulletin_id FROM bulletins WHERE num_notice='.$notice_id;
$result = pmb_mysql_query($query, $dbh);
if(pmb_mysql_num_rows($result)){
while($line=pmb_mysql_fetch_array($result,MYSQL_ASSOC)){
$bulletin_id=$line['bulletin_id'];
}
}
$resa=new reservation($id_empr, $notice_id, $bulletin_id);
if($resa->add($idloc)){
$resa_cart_display.="".$resa->notice." | ".$resa->message." | ";
}else{
$resa_cart_display.="".$resa->notice." | ".$resa->message." | ";
}
$resa_cart_display.="
";
}
$resa_cart_display.="
";
if(!$opac_resa_popup){
require_once $base_path.'/includes/show_cart.inc.php';
}
}
}else{
$resa_cart_display="".$msg["empr_menu_resa"]." : |
";
foreach($notices as $notice_id){
$resa_cart_display.="";
$bulletin_id=0;
//On vérifi si notre notice n'est pas une notice de bulletin.
$query='SELECT bulletin_id FROM bulletins WHERE num_notice='.$notice_id;
$result = pmb_mysql_query($query, $dbh);
if(pmb_mysql_num_rows($result)){
while($line=pmb_mysql_fetch_array($result,MYSQL_ASSOC)){
$bulletin_id=$line['bulletin_id'];
}
}
$resa=new reservation($id_empr, $notice_id, $bulletin_id);
if($resa->add($_SESSION['empr_location'])){
$resa_cart_display.="".$resa->notice." | ".$resa->message." | ";
}else{
$resa_cart_display.="".$resa->notice." | ".$resa->message." | ";
}
$resa_cart_display.="
";
}
$resa_cart_display.="
";
if(!$opac_resa_popup){
require_once $base_path.'/includes/show_cart.inc.php';
}
}
} else {
print "";
}