analyser(); $print_options = $xml_print->table; if (($action=="print_$lvl")&&($output=="tt")) { header("Content-Type: application/word"); header("Content-Disposition: attachement; filename=liste.doc"); } $output_final = "".$msg["print_title"]."" . ''. " "; if ($action!="print_$lvl") { $output_final .= link_styles($css); $output_final .= ""; $output_final .= " "; } elseif($output=="docnum"){ $docnum=new docnum_merge(0,$doc_num_list); $docnum->merge(); exit; } else { //print ""; $output_final .= ""; $opac_visionneuse_allow=0; if($notice_tpl)$noti_tpl=new notice_tpl_gen($notice_tpl); if($action == 'print_cart'){ if($number && $select_noti){ $cart_ = explode(",",$select_noti); } else $cart_=$_SESSION["cart"]; $date_today = formatdate(today()) ; if ($output=="email") { //on rajoute une mention spécifiant l'origine du mail... $rqt = "select empr_nom, empr_prenom from empr where id_empr ='".$_SESSION['id_empr_session']."'"; $res = mysql_query($rqt); if(mysql_num_rows($res)){ $info = mysql_fetch_object($res); $output_final .= "

".$msg['biblio_send_by']." ".$info->empr_nom." ".$info->empr_prenom."

" ; } } $output_final .= "

".$date_today." ".sprintf($msg["show_cart_n_notices"],count($cart_))."


"; //print ""; for ($i=0; $ibuild_notice(substr($cart_[$i],0,2)!="es"?$cart_[$i]:substr($cart_[$i],2)); $output_final.="
"; } else{ if (substr($cart_[$i],0,2)!="es") { if (!$opac_notice_affichage_class) $opac_notice_affichage_class="notice_affichage"; } else $opac_notice_affichage_class="notice_affichage_unimarc"; $current = new $opac_notice_affichage_class((substr($cart_[$i],0,2)!="es"?$cart_[$i]:substr($cart_[$i],2)),array(),0,1); $current->do_header(); if ($type=='PUBLIC') { $current->do_public($short,$ex); if ($vignette) $current->do_image($current->notice_public,false); } else { $current->do_isbd($short,$ex); if ($vignette) $current->do_image($current->notice_isbd,false); } if ($header) $output_final .= "

".$current->notice_header."

"; if ($current->notice->niveau_biblio =='s') { $perio="[".$msg['isbd_type_perio'].$bulletins."] "; } elseif ($current->notice->niveau_biblio =='a') { $perio="[".$msg['isbd_type_art']."] "; } else $perio=""; if ($type=='PUBLIC') $output_final .= $perio.$current->notice_public; else $output_final .= $perio.$current->notice_isbd; if ($ex) $output_final .= $current->affichage_expl ; $output_final .= "
"; } } if ($charset!='utf-8') $output_final=cp1252Toiso88591($output_final); } elseif($action='print_list'){ if($number && $select_noti){ $notices = explode(",",$select_noti); } else { $rqt = "select * from opac_liste_lecture where id_liste='$id_liste'"; $res = mysql_query($rqt); $liste=mysql_fetch_object($res); $nom_liste = $liste->nom_liste; $description = $liste->description; $notices=explode(',',$liste->notices_associees); } $date_today = formatdate(today()) ; if ($output=="email") { //on rajoute une mention spécifiant l'origine du mail... $rqt = "select empr_nom, empr_prenom from empr where id_empr ='".$_SESSION['id_empr_session']."'"; $res = mysql_query($rqt); if(mysql_num_rows($res)){ $info = mysql_fetch_object($res); $output_final .= "

".$msg['biblio_send_by']." ".$info->empr_nom." ".$info->empr_prenom."

" ; } } $output_final .= "

".$date_today." ".sprintf($msg["show_cart_n_notices"],count($notices))."


"; for ($i=0; $ibuild_notice(substr($notices[$i],0,2)!="es"?$notices[$i]:substr($notices[$i],2)); $output_final.="
"; } else{ if (substr($notices[$i],0,2)!="es") { if (!$opac_notice_affichage_class) $opac_notice_affichage_class="notice_affichage"; } else $opac_notice_affichage_class="notice_affichage_unimarc"; $current = new $opac_notice_affichage_class((substr($notices[$i],0,2)!="es"?$notices[$i]:substr($notices[$i],2)),array(),0,1); $current->do_header(); if ($type=='PUBLIC') { $current->do_public($short,$ex); if ($vignette) $current->do_image($current->notice_public,false); } else { $current->do_isbd($short,$ex); if ($vignette) $current->do_image($current->notice_isbd,false); } if ($header) $output_final .= "

".$current->notice_header."

"; if ($current->notice->niveau_biblio =='s') { $perio="[".$msg['isbd_type_perio'].$bulletins."] "; } elseif ($current->notice->niveau_biblio =='a') { $perio="[".$msg['isbd_type_art']."] "; } else $perio=""; if ($type=='PUBLIC') $output_final .= $perio.$current->notice_public; else $output_final .= $perio.$current->notice_isbd; if ($ex) $output_final .= $current->affichage_expl ; $output_final .= "
"; } if ($charset!='utf-8') $output_final=cp1252Toiso88591($output_final); } } //print "
"; if ($output=="printer") $output_final .= ""; } if ($output!="email") print pmb_bidi($output_final."") ; else { $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=".$charset."\n"; $res_envoi=mailpmb("", $emaildest,$msg["print_emailobj"]." $opac_biblio_name - $date_today ",($emailcontent ? $msg["print_emailcontent"].$emailcontent."
" : '').$output_final."

".mail_bloc_adresse()." ",$opac_biblio_name, $opac_biblio_email, $headers); $vide_cache=filemtime("./styles/".$css."/".$css.".css"); if ($res_envoi) print "".$msg["print_title"]."\n

".sprintf($msg["print_emailsucceed"],$emaildest)."


".$msg["print_emailclose"]."
" ; else echo "".$msg["print_title"]."\n

".sprintf($msg["print_emailfailed"],$emaildest)."


".$msg["print_emailclose"]."
" ; } 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(); }