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 .= "";
$output_final .= "".$msg["print_options"]."
";
$output_final .= "";
} else {
//print "";
$output_final .= "";
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);
} else {
$current->do_isbd($short,$ex);
if ($vignette) $current->do_image($current->notice_isbd);
}
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);
} else {
$current->do_isbd($short,$ex);
if ($vignette) $current->do_image($current->notice_isbd);
}
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()."