diff options
author | ivan <ivan> | 2005-03-12 14:31:50 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-03-12 14:31:50 +0000 |
commit | b5fbaadb1cb2893660e460a1d4a3cabe02774de7 (patch) | |
tree | 0f574d67fffe967f98d0bdcac1e69e1fc1fd78c0 /httemplate/edit/prepay_credit.cgi | |
parent | 40c89f3fd0933be14693b918e045bc21d39d6f01 (diff) |
- bring prepaid support into this century (close: Bug#1124)
- finally get rid of fs_signup (everything is in fs_selfservice now) (Bug#413)
- organize main menu sysadmin section so it is slightly less confusing
Diffstat (limited to 'httemplate/edit/prepay_credit.cgi')
-rw-r--r-- | httemplate/edit/prepay_credit.cgi | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/httemplate/edit/prepay_credit.cgi b/httemplate/edit/prepay_credit.cgi new file mode 100644 index 000000000..9cf0fc6e1 --- /dev/null +++ b/httemplate/edit/prepay_credit.cgi @@ -0,0 +1,56 @@ +<% +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', +; + +$cgi->param('multiplier', '60') unless $cgi->param('multiplier'); + +%> + +<%= header('Generate prepaid cards'. ($agent ? ' for '. $agent->agent : ''), + menubar( 'Main Menu' => $p, )) +%> + +<% if ( $cgi->param('error') ) { %> + <FONT SIZE="+1" COLOR="#FF0000">Error: <%= $cgi->param('error') %></FONT> +<% } %> + +<FORM ACTION="<%=popurl(1)%>process/prepay_credit.cgi" METHOD="POST" NAME="OneTrueForm" onSubmit="document.OneTrueForm.submit.disabled=true"> + +Generate +<INPUT TYPE="text" NAME="num" VALUE="<%= $cgi->param('num') || '(quantity)' %>" SIZE=10 MAXLENGTH=10 onFocus="if ( this.value == '(quantity)' ) { this.value = ''; }"> +<SELECT NAME="type"> +<% foreach (qw(alpha alphanumeric numeric)) { %> + <OPTION<%= $cgi->param('type') eq $_ ? ' SELECTED' : '' %>><%= $_ %> +<% } %> +</SELECT> + prepaid cards + +<BR>for <SELECT NAME="agentnum"><OPTION>(any agent) +<% foreach my $opt_agent ( qsearch('agent', { 'disabled' => '' } ) ) { %> + <OPTION VALUE="<%= $opt_agent->agentnum %>"<%= $opt_agent->agentnum == $agentnum ? ' SELECTED' : '' %>><%= $opt_agent->agent %> +<% } %> +</SELECT> + +<BR>Value: +$<INPUT TYPE="text" NAME="amount" SIZE=8 MAXLENGTH=7 VALUE="<%= $cgi->param('amount') %>"> +and/or +<INPUT TYPE="text" NAME="seconds" SIZE=6 MAXLENGTH=5 VALUE="<%= $cgi->param('seconds') %>"> +<SELECT NAME="multiplier"> +<% foreach my $multiplier ( keys %multiplier ) { %> + <OPTION VALUE="<%= $multiplier %>"<%= $cgi->param('multiplier') eq $multiplier ? ' SELECTED' : '' %>><%= $multiplier{$multiplier} %> +<% } %> +</SELECT> +<BR><BR> +<INPUT TYPE="submit" NAME="submit" VALUE="Generate" onSubmit="this.disabled = true"> + +</FORM></BODY></HTML> + |