#!/usr/bin/perl -Tw
#
-# $Id: signup.cgi,v 1.21 2002-04-16 00:02:26 ivan Exp $
+# $Id: signup.cgi,v 1.23 2002-04-17 12:14:37 ivan Exp $
use strict;
use vars qw( @payby $cgi $locales $packages $pops $init_data $error
$ieak_file = '/usr/local/freeside/ieak.template';
$cck_file = '/usr/local/freeside/cck.template';
-$signup_html = '/usr/local/freeside/signup.html';
-$success_html = '/usr/local/freeside/success.html';
+$signup_html = -e 'signup.html'
+ ? 'signup.html'
+ : '/usr/local/freeside/signup.html';
+$success_html = -e 'success.html'
+ ? 'success.html'
+ : '/usr/local/freeside/success.html';
if ( -e $ieak_file ) {
my $ieak_txt = Text::Template::_load_text($ieak_file)
or die "fatal: invalid email_name got past FS::SignupClient::new_customer";
my $email_name = $1;
- my $pop = pop_info($cgi->param('popnum'))
- or die "fatal: invalid popnum got past FS::SignupClient::new_customer";
- ( $ac, $exch, $loc ) = ( $pop->{'ac'}, $pop->{'exch'}, $pop->{'loc'} );
+ my $pop = pop_info($cgi->param('popnum'));
+ #or die "fatal: invalid popnum got past FS::SignupClient::new_customer";
+ if ( $pop ) {
+ ( $ac, $exch, $loc ) = ( $pop->{'ac'}, $pop->{'exch'}, $pop->{'loc'} );
+ } else {
+ ( $ac, $exch, $loc ) = ( '', '', ''); #presumably you're not using them.
+ }
my $pkg = ( grep { $_->{'pkgpart'} eq $pkgpart } @$packages )[0]->{'pkg'};