use C4::Auth;
use C4::Context;
use C4::Output;
+use C4::Interface::CGI::Output;
use C4::Search;
use C4::Context;
use HTML::Template;
$searchstring=~ s/\'/\\\'/g;
my @data=split(' ',$searchstring);
my $count=@data;
- my $query="Select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where (tagfield > $data[0]) order by tagfield";
+ my $query="Select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where (tagfield >= $data[0]) order by tagfield";
my $sth=$dbh->prepare($query);
$sth->execute;
my @results;
my $input = new CGI;
my $searchfield=$input->param('searchfield');
+$searchfield=0 unless $searchfield;
my $pkfield="tagfield";
my $reqsel="select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where $pkfield='$searchfield'";
my $offset=$input->param('offset');
$template->param(loop => \@loop_data);
if ($offset>0) {
my $prevpage = $offset-$pagesize;
- $template->param(previous => "<a href=$script_name?offset=".$prevpage.'><< Prev</a>');
+ $template->param(previous => "<a href=\"$script_name?offset=".$prevpage.'">');
}
if ($offset+$pagesize<$count) {
my $nextpage =$offset+$pagesize;
- $template->param(next => "<a href=$script_name?offset=".$nextpage.'>Next >></a>');
+ $template->param(next => "<a href=\"$script_name?offset=".$nextpage.'">');
}
} #---- END $OP eq DEFAULT
$template->param(loggeninuser => $loggedinuser);
-print $input->header(-cookie => $cookie), $template->output;
+output_html_with_http_headers $input, $cookie, $template->output;