diff options
author | ivan <ivan> | 2007-02-03 11:36:30 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-02-03 11:36:30 +0000 |
commit | 590603ecaea3184f64530755a76626be8205da49 (patch) | |
tree | 0fdb8164cd74bd4cbbd3c2266b8f8bf4cbb7fc00 /httemplate/search/reg_code.html | |
parent | 14e3560b43ca8a747f4210bd784a0315daeb5e9e (diff) |
add customer status column to customer & most other reports. also put the C in ACL in the search/ and graph/ directories.
Diffstat (limited to 'httemplate/search/reg_code.html')
-rw-r--r-- | httemplate/search/reg_code.html | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/httemplate/search/reg_code.html b/httemplate/search/reg_code.html index dc388db2e..87e0fcdd5 100644 --- a/httemplate/search/reg_code.html +++ b/httemplate/search/reg_code.html @@ -1,13 +1,3 @@ -% -% -%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, @@ -35,3 +25,16 @@ ], ) %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +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"; + +<%init> |