time/data/etc. unit pricing add-ons, RT#24392
[freeside.git] / httemplate / search / searchbar.cgi
1 <%init>
2 my %searches = (
3   'customers' => 'cust_main.cgi?search_cust=',
4   'prospects' => 'prospect_main.html?search_prospect=',
5   'invoices'  => 'cust_bill.html?invnum=',
6   'services'  => 'cust_svc.html?search_svc=',
7 );
8 if ( FS::Conf->new->config('ticket_system') ) {
9   $searches{'tickets'} = FS::TicketSystem->baseurl . 'index.html?q=';
10 }
11
12 $cgi->param('search_for') =~ /^(\w+)$/;
13 my $search = $searches{$1} or die "unknown search type: '$1'\n";
14 my $q = $cgi->param('q'); # pass through unparsed
15 </%init>
16 <% $cgi->redirect($search . $q) %>