summaryrefslogtreecommitdiff
path: root/httemplate/edit/reg_code.cgi
diff options
context:
space:
mode:
authorivan <ivan>2008-01-13 21:35:54 +0000
committerivan <ivan>2008-01-13 21:35:54 +0000
commit0930d22ffc440f80c1b222b2e750cadbabd9e8f6 (patch)
tree59d6738ed4c685cd9bec804e9d3f661f4f37d72c /httemplate/edit/reg_code.cgi
parentf49f11d4c3c4ba9480cc5c9acfaa606a5ba73ad1 (diff)
ACLs
Diffstat (limited to 'httemplate/edit/reg_code.cgi')
-rw-r--r--httemplate/edit/reg_code.cgi29
1 files changed, 15 insertions, 14 deletions
diff --git a/httemplate/edit/reg_code.cgi b/httemplate/edit/reg_code.cgi
index 4ad3905..e57ac09 100644
--- a/httemplate/edit/reg_code.cgi
+++ b/httemplate/edit/reg_code.cgi
@@ -1,16 +1,4 @@
-%
-%my $agentnum = $cgi->param('agentnum');
-%$agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum");
-%$agentnum = $1;
-%my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
-%
-%
-
-
-<% include("/elements/header.html",'Generate registration codes for '. $agent->agent, menubar(
- 'Main Menu' => $p,
- ))
-%>
+<% include('/elements/header.html', 'Generate registration codes for '. $agent->agent) %>
<% include('/elements/error.html') %>
@@ -39,5 +27,18 @@ registration codes for <B><% $agent->agent %></B> allowing the following package
<BR>
<INPUT TYPE="submit" NAME="submit" VALUE="Generate">
-</FORM></BODY></HTML>
+</FORM>
+
+<% include('/elements/footer.html') %>
+
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my $agentnum = $cgi->param('agentnum');
+$agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum");
+$agentnum = $1;
+my $agent = qsearchs('agent', { 'agentnum' => $agentnum } );
+</%init>