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 = mysql_query($requete, $dbh); $source_id = 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=mysql_query($sql,$dbh); if ($ligne=mysql_fetch_array($res)) { $nb_fiche++; $export= new start_export(($id_externe ? $id_externe : $cart_[$z]),$typeexport,$is_externe) ; $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; $rqt= " select empr_prof,empr_cp, empr_ville as ville, empr_year, empr_sexe, empr_date_adhesion, empr_date_expiration, count(pret_idexpl) as nbprets, count(resa.id_resa) as nbresa, code.libelle as codestat, es.statut_libelle as statut, categ.libelle as categ, gr.libelle_groupe as groupe,dl.location_libelle as location from empr e left join empr_codestat code on code.idcode=e.empr_codestat left join empr_statut es on e.empr_statut=es.idstatut left join empr_categ categ on categ.id_categ_empr=e.empr_categ left join empr_groupe eg on eg.empr_id=e.id_empr left join groupe gr on eg.groupe_id=gr.id_groupe left join docs_location dl on e.empr_location=dl.idlocation left join resa on e.id_empr=resa_idempr left join pret on e.id_empr=pret_idempr where e.empr_login='".addslashes($login)."' group by resa_idempr, pret_idempr"; $res=mysql_query($rqt); if($res){ $empr_carac = 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 ""; } } }