2 %my $agentnum = $cgi->param('agentnum');
3 %$agentnum =~ /^(\d+)$/ or eidiot "illegal agentnum $agentnum";
5 %my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
10 <% include("/elements/header.html",'Generate registration codes for '. $agent->agent, menubar(
14 % if ( $cgi->param('error') ) {
16 <FONT SIZE="+1" COLOR="#FF0000">Error: <% $cgi->param('error') %></FONT>
20 <FORM ACTION="<%popurl(1)%>process/reg_code.cgi" METHOD="POST" NAME="OneTrueForm" onSubmit="document.OneTrueForm.submit.disabled=true">
21 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">
24 <INPUT TYPE="text" NAME="num" VALUE="<% $cgi->param('num') %>" SIZE=5 MAXLENGTH=4>
25 registration codes for <B><% $agent->agent %></B> allowing the following packages:
27 % foreach my $part_pkg ( qsearch('part_pkg', { 'disabled' => '' } ) ) {
29 <INPUT TYPE="checkbox" NAME="pkgpart<% $part_pkg->pkgpart %>">
30 <% $part_pkg->pkg %> - <% $part_pkg->comment %>
36 <INPUT TYPE="submit" NAME="submit" VALUE="Generate">