[freeside-commits] freeside/httemplate/edit prepay_credit.cgi, 1.3,
1.4
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Nov 29 18:27:58 PST 2006
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv12489/httemplate/edit
Modified Files:
prepay_credit.cgi
Log Message:
prepaid download/upload tracking
Index: prepay_credit.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/prepay_credit.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- prepay_credit.cgi 23 Aug 2006 22:25:37 -0000 1.3
+++ prepay_credit.cgi 30 Nov 2006 02:27:56 -0000 1.4
@@ -11,7 +11,16 @@
% 3600 => 'hours',
%;
%
-%$cgi->param('multiplier', '60') unless $cgi->param('multiplier');
+%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');
%
%
@@ -46,9 +55,11 @@
</SELECT>
-<BR>Value:
+<TABLE>
+<TR><TD>Value:
$<INPUT TYPE="text" NAME="amount" SIZE=8 MAXLENGTH=7 VALUE="<% $cgi->param('amount') %>">
-and/or
+</TD>
+<TD>and/or
<INPUT TYPE="text" NAME="seconds" SIZE=6 MAXLENGTH=5 VALUE="<% $cgi->param('seconds') %>">
<SELECT NAME="multiplier">
% foreach my $multiplier ( keys %multiplier ) {
@@ -57,6 +68,30 @@
% }
</SELECT>
+</TD></TR>
+<TR><TD></TD>
+<TD>and/or
+<INPUT TYPE="text" NAME="upbytes" SIZE=6 MAXLENGTH=5 VALUE="<% $cgi->param('upbytes') %>">
+<SELECT NAME="upmultiplier">
+% foreach my $multiplier ( keys %bytemultiplier ) {
+
+ <OPTION VALUE="<% $multiplier %>"<% $cgi->param('upmultiplier') eq $multiplier ? ' SELECTED' : '' %>><% $bytemultiplier{$multiplier} %>
+% }
+
+</SELECT> upload
+</TD></TR>
+<TR><TD></TD>
+<TD>and/or
+<INPUT TYPE="text" NAME="downbytes" SIZE=6 MAXLENGTH=5 VALUE="<% $cgi->param('downbytes') %>">
+<SELECT NAME="downmultiplier">
+% foreach my $multiplier ( keys %bytemultiplier ) {
+
+ <OPTION VALUE="<% $multiplier %>"<% $cgi->param('downmultiplier') eq $multiplier ? ' SELECTED' : '' %>><% $bytemultiplier{$multiplier} %>
+% }
+
+</SELECT> download
+</TD></TR>
+</TABLE>
<BR><BR>
<INPUT TYPE="submit" NAME="submit" VALUE="Generate" onSubmit="this.disabled = true">
More information about the freeside-commits
mailing list