".$msg['transferts_circ_menu_reset'], $msg[661], $msg['transferts_circ_reset_exemplaire'], "./circ.php?categ=trans&sub=".$sub); if(!$f_ex_location)$f_ex_location=$deflt_docs_location; if(!$f_ex_statut)$f_ex_statut=$deflt_docs_statut; $formlocid="f_ex_section".$f_ex_location; if(!isset(${$formlocid})) $expl_section = ''; else $expl_section = ${$formlocid}; if(!isset($f_reset_resa)) $f_reset_resa = ''; $checked_reset_resa = ''; if($f_reset_resa){ $checked_reset_resa = " checked='checked' "; } $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(true,$expl_section); $form_suite.="
".do_selector('docs_statut', 'f_ex_statut',$f_ex_statut)."

"; print str_replace('', $form_suite, $form); //si cb if ($form_cb_expl != "") { $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." WHERE expl_cb='".$form_cb_expl."' " ; pmb_mysql_query( $rqt ); if ($expl_section) { $rqt = "UPDATE exemplaires SET 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 ); // Suppression doc à ranger $rqt = "delete from resa_ranger where resa_cb='".$form_cb_expl."' "; $res = pmb_mysql_query($rqt, $dbh) ; // Suppression doc à traiter $rqt = "UPDATE exemplaires set expl_retloc=0 where expl_cb='".$form_cb_expl."' limit 1 "; pmb_mysql_query($rqt, $dbh); if($f_reset_resa){ // Suppression resa $rqt = "delete from resa where resa_cb='".$form_cb_expl."' " ; pmb_mysql_query($rqt, $dbh) ; } // le reset est fait $expl = new mono_display_expl($form_cb_expl,0 ,0); $aff=str_replace("!!cb_expl!!", $expl->header,$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].""; } } ?>