diff options
author | ivan <ivan> | 2002-04-19 13:17:56 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-04-19 13:17:56 +0000 |
commit | a28e2731a7febc2a96bb11ed4ce165808bd8b8d9 (patch) | |
tree | 178786667b4366c6f704a3635e99906ad8322083 /fs_signup/FS-SignupClient/cgi/signup.cgi | |
parent | 98a73bb080f55f4f5d850102bcec6da2807e3d4f (diff) |
signup server: FS::part_pkg->payby kludge & example template which uses
H:W:SelectLayers
Diffstat (limited to 'fs_signup/FS-SignupClient/cgi/signup.cgi')
-rwxr-xr-x | fs_signup/FS-SignupClient/cgi/signup.cgi | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi index a7118ed2b..839d80421 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.cgi +++ b/fs_signup/FS-SignupClient/cgi/signup.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: signup.cgi,v 1.23 2002-04-17 12:14:37 ivan Exp $ +# $Id: signup.cgi,v 1.24 2002-04-19 13:17:56 ivan Exp $ use strict; use vars qw( @payby $cgi $locales $packages $pops $init_data $error @@ -60,6 +60,7 @@ if ( -e $cck_file ) { $cck_template = ''; } +$agentnum = ''; if ( -e $signup_html ) { my $signup_txt = Text::Template::_load_text($signup_html) or die $Text::Template::ERROR; @@ -70,6 +71,11 @@ if ( -e $signup_html ) { DELIMITERS => [ '<%=', '%>' ] ) or die $Text::Template::ERROR; + if ( $signup_txt =~ + /<\s*INPUT TYPE="?hidden"?\s+NAME="?agentnum"?\s+VALUE="?(\d+)"?\s*>/si + ) { + $agentnum = $1; + } } else { $signup_template = new Text::Template ( TYPE => 'STRING', SOURCE => &signup_default, @@ -96,8 +102,10 @@ if ( -e $success_html ) { or die $Text::Template::ERROR; } + ( $locales, $packages, $pops, $init_data ) = signup_info(); @payby = @{$init_data->{'payby'}} if @{$init_data->{'payby'}}; +$packages = $init_data->{agentnum2part_pkg}{$agentnum} if $agentnum; $cgi = new CGI; @@ -169,7 +177,7 @@ if ( defined $cgi->param('magic') ) { 'sec_phrase' => $sec_phrase = $cgi->param('sec_phrase'), '_password' => $password = $cgi->param('_password'), 'popnum' => $popnum = $cgi->param('popnum'), - 'agentnum' => $agentnum = $cgi->param('agentnum'), + 'agentnum' => $agentnum, # = $cgi->param('agentnum'), } ); } |