Origines des notices NG72 $sql="select 1 from origine_notice,notices where notice_id = '$cart_[$z]' and origine_catalogage = orinot_id and orinot_diffusion='1'"; } else { $id_externe = substr($cart_[$z],2); $is_externe = true; $requete = "SELECT source_id FROM external_count WHERE rid=".$id_externe; $myQuery = pmb_mysql_query($requete, $dbh); $source_id = pmb_mysql_result($myQuery, 0, 0); $sql="select 1 from entrepot_source_$source_id where recid='".$id_externe."' group by ufield,usubfield,field_order,subfield_order,value"; } $res=pmb_mysql_query($sql,$dbh); if ($ligne=pmb_mysql_fetch_array($res)) { $nb_fiche++; $export= new start_export(($id_externe ? $id_externe : $cart_[$z]),$typeexport,$is_externe,$keep_expl,$keep_explnum) ; $exportation.=$export->output_notice; } } if ($nb_fiche>0) { $exportation=$export->get_header().$exportation.$export->get_footer(); header("Content-type: ".$export->get_mime_type()); header('Content-Disposition: attachment; filename="export.'.$export->get_suffix().'"'); print $exportation; global $pmb_logs_activate; if($pmb_logs_activate){ global $log, $infos_notice, $infos_expl; if($_SESSION['user_code']) { $res=pmb_mysql_query($log->get_empr_query()); if($res){ $empr_carac = pmb_mysql_fetch_array($res); $log->add_log('empr',$empr_carac); } } $log->add_log('num_session',session_id()); $log->add_log('expl',$infos_expl); $log->add_log('docs',$infos_notice); $log->save(); } } else { print ""; } } }