http_header('Content-Type' => 'text/plain' );
my $csv = new Text::CSV_XS { 'always_quote' => 1,
- #'eol' => "\015\012", #"\012"
+ 'eol' => "\n", #"\015\012", #"\012"
};
$csv->combine(@$header); #or die $csv->status;
} elsif ( $type =~ /\.xls$/ ) {
#http_header('Content-Type' => 'application/excel' ); #eww
- http_header('Content-Type' => 'application/vnd.ms-excel' ); #alas
+ http_header('Content-Type' => 'application/vnd.ms-excel' );
#http_header('Content-Type' => 'application/msexcel' ); #alas
my $data = '';
} else {
( my $xlsname = $opt{'name'} ) =~ s/\W//g;
$opt{'name'} =~ s/s$// if $total == 1;
+
+ my @menubar = ();
+ if ( $opt{'menubar'} ) {
+ @menubar = @{ $opt{'menubar'} };
+ } else {
+ @menubar = ( 'Main menu' => $p );
+ }
%>
<%= include( '/elements/header.html', $opt{'title'},
- include( '/elements/menubar.html', 'Main menu' => $p )
+ include( '/elements/menubar.html', @menubar )
)
%>
<% my $pager = include ( '/elements/pager.html',
<TABLE>
<TR>
- <TD>
+ <TD VALIGN="bottom">
<%= $total %> total <%= $opt{'name'} %><BR>
<% if ( $opt{'count_addl'} ) { %>
<% my $n=0; foreach my $count ( @{$opt{'count_addl'}} ) { %>
<TD ALIGN="right">
<% $cgi->param('_type', "$xlsname.xls" ); %>
Download full results<BR>
- as <A HREF="<%= $cgi->self_url %>">Excel spreadsheet</A>
- <BR>
+ as <A HREF="<%= $cgi->self_url %>">Excel spreadsheet</A><BR>
<% $cgi->param('_type', 'csv'); %>
as <A HREF="<%= $cgi->self_url %>">CSV file</A>
</TD>
<%= $pager %>
<STYLE TYPE="text/css">
.grid table { border: solid; empty-cells: show }
- .grid TH { padding-left: 1px; padding-right: 1px; border: 1px solid #dddddd; border-bottom: dashed 1px black; border-right: none }
- .grid TD { padding-left: 1px; padding-right: 1px; empty-cells: show; border: 1px solid #cccccc; border-bottom: none; border-right: none }
+ .grid TH { padding-left: 3px; padding-right: 3px; border: 1px solid #dddddd; border-bottom: dashed 1px black; border-right: none }
+ .grid TD { padding-left: 3px; padding-right: 3px; empty-cells: show; border: 1px solid #cccccc; border-bottom: none; border-right: none }
</STYLE>
<TABLE CLASS="grid" CELLSPACING=0 CELLPADDING=0 BORDER=1 BORDERCOLOR="#000000" STYLE="border: solid 1px black; empty-cells: show">
<TR>