# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id$
use strict;
require Exporter;
my $dbh=C4::Context->dbh;
my $marcflavour = C4::Context->preference("marcflavour");
+my ($template, $loggedinuser, $cookie)
+ = get_template_and_user
+ (
+ {
+ template_name => "tools/export.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {tools => 1},
+ debug => 1,
+ }
+ );
+
if ($op eq "export") {
+ binmode(STDOUT,":utf8");
print $query->header( -type => 'application/octet-stream',
- -attachment=>$filename);
-
+ -charset => 'utf-8',
+ -attachment=>$filename);
+
my $StartingBiblionumber = $query->param("StartingBiblionumber");
my $EndingBiblionumber = $query->param("EndingBiblionumber");
my $output_format = $query->param("output_format");
print $record->as_xml_record($marcflavour);
}
else {
- print $record->as_formatted;
+ print $record->as_usmarc();
}
}
exit;
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {tools => 1},
+ flagsrequired => {tools => 'export_catalog'},
debug => 1,
}
);
-
$template->param(
branchloop => \@branchloop,
itemtypeloop => \@itemtypesloop