setDomain(1); $acces_m = $dom_1->getRights($PMBuserid,$f_notice,8); } if ($acces_m==0) { if (!$f_explnum_id) { error_message('', htmlentities($dom_1->getComment('mod_noti_error'), ENT_QUOTES, $charset), 1, ''); } else { error_message('', htmlentities($dom_1->getComment('mod_enum_error'), ENT_QUOTES, $charset), 1, ''); } } else { if(!isset($forcage)){ $forcage = 0; } if ($forcage == 1) { $tab = unserialize(stripslashes($ret_url)); foreach($tab->GET as $key => $val){ if (get_magic_quotes_gpc()) { $GLOBALS[$key] = $val; } else { add_sl($val); $GLOBALS[$key] = $val; } } foreach($tab->POST as $key => $val){ if (get_magic_quotes_gpc()) { $GLOBALS[$key] = $val; } else { add_sl($val); $GLOBALS[$key] = $val; } } foreach($tab->FILES as $key => $val){ if (get_magic_quotes_gpc()) { $_FILES[$key] = $val; } else { add_sl($val); $_FILES[$key] = $val; } } } $retour = "./catalog.php?categ=isbd&id=$f_notice"; //Vérification des champs personalisés $p_perso=new parametres_perso("explnum"); $nberrors=$p_perso->check_submited_fields(); if ($nberrors) { error_message_history($msg["notice_champs_perso"],$p_perso->error_message,1); exit(); } $explnum = new explnum($f_explnum_id); $explnum->set_p_perso($p_perso); if(!$forcage && ($pmb_explnum_controle_doublons != 0) ) { //Si controle de dedoublonnage active if (file_exists($base_path.'/temp/explnum_doublon_'.$f_notice)) { // On supprime les doublons stockés inutilement unlink($base_path.'/temp/explnum_doublon_'.$f_notice); } // En modification de document numérique, on ne dedoublonne pas if(!$f_explnum_id) { $signature = $explnum->gen_signature($_FILES['f_fichier']['tmp_name']); if ($signature) { $query = "select explnum_id, explnum_notice, explnum_bulletin, explnum_nom from explnum where explnum_signature = '".$signature."'"; $result = pmb_mysql_query($query); if ($dbls = pmb_mysql_num_rows($result)) { $new_name = $base_path.'/temp/explnum_doublon_'.$f_notice; move_uploaded_file($_FILES['f_fichier']['tmp_name'], $new_name); $_FILES['f_fichier']['tmp_name'] = $new_name; //affichage de l'erreur, en passant tous les param postes (serialise) pour l'eventuel forcage $tab = new stdClass(); $tab->POST = $_POST; $tab->GET = $_GET; $tab->FILES = $_FILES; $ret_url = htmlentities(serialize($tab), ENT_QUOTES, $charset); print "
".$msg[540]."
".$msg["gen_signature_docnum_erreur_similaire"]."
"; if ($dbls < $nb_per_page_search) { $maxAffiche = $dbls; echo "
".sprintf($msg["gen_signature_erreur_similaire_nb"], $dbls, $dbls)."
"; }else{ $maxAffiche = $nb_per_page_search; echo "
".sprintf($msg["gen_signature_erreur_similaire_nb"], $maxAffiche, $dbls)."
"; } $enCours = 1; while ($enCours <= $maxAffiche) { $row = pmb_mysql_fetch_object($result); $record_link = '#'; $record_title = ''; if ($row->explnum_notice) { require_once($class_path.'/notice.class.php'); $record_link = notice::get_gestion_link($row->explnum_notice); $record_title = notice::get_notice_title($row->explnum_notice); } else if ($row->explnum_bulletin) { $record_link = './catalog.php?categ=serials&sub=view&sub=bulletinage&action=view&bul_id='.$row->explnum_bulletin; $query = 'select bulletin_titre from bulletins where bulletin_id = '.$row->explnum_bulletin; $record_title = pmb_mysql_result(pmb_mysql_query($query), 0, 0); } echo "
".$row->explnum_nom." (".$record_title.")
"; $enCours++; } exit(); } } } } //fin du controle de dedoublonage if(!isset($conservervignette)){ $conservervignette = 0; } if(!isset($f_statut_chk)){ $f_statut_chk = 0; } if(!isset($book_lender_id)){ $book_lender_id = array(); } $explnum->mise_a_jour($f_notice, $f_bulletin, $f_nom, $f_url, $retour, $conservervignette, $f_statut_chk, $f_explnum_statut, $book_lender_id, $forcage, $f_url_vignette); }