".$msg[transferts_circ_menu_reset],
$msg[661], $msg[transferts_circ_reset_exemplaire], "./circ.php?categ=trans&sub=".$sub, 0);
if(!$f_ex_location)$f_ex_location=$deflt_docs_location;
if(!$f_ex_statut)$f_ex_statut=$deflt_docs_statut;
$form_suite="
".gen_liste ("select distinct idlocation, location_libelle from docs_location order by location_libelle", "idlocation", "location_libelle", 'f_ex_location', "calcule_section(this);", $f_ex_location, "", "","","",0)."
";
$expl = new exemplaire();
$form_suite.=$expl->do_selector();
$form_suite.="
".do_selector('docs_statut', 'f_ex_statut',$f_ex_statut)."
";
$form = str_replace('',
$form_suite,
$form);
print $form;
//si cb
if ($form_cb_expl != "") {
$formlocid="f_ex_section".$f_ex_location ;
$expl_section=$$formlocid ;
$query = "select * from exemplaires where expl_cb='".$form_cb_expl."' ";
$result = pmb_mysql_query($query, $dbh);
$expl_info = pmb_mysql_fetch_object($result);
if($expl_info->expl_id) {
// Reset des transferts en cours
$rqt = "UPDATE transferts,transferts_demande, exemplaires set etat_transfert=1, etat_demande=7
WHERE id_transfert=num_transfert and num_expl=expl_id and etat_transfert=0 AND expl_cb='".$form_cb_expl."' " ;
pmb_mysql_query( $rqt );
//on met à jour la localisation de expl avec celle de l'utilisateur
$rqt = "UPDATE exemplaires
SET expl_location=".$f_ex_location.", transfert_location_origine =".$f_ex_location.",
expl_statut=".$f_ex_statut.", transfert_statut_origine =".$f_ex_statut.",
expl_section=".$expl_section.", transfert_section_origine =".$expl_section."
WHERE expl_cb='".$form_cb_expl."' " ;
pmb_mysql_query( $rqt );
$rqt = "DELETE FROM transferts_source WHERE trans_source_numexpl=".$expl_info->expl_id ;
pmb_mysql_query( $rqt );
$rqt = "insert transferts_source SET trans_source_numloc=".$f_ex_location." , trans_source_numexpl=".$expl_info->expl_id;
pmb_mysql_query( $rqt );
// le reset est fait
$aff=str_replace("!!cb_expl!!", $form_cb_expl,$transferts_reset_OK);
echo str_replace("!!new_location!!", $obj_transfert->new_location_libelle,$aff);
$stuff = get_expl_info($expl_info->expl_id);
$stuff = check_pret($stuff);
print print_info($stuff,1,1,0);
}else{
// cb inconnu
print "".$form_cb_expl." : ".$msg[367]."";
}
}
?>