".$msg["print_options"]."\n"; print "
".$msg["print_size"].""; if(!$notice_id) print"
 ".$msg["print_size_current_page"]."
 ".$msg["print_size_all"]."
"; $sort_info = $sort_id ? '' : ''; $onchange=" var div_sel=document.getElementById('sel_notice_tpl'); var div_sel2=document.getElementById('sel_notice_tpl2'); var notice_tpl=document.getElementById('notice_tpl'); var sel=notice_tpl.options[notice_tpl.selectedIndex].value; if(sel>0){ div_sel.style.display='none'; div_sel2.style.display='none'; }else { div_sel.style.display='block'; div_sel2.style.display='block'; } "; $sel_notice_tpl=notice_tpl_gen::gen_tpl_select("notice_tpl",0,$onchange); print" ".$msg["print_format_title"]."
$sel_notice_tpl
 ".$msg["print_short_format"]."
 ".$msg["print_long_format"]."
 
 ".$msg["print_permalink"]."
".$msg["print_ex_title"]."
 ".$msg["print_ex"]."
".$msg["print_numeric_ex_title"]."
 ".$msg["print_numeric_ex"]."
 ".$msg["print_no_numeric_ex"]."
 ".$msg["print_no_ex"]."
".$msg["print_output_title"]."
 ".$msg["print_output_printer"]."
 ".$msg["print_output_writer"]."
 ".$msg["print_output_email"]."
  ".$msg["print_emaildest"]."
".$sort_info."
 
"; print "
"; } if ($action_print=="print") { if ($_SESSION["session_history"][$current_print]) { $_SESSION["PRINT"]=$_SESSION["session_history"][$current_print]["NOTI"]; $_SESSION["PRINT"]["short"]=$short; $_SESSION["PRINT"]["ex"]=$ex; $_SESSION["PRINT"]["exnum"]=$exnum; $_SESSION["PRINT"]["output"]=$output; $_SESSION["PRINT"]["emaildest"]=$emaildest; $_SESSION["PRINT"]["pager"]=$pager; $_SESSION["PRINT"]["notice_id"]=$notice_id; $_SESSION["PRINT"]["permalink"]=$permalink; $_SESSION["PRINT"]["header"]=$header; $_SESSION["PRINT"]["notice_tpl"]=$notice_tpl; if ($sort_id) $_SESSION["PRINT"]["sort_id"]=$sort_id; else $_SESSION["PRINT"]["sort_id"]=$_SESSION['tri']; echo ""; } elseif ($notice_id) { $_SESSION["PRINT"]["short"]=$short; $_SESSION["PRINT"]["ex"]=$ex; $_SESSION["PRINT"]["exnum"]=$exnum; $_SESSION["PRINT"]["output"]=$output; $_SESSION["PRINT"]["emaildest"]=$emaildest; $_SESSION["PRINT"]["pager"]=$pager; $_SESSION["PRINT"]["notice_id"]=$notice_id; $_SESSION["PRINT"]["permalink"]=$permalink; $_SESSION["PRINT"]["header"]=$header; $_SESSION["PRINT"]["notice_tpl"]=$notice_tpl; echo ""; } else { echo ""; } } $use_opac_url_base=1; $prefix_url_image=$opac_url_base; $no_aff_doc_num_image=1; if (($action_print=="")&&($_SESSION["PRINT"])) { $environement=$_SESSION["PRINT"]; $limit=''; if($environement["notice_id"]){ $requete="select notice_id from notices where notice_id=".$environement["notice_id"]; } elseif ($environement["TEXT_QUERY"]) { $requete=preg_replace('/limit\s+[0-9]\s*,*\s*[0-9]*\s*$/','',$environement["TEXT_QUERY"],1); } else { switch ($environement["SEARCH_TYPE"]) { case "extended": $sh=new search(); $table=$sh->make_search(); $requete="select notice_id from $table"; break; case "cart": $requete="select object_id as notice_id from caddie_content join notices where caddie_id=".$idcaddie." and object_id=notice_id order by index_sew"; break; } } if ($environement["pager"]) { $start= $nb_per_page_search*($environement["PAGE"]-1); $nbLimit = $nb_per_page_search; $limit="limit ".$start.",$nb_per_page_search"; }else{ $start = 0; $nbLimit = -1; } if ($environement["sort_id"]) { $sort = new sort('notices','base'); $requete = $sort->appliquer_tri($environement["sort_id"] , $requete, "notice_id", $start, $nbLimit); }else{ $requete.=" $limit"; } $resultat=@mysql_query($requete); $pheader = ''.$msg['print_title'].''; $pheader.= ''; $output_final.= $pheader; $date_today = formatdate(today()) ; $output_final.= '

'.$date_today.' '.sprintf($msg["print_n_notices"],mysql_num_rows($resultat)).'

'; $output_final.= '
'; if($_SESSION["PRINT"]["notice_tpl"]) $noti_tpl=new notice_tpl_gen($_SESSION["PRINT"]["notice_tpl"]); while (($r=mysql_fetch_object($resultat))) { if($noti_tpl) { $output_final.=$noti_tpl->build_notice($r->notice_id,$deflt2docs_location); $output_final.="
"; } else{ $n=mysql_fetch_object(@mysql_query("select * from notices where notice_id=".$r->notice_id)); if($n->niveau_biblio != 's' && $n->niveau_biblio != 'a') { $mono=new mono_display($n,$environement["short"],"",$environement["ex"],"","","",0,1,$environement["exnum"]); if ($environement["header"]) $output_final.= ''.$mono->header.'

'; $output_final.= $mono->isbd; } else { $serial = new serial_display($n, $environement["short"], "", "", "", "", "", 0,1,$environement["exnum"] ); if ($environement["header"]) $output_final.= ''.$serial->header.'

'; $output_final.= $serial->isbd; } if($environement["permalink"]) $output_final .= "
".substr($pmb_opac_url."index.php?lvl=notice_display&id=".$r->notice_id,0,80)."
"; $output_final.="
"; } } if ($charset!='utf-8') $output_final=cp1252Toiso88591($output_final); switch($environement['output']) { case 'email': $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=".$charset."\n"; $f_objet_mail = $msg['print_emailobj']." - $biblio_name - $date_today "; $f_message_to_send = $output_final.'

'.mail_bloc_adresse()." "; $emaildest=$_SESSION["PRINT"]["emaildest"]; $res_envoi=mailpmb("", $emaildest, $f_objet_mail, $f_message_to_send, $PMBuserprenom." ".$PMBusernom, $PMBuseremail, $headers, "", $PMBuseremailbcc); if ($res_envoi) { print "$pheader\n

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


".$msg["print_emailclose"]."
" ; } else { print "$pheader\n

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


".$msg["print_emailclose"]."
" ; } break; case 'printer': $output_final.= ''; $output_final.= ''; print pmb_bidi($output_final); break; case 'tt': $output_final.= ''; print pmb_bidi($output_final); break; } $_SESSION["PRINT"]=false; } ?>