3 my $agentnum = $cgi->param('agentnum');
4 $agentnum =~ /^(\d+)$/ or eidiot "illegal agentnum $agentnum";
6 my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
8 my $count_query = "SELECT COUNT(*) FROM reg_code WHERE agentnum = $agentnum";
10 %><%= include( 'elements/search.html',
11 'title' => 'Unused Registration Codes for '.
13 'name' => 'registration codes',
14 'query' => { 'table' => 'reg_code',
15 'hashref' => { 'agentnum' => $agentnum, },
17 'count_query' => $count_query,
19 'header' => [ qw(Code Packages) ],
24 qq!<A HREF="${p}edit/part_pkg.cgi?!. $_->pkgpart. '">'.
25 $_->pkg. ' - '. $_->comment.