";
$msg_a_pointer .="
".$msg["circ_pret_piege_expl_todo"]."
";
}
}
if(!$pas_ranger){
// cb non réaffecté, il faut transférer les infos de la résa dans la table des docs à ranger
$rqt = "insert into resa_ranger (resa_cb) values ('".$cb_recup."') ";
$res = mysql_query ($rqt, $dbh) ;
}
} else {
alert_empr_resa($id_resa_validee) ;
$requete="SELECT empr_cb, empr_nom, empr_prenom, location_libelle FROM resa JOIN empr ON resa_idempr=id_empr JOIN docs_location ON resa_loc_retrait=idlocation WHERE id_resa=".$id_resa_validee."";
$res=mysql_query($requete);
$msg_a_pointer .= "
";
$msg_a_pointer .="
".$msg["circ_retour_ranger_resa"]."
";
$msg_a_pointer .= "
".$msg["circ_retour_resa_par"]." : ".htmlentities(mysql_result($res,0,1),ENT_QUOTES,$charset).", ".htmlentities(mysql_result($res,0,2),ENT_QUOTES,$charset)."";
$msg_a_pointer .= "
".$msg["376"]." : ".htmlentities($form_cb_expl,ENT_QUOTES,$charset)."";
$msg_a_pointer .= "
".$msg["circ_retour_loc_retrait"]." : ".htmlentities(mysql_result($res,0,3),ENT_QUOTES,$charset)."";
$msg_a_pointer .= "
" ;
}
}
}
}
break;
case 'imprimer_confirmation':
// récupérer les items
if (!$suppr_id_resa) $suppr_id_resa=array() ;
$tmp_in_resa = implode(",",$suppr_id_resa) ;
if ($tmp_in_resa) {
$rqt = "select id_resa, resa_idempr, resa_confirmee from resa where id_resa in (".$tmp_in_resa.") and resa_cb is not null and resa_cb!='' order by resa_idempr ";
$res = mysql_query ($rqt, $dbh) ;
alert_empr_resa ($tmp_in_resa);
} else print alert_jscript($msg['no_resa_selected']);
break;
case 'suppr_cb':
if (!$form_cb_expl) break ;
$msg_a_ranger = "
";
$aff_a_ranger .= "
" ;
// récupérer l'exemplaire
$query = "select expl_id from exemplaires where expl_cb='$form_cb_expl'";
$result = mysql_query($query, $dbh);
if(!mysql_num_rows($result)) {
// exemplaire inconnu
$aff_a_ranger .= "$form_cb_expl : ${msg[367]}
";
} else {
$expl_lu = mysql_fetch_object($result) ;
if($stuff = get_expl_info($expl_lu->expl_id)) {
$stuff = check_pret($stuff);
$aff_a_ranger .= print_info($stuff,1,0,0)."
";
} else {
$aff_a_ranger .= "$form_cb_expl : ${msg[395]}
";
}
}
$rqt = "delete from resa_ranger where resa_cb='".$form_cb_expl."' ";
$res = mysql_query ($rqt, $dbh) ;
if (mysql_affected_rows()) $msg_a_ranger .= $msg[resa_docrange] ;
else $msg_a_ranger .= $msg[resa_docrange_non] ;
$msg_a_ranger = str_replace('!!cb!!', $form_cb_expl, $msg_a_ranger );
$msg_a_ranger .= "" ;
break;
}
switch($sub) {
case 'docranger':
print "
$msg[resa_menu] > ".$msg["resa_menu_liste_".$sub]."
" ;
get_cb_expl("", $msg[661], $msg[resa_suppr_doc], "./circ.php?categ=listeresa&sub=$sub&action=suppr_cb", 1);
print $msg_a_ranger.$aff_a_ranger ;
print "
".$msg['resa_liste_docranger']."
" ;
print pmb_bidi(resa_ranger_list ()) ;
break;
case 'depassee':
print "
$msg[resa_menu] > ".$msg["resa_menu_liste_".$sub]."
" ;
print pmb_bidi(resa_list (0, 0, 0,"","resa_date_fin < CURDATE() and resa_date_fin<>'0000-00-00' ",1,"./circ.php?categ=listeresa&sub=$sub")) ;
break;
case 'suppr_resa_from_fiche':
break;
default:
case 'encours':
print "
$msg[resa_menu] > ".$msg["resa_menu_liste_".$sub]."
" ;
get_cb_expl("", $msg[661], $msg[resa_pointage_doc], "./circ.php?categ=listeresa&sub=$sub&action=valide_cb&f_loc=$f_loc", 1);
//un message à afficher
print $msg_a_pointer ;
//la clause de restriction
$cl_where = "(resa_date_fin >= CURDATE() or resa_date_fin='0000-00-00')";
/*
if ($pmb_transferts_actif=="1") {
if ($f_loc=="")
$f_loc = $deflt_docs_location;
if ($f_loc!="0") {
switch ($transferts_choix_lieu_opac) {
case "1":
//retrait de la resa sur lieu choisi par le lecteur
$cl_where .= " AND resa_loc_retrait=" . $f_loc;
break;
case "2":
//retrait de la resa sur lieu fixé
if ($f_loc!=$transferts_site_fixe)
$cl_where .= " AND 0";
break;
case "3":
//retrait de la resa sur lieu exemplaire
default:
//retrait de la resa sur lieu lecteur
$cl_where .= " AND empr_location=" . $f_loc;
break;
} //switch $transferts_choix_lieu_opac
} //if ($f_loc!="0")
} //if pmb_transferts_actif
*/
//on affiche la liste
echo $resa_liste_jscript_GESTION_INFO_GESTION;
print pmb_bidi(resa_list (0, 0, 0,"", $cl_where,1,"./circ.php?categ=listeresa&sub=$sub")) ;
break;
}