From 3ce7691203a7737406bf2d4442f7fd84b81f847e Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 23 Aug 2006 22:25:39 +0000 Subject: Will things ever be the same again? It's the final masonize --- httemplate/search/reg_code.html | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'httemplate/search/reg_code.html') diff --git a/httemplate/search/reg_code.html b/httemplate/search/reg_code.html index 52a99ff66..dc388db2e 100644 --- a/httemplate/search/reg_code.html +++ b/httemplate/search/reg_code.html @@ -1,13 +1,14 @@ -<% - -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', +% +% +%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', -- cgit v1.2.1 From 590603ecaea3184f64530755a76626be8205da49 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 3 Feb 2007 11:36:30 +0000 Subject: add customer status column to customer & most other reports. also put the C in ACL in the search/ and graph/ directories. --- httemplate/search/reg_code.html | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'httemplate/search/reg_code.html') 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> -- cgit v1.2.1