+my $query = new CGI;
+
+my $type = $query->param('type');
+my $op = $query->param('op') || '';
+my $batch_id = $query->param('batch_id');
+my $ccl_query = $query->param('ccl_query');
+my $startfrom = $query->param('startfrom') || 1;
+my ($template, $loggedinuser, $cookie) = (undef, undef, undef);
+my (
+ $total_hits, $orderby, $results, $total, $error,
+ $marcresults, $idx, $datefrom, $dateto, $ccl_textbox
+);
+my $resultsperpage = C4::Context->preference('numSearchResults') || '20';
+my $show_results = 0;
+my $display_columns = [ {_add => {label => "Add Item", link_field => 1}},
+ {_item_call_number => {label => "Call Number", link_field => 0}},
+ {_date_accessioned => {label => "Accession Date", link_field => 0}},
+ {_barcode => {label => "Barcode", link_field => 0}},
+ {select => {label => "Select", value => "_item_number"}},
+ ];
+
+if ( $op eq "do_search" ) {
+ $idx = $query->param('idx');
+ $ccl_textbox = $query->param('ccl_textbox');
+ if ( $ccl_textbox && $idx ) {
+ $ccl_query = "$idx=$ccl_textbox";
+ }
+
+ $datefrom = $query->param('datefrom');
+ $dateto = $query->param('dateto');