-if ( $op eq "do_search" ) {
- my @marclist = $query->param('marclist');
- my @and_or = $query->param('and_or');
- my @excluding = $query->param('excluding');
- my @operator = $query->param('operator');
- my @value = $query->param('value');
-
- $resultsperpage = $query->param('resultsperpage');
- $resultsperpage = 19 if ( !defined $resultsperpage );
- my $orderby = $query->param('orderby');
-
- # builds tag and subfield arrays
- my @tags;
-
- my ( $results, $total ) ;
- #catalogsearch( $dbh, \@tags, \@and_or, \@excluding, \@operator, \@value,
- # $startfrom * $resultsperpage,
- # $resultsperpage, $orderby );
-
-#use Data::Dumper;
- my $searchquery=$marclist[0];
- my ($error, $marcresults) = SimpleSearch($searchquery);
- my $hits = scalar @$marcresults;
- my @results;
-
- for(my $i=0;$i<$hits;$i++) {
- my %resultsloop;
- my $marcrecord = MARC::File::USMARC::decode($marcresults->[$i]);
- my $biblio = TransformMarcToKoha(C4::Context->dbh,$marcrecord,'');
- #build the hash for the template.
- %resultsloop=%$biblio;
- $resultsloop{highlight} = ($i % 2)?(1):(0);
- #warn $resultsloop{biblionumber};
- push @results, \%resultsloop;
- }
- my @results2;
- my $i;
- for ( $i = 0 ; $i <= ( $hits - 1 ) ; $i++ ) {
- my $itemnums = get_itemnumbers_of($results[$i]->{'biblionumber'});
-
- my $iii = $itemnums->{$results[$i]->{'biblionumber'} } ;
- my $item_results;
- if ($iii ) {
- $item_results = &GetItemInfosOf( @$iii );
+ if ($datefrom) {
+ $datefrom = eval { dt_from_string ( $datefrom ) };
+ if ($datefrom) {
+ $datefrom = output_pref( { dt => $datefrom, dateonly => 1, dateformat => 'iso' } );
+ $ccl_query .= ' and ' if $ccl_textbox;
+ $ccl_query .= "acqdate,ge,st-date-normalized=" . $datefrom;