" . $msg[transferts_circ_menu_titre] . " > " . $msg[transferts_circ_menu_validation] . ""; echo affiche_liste_valide( $transferts_validation_liste_valide, $transferts_validation_liste_valide_ligne, "SELECT num_notice, num_bulletin, " . "expl_cb as val_ex, lender_libelle, transferts.date_creation as val_date_creation, " . "transferts.date_retour as val_date_retour, motif as val_motif, location_libelle as val_dest, empr_cb as val_empr " . "FROM transferts " . "INNER JOIN transferts_demande ON id_transfert=num_transfert " . "INNER JOIN exemplaires ON num_expl=expl_id " . "INNER JOIN lenders ON idlender=expl_owner " . "INNER JOIN docs_location ON num_location_dest=idlocation " . "LEFT JOIN resa ON resa_trans=id_resa " . "LEFT JOIN empr ON resa_idempr=id_empr " . "WHERE ". "id_transfert IN (!!liste_numeros!!) ". "AND etat_demande=0", "circ.php?categ=trans&sub=". $sub ); break; case "val": //on enregistre les validations des exemplaires sélectionnés $obj_transfert->enregistre_validation($liste_transfert); $action=""; break; case "aff_refus": //on affiche l'écran de saisie du refus echo "

" . $msg[transferts_circ_menu_titre] . " > " . $msg[transferts_circ_menu_validation] . "

"; echo affiche_liste_valide( $transferts_validation_liste_refus, $transferts_validation_liste_valide_ligne, "SELECT num_notice, num_bulletin, " . "expl_cb as val_ex, lender_libelle, transferts.date_creation as val_date_creation, " . "transferts.date_retour as val_date_retour, motif as val_motif, location_libelle as val_dest, empr_cb as val_empr " . "FROM transferts " . "INNER JOIN transferts_demande ON id_transfert=num_transfert " . "INNER JOIN exemplaires ON num_expl=expl_id " . "INNER JOIN lenders ON idlender=expl_owner " . "INNER JOIN docs_location ON num_location_dest=idlocation " . "LEFT JOIN resa ON resa_trans=id_resa " . "LEFT JOIN empr ON resa_idempr=id_empr " . "WHERE ". "id_transfert IN (!!liste_numeros!!) ". "AND etat_demande=0", "circ.php?categ=trans&sub=". $sub ); break; case "refus": //on enregistre les refus $obj_transfert->enregistre_refus($liste_transfert,$motif_refus); $action=""; break; } if ($action == "") { //pas d'action donc affichage de la liste des validations en attente get_cb_expl($msg[transferts_circ_menu_titre]." > ".$msg[transferts_circ_menu_validation], $msg[661], $msg[transferts_circ_validation_exemplaire], "./circ.php?categ=trans&sub=".$sub."&f_destination=".$f_destination."&nb_per_page=".$nb_per_page, 0); //pour la validation d'un exemplaire if ($form_cb_expl != "") { //enregistre l'acceptation du transfert $res_val = $obj_transfert->enregistre_validation_cb($form_cb_expl); if ($res_val==false) { // la validation ne s'est pas faite ! echo $transferts_validation_acceptation_erreur; } else { // la validation est faite $aff=str_replace("!!cb_expl!!", $form_cb_expl,$transferts_validation_acceptation_OK); echo str_replace("!!new_location!!", $obj_transfert->new_location_libelle,$aff); } } $filtres = " ".$msg["transferts_circ_validation_filtre_destination"].str_replace("!!nom_liste!!","f_destination",$transferts_liste_localisations_tous); $filtres = str_replace("!!liste_localisations!!", do_liste_localisation($f_destination), $filtres); $req = "FROM transferts " . "INNER JOIN transferts_demande ON id_transfert=num_transfert " . "INNER JOIN exemplaires ON num_expl=expl_id " . "INNER JOIN docs_statut ON expl_statut=idstatut " . "INNER JOIN lenders ON idlender=expl_owner " . "INNER JOIN docs_location ON num_location_dest=idlocation " . "LEFT JOIN resa ON resa_trans=id_resa " . "LEFT JOIN empr ON resa_idempr=id_empr " . "WHERE etat_transfert=0 " . //pas fini "AND etat_demande=0 " . //pas validé "AND num_location_source=".$deflt_docs_location; //pour le site de l'utilisateur $url_edition = "./edit.php?categ=transferts&sub=validation"; // si une destination est sélectionnée if ($f_destination) { $req .= " AND num_location_dest=".$f_destination; $url_edition .= "&site_destination=" .$f_destination; } //le lien pour l'édition si on a le droit ... if (SESSrights & EDIT_AUTH) $lien_edition = "".$msg[1100].""; else $lien_edition = ""; //on affihce la liste echo affiche_liste( $sub, $page, "SELECT num_notice, num_bulletin, ". "id_transfert as val_id, " . "expl_cb as val_ex, expl_cote as val_cote, CONCAT(statut_libelle,'###',expl_id) as val_statut, lender_libelle, transferts.date_creation as val_date_creation, " . "transferts.date_retour as val_date_retour, motif as val_motif, location_libelle as val_dest, empr_cb as val_empr ", $req, $nb_per_page, $transferts_validation_form_global, $transferts_validation_tableau_definition, $transferts_validation_tableau_ligne, $transferts_validation_boutons_action, $transferts_validation_pas_de_resultats, $lien_edition, $filtres, "&f_destination=".$f_destination ); } ?>