X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprepay_credit.cgi;h=f7a1b0801527445ca563834e007c136b96a73712;hb=e0a26680d75fc2000bde195eba7946805a3aaa28;hp=c32c04d16b5ca55800aa9c1abca6fcdcbf787ead;hpb=4ff01614d071303790ccb7dbf18eccbc01e33caa;p=freeside.git diff --git a/httemplate/edit/prepay_credit.cgi b/httemplate/edit/prepay_credit.cgi index c32c04d16..f7a1b0801 100644 --- a/httemplate/edit/prepay_credit.cgi +++ b/httemplate/edit/prepay_credit.cgi @@ -1,46 +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, )) -%> +<% 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'); +