summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorjeff <jeff>2006-12-07 02:40:32 +0000
committerjeff <jeff>2006-12-07 02:40:32 +0000
commit6194551336a925ae5455cede68a7f73660b06bb6 (patch)
tree54be12685fdfcc4b3da1ccfca8a42bff1a2b128c /httemplate/edit
parent571d5e87ffc63a155072dab88fba16d5918cc57d (diff)
retouch bandwidth countdown
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/prepay_credit.cgi12
-rw-r--r--httemplate/edit/process/prepay_credit.cgi2
2 files changed, 14 insertions, 0 deletions
diff --git a/httemplate/edit/prepay_credit.cgi b/httemplate/edit/prepay_credit.cgi
index 7ce44c087..c22904d6c 100644
--- a/httemplate/edit/prepay_credit.cgi
+++ b/httemplate/edit/prepay_credit.cgi
@@ -21,6 +21,7 @@
%$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');
%
%
@@ -91,6 +92,17 @@ $<INPUT TYPE="text" NAME="amount" SIZE=8 MAXLENGTH=7 VALUE="<% $cgi->param('amou
</SELECT> download
</TD></TR>
+<TR><TD></TD>
+<TD>and/or
+<INPUT TYPE="text" NAME="totalbytes" SIZE=6 MAXLENGTH=5 VALUE="<% $cgi->param('totalbytes') %>">
+<SELECT NAME="totalmultiplier">
+% foreach my $multiplier ( keys %bytemultiplier ) {
+
+ <OPTION VALUE="<% $multiplier %>"<% $cgi->param('totalmultiplier') eq $multiplier ? ' SELECTED' : '' %>><% $bytemultiplier{$multiplier} %>
+% }
+
+</SELECT> total transfer
+</TD></TR>
</TABLE>
<BR><BR>
<INPUT TYPE="submit" NAME="submit" VALUE="Generate" onSubmit="this.disabled = true">
diff --git a/httemplate/edit/process/prepay_credit.cgi b/httemplate/edit/process/prepay_credit.cgi
index ba4296900..6bf46bf7c 100644
--- a/httemplate/edit/process/prepay_credit.cgi
+++ b/httemplate/edit/process/prepay_credit.cgi
@@ -19,6 +19,7 @@
%$hashref->{seconds} = $cgi->param('seconds') * $cgi->param('multiplier');
%$hashref->{upbytes} = $cgi->param('upbytes') * $cgi->param('upmultiplier');
%$hashref->{downbytes} = $cgi->param('downbytes') * $cgi->param('downmultiplier');
+%$hashref->{totalbytes} = $cgi->param('totalbytes') * $cgi->param('totalmultiplier');
%
%$error ||= FS::prepay_credit::generate( $num,
% scalar($cgi->param('type')),
@@ -50,6 +51,7 @@
<% $hashref->{seconds} ? duration_exact($hashref->{seconds}) : '' %>
<% $hashref->{upbytes} ? FS::UI::Web::bytecount_unexact($hashref->{upbytes}) : '' %>
<% $hashref->{downbytes} ? FS::UI::Web::bytecount_unexact($hashref->{downbytes}) : '' %>
+ <% $hashref->{totalbytes} ? FS::UI::Web::bytecount_unexact($hashref->{totalbytes}) : '' %>
<br>
% }