X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprepay_credit.cgi;h=f7a1b0801527445ca563834e007c136b96a73712;hb=8d534e61d74e561a15f0863a835cda4af639a9ea;hp=c22904d6cadf9d4725c8eafffb2d4ac18dc22e27;hpb=6194551336a925ae5455cede68a7f73660b06bb6;p=freeside.git diff --git a/httemplate/edit/prepay_credit.cgi b/httemplate/edit/prepay_credit.cgi index c22904d6c..f7a1b0801 100644 --- a/httemplate/edit/prepay_credit.cgi +++ b/httemplate/edit/prepay_credit.cgi @@ -1,52 +1,22 @@ -% -%my $agent = ''; -%my $agentnum = ''; -%if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { -% $agent = qsearchs('agent', { 'agentnum' => $agentnum=$1 } ); -%} -% -%tie my %multiplier, 'Tie::IxHash', -% 1 => 'seconds', -% 60 => 'minutes', -% 3600 => 'hours', -%; -% -%tie my %bytemultiplier, 'Tie::IxHash', -% 1 => 'bytes', -% 1000 => 'Kbytes', -% 1000000 => 'Mbytes', -% 1000000000 => 'Gbytes', -%; -% -%$cgi->param('multiplier', '60') unless $cgi->param('multiplier'); -%$cgi->param('upmultiplier', '1000000') unless $cgi->param('upmultiplier'); -%$cgi->param('downmultiplier', '1000000') unless $cgi->param('downmultiplier'); -%$cgi->param('totalmultiplier','1000000') unless $cgi->param('totalmultiplier'); -% -% - - -<% include("/elements/header.html",'Generate prepaid cards'. ($agent ? ' for '. $agent->agent : ''), - menubar( 'Main Menu' => $p, )) -%> -% if ( $cgi->param('error') ) { - - Error: <% $cgi->param('error') %> -% } +<% include("/elements/header.html",'Generate prepaid cards'. ($agent ? ' for '. $agent->agent : '') ) %> +<% include('/elements/error.html') %>
Generate - + + +prepaid cards of + +  - prepaid cards + +characters each
for +$ and/or - + + + + -
+ + +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $agent = ''; +my $agentnum = ''; +if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { + $agent = qsearchs('agent', { 'agentnum' => $agentnum=$1 } ); +} + +tie my %multiplier, 'Tie::IxHash', + 1 => 'seconds', + 60 => 'minutes', + 3600 => 'hours', +; + +tie my %bytemultiplier, 'Tie::IxHash', + 1 => 'bytes', + 1024 => 'Kbytes', + 1048576 => 'Mbytes', + 1073741824 => 'Gbytes', +; + +$cgi->param('multiplier', '60') unless $cgi->param('multiplier'); +$cgi->param('upmultiplier', '1048576') unless $cgi->param('upmultiplier'); +$cgi->param('downmultiplier', '1048576') unless $cgi->param('downmultiplier'); +$cgi->param('totalmultiplier','1048576') unless $cgi->param('totalmultiplier'); +