summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/reg_code.cgi
diff options
context:
space:
mode:
authorcvs2git <cvs2git>2010-12-27 00:04:45 +0000
committercvs2git <cvs2git>2010-12-27 00:04:45 +0000
commitc82d349f864e6bd9f96fd1156903bc1f7193a203 (patch)
treee117a87533656110b6acd56fc0ca64289892a9f5 /httemplate/edit/process/reg_code.cgi
parent74e058c8a010ef6feb539248a550d0bb169c1e94 (diff)
This commit was manufactured by cvs2svn to create tag 'TORRUS_1_0_9'.TORRUS_1_0_9
Diffstat (limited to 'httemplate/edit/process/reg_code.cgi')
-rw-r--r--httemplate/edit/process/reg_code.cgi45
1 files changed, 0 insertions, 45 deletions
diff --git a/httemplate/edit/process/reg_code.cgi b/httemplate/edit/process/reg_code.cgi
deleted file mode 100644
index 035e10b..0000000
--- a/httemplate/edit/process/reg_code.cgi
+++ /dev/null
@@ -1,45 +0,0 @@
-%unless ( ref($error) ) {
-% $cgi->param('error'. $error );
-<% $cgi->redirect(popurl(3). "edit/reg_code.cgi?". $cgi->query_string ) %>
-% } else {
-
-<% include("/elements/header.html","$num registration codes generated for ". $agent->agent, menubar(
- 'View all agents' => popurl(3). 'browse/agent.cgi',
-) ) %>
-
-<PRE><FONT SIZE="+1">
-% foreach my $code ( @$error ) {
- <% $code %>
-% }
-</FONT></PRE>
-
-<% include('/elements/footer.html') %>
-% }
-<%init>
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-
-$cgi->param('agentnum') =~ /^(\d+)$/
- or errorpage('illegal agentnum '. $cgi->param('agentnum'));
-my $agentnum = $1;
-my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
-
-my $error = '';
-
-my $num = 0;
-if ( $cgi->param('num') =~ /^\s*(\d+)\s*$/ ) {
- $num = $1;
-} else {
- $error = 'Illegal number of codes: '. $cgi->param('num');
-}
-
-my @pkgparts =
- map { /^pkgpart(.*)$/; $1 }
- grep { $cgi->param($_) }
- grep { /^pkgpart/ }
- $cgi->param;
-
-$error ||= $agent->generate_reg_codes($num, \@pkgparts);
-
-</%init>