freeside/httemplate/search reg_code.html,NONE,1.1
ivan
ivan at pouncequick.420.am
Sat Jan 29 04:34:18 PST 2005
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory pouncequick:/tmp/cvs-serv3172/httemplate/search
Added Files:
reg_code.html
Log Message:
registration codes
--- NEW FILE: reg_code.html ---
<%
my $agentnum = $cgi->param('agentnum');
$agentnum =~ /^(\d+)$/ or eidiot "illegal agentnum $agentnum";
$agentnum = $1;
my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
my $count_query = "SELECT COUNT(*) FROM reg_code WHERE agentnum = $agentnum";
%>
<%= include( 'elements/search.html',
'title' => 'Unused Registration Codes for '. $agent->agent,
'name' => 'registration codes',
'query' => { 'table' => 'reg_code',
'hashref' => { 'agentnum' => $agentnum, },
},
'count_query' => $count_query,
#'redirect' => $link,
'header' => [ qw(Code Packages) ],
'fields' => [
'code',
sub { map {
qq!<A HREF="${p}edit/part_pkg.cgi?!. $_->pkgpart. '">'.
$_->pkg. ' - '. $_->comment.
'</A><BR>'
} $_[0]->part_pkg
},
],
'links' => [
'',
#$plink,
'',
],
)
%>
More information about the freeside-commits
mailing list