7 use C4::Interface::CGI::Output;
8 use C4::Output; # contains gettemplate
14 my $op=$query->param("op");
15 if ($op eq "export") {
16 print $query->header('Content-Type: text/marc');
17 my $start_bib = $query->param("start_bib");
18 my $end_bib = $query->param("end_bib");
19 my $dbh=C4::Context->dbh;
21 if ($start_bib && $end_bib) {
22 $sth=$dbh->prepare("select bibid from marc_biblio where bibid >=? and bibid <=? order by bibid");
23 $sth->execute($start_bib,$end_bib);
25 $sth=$dbh->prepare("select bibid from marc_biblio order by bibid");
28 while (my ($bibid) = $sth->fetchrow) {
29 my $record = MARCgetbiblio($dbh,$bibid);
31 print $record->as_usmarc();
34 my ($template, $loggedinuser, $cookie)
35 = get_template_and_user({template_name => "export/marc.tmpl",
39 flagsrequired => {parameters => 1},
42 output_html_with_http_headers $query, $cookie, $template->output;