X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fprepay_credit.cgi;h=3f0d6ba1d22b9a29dbb8d322783bc5052e52f293;hp=9cf0fc6e1deeff202bcb2a8edb2f7b3c62f5afb1;hb=b71b1576c68bc40ad26592b354feace37a029f0e;hpb=b5fbaadb1cb2893660e460a1d4a3cabe02774de7 diff --git a/httemplate/edit/prepay_credit.cgi b/httemplate/edit/prepay_credit.cgi index 9cf0fc6e1..3f0d6ba1d 100644 --- a/httemplate/edit/prepay_credit.cgi +++ b/httemplate/edit/prepay_credit.cgi @@ -1,56 +1,112 @@ -<% -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') %> -%> +
-<%= header('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 -
for +characters each + +
for + +<& /elements/select-agent.html, + 'empty_label' => '(any agent)', + 'curr_value' => $agentnum, +&> -
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'); +