X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprepay_credit.cgi;h=f7a1b0801527445ca563834e007c136b96a73712;hp=253edb94b84ac5f8f7efafd460647ae8b059120d;hb=37591b61f8ad6fc5c5acb2fd8f520d2dbe4f1539;hpb=c1bb4ddb71147d0571bd301a6d8c452fdf0e1bc9 diff --git a/httemplate/edit/prepay_credit.cgi b/httemplate/edit/prepay_credit.cgi index 253edb94b..f7a1b0801 100644 --- a/httemplate/edit/prepay_credit.cgi +++ b/httemplate/edit/prepay_credit.cgi @@ -1,56 +1,113 @@ -<% -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', -; +<% include("/elements/header.html",'Generate prepaid cards'. ($agent ? ' for '. $agent->agent : '') ) %> -$cgi->param('multiplier', '60') unless $cgi->param('multiplier'); +<% include('/elements/error.html') %> -%> +
-<%= include("/elements/header.html",'Generate prepaid cards'. ($agent ? ' for '. $agent->agent : ''), - menubar( 'Main Menu' => $p, )) -%> - -<% if ( $cgi->param('error') ) { %> - Error: <%= $cgi->param('error') %> -<% } %> +Generate + - +prepaid cards of -Generate - +  - prepaid cards + +characters each
for -
Value: -$ -and/or - + + + + + + + + + +
Value: +$ +and/or + +
and/or + + upload +
and/or + + download +
and/or + + total transfer +


-
+ + +<% 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'); +