diff options
Diffstat (limited to 'fs_selfservice')
88 files changed, 0 insertions, 7427 deletions
diff --git a/fs_selfservice/DEPLOY b/fs_selfservice/DEPLOY deleted file mode 100755 index c93ed0fea..000000000 --- a/fs_selfservice/DEPLOY +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -#this is a quick hack for my dev machine. do not use it. -# see the "make install-selfservice" and "make update-selfservice" makefile -# targets to properly install this stuff. - -#kill `cat /var/run/freeside-selfservice-server.fs_selfservice.pid` - -cd FS-SelfService -perl Makefile.PL && make && make install -cd .. - -( cd ..; make deploy; cd fs_selfservice ) - -#cp /home/ivan/freeside/fs_selfservice/FS-SelfService/cgi/* /var/www/MyAccount -#chown freeside /var/www/MyAccount/*.cgi -#chmod 755 /var/www/MyAccount/*.cgi -#ln -s /var/www/MyAccount/selfservice.cgi /var/www/MyAccount/index.cgi || true - - #cp /home/ivan/freeside/fs_signup/FS-SignupClient/cgi/* /var/www/signup/ - ##mv /var/www/signup/signup-snarf.html /var/www/signup/signup.html #!!!!! - ##mv /var/www/signup/signup-billaddress.html /var/www/signup/signup.html #!!!!! - ##mv /var/www/signup/signup-freeoption.html /var/www/signup/signup.html #!!!!! - #chown freeside /var/www/signup/signup.cgi - #chmod 755 /var/www/signup/signup.cgi - #ln -s /var/www/signup/signup.cgi /var/www/signup/index.cgi || true - - -chmod 755 /var/www/selfservice/*.cgi diff --git a/fs_selfservice/FS-SelfService/Changes b/fs_selfservice/FS-SelfService/Changes deleted file mode 100644 index b9e26b7dc..000000000 --- a/fs_selfservice/FS-SelfService/Changes +++ /dev/null @@ -1,6 +0,0 @@ -Revision history for Perl extension FS::SelfService. - -0.01 Tue May 28 16:49:41 2002 - - original version; created by h2xs 1.21 with options - -A -X -n FS::SelfService - diff --git a/fs_selfservice/FS-SelfService/MANIFEST b/fs_selfservice/FS-SelfService/MANIFEST deleted file mode 100644 index a619b2b6c..000000000 --- a/fs_selfservice/FS-SelfService/MANIFEST +++ /dev/null @@ -1,8 +0,0 @@ -Changes -Makefile.PL -MANIFEST -SelfService.pm -SelfService/XMLRPC.pm -test.pl -freeside-selfservice-clientd -freeside-selfservice-xmlrpc-server diff --git a/fs_selfservice/FS-SelfService/Makefile.PL b/fs_selfservice/FS-SelfService/Makefile.PL deleted file mode 100644 index c078f0865..000000000 --- a/fs_selfservice/FS-SelfService/Makefile.PL +++ /dev/null @@ -1,20 +0,0 @@ -use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. -WriteMakefile( - 'NAME' => 'FS::SelfService', - 'VERSION_FROM' => 'SelfService.pm', # finds $VERSION - 'EXE_FILES' => [ 'freeside-selfservice-clientd', - 'freeside-selfservice-xmlrpc-server', - ], - 'INSTALLSCRIPT' => '/usr/local/sbin', - 'INSTALLSITEBIN' => '/usr/local/sbin', - 'INSTALLSITESCRIPT' => '/usr/local/sbin', #recent deb users this... - 'PERM_RWX' => '750', - 'PREREQ_PM' => { - 'Storable' => 2.09, - }, # e.g., Module::Name => 1.1 - ($] >= 5.005 ? ## Add these new keywords supported since 5.005 - (ABSTRACT_FROM => 'SelfService.pm', # retrieve abstract from module - AUTHOR => 'Ivan Kohler <ivan-freeside-selfservice@420.am>') : ()), -); diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm deleted file mode 100644 index ec4668fe8..000000000 --- a/fs_selfservice/FS-SelfService/SelfService.pm +++ /dev/null @@ -1,1467 +0,0 @@ -package FS::SelfService; - -use strict; -use vars qw($VERSION @ISA @EXPORT_OK $DEBUG $dir $socket %autoload $tag); -use Exporter; -use Socket; -use FileHandle; -#use IO::Handle; -use IO::Select; -use Storable 2.09 qw(nstore_fd fd_retrieve); - -$VERSION = '0.03'; - -@ISA = qw( Exporter ); - -$DEBUG = 0; - -$dir = "/usr/local/freeside"; -$socket = "$dir/selfservice_socket"; -$socket .= '.'.$tag if defined $tag && length($tag); - -#maybe should ask ClientAPI for this list -%autoload = ( - 'passwd' => 'passwd/passwd', - 'chfn' => 'passwd/passwd', - 'chsh' => 'passwd/passwd', - 'login' => 'MyAccount/login', - 'logout' => 'MyAccount/logout', - 'customer_info' => 'MyAccount/customer_info', - 'edit_info' => 'MyAccount/edit_info', #add to ss cgi! - 'invoice' => 'MyAccount/invoice', - 'invoice_logo' => 'MyAccount/invoice_logo', - 'list_invoices' => 'MyAccount/list_invoices', #? - 'cancel' => 'MyAccount/cancel', #add to ss cgi! - 'payment_info' => 'MyAccount/payment_info', - 'process_payment' => 'MyAccount/process_payment', - 'process_payment_order_pkg' => 'MyAccount/process_payment_order_pkg', - 'process_prepay' => 'MyAccount/process_prepay', - 'list_pkgs' => 'MyAccount/list_pkgs', #add to ss (added?) - 'list_svcs' => 'MyAccount/list_svcs', #add to ss (added?) - 'list_svc_usage' => 'MyAccount/list_svc_usage', - 'list_support_usage' => 'MyAccount/list_support_usage', - 'order_pkg' => 'MyAccount/order_pkg', #add to ss cgi! - 'change_pkg' => 'MyAccount/change_pkg', - 'order_recharge' => 'MyAccount/order_recharge', - 'cancel_pkg' => 'MyAccount/cancel_pkg', #add to ss cgi! - 'charge' => 'MyAccount/charge', #? - 'part_svc_info' => 'MyAccount/part_svc_info', - 'provision_acct' => 'MyAccount/provision_acct', - 'provision_external' => 'MyAccount/provision_external', - 'unprovision_svc' => 'MyAccount/unprovision_svc', - 'myaccount_passwd' => 'MyAccount/myaccount_passwd', - 'signup_info' => 'Signup/signup_info', - 'domain_select_hash' => 'Signup/domain_select_hash', # expose? - 'new_customer' => 'Signup/new_customer', - 'agent_login' => 'Agent/agent_login', - 'agent_logout' => 'Agent/agent_logout', - 'agent_info' => 'Agent/agent_info', - 'agent_list_customers' => 'Agent/agent_list_customers', -); -@EXPORT_OK = ( keys(%autoload), qw( regionselector expselect popselector domainselector) ); - -$ENV{'PATH'} ='/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -my $freeside_uid = scalar(getpwnam('freeside')); -die "not running as the freeside user\n" if $> != $freeside_uid; - --e $dir or die "FATAL: $dir doesn't exist!"; --d $dir or die "FATAL: $dir isn't a directory!"; --r $dir or die "FATAL: Can't read $dir as freeside user!"; --x $dir or die "FATAL: $dir not searchable (executable) as freeside user!"; - -foreach my $autoload ( keys %autoload ) { - - my $eval = - "sub $autoload { ". ' - my $param; - if ( ref($_[0]) ) { - $param = shift; - } else { - #warn scalar(@_). ": ". join(" / ", @_); - $param = { @_ }; - } - - $param->{_packet} = \''. $autoload{$autoload}. '\'; - - simple_packet($param); - }'; - - eval $eval; - die $@ if $@; - -} - -sub simple_packet { - my $packet = shift; - warn "sending ". $packet->{_packet}. " to server" - if $DEBUG; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($socket)) or die "connect to $socket: $!"; - nstore_fd($packet, \*SOCK) or die "can't send packet: $!"; - SOCK->flush; - - #shoudl trap: Magic number checking on storable file failed at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/fd_retrieve.al) line 337, at /usr/local/share/perl/5.6.1/FS/SelfService.pm line 71 - - #block until there is a message on socket -# my $w = new IO::Select; -# $w->add(\*SOCK); -# my @wait = $w->can_read; - - warn "reading message from server" - if $DEBUG; - - my $return = fd_retrieve(\*SOCK) or die "error reading result: $!"; - die $return->{'_error'} if defined $return->{_error} && $return->{_error}; - - warn "returning message to client" - if $DEBUG; - - $return; -} - -=head1 NAME - -FS::SelfService - Freeside self-service API - -=head1 SYNOPSIS - - # password and shell account changes - use FS::SelfService qw(passwd chfn chsh); - - # "my account" functionality - use FS::SelfService qw( login customer_info invoice cancel payment_info process_payment ); - - my $rv = login( { 'username' => $username, - 'domain' => $domain, - 'password' => $password, - } - ); - - if ( $rv->{'error'} ) { - #handle login error... - } else { - #successful login - my $session_id = $rv->{'session_id'}; - } - - my $customer_info = customer_info( { 'session_id' => $session_id } ); - - #payment_info and process_payment are available in 1.5+ only - my $payment_info = payment_info( { 'session_id' => $session_id } ); - - #!!! process_payment example - - #!!! list_pkgs example - - #!!! order_pkg example - - #!!! cancel_pkg example - - # signup functionality - use FS::SelfService qw( signup_info new_customer ); - - my $signup_info = signup_info; - - $rv = new_customer( { - 'first' => $first, - 'last' => $last, - 'company' => $company, - 'address1' => $address1, - 'address2' => $address2, - 'city' => $city, - 'state' => $state, - 'zip' => $zip, - 'country' => $country, - 'daytime' => $daytime, - 'night' => $night, - 'fax' => $fax, - 'payby' => $payby, - 'payinfo' => $payinfo, - 'paycvv' => $paycvv, - 'paystart_month' => $paystart_month - 'paystart_year' => $paystart_year, - 'payissue' => $payissue, - 'payip' => $payip - 'paydate' => $paydate, - 'payname' => $payname, - 'invoicing_list' => $invoicing_list, - 'referral_custnum' => $referral_custnum, - 'pkgpart' => $pkgpart, - 'username' => $username, - '_password' => $password, - 'popnum' => $popnum, - 'agentnum' => $agentnum, - } - ); - - my $error = $rv->{'error'}; - if ( $error eq '_decline' ) { - print_decline(); - } elsif ( $error ) { - reprint_signup(); - } else { - print_success(); - } - -=head1 DESCRIPTION - -Use this API to implement your own client "self-service" module. - -If you just want to customize the look of the existing "self-service" module, -see XXXX instead. - -=head1 PASSWORD, GECOS, SHELL CHANGING FUNCTIONS - -=over 4 - -=item passwd - -=item chfn - -=item chsh - -=back - -=head1 "MY ACCOUNT" FUNCTIONS - -=over 4 - -=item login HASHREF - -Creates a user session. Takes a hash reference as parameter with the -following keys: - -=over 4 - -=item username - -Username - -=item domain - -Domain - -=item password - -Password - -=back - -Returns a hash reference with the following keys: - -=over 4 - -=item error - -Empty on success, or an error message on errors. - -=item session_id - -Session identifier for successful logins - -=back - -=item customer_info HASHREF - -Returns general customer information. - -Takes a hash reference as parameter with a single key: B<session_id> - -Returns a hash reference with the following keys: - -=over 4 - -=item name - -Customer name - -=item balance - -Balance owed - -=item open - -Array reference of hash references of open inoices. Each hash reference has -the following keys: invnum, date, owed - -=item small_custview - -An HTML fragment containing shipping and billing addresses. - -=item The following fields are also returned - -first last company address1 address2 city county state zip country daytime night fax ship_first ship_last ship_company ship_address1 ship_address2 ship_city ship_state ship_zip ship_country ship_daytime ship_night ship_fax payby payinfo payname month year invoicing_list postal_invoicing - -=back - -=item edit_info HASHREF - -Takes a hash reference as parameter with any of the following keys: - -first last company address1 address2 city county state zip country daytime night fax ship_first ship_last ship_company ship_address1 ship_address2 ship_city ship_state ship_zip ship_country ship_daytime ship_night ship_fax payby payinfo paycvv payname month year invoicing_list postal_invoicing - -If a field exists, the customer record is updated with the new value of that -field. If a field does not exist, that field is not changed on the customer -record. - -Returns a hash reference with a single key, B<error>, empty on success, or an -error message on errors - -=item invoice HASHREF - -Returns an invoice. Takes a hash reference as parameter with two keys: -session_id and invnum - -Returns a hash reference with the following keys: - -=over 4 - -=item error - -Empty on success, or an error message on errors - -=item invnum - -Invoice number - -=item invoice_text - -Invoice text - -=back - -=item list_invoices HASHREF - -Returns a list of all customer invoices. Takes a hash references with a single -key, session_id. - -Returns a hash reference with the following keys: - -=over 4 - -=item error - -Empty on success, or an error message on errors - -=item invoices - -Reference to array of hash references with the following keys: - -=over 4 - -=item invnum - -Invoice ID - -=item _date - -Invoice date, in UNIX epoch time - -=back - -=back - -=item cancel HASHREF - -Cancels this customer. - -Takes a hash reference as parameter with a single key: B<session_id> - -Returns a hash reference with a single key, B<error>, which is empty on -success or an error message on errors. - -=item payment_info HASHREF - -Returns information that may be useful in displaying a payment page. - -Takes a hash reference as parameter with a single key: B<session_id>. - -Returns a hash reference with the following keys: - -=over 4 - -=item error - -Empty on success, or an error message on errors - -=item balance - -Balance owed - -=item payname - -Exact name on credit card (CARD/DCRD) - -=item address1 - -Address line one - -=item address2 - -Address line two - -=item city - -City - -=item state - -State - -=item zip - -Zip or postal code - -=item payby - -Customer's current default payment type. - -=item card_type - -For CARD/DCRD payment types, the card type (Visa card, MasterCard, Discover card, American Express card, etc.) - -=item payinfo - -For CARD/DCRD payment types, the card number - -=item month - -For CARD/DCRD payment types, expiration month - -=item year - -For CARD/DCRD payment types, expiration year - -=item cust_main_county - -County/state/country data - array reference of hash references, each of which has the fields of a cust_main_county record (see L<FS::cust_main_county>). Note these are not FS::cust_main_county objects, but hash references of columns and values. - -=item states - -Array reference of all states in the current default country. - -=item card_types - -Hash reference of card types; keys are card types, values are the exact strings -passed to the process_payment function - -=item paybatch - -Unique transaction identifier (prevents multiple charges), passed to the -process_payment function - -=back - -=item process_payment HASHREF - -Processes a payment and possible change of address or payment type. Takes a -hash reference as parameter with the following keys: - -=over 4 - -=item session_id - -Session identifier - -=item amount - -Amount - -=item save - -If true, address and card information entered will be saved for subsequent -transactions. - -=item auto - -If true, future credit card payments will be done automatically (sets payby to -CARD). If false, future credit card payments will be done on-demand (sets -payby to DCRD). This option only has meaning if B<save> is set true. - -=item payname - -Name on card - -=item address1 - -Address line one - -=item address2 - -Address line two - -=item city - -City - -=item state - -State - -=item zip - -Zip or postal code - -=item payinfo - -Card number - -=item month - -Card expiration month - -=item year - -Card expiration year - -=item paybatch - -Unique transaction identifier, returned from the payment_info function. -Prevents multiple charges. - -=back - -Returns a hash reference with a single key, B<error>, empty on success, or an -error message on errors - -=item list_pkgs - -Returns package information for this customer. For more detail on services, -see L</list_svcs>. - -Takes a hash reference as parameter with a single key: B<session_id> - -Returns a hash reference containing customer package information. The hash reference contains the following keys: - -=over 4 - -=item custnum - -Customer number - -=item cust_pkg HASHREF - -Array reference of hash references, each of which has the fields of a cust_pkg -record (see L<FS::cust_pkg>) as well as the fields below. Note these are not -the internal FS:: objects, but hash references of columns and values. - -=over 4 - -=item part_pkg fields - -All fields of part_pkg for this specific cust_pkg (be careful with this -information - it may reveal more about your available packages than you would -like users to know in aggregate) - -=cut - -#XXX pare part_pkg fields down to a more secure subset - -=item part_svc - -An array of hash references indicating information on unprovisioned services -available for provisioning for this specific cust_pkg. Each has the following -keys: - -=over 4 - -=item part_svc fields - -All fields of part_svc (be careful with this information - it may reveal more -about your available packages than you would like users to know in aggregate) - -=cut - -#XXX pare part_svc fields down to a more secure subset - -=back - -=item cust_svc - -An array of hash references indicating information on the customer services -already provisioned for this specific cust_pkg. Each has the following keys: - -=over 4 - -=item label - -Array reference with three elements: - -=over 4 - -=item Name of this service - -=item Meaningful user-specific identifier for the service (i.e. username, domain or mail alias) - -=item Table name of this service - -=back - -=item svcnum - -Primary key for this service - -=item svcpart - -Service definition (part_pkg) - -=item pkgnum - -Customer package (cust_pkg) - -=item overlimit - -Blank if the service is not over limit, or the date the service exceeded its usage limit (as a UNIX timestamp). - -=back - -=back - -=item error - -Empty on success, or an error message on errors. - -=back - -=item list_svcs - -Returns service information for this customer. - -Takes a hash reference as parameter with a single key: B<session_id> - -Returns a hash reference containing customer package information. The hash reference contains the following keys: - -=over 4 - -=item custnum - -Customer number - -=item svcs - -An array of hash references indicating information on all of this customer's -services. Each has the following keys: - -=over 4 - -=item svcnum - -Primary key for this service - -=item label - -Name of this service - -=item value - -Meaningful user-specific identifier for the service (i.e. username, domain, or -mail alias). - -=back - -Account (svc_acct) services also have the following keys: - -=item username - -Username - -=item email - -username@domain - -=item seconds - -Seconds remaining - -=item upbytes - -Upload bytes remaining - -=item downbytes - -Download bytes remaining - -=item totalbytes - -Total bytes remaining - -=item recharge_amount - -Cost of a recharge - -=item recharge_seconds - -Number of seconds gained by recharge - -=item recharge_upbytes - -Number of upload bytes gained by recharge - -=item recharge_downbytes - -Number of download bytes gained by recharge - -=item recharge_totalbytes - -Number of total bytes gained by recharge - -=back - -=back - -=item order_pkg - -Orders a package for this customer. - -Takes a hash reference as parameter with the following keys: - -=over 4 - -=item session_id - -Session identifier - -=item pkgpart - -pkgpart of package to order - -=item svcpart - -optional svcpart, required only if the package definition does not contain -one svc_acct service definition with quantity 1 (it may contain others with -quantity >1) - -=item username - -Username - -=item _password - -Password - -=item sec_phrase - -Optional security phrase - -=item popnum - -Optional Access number number - -=back - -Returns a hash reference with a single key, B<error>, empty on success, or an -error message on errors. The special error '_decline' is returned for -declined transactions. - -=item cancel_pkg - -Cancels a package for this customer. - -Takes a hash reference as parameter with the following keys: - -=over 4 - -=item session_id - -Session identifier - -=item pkgpart - -pkgpart of package to cancel - -=back - -Returns a hash reference with a single key, B<error>, empty on success, or an -error message on errors. - -=back - -=head1 SIGNUP FUNCTIONS - -=over 4 - -=item signup_info HASHREF - -Takes a hash reference as parameter with the following keys: - -=over 4 - -=item session_id - Optional agent/reseller interface session - -=back - -Returns a hash reference containing information that may be useful in -displaying a signup page. The hash reference contains the following keys: - -=over 4 - -=item cust_main_county - -County/state/country data - array reference of hash references, each of which has the fields of a cust_main_county record (see L<FS::cust_main_county>). Note these are not FS::cust_main_county objects, but hash references of columns and values. - -=item part_pkg - -Available packages - array reference of hash references, each of which has the fields of a part_pkg record (see L<FS::part_pkg>). Each hash reference also has an additional 'payby' field containing an array reference of acceptable payment types specific to this package (see below and L<FS::part_pkg/payby>). Note these are not FS::part_pkg objects, but hash references of columns and values. Requires the 'signup_server-default_agentnum' configuration value to be set, or -an agentnum specified explicitly via reseller interface session_id in the -options. - -=item agent - -Array reference of hash references, each of which has the fields of an agent record (see L<FS::agent>). Note these are not FS::agent objects, but hash references of columns and values. - -=item agentnum2part_pkg - -Hash reference; keys are agentnums, values are array references of available packages for that agent, in the same format as the part_pkg arrayref above. - -=item svc_acct_pop - -Access numbers - array reference of hash references, each of which has the fields of an svc_acct_pop record (see L<FS::svc_acct_pop>). Note these are not FS::svc_acct_pop objects, but hash references of columns and values. - -=item security_phrase - -True if the "security_phrase" feature is enabled - -=item payby - -Array reference of acceptable payment types for signup - -=over 4 - -=item CARD - -credit card - automatic - -=item DCRD - -credit card - on-demand - version 1.5+ only - -=item CHEK - -electronic check - automatic - -=item DCHK - -electronic check - on-demand - version 1.5+ only - -=item LECB - -Phone bill billing - -=item BILL - -billing, not recommended for signups - -=item COMP - -free, definitely not recommended for signups - -=item PREPAY - -special billing type: applies a credit (see FS::prepay_credit) and sets billing type to BILL - -=back - -=item cvv_enabled - -True if CVV features are available (1.5+ or 1.4.2 with CVV schema patch) - -=item msgcat - -Hash reference of message catalog values, to support error message customization. Currently available keys are: passwords_dont_match, invalid_card, unknown_card_type, and not_a (as in "Not a Discover card"). Values are configured in the web interface under "View/Edit message catalog". - -=item statedefault - -Default state - -=item countrydefault - -Default country - -=back - -=item new_customer HASHREF - -Creates a new customer. Takes a hash reference as parameter with the -following keys: - -=over 4 - -=item first - -first name (required) - -=item last - -last name (required) - -=item ss - -(not typically collected; mostly used for ACH transactions) - -=item company - -Company name - -=item address1 (required) - -Address line one - -=item address2 - -Address line two - -=item city (required) - -City - -=item county - -County - -=item state (required) - -State - -=item zip (required) - -Zip or postal code - -=item daytime - -Daytime phone number - -=item night - -Evening phone number - -=item fax - -Fax number - -=item payby - -CARD, DCRD, CHEK, DCHK, LECB, BILL, COMP or PREPAY (see L</signup_info> (required) - -=item payinfo - -Card number for CARD/DCRD, account_number@aba_number for CHEK/DCHK, prepaid "pin" for PREPAY, purchase order number for BILL - -=item paycvv - -Credit card CVV2 number (1.5+ or 1.4.2 with CVV schema patch) - -=item paydate - -Expiration date for CARD/DCRD - -=item payname - -Exact name on credit card for CARD/DCRD, bank name for CHEK/DCHK - -=item invoicing_list - -comma-separated list of email addresses for email invoices. The special value 'POST' is used to designate postal invoicing (it may be specified alone or in addition to email addresses), - -=item referral_custnum - -referring customer number - -=item pkgpart - -pkgpart of initial package - -=item username - -Username - -=item _password - -Password - -=item sec_phrase - -Security phrase - -=item popnum - -Access number (index, not the literal number) - -=item agentnum - -Agent number - -=back - -Returns a hash reference with the following keys: - -=over 4 - -=item error - -Empty on success, or an error message on errors. The special error '_decline' is returned for declined transactions; other error messages should be suitable for display to the user (and are customizable in under Configuration | View/Edit message catalog) - -=back - -=item regionselector HASHREF | LIST - -Takes as input a hashref or list of key/value pairs with the following keys: - -=over 4 - -=item selected_county - -Currently selected county - -=item selected_state - -Currently selected state - -=item selected_country - -Currently selected country - -=item prefix - -Specify a unique prefix string if you intend to use the HTML output multiple time son one page. - -=item onchange - -Specify a javascript subroutine to call on changes - -=item default_state - -Default state - -=item default_country - -Default country - -=item locales - -An arrayref of hash references specifying regions. Normally you can just pass the value of the I<cust_main_county> field returned by B<signup_info>. - -=back - -Returns a list consisting of three HTML fragments for county selection, -state selection and country selection, respectively. - -=cut - -#false laziness w/FS::cust_main_county (this is currently the "newest" version) -sub regionselector { - my $param; - if ( ref($_[0]) ) { - $param = shift; - } else { - $param = { @_ }; - } - $param->{'selected_country'} ||= $param->{'default_country'}; - $param->{'selected_state'} ||= $param->{'default_state'}; - - my $prefix = exists($param->{'prefix'}) ? $param->{'prefix'} : ''; - - my $countyflag = 0; - - my %cust_main_county; - -# unless ( @cust_main_county ) { #cache - #@cust_main_county = qsearch('cust_main_county', {} ); - #foreach my $c ( @cust_main_county ) { - foreach my $c ( @{ $param->{'locales'} } ) { - #$countyflag=1 if $c->county; - $countyflag=1 if $c->{county}; - #push @{$cust_main_county{$c->country}{$c->state}}, $c->county; - #$cust_main_county{$c->country}{$c->state}{$c->county} = 1; - $cust_main_county{$c->{country}}{$c->{state}}{$c->{county}} = 1; - } -# } - $countyflag=1 if $param->{selected_county}; - - my $script_html = <<END; - <SCRIPT> - function opt(what,value,text) { - var optionName = new Option(text, value, false, false); - var length = what.length; - what.options[length] = optionName; - } - function ${prefix}country_changed(what) { - country = what.options[what.selectedIndex].text; - for ( var i = what.form.${prefix}state.length; i >= 0; i-- ) - what.form.${prefix}state.options[i] = null; -END - #what.form.${prefix}state.options[0] = new Option('', '', false, true); - - foreach my $country ( sort keys %cust_main_county ) { - $script_html .= "\nif ( country == \"$country\" ) {\n"; - foreach my $state ( sort keys %{$cust_main_county{$country}} ) { - my $text = $state || '(n/a)'; - $script_html .= qq!opt(what.form.${prefix}state, "$state", "$text");\n!; - } - $script_html .= "}\n"; - } - - $script_html .= <<END; - } - function ${prefix}state_changed(what) { -END - - if ( $countyflag ) { - $script_html .= <<END; - state = what.options[what.selectedIndex].text; - country = what.form.${prefix}country.options[what.form.${prefix}country.selectedIndex].text; - for ( var i = what.form.${prefix}county.length; i >= 0; i-- ) - what.form.${prefix}county.options[i] = null; -END - - foreach my $country ( sort keys %cust_main_county ) { - $script_html .= "\nif ( country == \"$country\" ) {\n"; - foreach my $state ( sort keys %{$cust_main_county{$country}} ) { - $script_html .= "\nif ( state == \"$state\" ) {\n"; - #foreach my $county ( sort @{$cust_main_county{$country}{$state}} ) { - foreach my $county ( sort keys %{$cust_main_county{$country}{$state}} ) { - my $text = $county || '(n/a)'; - $script_html .= - qq!opt(what.form.${prefix}county, "$county", "$text");\n!; - } - $script_html .= "}\n"; - } - $script_html .= "}\n"; - } - } - - $script_html .= <<END; - } - </SCRIPT> -END - - my $county_html = $script_html; - if ( $countyflag ) { - $county_html .= qq!<SELECT NAME="${prefix}county" onChange="$param->{'onchange'}">!; - $county_html .= '</SELECT>'; - } else { - $county_html .= - qq!<INPUT TYPE="hidden" NAME="${prefix}county" VALUE="$param->{'selected_county'}">!; - } - - my $state_html = qq!<SELECT NAME="${prefix}state" !. - qq!onChange="${prefix}state_changed(this); $param->{'onchange'}">!; - foreach my $state ( sort keys %{ $cust_main_county{$param->{'selected_country'}} } ) { - my $text = $state || '(n/a)'; - my $selected = $state eq $param->{'selected_state'} ? 'SELECTED' : ''; - $state_html .= "\n<OPTION $selected VALUE=$state>$text</OPTION>" - } - $state_html .= '</SELECT>'; - - $state_html .= '</SELECT>'; - - my $country_html = qq!<SELECT NAME="${prefix}country" !. - qq!onChange="${prefix}country_changed(this); $param->{'onchange'}">!; - my $countrydefault = $param->{default_country} || 'US'; - foreach my $country ( - sort { ($b eq $countrydefault) <=> ($a eq $countrydefault) or $a cmp $b } - keys %cust_main_county - ) { - my $selected = $country eq $param->{'selected_country'} ? ' SELECTED' : ''; - $country_html .= "\n<OPTION$selected>$country</OPTION>" - } - $country_html .= '</SELECT>'; - - ($county_html, $state_html, $country_html); - -} - -#=item expselect HASHREF | LIST -# -#Takes as input a hashref or list of key/value pairs with the following keys: -# -#=over 4 -# -#=item prefix - Specify a unique prefix string if you intend to use the HTML output multiple time son one page. -# -#=item date - current date, in yyyy-mm-dd or m-d-yyyy format -# -#=back - -=item expselect PREFIX [ DATE ] - -Takes as input a unique prefix string and the current expiration date, in -yyyy-mm-dd or m-d-yyyy format - -Returns an HTML fragments for expiration date selection. - -=cut - -sub expselect { - #my $param; - #if ( ref($_[0]) ) { - # $param = shift; - #} else { - # $param = { @_ }; - #my $prefix = $param->{'prefix'}; - #my $prefix = exists($param->{'prefix'}) ? $param->{'prefix'} : ''; - #my $date = exists($param->{'date'}) ? $param->{'date'} : ''; - my $prefix = shift; - my $date = scalar(@_) ? shift : ''; - - my( $m, $y ) = ( 0, 0 ); - if ( $date =~ /^(\d{4})-(\d{2})-\d{2}$/ ) { #PostgreSQL date format - ( $m, $y ) = ( $2, $1 ); - } elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) { - ( $m, $y ) = ( $1, $3 ); - } - my $return = qq!<SELECT NAME="$prefix!. qq!_month" SIZE="1">!; - for ( 1 .. 12 ) { - $return .= qq!<OPTION VALUE="$_"!; - $return .= " SELECTED" if $_ == $m; - $return .= ">$_"; - } - $return .= qq!</SELECT>/<SELECT NAME="$prefix!. qq!_year" SIZE="1">!; - my @t = localtime; - my $thisYear = $t[5] + 1900; - for ( ($thisYear > $y && $y > 0 ? $y : $thisYear) .. ($thisYear+10) ) { - $return .= qq!<OPTION VALUE="$_"!; - $return .= " SELECTED" if $_ == $y; - $return .= ">$_"; - } - $return .= "</SELECT>"; - - $return; -} - -=item popselector HASHREF | LIST - -Takes as input a hashref or list of key/value pairs with the following keys: - -=over 4 - -=item popnum - -Access number number - -=item pops - -An arrayref of hash references specifying access numbers. Normally you can just pass the value of the I<svc_acct_pop> field returned by B<signup_info>. - -=back - -Returns an HTML fragment for access number selection. - -=cut - -#horrible false laziness with FS/FS/svc_acct_pop.pm::popselector -sub popselector { - my $param; - if ( ref($_[0]) ) { - $param = shift; - } else { - $param = { @_ }; - } - my $popnum = $param->{'popnum'}; - my $pops = $param->{'pops'}; - - return '<INPUT TYPE="hidden" NAME="popnum" VALUE="">' unless @$pops; - return $pops->[0]{city}. ', '. $pops->[0]{state}. - ' ('. $pops->[0]{ac}. ')/'. $pops->[0]{exch}. '-'. $pops->[0]{loc}. - '<INPUT TYPE="hidden" NAME="popnum" VALUE="'. $pops->[0]{popnum}. '">' - if scalar(@$pops) == 1; - - my %pop = (); - my %popnum2pop = (); - foreach (@$pops) { - push @{ $pop{ $_->{state} }->{ $_->{ac} } }, $_; - $popnum2pop{$_->{popnum}} = $_; - } - - my $text = <<END; - <SCRIPT> - function opt(what,href,text) { - var optionName = new Option(text, href, false, false) - var length = what.length; - what.options[length] = optionName; - } -END - - my $init_popstate = $param->{'init_popstate'}; - if ( $init_popstate ) { - $text .= '<INPUT TYPE="hidden" NAME="init_popstate" VALUE="'. - $init_popstate. '">'; - } else { - $text .= <<END; - function acstate_changed(what) { - state = what.options[what.selectedIndex].text; - what.form.popac.options.length = 0 - what.form.popac.options[0] = new Option("Area code", "-1", false, true); -END - } - - my @states = $init_popstate ? ( $init_popstate ) : keys %pop; - foreach my $state ( sort { $a cmp $b } @states ) { - $text .= "\nif ( state == \"$state\" ) {\n" unless $init_popstate; - - foreach my $ac ( sort { $a cmp $b } keys %{ $pop{$state} }) { - $text .= "opt(what.form.popac, \"$ac\", \"$ac\");\n"; - if ($ac eq $param->{'popac'}) { - $text .= "what.form.popac.options[what.form.popac.length-1].selected = true;\n"; - } - } - $text .= "}\n" unless $init_popstate; - } - $text .= "popac_changed(what.form.popac)}\n"; - - $text .= <<END; - function popac_changed(what) { - ac = what.options[what.selectedIndex].text; - what.form.popnum.options.length = 0; - what.form.popnum.options[0] = new Option("City", "-1", false, true); - -END - - foreach my $state ( @states ) { - foreach my $popac ( keys %{ $pop{$state} } ) { - $text .= "\nif ( ac == \"$popac\" ) {\n"; - - foreach my $pop ( @{$pop{$state}->{$popac}}) { - my $o_popnum = $pop->{popnum}; - my $poptext = $pop->{city}. ', '. $pop->{state}. - ' ('. $pop->{ac}. ')/'. $pop->{exch}. '-'. $pop->{loc}; - - $text .= "opt(what.form.popnum, \"$o_popnum\", \"$poptext\");\n"; - if ($popnum == $o_popnum) { - $text .= "what.form.popnum.options[what.form.popnum.length-1].selected = true;\n"; - } - } - $text .= "}\n"; - } - } - - - $text .= "}\n</SCRIPT>\n"; - - $text .= - qq!<TABLE CELLPADDING="0"><TR><TD><SELECT NAME="acstate"! . - qq!SIZE=1 onChange="acstate_changed(this)"><OPTION VALUE=-1>State!; - $text .= "<OPTION" . ($_ eq $param->{'acstate'} ? " SELECTED" : "") . - ">$_" foreach sort { $a cmp $b } @states; - $text .= '</SELECT>'; #callback? return 3 html pieces? #'</TD>'; - - $text .= - qq!<SELECT NAME="popac" SIZE=1 onChange="popac_changed(this)">!. - qq!<OPTION>Area code</SELECT></TR><TR VALIGN="top">!; - - $text .= qq!<TR><TD><SELECT NAME="popnum" SIZE=1 STYLE="width: 20em"><OPTION>City!; - - - #comment this block to disable initial list polulation - my @initial_select = (); - if ( scalar( @$pops ) > 100 ) { - push @initial_select, $popnum2pop{$popnum} if $popnum2pop{$popnum}; - } else { - @initial_select = @$pops; - } - foreach my $pop ( sort { $a->{state} cmp $b->{state} } @initial_select ) { - $text .= qq!<OPTION VALUE="!. $pop->{popnum}. '"'. - ( ( $popnum && $pop->{popnum} == $popnum ) ? ' SELECTED' : '' ). ">". - $pop->{city}. ', '. $pop->{state}. - ' ('. $pop->{ac}. ')/'. $pop->{exch}. '-'. $pop->{loc}; - } - - $text .= qq!</SELECT></TD></TR></TABLE>!; - - $text; - -} - -=item domainselector HASHREF | LIST - -Takes as input a hashref or list of key/value pairs with the following keys: - -=over 4 - -=item pkgnum - -Package number - -=item domsvc - -Service number of the selected item. - -=back - -Returns an HTML fragment for domain selection. - -=cut - -sub domainselector { - my $param; - if ( ref($_[0]) ) { - $param = shift; - } else { - $param = { @_ }; - } - my $domsvc= $param->{'domsvc'}; - my $rv = - domain_select_hash(map {$_ => $param->{$_}} qw(pkgnum svcpart pkgpart) ); - my $domains = $rv->{'domains'}; - $domsvc = $rv->{'domsvc'} unless $domsvc; - - return '<INPUT TYPE="hidden" NAME="domsvc" VALUE="">' - unless scalar(keys %$domains); - - if (scalar(keys %$domains) == 1) { - my $key; - foreach(keys %$domains) { - $key = $_; - } - return '<TR><TD ALIGN="right">Domain</TD><TD>'. $domains->{$key}. - '<INPUT TYPE="hidden" NAME="domsvc" VALUE="'. $key. '"></TD></TR>' - } - - my $text .= qq!<TR><TD ALIGN="right">Domain</TD><TD><SELECT NAME="domsvc" SIZE=1 STYLE="width: 20em"><OPTION>(Choose Domain)!; - - - foreach my $domain ( sort { $domains->{$a} cmp $domains->{$b} } keys %$domains ) { - $text .= qq!<OPTION VALUE="!. $domain. '"'. - ( ( $domsvc && $domain == $domsvc ) ? ' SELECTED' : '' ). ">". - $domains->{$domain}; - } - - $text .= qq!</SELECT></TD></TR>!; - - $text; - -} - -=back - -=head1 RESELLER FUNCTIONS - -Note: Resellers can also use the B<signup_info> and B<new_customer> functions -with their active session, and the B<customer_info> and B<order_pkg> functions -with their active session and an additional I<custnum> parameter. - -=over 4 - -=item agent_login - -=item agent_info - -=item agent_list_customers - -=back - -=head1 BUGS - -=head1 SEE ALSO - -L<freeside-selfservice-clientd>, L<freeside-selfservice-server> - -=cut - -1; - diff --git a/fs_selfservice/FS-SelfService/SelfService/XMLRPC.pm b/fs_selfservice/FS-SelfService/SelfService/XMLRPC.pm deleted file mode 100644 index 4e0d3e909..000000000 --- a/fs_selfservice/FS-SelfService/SelfService/XMLRPC.pm +++ /dev/null @@ -1,88 +0,0 @@ -package FS::SelfService::XMLRPC; - -=head1 NAME - -FS::SelfService::XMLRPC - Freeside XMLRPC accessible self-service API - -=head1 SYNOPSIS - -=head1 DESCRIPTION - -Use this API to implement your own client "self-service" module vi XMLRPC. - -Each routine described in L<FS::SelfService> is available vi XMLRPC as the -method FS.SelfService.XMLRPC.B<method>. All values are passed to the -selfservice-server in a struct of strings. The return values are in a -struct as strings, arrays, or structs as appropriate for the values -described in L<FS::SelfService>. - -=head1 BUGS - -=head1 SEE ALSO - -L<freeside-selfservice-clientd>, L<freeside-selfservice-server>,L<FS::SelfService> - -=cut - -use strict; -use vars qw($DEBUG $AUTOLOAD); -use FS::SelfService; - -$DEBUG = 0; -$FS::SelfService::DEBUG = $DEBUG; - -sub AUTOLOAD { - my $call = $AUTOLOAD; - $call =~ s/^FS::SelfService::XMLRPC:://; - if (exists($FS::SelfService::autoload{$call})) { - shift; #discard package name; - $call = "FS::SelfService::$call"; - no strict 'refs'; - &{$call}(@_); - }else{ - die "No such procedure: $call"; - } -} - -package SOAP::Transport::HTTP::Daemon; # yuck - -use POSIX qw(:sys_wait_h); - -no warnings 'redefine'; - -sub handle { - my $self = shift->new; - - local $SIG{CHLD} = 'IGNORE'; - -ACCEPT: - while (my $c = $self->accept) { - - my $kid = 0; - do { - $kid = waitpid(-1, WNOHANG); - warn "found kid $kid"; - } while $kid > 0; - - my $pid = fork; - next ACCEPT if $pid; - - if ( not defined $pid ) { - warn "fork() failed: $!"; - $c = undef; - } else { - while (my $r = $c->get_request) { - $self->request($r); - $self->SUPER::handle; - $c->send_response($self->response); - } - # replaced ->close, thanks to Sean Meisner <Sean.Meisner@VerizonWireless.com> - # shutdown() doesn't work on AIX. close() is used in this case. Thanks to Jos Clijmans <jos.clijmans@recyfin.be> - UNIVERSAL::isa($c, 'shutdown') ? $c->shutdown(2) : $c->close(); - $c->close; - } - exit; - } -} - -1; diff --git a/fs_selfservice/FS-SelfService/cgi/ach_payment_results.html b/fs_selfservice/FS-SelfService/cgi/ach_payment_results.html deleted file mode 100644 index 9fe400faf..000000000 --- a/fs_selfservice/FS-SelfService/cgi/ach_payment_results.html +++ /dev/null @@ -1,16 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<FONT SIZE=4>Payment results</FONT><BR><BR> -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error processing your payment: $error</FONT>!; -} else { - $OUT .= 'Your payment was processed successfully. Thank you.'; -} %> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/agent.cgi b/fs_selfservice/FS-SelfService/cgi/agent.cgi deleted file mode 100644 index 6e8de619a..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent.cgi +++ /dev/null @@ -1,458 +0,0 @@ -#!/usr/bin/perl -T -#!/usr/bin/perl -Tw - -#some false laziness w/selfservice.cgi - -use strict; -use vars qw($DEBUG $me $cgi $session_id $form_max $template_dir); -use subs qw(do_template); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use Business::CreditCard; -use Text::Template; -#use HTML::Entities; -use FS::SelfService qw( agent_login agent_logout agent_info - agent_list_customers - signup_info new_customer - customer_info list_pkgs order_pkg - part_svc_info provision_acct provision_external - unprovision_svc - ); - -$DEBUG = 0; -$me = 'agent.cgi:'; - -$template_dir = '.'; - -$form_max = 255; - -warn "$me starting\n" if $DEBUG; - -warn "$me initializing CGI\n" if $DEBUG; -$cgi = new CGI; - -unless ( defined $cgi->param('session') ) { - warn "$me no session defined, sending login page\n" if $DEBUG; - do_template('agent_login',{}); - exit; -} - -if ( $cgi->param('session') eq 'login' ) { - - warn "$me processing login\n" if $DEBUG; - - $cgi->param('username') =~ /^\s*([a-z0-9_\-\.\&]{0,$form_max})\s*$/i - or die "illegal username"; - my $username = $1; - - $cgi->param('password') =~ /^(.{0,$form_max})$/ - or die "illegal password"; - my $password = $1; - - my $rv = agent_login( - 'username' => $username, - 'password' => $password, - ); - if ( $rv->{error} ) { - do_template('agent_login', { - 'error' => $rv->{error}, - 'username' => $username, - } ); - exit; - } else { - $cgi->param('session' => $rv->{session_id} ); - $cgi->param('action' => 'agent_main' ); - } -} - -$session_id = $cgi->param('session'); - -warn "$me checking action\n" if $DEBUG; -$cgi->param('action') =~ - /^(agent_main|signup|process_signup|list_customers|view_customer|agent_provision|provision_svc|process_svc_acct|process_svc_external|delete_svc|agent_order_pkg|process_order_pkg|logout)$/ - or die "unknown action ". $cgi->param('action'); -my $action = $1; - -warn "$me running $action\n" if $DEBUG; -my $result = eval "&$action();"; -die $@ if $@; - -if ( $result->{error} eq "Can't resume session" ) { #ick - do_template('agent_login',{}); - exit; -} - -warn "$me processing template $action\n" if $DEBUG; -do_template($action, { - 'session_id' => $session_id, - %{$result} -}); -warn "$me done processing template $action\n" if $DEBUG; - -#-- - -sub logout { - $action = 'agent_logout'; - agent_logout( 'session_id' => $session_id ); -} - -sub agent_main { agent_info( 'session_id' => $session_id ); } - -sub signup { signup_info( 'session_id' => $session_id ); } - -sub process_signup { - - my $init_data = signup_info( 'session_id' => $session_id ); - if ( $init_data->{'error'} ) { - if ( $init_data->{'error'} eq "Can't resume session" ) { #ick - do_template('agent_login',{}); - exit; - } else { #? - die $init_data->{'error'}; - } - } - - my $error = ''; - - #false laziness w/signup.cgi, identical except for agentnum vs session_id - my $payby = $cgi->param('payby'); - if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) { - #$payinfo = join('@', map { $cgi->param( $payby. "_payinfo$_" ) } (1,2) ); - $cgi->param('payinfo' => $cgi->param($payby. '_payinfo1'). '@'. - $cgi->param($payby. '_payinfo2') - ); - } else { - $cgi->param('payinfo' => $cgi->param( $payby. '_payinfo' ) ); - } - $cgi->param('paydate' => $cgi->param( $payby. '_month' ). '-'. - $cgi->param( $payby. '_year' ) - ); - $cgi->param('payname' => $cgi->param( $payby. '_payname' ) ); - $cgi->param('paycvv' => defined $cgi->param( $payby. '_paycvv' ) - ? $cgi->param( $payby. '_paycvv' ) - : '' - ); - - if ( $cgi->param('invoicing_list') ) { - $cgi->param('invoicing_list' => $cgi->param('invoicing_list'). ', POST') - if $cgi->param('invoicing_list_POST'); - } else { - $cgi->param('invoicing_list' => 'POST' ); - } - - if ( $cgi->param('_password') ne $cgi->param('_password2') ) { - $error = $init_data->{msgcat}{passwords_dont_match}; #msgcat - $cgi->param('_password', ''); - $cgi->param('_password2', ''); - } - - if ( $payby =~ /^(CARD|DCRD)$/ && $cgi->param('CARD_type') ) { - my $payinfo = $cgi->param('payinfo'); - $payinfo =~ s/\D//g; - - $payinfo =~ /^(\d{13,16})$/ - or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - $payinfo = $1; - validate($payinfo) - or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - cardtype($payinfo) eq $cgi->param('CARD_type') - or $error ||= $init_data->{msgcat}{not_a}. $cgi->param('CARD_type'); - } - - unless ( $error ) { - my $rv = new_customer ( { - 'session_id' => $session_id, - map { $_ => scalar($cgi->param($_)) } - qw( last first ss company - address1 address2 city county state zip country - daytime night fax - - ship_last ship_first ship_company - ship_address1 ship_address2 ship_city ship_county ship_state - ship_zip ship_country - ship_daytime ship_night ship_fax - - payby payinfo paycvv paydate payname invoicing_list - referral_custnum promo_code reg_code - pkgpart username sec_phrase _password popnum refnum - ), - grep { /^snarf_/ } $cgi->param - } ); - $error = $rv->{'error'}; - } - #eslaf - - if ( $error ) { - $action = 'signup'; - my $r = { - $cgi->Vars, - %{$init_data}, - 'error' => $error, - }; - #warn join('\n', map "$_ => $r->{$_}", keys %$r )."\n"; - $r; - } else { - $action = 'agent_main'; - my $agent_info = agent_info( 'session_id' => $session_id ); - $agent_info->{'message'} = 'Signup successful'; - $agent_info; - } - -} - -sub list_customers { - - my $results = - agent_list_customers( 'session_id' => $session_id, - map { $_ => $cgi->param($_) } - grep defined($cgi->param($_)), - qw(prospect active susp cancel), - 'search', - ); - - if ( scalar( @{$results->{'customers'}} ) == 1 ) { - $action = 'view_customer'; - customer_info ( - 'agent_session_id' => $session_id, - 'custnum' => $results->{'customers'}[0]{'custnum'}, - ); - } else { - $results; - } - -} - -sub view_customer { - - #my $init_data = signup_info( 'session_id' => $session_id ); - #if ( $init_data->{'error'} ) { - # if ( $init_data->{'error'} eq "Can't resume session" ) { #ick - # do_template('agent_login',{}); - # exit; - # } else { #? - # die $init_data->{'error'}; - # } - #} - # - #my $customer_info = - customer_info ( - 'agent_session_id' => $session_id, - 'custnum' => $cgi->param('custnum'), - ); - # - #return { - # ( map { $_ => $init_data->{$_} } - # qw( part_pkg security_phrase svc_acct_pop ), - # ), - # %$customer_info, - #}; -} - -sub agent_order_pkg { - - my $init_data = signup_info( 'session_id' => $session_id ); - if ( $init_data->{'error'} ) { - if ( $init_data->{'error'} eq "Can't resume session" ) { #ick - do_template('agent_login',{}); - exit; - } else { #? - die $init_data->{'error'}; - } - } - - my $customer_info = customer_info ( - 'agent_session_id' => $session_id, - 'custnum' => $cgi->param('custnum'), - ); - - return { - ( map { $_ => $init_data->{$_} } - qw( part_pkg security_phrase svc_acct_pop ), - ), - %$customer_info, - }; - -} - -sub agent_provision { - my $result = list_pkgs( - 'agent_session_id' => $session_id, - 'custnum' => $cgi->param('custnum'), - ); - die $result->{'error'} if exists $result->{'error'} && $result->{'error'}; - $result; -} - -sub provision_svc { - - my $result = part_svc_info( - 'agent_session_id' => $session_id, - map { $_ => $cgi->param($_) } qw( pkgnum svcpart custnum ), - ); - die $result->{'error'} if exists $result->{'error'} && $result->{'error'}; - - $result->{'svcdb'} =~ /^svc_(.*)$/ - #or return { 'error' => 'Unknown svcdb '. $result->{'svcdb'} }; - or die 'Unknown svcdb '. $result->{'svcdb'}; - $action .= "_$1"; - $action = "agent_$action"; - - $result; -} - -sub process_svc_acct { - - my $result = provision_acct ( - 'agent_session_id' => $session_id, - map { $_ => $cgi->param($_) } qw( - custnum pkgnum svcpart username _password _password2 sec_phrase popnum ) - ); - - if ( exists $result->{'error'} && $result->{'error'} ) { - #warn "$result $result->{'error'}"; - $action = 'provision_svc_acct'; - $action = "agent_$action"; - return { - $cgi->Vars, - %{ part_svc_info( 'agent_session_id' => $session_id, - map { $_ => $cgi->param($_) } qw(pkgnum svcpart custnum) - ) - }, - 'error' => $result->{'error'}, - }; - } else { - #warn "$result $result->{'error'}"; - $action = 'agent_provision'; - return { - %{agent_provision()}, - 'message' => $result->{'svc'}. ' setup successfully.', - }; - } - -} - -sub process_svc_external { - - my $result = provision_external ( - 'agent_session_id' => $session_id, - map { $_ => $cgi->param($_) } qw( custnum pkgnum svcpart ) - ); - - #warn "$result $result->{'error'}"; - $action = 'agent_provision'; - return { - %{agent_provision()}, - 'message' => $result->{'error'} - ? '<FONT COLOR="#FF0000">'. $result->{'error'}. '</FONT>' - : $result->{'svc'}. ' setup successfully'. - ': serial number '. - sprintf('%010d', $result->{'id'}). '-'. $result->{'title'} - }; - -} - -sub delete_svc { - my $result = unprovision_svc( - 'agent_session_id' => $session_id, - 'custnum' => $cgi->param('custnum'), - 'svcnum' => $cgi->param('svcnum'), - ); - - $action = 'agent_provision'; - - return { - %{agent_provision()}, - 'message' => $result->{'error'} - ? '<FONT COLOR="#FF0000">'. $result->{'error'}. '</FONT>' - : $result->{'svc'}. ' removed.' - }; - -} - -sub process_order_pkg { - - my $results = ''; - - unless ( length($cgi->param('_password')) ) { - my $init_data = signup_info( 'session_id' => $session_id ); - #die $init_data->{'error'} if $init_data->{'error'}; - $results = { 'error' => $init_data->{msgcat}{empty_password} }; - } - if ( $cgi->param('_password') ne $cgi->param('_password2') ) { - my $init_data = signup_info( 'session_id' => $session_id ); - $results = { 'error' => $init_data->{msgcat}{passwords_dont_match} }; - $cgi->param('_password', ''); - $cgi->param('_password2', ''); - } - - $results ||= order_pkg ( - 'agent_session_id' => $session_id, - map { $_ => $cgi->param($_) } - qw( custnum pkgpart username _password _password2 sec_phrase popnum ) - ); - - if ( $results->{'error'} ) { - $action = 'agent_order_pkg'; - return { - $cgi->Vars, - %{agent_order_pkg()}, - #'message' => '<FONT COLOR="#FF0000">'. $results->{'error'}. '</FONT>', - 'error' => '<FONT COLOR="#FF0000">'. $results->{'error'}. '</FONT>', - }; - } else { - $action = 'view_customer'; - #$cgi->delete( grep { $_ ne 'custnum' } $cgi->param ); - return { - %{view_customer()}, - 'message' => 'Package order successful.', - }; - } - -} - -#-- - -sub do_template { - my $name = shift; - my $fill_in = shift; - #warn join(' / ', map { "$_=>".$fill_in->{$_} } keys %$fill_in). "\n"; - - $cgi->delete_all(); - $fill_in->{'selfurl'} = $cgi->self_url; #OLD - $fill_in->{'self_url'} = $cgi->self_url; - $fill_in->{'cgi'} = \$cgi; - - my $template = new Text::Template( TYPE => 'FILE', - SOURCE => "$template_dir/$name.html", - DELIMITERS => [ '<%=', '%>' ], - UNTAINT => 1, ) - or die $Text::Template::ERROR; - - local $^W = 0; - print $cgi->header( '-expires' => 'now' ), - $template->fill_in( PACKAGE => 'FS::SelfService::_agentcgi', - HASH => $fill_in - ); -} - -package FS::SelfService::_agentcgi; - -use HTML::Entities; -use FS::SelfService qw(regionselector expselect popselector); - -#false laziness w/selfservice.cgi -sub include { - my $name = shift; - my $template = new Text::Template( TYPE => 'FILE', - SOURCE => "$main::template_dir/$name.html", - DELIMITERS => [ '<%=', '%>' ], - UNTAINT => 1, - ) - or die $Text::Template::ERROR; - - $template->fill_in( PACKAGE => 'FS::SelfService::_agentcgi', - #HASH => $fill_in - ); - -} - diff --git a/fs_selfservice/FS-SelfService/cgi/agent_customer_menu.html b/fs_selfservice/FS-SelfService/cgi/agent_customer_menu.html deleted file mode 100644 index 603fc0bd2..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent_customer_menu.html +++ /dev/null @@ -1,7 +0,0 @@ -<%= $url = "$selfurl?session=$session_id;custnum=$custnum;action="; ''; %> -<TD VALIGN="top" HEIGHT=384 BGCOLOR="#dddddd"> -<A HREF="<%= $url %>agent_provision">Setup services</A><BR><BR> -<A HREF="<%= $url %>agent_order_pkg">Purchase additional package</A><BR><BR> - -</TD> - diff --git a/fs_selfservice/FS-SelfService/cgi/agent_delete_svc.html b/fs_selfservice/FS-SelfService/cgi/agent_delete_svc.html deleted file mode 100644 index 7a2b75071..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent_delete_svc.html +++ /dev/null @@ -1,19 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<%= $small_custview %> -<BR> -<%= if ( $error ) { - - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT>!; -} else { - $OUT .= "<FONT SIZE=4>$svc removed.</FONT>"; -} %> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/agent_login.html b/fs_selfservice/FS-SelfService/cgi/agent_login.html deleted file mode 100644 index 4b0778ec5..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent_login.html +++ /dev/null @@ -1,22 +0,0 @@ -<HTML><HEAD><TITLE>Reseller Login</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=5>Reseller Login</FONT><BR><BR> -<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT> -<FORM ACTION="<%= $self_url %>" METHOD=POST> -<INPUT TYPE="hidden" NAME="session" VALUE="login"> -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=2 CELLPADDING=0> -<TR> - <TH ALIGN="right">Username </TH> - <TD> - <INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"> - </TD> -</TR> -<TR> - <TH ALIGN="right">Password </TH> - <TD> - <INPUT TYPE="password" NAME="password"> - </TD> -</TR> -</TABLE> -<BR><BR><INPUT TYPE="submit" VALUE="Login"> -</FORM></BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/agent_logout.html b/fs_selfservice/FS-SelfService/cgi/agent_logout.html deleted file mode 100644 index 98094679a..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent_logout.html +++ /dev/null @@ -1,5 +0,0 @@ -<HTML><HEAD><TITLE>Reseller</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>Reseller</FONT><BR><BR> -You have been logged out. -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/agent_main.html b/fs_selfservice/FS-SelfService/cgi/agent_main.html deleted file mode 100644 index 9dd338382..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent_main.html +++ /dev/null @@ -1,37 +0,0 @@ -<HTML><HEAD><TITLE>Reseller</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>Reseller</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_menu') %> -<TD VALIGN="top"> - -<%= $message - ? "<FONT SIZE=\"+2\"><B>$message</B></FONT>" - : "Hello $agent!" -%><BR><BR> - -<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee"> -<TR><TH BGCOLOR="#cccccc">Customer summary</TH></TR> -<TR><TD BGCOLOR="#dddddd"> - - <B><%= $num_prospect %></B> - <%= $num_prospect ? qq!<A HREF="${url}list_customers;prospect=1">! : '' %>prospects</A> - - <BR><FONT COLOR="#00CC00"><B><%= $num_active %></B></FONT> - <%= $num_active ? qq!<A HREF="${url}list_customers;active=1">! : '' %>active</A> - - <BR><FONT COLOR="#FF9900"><B><%= $num_susp %></B></FONT> - <%= $num_susp ? qq!<A HREF="${url}list_customers;susp=1">! : '' %>suspended</A> - - <BR><FONT COLOR="#FF0000"><B><%= $num_cancel %></B></FONT> - <%= $num_cancel ? qq!<A HREF="${url}list_customers;cancel=1">! : '' %>cancelled</A> - -</TD></TR></TABLE> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - - - diff --git a/fs_selfservice/FS-SelfService/cgi/agent_menu.html b/fs_selfservice/FS-SelfService/cgi/agent_menu.html deleted file mode 100644 index 84a295304..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent_menu.html +++ /dev/null @@ -1,15 +0,0 @@ -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<TD VALIGN="top" HEIGHT=384 BGCOLOR="#dddddd"> - -<A HREF="<%= $url %>agent_main">Overview</A><BR><BR> -<A HREF="<%= $url %>signup">New customer<!--/prospect--></A><BR><BR> -<FORM ACTION="<%= $selfurl %>"> -<INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>"> -<INPUT TYPE="hidden" NAME="action" VALUE="list_customers"> -<INPUT TYPE="text" NAME="search" SIZE=20><BR> -<SMALL><I>cust #, last name, or company</I></SMALL><BR> -<INPUT TYPE="submit" VALUE="Search customers"><BR> -</FORM> -<A HREF="<%= $url %>logout">Logout</A><BR><BR> - -</TD> diff --git a/fs_selfservice/FS-SelfService/cgi/agent_order_pkg.html b/fs_selfservice/FS-SelfService/cgi/agent_order_pkg.html deleted file mode 100644 index 0a665c99e..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent_order_pkg.html +++ /dev/null @@ -1,19 +0,0 @@ -<HTML><HEAD><TITLE>Reseller</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>Reseller</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;custnum=$custnum;action="; ''; %> -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_menu') %> -<TD VALIGN="top"> -<%= $small_custview %> -<BR> - -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_customer_menu') %> -<TD VALIGN="top"> -<%= include('order_pkg') %> -</TD></TR></TABLE> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/agent_provision.html b/fs_selfservice/FS-SelfService/cgi/agent_provision.html deleted file mode 100644 index 8770e2f9e..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent_provision.html +++ /dev/null @@ -1,25 +0,0 @@ -<HTML><HEAD><TITLE>Reseller</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>Reseller</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;custnum=$custnum;action="; ''; %> -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_menu') %> -<TD VALIGN="top"> - -<%= $message - ? "<FONT SIZE=\"+2\"><B>$message</B></FONT><BR><BR>" - : '' -%> - -<%= $small_custview %> -<BR> - -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_customer_menu') %> -<TD VALIGN="top"> -<%= include('provision_list') %> -</TD></TR></TABLE> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/agent_provision_svc_acct.html b/fs_selfservice/FS-SelfService/cgi/agent_provision_svc_acct.html deleted file mode 100644 index 8d299cdc5..000000000 --- a/fs_selfservice/FS-SelfService/cgi/agent_provision_svc_acct.html +++ /dev/null @@ -1,19 +0,0 @@ -<HTML><HEAD><TITLE>Reseller</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>Reseller</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;custnum=$custnum;action="; ''; %> -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_menu') %> -<TD VALIGN="top"> -<%= $small_custview %> -<BR> -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_customer_menu') %> -<TD VALIGN="top"> -<%= include('svc_acct') %> -</TD></TR></TABLE> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/bill.html b/fs_selfservice/FS-SelfService/cgi/bill.html deleted file mode 100644 index bbdf1f210..000000000 --- a/fs_selfservice/FS-SelfService/cgi/bill.html +++ /dev/null @@ -1,7 +0,0 @@ -<TR> - <TD ALIGN="right">P.O. number</TD> - <TD><INPUT TYPE="text" NAME="payinfo" SIZE=10 MAXLENGTH=20 VALUE="<%=$payinfo%>"></TD> -</TR><TR> - <TD ALIGN="right">Attention</TD> - <TD><INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="payname" VALUE="<%=$payname%>"></TD> -</TR> diff --git a/fs_selfservice/FS-SelfService/cgi/card.html b/fs_selfservice/FS-SelfService/cgi/card.html deleted file mode 100644 index cf6d20d8d..000000000 --- a/fs_selfservice/FS-SelfService/cgi/card.html +++ /dev/null @@ -1,73 +0,0 @@ -<TR> - <TD ALIGN="right">Card number</TD> - <TD> - <TABLE> - <TR> - <TD> - <INPUT TYPE="text" NAME="payinfo" SIZE=20 MAXLENGTH=19 VALUE="<%=$payinfo%>"> </TD> - <TD>Exp.</TD> - <TD> - <SELECT NAME="month"> - <%= for ( ( map "0$_", 1 .. 9 ), 10 .. 12 ) { - $OUT .= '<OPTION'. ($_ == $month ? ' SELECTED' : ''). ">$_\n"; - } %> - </SELECT> - </TD> - <TD> / </TD> - <TD> - <SELECT NAME="year"> - <%= my @a = localtime; for ( $a[5]+1900 .. $a[5]+1915 ) { - $OUT .= '<OPTION'. ($_ == $year ? ' SELECTED' : ''). ">$_\n"; - } %> - </SELECT> - </TD> - </TR> - </TABLE> - </TD> -</TR> -<%= - if ( $withcvv ) { - $OUT .= qq!<TR>!; - $OUT .= qq!<TD ALIGN="right">CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>)</TD>!; - $OUT .= qq!<TD><INPUT TYPE="text" NAME="paycvv" VALUE="" SIZE=4 MAXLENGTH=4></TD>!; - $OUT .= qq!</TR>!; - } - ''; -%> -<TR> - <TD ALIGN="right">Exact name on card</TD> - <TD><INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="payname" VALUE="<%=$payname%>"></TD> -</TR><TR> - <TD ALIGN="right">Card billing address</TD> - <TD> - <INPUT TYPE="text" SIZE=40 MAXLENGTH=80 NAME="address1" VALUE="<%=$address1%>"> - </TD> -</TR><TR> - <TD ALIGN="right">Address line 2</TD> - <TD> - <INPUT TYPE="text" SIZE=40 MAXLENGTH=80 NAME="address2" VALUE="<%=$address2%>"> - </TD> -</TR><TR> - <TD ALIGN="right">City</TD> - <TD> - <TABLE> - <TR> - <TD> - <INPUT TYPE="text" NAME="city" SIZE="12" MAXLENGTH=80 VALUE="<%=$city%>"> - </TD> - <TD>State</TD> - <TD> - <SELECT NAME="state"> - <%= for ( @states ) { - $OUT .= '<OPTION'. ($_ eq $state ? ' SELECTED' : '' ). ">$_\n"; - } %> - </SELECT> - </TD> - <TD>Zip</TD> - <TD> - <INPUT TYPE="text" NAME="zip" SIZE=11 MAXLENGTH=10 VALUE="<%=$zip%>"> - </TD> - </TR> - </TABLE> - </TD> -</TR> diff --git a/fs_selfservice/FS-SelfService/cgi/change_bill.html b/fs_selfservice/FS-SelfService/cgi/change_bill.html deleted file mode 100755 index 0bc47d069..000000000 --- a/fs_selfservice/FS-SelfService/cgi/change_bill.html +++ /dev/null @@ -1,25 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"> -<FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<FONT SIZE=4>Edit billing address</FONT><BR><BR> -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT><BR><BR>!; -} ''; %> - -<FORM NAME="ChangeBillForm" ACTION="<%= $selfurl %>" METHOD=POST onSubmit="document.bottomform.submit.disabled=true;"> -<INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>"> -<INPUT TYPE="hidden" NAME="action" VALUE="process_change_bill"> -<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0> - -<%= $r=qq!<font color="#ff0000">*</font> !; include('contact') %> - -<INPUT TYPE="submit" NAME="submit" VALUE="<%= $custnum ? "Apply Changes" : "Add Customer" %>"> -<BR> -</FORM> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/change_password.html b/fs_selfservice/FS-SelfService/cgi/change_password.html deleted file mode 100644 index af7b45313..000000000 --- a/fs_selfservice/FS-SelfService/cgi/change_password.html +++ /dev/null @@ -1,53 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Change password</FONT><BR><BR> - -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!; -} ''; %> - -<FORM ACTION="<%= $selfurl %>" METHOD="POST"> -<INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>"> -<INPUT TYPE="hidden" NAME="action" VALUE="process_change_password"> - -<TABLE BGCOLOR="#cccccc"> - - <TR> - <TH ALIGN="right">Change password for account: </TH> - <TD> - <SELECT NAME="svcnum"> - <%= foreach my $svc ( @svcs ) { - $OUT .= '<OPTION VALUE="'. $svc->{'svcnum'}. '"'. - ( $svc->{'svcnum'} eq $svcnum ? ' SELECTED' : '' ). '>'. - $svc->{'label'}. ': '. $svc->{'value'}. "\n"; - } - %> - </SELECT> - </TD> - </TR> - - <TR> - <TH ALIGN="right">New password: </TH> - <TD><INPUT TYPE="password" NAME="new_password" SIZE="18"></TD> - </TR> - - <TR> - <TH ALIGN="right">Re-enter new password: </TH> - <TD><INPUT TYPE="password" NAME="new_password2" SIZE="18"></TD> - </TR> - -</TABLE> -<BR> - -<INPUT TYPE="submit" VALUE="Change password"> - -</FORM> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/change_pay.html b/fs_selfservice/FS-SelfService/cgi/change_pay.html deleted file mode 100644 index d26abfa7a..000000000 --- a/fs_selfservice/FS-SelfService/cgi/change_pay.html +++ /dev/null @@ -1,75 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"> -<script language="JavaScript"><!-- - var mywindow = -1; - function myopen(filename,windowname,properties) { - myclose(); - mywindow = window.open(filename,windowname,properties); - } - function myclose() { - if ( mywindow != -1 ) - mywindow.close(); - mywindow = -1 - } -//--></script> -<FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<FONT SIZE=4>Change payment information</FONT><BR><BR> -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT><BR><BR>!; - } ''; %> - -<FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true"> -<%= - use Tie::IxHash; - use HTML::Widgets::SelectLayers; - - my $preauto = '<TR><TD COLSPAN=3><INPUT TYPE="checkbox" NAME="auto" VALUE="1"'; - my $postauto = '>Charge future payments to this card automatically</TD></TR>'; - - my $tail = qq(</TABLE><INPUT TYPE="hidden" NAME="session" VALUE="$session_id">). - qq(<INPUT TYPE="hidden" NAME="action" VALUE="process_change_pay">). - qq(<BR>). - qq(<INPUT TYPE="submit" NAME="process" ). - qq(VALUE="Save payment information"> ). - qq(<!-- onClick="this.disabled=true"> -->); - - - my %paybychecked = ( - 'BILL' => include('bill'), - 'CARD' => include('card')."$preauto CHECKED $postauto", - 'DCRD' => include('card')."$preauto $postauto", - 'CHEK' => include('check')."$preauto CHECKED $postauto", - 'DCHK' => include('check')."$preauto $postauto", - ); - my %payby_index = ( 'CARD' => qq/Credit Card/, - 'DCRD' => qq/Credit Card/, - 'CHEK' => qq/Check/, - 'DCHK' => qq/Check/, - 'LECB' => qq/Phone Bill Billing/, - 'BILL' => qq/Billing/, - 'COMP' => qq/Complimentary/, - 'PREPAY' => qq/Prepaid Card/, - ); - tie my %options, 'Tie::IxHash', (); - foreach my $payby_option ( @paybys ) { - $options{$payby_option} = $payby_index{$payby_option}; - } - $options{$payby} = $payby_index{$payby} - unless exists($options{$payby}); - - HTML::Widgets::SelectLayers->new( - options => \%options, - selected_layer => $payby, -# form_name => 'dummy', -# form_action => 'dummy.cgi', - layer_callback => sub { my $layer = shift; return '<TABLE BGCOLOR="#cccccc">'.$paybychecked{$layer}.qq!<INPUT TYPE="hidden" NAME="payby" VALUE="$layer">$tail!; }, - )->html; - -%> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/change_pkg.html b/fs_selfservice/FS-SelfService/cgi/change_pkg.html deleted file mode 100644 index a841308a5..000000000 --- a/fs_selfservice/FS-SelfService/cgi/change_pkg.html +++ /dev/null @@ -1,37 +0,0 @@ -<SCRIPT TYPE="text/javascript"> -function enable_change_pkg () { - if ( document.ChangePkgForm.pkgpart.selectedIndex > 0 ) { - document.ChangePkgForm.submit.disabled = false; - } else { - document.ChangePkgForm.submit.disabled = true; - } -} -</SCRIPT> -<FONT SIZE=4>Purchase replacement package for "<%= $pkg; %>"</FONT><BR><BR> -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!; -} ''; %> -<FORM NAME="ChangePkgForm" ACTION="<%= $selfurl %>" METHOD=POST> -<INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>"> -<INPUT TYPE="hidden" NAME="action" VALUE="process_change_pkg"> -<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<%= $pkgnum %>"> -<INPUT TYPE="hidden" NAME="pkg" VALUE="<%= $pkg %>"> -<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0> -<TR> - <TD COLSPAN=2><SELECT NAME="pkgpart" onChange="enable_change_pkg()"> - <OPTION VALUE=""> - - <%= - foreach my $part_pkg ( @part_pkg ) { - $OUT .= '<OPTION VALUE="'. $part_pkg->{'pkgpart'}. '"'; - $OUT .= ' SELECTED' if $pkgpart && $part_pkg->{'pkgpart'} == $pkgpart; - $OUT .= '>'. $part_pkg->{'pkg'}; - } - %> - - </SELECT></TD> -</TR> -</TABLE> -<INPUT NAME="submit" TYPE="submit" VALUE="Purchase" disabled> -</FORM> - diff --git a/fs_selfservice/FS-SelfService/cgi/change_ship.html b/fs_selfservice/FS-SelfService/cgi/change_ship.html deleted file mode 100755 index 1a3b85d6d..000000000 --- a/fs_selfservice/FS-SelfService/cgi/change_ship.html +++ /dev/null @@ -1,104 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"> -<FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<FONT SIZE=4>Edit service address</FONT><BR><BR> -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT><BR><BR>!; -} ''; %> - -<FORM NAME="OneTrueForm" ACTION="<%= $selfurl %>" METHOD=POST onSubmit="document.bottomform.submit.disabled=true;"> -<INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>"> -<INPUT TYPE="hidden" NAME="action" VALUE="process_change_ship"> -<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0> - -<%= - foreach ( - qw( last first company address1 address2 city county state zip country - daytime night fax ) - ) { - $OUT .= qq!<INPUT TYPE="hidden" NAME="$_" VALUE="${$_}">!; - }; - ''; -%> -<SCRIPT> -function bill_changed(what) { - if ( what.form.same.checked ) { -<%= - for (qw( last first company address1 address2 city zip daytime night fax )) { - $OUT .= "what.form.ship_$_.value = what.form.$_.value;"; - } - ''; -%> - what.form.ship_country.selectedIndex = what.form.country.selectedIndex; - - function fix_ship_county() { - what.form.ship_county.selectedIndex = what.form.county.selectedIndex; - } - - function fix_ship_state() { - what.form.ship_state.selectedIndex = what.form.state.selectedIndex; - ship_state_changed(what.form.ship_state, fix_ship_county ); - } - - ship_country_changed(what.form.ship_country, fix_ship_state ); - - } -} -function samechanged(what) { - if ( what.checked ) { - bill_changed(what); - -<%= - for (qw( last first company address1 address2 city county state zip country daytime night fax )) { - $OUT .= "what.form.ship_$_.disabled = true;"; - $OUT .= "what.form.ship_$_.style.backgroundColor = '#dddddd';"; - } - if ( $require_address2 ) { - $OUT .= "document.getElementById('ship_address2_required').style.visibility = 'hidden';"; - $OUT .= "document.getElementById('ship_address2_label').style.visibility = 'hidden';"; - } -%> - - } else { - -<%= - for (qw( last first company address1 address2 city county state zip country daytime night fax )) { - $OUT .= "what.form.ship_$_.disabled = false;"; - $OUT .= "what.form.ship_$_.style.backgroundColor = '#ffffff';"; - } - if ( $require_address2 ) { - $OUT .= "document.getElementById('ship_address2_required').style.visibility = '';"; - $OUT .= "document.getElementById('ship_address2_label').style.visibility = '';"; - } -%> - } -} -</SCRIPT> -(<INPUT TYPE="checkbox" NAME="same" VALUE="Y" onClick="samechanged(this)" - <%= (!$ship_last || $cgi->param('same') eq 'Y') ? 'CHECKED' : '' %> - >same as billing address) -<%= $r=qq!<font color="#ff0000">*</font> !; - if (!$ship_last || $cgi->param('same') eq 'Y') { - $disabled = 'DISABLED STYLE="background-color: #dddddd"'; - foreach ( qw( last first company address1 address2 city county state - zip country daytime night fax ) - ) { - ${"ship_$_"} = ${$_}; - } - }else{ - $disabled = ''; - } - $pre = 'ship_'; - include('contact'); -%> - -<INPUT TYPE="submit" NAME="submit" VALUE="<%= $custnum ? "Apply Changes" : "Add Customer" %>"> -<BR> -</FORM> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/check.html b/fs_selfservice/FS-SelfService/cgi/check.html deleted file mode 100644 index 68753fe08..000000000 --- a/fs_selfservice/FS-SelfService/cgi/check.html +++ /dev/null @@ -1,54 +0,0 @@ -<TR> - <TD ALIGN="right">Account type</TD> - <TD> - <SELECT NAME="paytype"> - <%= foreach ( @paytypes ) { - $selected = $paytype eq $_ ? ' SELECTED' : ''; - $OUT .= qq(<OPTION$selected VALUE="$_">$_\n); - } %> - </SELECT> - </TD> -</TD><TR> - <TD ALIGN="right">Account number</TD> - <TD><INPUT TYPE="text" NAME="payinfo1" SIZE=10 MAXLENGTH=20 VALUE="<%=$payinfo1%>"></TD> -</TD><TR> - <TD ALIGN="right">ABA/Routing number</TD> - <TD><INPUT TYPE="text" NAME="payinfo2" SIZE=10 MAXLENGTH=9 VALUE="<%=$payinfo2%>"></TD> -</TR><TR> - <TD ALIGN="right">Bank name</TD> - <TD><INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="payname" VALUE="<%=$payname%>"></TD> -</TR><TR> - <%= - $OUT = ''; - if ($show_paystate) { - $OUT .= qq!<TD ALIGN="right">Bank state</TD><TD><SELECT NAME="paystate">!; - for ( @states ) { - $OUT .= '<OPTION'. ($_ eq $paystate ? ' SELECTED' : '' ). ">$_\n"; - } - $OUT .= '</SELECT></TD></TR><TR>'; - } - %> - <%= - $OUT = ''; - if ($show_ss) { - $OUT .= '<TD ALIGN="right">Account holder<BR>Social '; - $OUT .= 'security or tax ID #</TD><TD>'; - $OUT .= qq!<INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="ss" VALUE="$ss">!; - $OUT .= '</TD></TR><TR>'; - } - %> - <%= - $OUT = ''; - if ($show_stateid) { - $OUT .= '<TD ALIGN="right">'; - $OUT .= qq!Account holder<BR>$stateid_label</TD><TD>!; - $OUT .= qq!<INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="stateid" VALUE="$stateid"></TD>!; - $OUT .= qq!<TD ALIGN="right">$stateid_state_label</TD>!; - $OUT .= '<TD><SELECT NAME="stateid_state">'; - for ( @states ) { - $OUT .= '<OPTION'. ($_ eq $stateid_state ? ' SELECTED' : '' ). ">$_\n"; - } - $OUT .='</SELECT></TD></TR><TR>'; - } - %> -</TR> diff --git a/fs_selfservice/FS-SelfService/cgi/contact.html b/fs_selfservice/FS-SelfService/cgi/contact.html deleted file mode 100644 index 20c15df78..000000000 --- a/fs_selfservice/FS-SelfService/cgi/contact.html +++ /dev/null @@ -1,135 +0,0 @@ -<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0> - -<TR> - <TH ALIGN="right"><%=$r%>Contact name<BR>(last, first)</TH> - <TD COLSPAN=5> - <INPUT TYPE="text" NAME="<%=$pre%>last" VALUE="<%= ${$pre.'last'} %>" onChange="<%= $onchange %>" <%=$disabled%>> , - <INPUT TYPE="text" NAME="<%=$pre%>first" VALUE="<%= ${$pre.'first'} %>" onChange="<%= $onchange %>" <%=$disabled%>> - </TD> -</TR> - -<TR> - <TD ALIGN="right">Company</TD> - <TD COLSPAN=7> - <INPUT TYPE="text" NAME="<%=$pre%>company" VALUE="<%= ${$pre.'company'} %>" SIZE=70 onChange="<%= $onchange %>" <%=$disabled%>> - </TD> -</TR> - -<TR> - <TH ALIGN="right"><%=$r%>Address</TH> - <TD COLSPAN=7> - <INPUT TYPE="text" NAME="<%=$pre%>address1" VALUE="<%= ${$pre.'address1'} %>" SIZE=70 onChange="<%= $onchange %>" <%=$disabled%>> - </TD> -</TR> - -<TR> - <TD ALIGN="right"> - <%= - my $style = - ( $disabled - || !$require_address2 - || ( !$pre && $ship_last ) - ) - ? 'visibility:hidden' - : ''; - - $OUT .= qq!<FONT ID="${pre}address2_required" color="#ff0000" STYLE="$style">*</FONT> <FONT ID="${pre}address2_label" STYLE="$style"><B>Unit #</B></FONT>!; - %> - </TD> - <TD COLSPAN=7> - <INPUT TYPE="text" NAME="<%=$pre%>address2" VALUE="<%= ${$pre.'address2'} %>" SIZE=70 onChange="<%= $onchange %>" <%=$disabled%>> - </TD> -</TR> - -<TR> - <TH ALIGN="right"><%=$r%>City</TH> - <TD> - <INPUT TYPE="text" ID="<%=$pre%>city" NAME="<%=$pre%>city" VALUE="<%= ${$pre.'city'} %>" onChange="<%= $onchange %>" <%=$disabled%>> - </TD> - <%= - ($county_html, $state_html, $country_html) = - FS::SelfService::regionselector( { - prefix => $pre, - selected_county => ${$pre.'county'}, - selected_state => ${$pre.'state'}, - selected_country => ${$pre.'country'}, - default_state => $statedefault, - default_country => $countrydefault, - locales => \@cust_main_county, - } ); - - $OUT .= qq!<TH ALIGN="right">${r}State/County</TH>!; - $OUT .= qq!<TD>$county_html $state_html</TD>!; - $OUT .= qq!<TH>${r}Zip</TH>!; - $OUT .= qq!<TD><INPUT TYPE="text" NAME="${pre}zip" VALUE="${$pre.'zip'}" SIZE=10 onChange="$onchange" $disabled></TD>!; - $OUT .= qq!</TR>!; - $OUT .= qq!<TR>!; - $OUT .= qq!<TH ALIGN="right">${r}Country</TH>!; - $OUT .= qq!<TD COLSPAN=5>$country_html</TD>!; - %> -</TR> - -<SCRIPT> - <%= - if ( $disabled ) { - $OUT .= qq!var what = document.getElementById("${pre}city");!; - for (qw( county state country ) ) { - $OUT .= "what.form.$pre$_.disabled = true;"; - $OUT .= "what.form.$pre$_.style.backgroundColor = '#dddddd';"; - } - }else{ - ''; - } - %> -</SCRIPT> - -<TR> - <TD ALIGN="right">Day Phone</TD> - <TD COLSPAN=5> - <INPUT TYPE="text" NAME="<%=$pre%>daytime" VALUE="<%= ${$pre.'daytime'} %>" SIZE=18 onChange="<%= $onchange %>" <%=$disabled%>> - </TD> -</TR> - -<TR> - <TD ALIGN="right">Night Phone</TD> - <TD COLSPAN=5> - <INPUT TYPE="text" NAME="<%=$pre%>night" VALUE="<%= ${$pre.'night'} %>" SIZE=18 onChange="<%= $onchange %>" <%=$disabled%>> - </TD> -</TR> - -<TR> - <TD ALIGN="right">Fax</TD> - <TD COLSPAN=5> - <INPUT TYPE="text" NAME="<%=$pre%>fax" VALUE="<%= ${$pre.'fax'} %>" SIZE=12 onChange="<%= $onchange %>" <%=$disabled%>> - </TD> -</TR> - -</TABLE> -<%=$r%>required fields<BR> - -<!-- -#my($county_html, $state_html, $country_html) = -# FS::cust_main_county::regionselector( $cust_main->get($pre.'county'), -# $cust_main->get($pre.'state'), -# $cust_main->get($pre.'country'), -# $pre, -# $onchange, -# $disabled, -# ); - -my %select_hash = ( - 'county' => ${$pre.'county'}, - 'state' => ${$pre.'state'}, - 'country' => ${$pre.'country'}, - 'prefix' => $pre, - 'onchange' => $onchange, - 'disabled' => $disabled, -); - -my @counties = counties( ${$pre.'state'}, - ${$pre.'country'}, - ); -my $county_style = scalar(@counties) > 1 ? '' : 'STYLE="visibility:hidden"'; - -my $r = qq!<font color="#ff0000">*</font> !; ---> diff --git a/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi b/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi deleted file mode 100644 index 5f344a32e..000000000 --- a/fs_selfservice/FS-SelfService/cgi/cust_bill-logo.cgi +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/perl -T -#!/usr/bin/perl -Tw - -use strict; -use CGI; -use FS::SelfService qw( invoice_logo ); - -my $cgi = new CGI; - -my($query) = $cgi->keywords; -$query =~ /^([^\.\/]*)$/ or '' =~ /^()$/; -my $templatename = $1; -my $hashref = invoice_logo('templatename' => $templatename); - -print $cgi->header( '-type' => $hashref->{'content_type'}, - '-expires' => 'now', - ). - $hashref->{'logo'}; - diff --git a/fs_selfservice/FS-SelfService/cgi/customer_change_pkg.html b/fs_selfservice/FS-SelfService/cgi/customer_change_pkg.html deleted file mode 100644 index d08ab9679..000000000 --- a/fs_selfservice/FS-SelfService/cgi/customer_change_pkg.html +++ /dev/null @@ -1,10 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<%= include('change_pkg') %> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/customer_order_pkg.html b/fs_selfservice/FS-SelfService/cgi/customer_order_pkg.html deleted file mode 100755 index c01b6b384..000000000 --- a/fs_selfservice/FS-SelfService/cgi/customer_order_pkg.html +++ /dev/null @@ -1,10 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<%= include('order_pkg') %> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/cvv2.html b/fs_selfservice/FS-SelfService/cgi/cvv2.html deleted file mode 100644 index b178c8513..000000000 --- a/fs_selfservice/FS-SelfService/cgi/cvv2.html +++ /dev/null @@ -1,25 +0,0 @@ -<HTML> - <HEAD> - <TITLE> - CVV2 information - </TITLE> - </HEAD> - <BODY BGCOLOR="#e8e8e8"> - The CVV2 number (also called CVC2 or CID) is a three- or four-digit - security code used to reduce credit card fraud.<BR><BR> - <TABLE BORDER=0 CELLSPACING=4> - <TR> - <TH>Visa / MasterCard / Discover</TH> - <TH>American Express</TH> - </TR> - <TR> - <TD> - <IMG BORDER=0 ALT="Visa/MasterCard/Discover" SRC="cvv2.png"> - </TD> - <TD> - <IMG BORDER=0 ALT="American Express" SRC="cvv2_amex.png"> - </TD> - </TABLE> - <CENTER><A HREF="javascript:close()">(close window)</A></CENTER> - </BODY> -</HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/cvv2.png b/fs_selfservice/FS-SelfService/cgi/cvv2.png Binary files differdeleted file mode 100644 index 4610dcbe6..000000000 --- a/fs_selfservice/FS-SelfService/cgi/cvv2.png +++ /dev/null diff --git a/fs_selfservice/FS-SelfService/cgi/cvv2_amex.png b/fs_selfservice/FS-SelfService/cgi/cvv2_amex.png Binary files differdeleted file mode 100644 index 21c36a0ab..000000000 --- a/fs_selfservice/FS-SelfService/cgi/cvv2_amex.png +++ /dev/null diff --git a/fs_selfservice/FS-SelfService/cgi/decline.html b/fs_selfservice/FS-SelfService/cgi/decline.html deleted file mode 100644 index a37ba3ab6..000000000 --- a/fs_selfservice/FS-SelfService/cgi/decline.html +++ /dev/null @@ -1,5 +0,0 @@ -<HTML><HEAD><TITLE>Processing error</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>Processing error</FONT><BR><BR> -There has been an error processing your account. Please contact customer -support. -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/delete_svc.html b/fs_selfservice/FS-SelfService/cgi/delete_svc.html deleted file mode 100644 index 8468deb4b..000000000 --- a/fs_selfservice/FS-SelfService/cgi/delete_svc.html +++ /dev/null @@ -1,17 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error: $error</FONT>!; -} else { - $OUT .= "<FONT SIZE=4>$svc removed.</FONT>"; -} %> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/list_customers.html b/fs_selfservice/FS-SelfService/cgi/list_customers.html deleted file mode 100644 index 858e5e9ba..000000000 --- a/fs_selfservice/FS-SelfService/cgi/list_customers.html +++ /dev/null @@ -1,39 +0,0 @@ -<HTML><HEAD><TITLE>Reseller</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>Reseller</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_menu') %> -<TD VALIGN="top"> - -<%= - if ( @customers ) { - $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'. - '<TR><TH BGCOLOR="#cccccc" COLSPAN=3>Customers</TH><TD>'; - my $col1 = "ffffff"; - my $col2 = "dddddd"; - my $col = $col1; - - foreach my $customer ( @customers ) { - my $td = qq!<TD BGCOLOR="#$col">!; - my $a = qq!<A HREF="${url}view_customer;custnum=!. - $customer->{'custnum'}. '">'; - $OUT .= - '<TR>'. - "$td<FONT COLOR=\"". $customer->{'statuscolor'}. '">'. - ucfirst($customer->{'status'}). "</TD>". "$td</TD>". - "$td$a". $customer->{'name'}. "</A></TD>". - '</TR>'; - #"$td</TD>". - $col = $col eq $col1 ? $col2 : $col1; - } - $OUT .= '</TABLE>'; - } else { - $OUT .= 'No customers.<BR><BR>'; - } -%> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/login.html b/fs_selfservice/FS-SelfService/cgi/login.html deleted file mode 100644 index 5607de783..000000000 --- a/fs_selfservice/FS-SelfService/cgi/login.html +++ /dev/null @@ -1,29 +0,0 @@ -<HTML><HEAD><TITLE>Login</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=5>Login</FONT><BR><BR> -<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT> -<FORM ACTION="<%= $self_url %>" METHOD=POST> -<INPUT TYPE="hidden" NAME="session" VALUE="login"> -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=2 CELLPADDING=0> -<TR> - <TH ALIGN="right">Username </TH> - <TD> - <INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"> - </TD> -</TR> -<TR> - <TH ALIGN="right">Domain </TH> - <TD> - <INPUT TYPE="text" NAME="domain" VALUE="<%= $domain %>"> - </TD> -</TR> -<!--<INPUT TYPE="hidden" NAME="domain" VALUE="myisp.com">--> -<TR> - <TH ALIGN="right">Password </TH> - <TD> - <INPUT TYPE="password" NAME="password"> - </TD> -</TR> -</TABLE> -<BR><BR><INPUT TYPE="submit" VALUE="Login"> -</FORM></BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/logout.html b/fs_selfservice/FS-SelfService/cgi/logout.html deleted file mode 100644 index 0e774e9eb..000000000 --- a/fs_selfservice/FS-SelfService/cgi/logout.html +++ /dev/null @@ -1,5 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -You have been logged out. -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html b/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html deleted file mode 100644 index f80142325..000000000 --- a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html +++ /dev/null @@ -1,61 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"> -<script language="JavaScript"><!-- - var mywindow = -1; - function myopen(filename,windowname,properties) { - myclose(); - mywindow = window.open(filename,windowname,properties); - } - function myclose() { - if ( mywindow != -1 ) - mywindow.close(); - mywindow = -1 - } -//--></script> -<FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<FONT SIZE=4>Make a payment</FONT><BR><BR> -<FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true"> -<INPUT TYPE="hidden" NAME="session" VALUE="<%=$session_id%>"> -<INPUT TYPE="hidden" NAME="action" VALUE="ach_payment_results"> -<TABLE BGCOLOR="#cccccc"> -<TR> - <TD ALIGN="right">Amount Due</TD> - <TD> - <TABLE><TR><TD BGCOLOR="#ffffff"> - $<%=sprintf("%.2f",$balance)%> - </TD></TR></TABLE> - </TD> -</TR> -<TR> - <TD ALIGN="right">Payment amount</TD> - <TD> - <TABLE><TR><TD BGCOLOR="#ffffff"> - $<INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<%=sprintf("%.2f",$balance)%>"> - </TD></TR></TABLE> - </TD> -</TR> -<%= include('check') %> -<TR> - <TD COLSPAN=2> - <INPUT TYPE="checkbox" CHECKED NAME="save" VALUE="1"> - Remember this information - </TD> -</TR><TR> - <TD COLSPAN=2> - <INPUT TYPE="checkbox"<%= $payby eq 'CHEK' ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> - Charge future payments to this account automatically - </TD> -</TR> -</TABLE> -<BR> -<INPUT TYPE="hidden" NAME="paybatch" VALUE="<%=$paybatch%>"> -<INPUT TYPE="submit" NAME="process" VALUE="Process payment"> <!-- onClick="this.disabled=true"> --> -</FORM> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/make_payment.html b/fs_selfservice/FS-SelfService/cgi/make_payment.html deleted file mode 100644 index 89239c06b..000000000 --- a/fs_selfservice/FS-SelfService/cgi/make_payment.html +++ /dev/null @@ -1,71 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"> -<script language="JavaScript"><!-- - var mywindow = -1; - function myopen(filename,windowname,properties) { - myclose(); - mywindow = window.open(filename,windowname,properties); - } - function myclose() { - if ( mywindow != -1 ) - mywindow.close(); - mywindow = -1 - } -//--></script> -<FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<FONT SIZE=4>Make a payment</FONT><BR><BR> -<FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true"> -<INPUT TYPE="hidden" NAME="session" VALUE="<%=$session_id%>"> -<INPUT TYPE="hidden" NAME="action" VALUE="payment_results"> -<TABLE BGCOLOR="#cccccc"> -<TR> - <TD ALIGN="right">Amount Due</TD> - <TD> - <TABLE><TR><TD BGCOLOR="#ffffff"> - $<%=sprintf("%.2f",$balance)%> - </TD></TR></TABLE> - </TD> -</TR> -<TR> - <TD ALIGN="right">Payment amount</TD> - <TD> - <TABLE><TR><TD BGCOLOR="#ffffff"> - $<INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<%=sprintf("%.2f",$balance)%>"> - </TD></TR></TABLE> - </TD> -</TR><TR> - <TD ALIGN="right">Card type</TD> - <TD> - <SELECT NAME="card_type"><OPTION></OPTION> - <%= foreach ( keys %card_types ) { - $selected = $card_type eq $card_types{$_} ? ' SELECTED' : ''; - $OUT .= qq(<OPTION$selected VALUE="). $card_types{$_}. qq(">$_\n); - } %> - </SELECT> - </TD> -</TR> -<%= include('card') %> -<TR> - <TD COLSPAN=2> - <INPUT TYPE="checkbox" CHECKED NAME="save" VALUE="1"> - Remember this information - </TD> -</TR><TR> - <TD COLSPAN=2> - <INPUT TYPE="checkbox"<%= $payby eq 'CARD' ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> - Charge future payments to this card automatically - </TD> -</TR> -</TABLE> -<BR> -<INPUT TYPE="hidden" NAME="paybatch" VALUE="<%=$paybatch%>"> -<INPUT TYPE="submit" NAME="process" VALUE="Process payment"> <!-- onClick="this.disabled=true"> --> -</FORM> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/map.gif b/fs_selfservice/FS-SelfService/cgi/map.gif Binary files differdeleted file mode 100644 index ef884d8f9..000000000 --- a/fs_selfservice/FS-SelfService/cgi/map.gif +++ /dev/null diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount.html b/fs_selfservice/FS-SelfService/cgi/myaccount.html deleted file mode 100644 index d1f567187..000000000 --- a/fs_selfservice/FS-SelfService/cgi/myaccount.html +++ /dev/null @@ -1,99 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -Hello <%= $name %>!<BR><BR> -<%= $small_custview %> -<BR> -<%= if ( $balance > 0 ) { - $OUT .= qq! <B><A HREF="${url}make_payment">Make a payment</A></B><BR><BR>!; -} %> -<%= - if ( @open_invoices ) { - $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'. - '<TR><TH BGCOLOR="#ff6666" COLSPAN=5>Open Invoices</TH></TR>'; - my $link = qq!<A HREF="<%= $url %>myaccount!; - my $col1 = "ffffff"; - my $col2 = "dddddd"; - my $col = $col1; - - foreach my $invoice ( @open_invoices ) { - my $td = qq!<TD BGCOLOR="#$col">!; - my $a=qq!<A HREF="${url}view_invoice;invnum=!. $invoice->{'invnum'}. '">'; - $OUT .= - "<TR>$td${a}Invoice #". $invoice->{'invnum'}. "</A></TD>$td</TD>". - "$td$a". $invoice->{'date'}. "</A></TD>$td</TD>". - qq!<TD BGCOLOR="#$col" ALIGN="right">$a\$!. $invoice->{'owed'}. - '</A></TD>'. - '</TR>'; - $col = $col eq $col1 ? $col2 : $col1; - } - $OUT .= '</TABLE><BR>'; - } else { - $OUT .= 'You have no outstanding invoices.<BR><BR>'; - } -%> - -<%= - if ( @support_services ) { - $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'. - '<TR><TH BGCOLOR="#ff6666" COLSPAN="3">Support Time Remaining</TH>'. - '</TR><TR><TH ALIGN="left">#</TH><TH>Package</TH>'. - '<TH>Time Remaining</TH></TR>'; - my $col1 = "ffffff"; - my $col2 = "dddddd"; - my $col = $col1; - - foreach my $support ( @support_services ) { - my $td = qq!<TD BGCOLOR="#$col">!; - my $a = qq!<A HREF="${url}view_support_details;svcnum=!. - $support->{'svcnum'}. '">'; - $OUT .= - "<TR>$td$a". $support->{'pkgnum'}. "</A></TD>". - $td.$a. $support->{'pkg'}. "</A></TD>". - $td.$a. $support->{'time'}. "</A></TD>". - '</TR>'; - $col = $col eq $col1 ? $col2 : $col1; - } - $OUT .= '</TABLE><BR>'; - } else { - $OUT .= ''; - } -%> - -<%= - if ( @tickets ) { - $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'. - '<TR><TH BGCOLOR="#ff6666" COLSPAN=5>Open Tickets</TH></TR>'. - '<TR><TH>#</TH><TH>Subject</TH><TH>Priority</TH><TH>Queue</TH>'. - '<TH>Status</TH></TR>'; - my $col1 = "ffffff"; - my $col2 = "dddddd"; - my $col = $col1; - - foreach my $ticket ( @tickets ) { - my $td = qq!<TD BGCOLOR="#$col">!; - $OUT .= - "<TR>$td". $ticket->{'id'}. "</TD>". - $td. $ticket->{'subject'}. "</TD>". - $td. ($ticket->{'content'} || $ticket->{'priority'}). "</TD>". - $td. $ticket->{'queue'}. "</TD>". - $td. $ticket->{'status'}. "</TD>". - '</TR>'; - $col = $col eq $col1 ? $col2 : $col1; - } - $OUT .= '</TABLE>'; - } else { - $OUT .= ''; - } -%> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - - - diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html b/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html deleted file mode 100644 index ec5a8fa42..000000000 --- a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html +++ /dev/null @@ -1,94 +0,0 @@ -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<TABLE BORDER=0><TR> -<TD VALIGN="top" HEIGHT="100%" BGCOLOR="#dddddd"> - -<TABLE CELLSPACING=0 BORDER=0 HEIGHT="100%"> - -<%= - -my @menu = ( -{ title=>' ' }, -{ title=>'Overview', url=>'myaccount', size=>'+1', }, -{ title=>' ' }, - -{ title=>'Purchase', size=>'+1', }, - { title=>'Purchase additional package', - url=>'customer_order_pkg', 'indent'=>2 }, -); - -if ( 1 ) { #XXXFIXME "enable selfservice prepay features" flag or something, eventually per-pkg or something really fancy - - push @menu, ( - { title=>'Recharge my account with a credit card', - url=>'make_payment', indent=>2 }, - { title=>'Recharge my account with a check', - url=>'make_ach_payment', indent=>2 }, - { title=>'Recharge my account with a prepaid card', - url=>'recharge_prepay', indent=>2 }, - ); - -} - -push @menu, ( - -{ title=>' ' }, - -{ title=>'View my usage', url=>'view_usage', size=>'+1', }, -{ title=>'Setup my services', url=>'provision', size=>'+1', }, - -{ title=>' ' }, - -{ title=>'Change my information', size=>'+1', }, - { title=>'Change billing address', url=>'change_bill', indent=>2 }, - { title=>'Change service address', url=>'change_ship', indent=>2 }, - { title=>'Change payment information', url=>'change_pay', indent=>2 }, - { title=>'Change password(s)', url=>'change_password', indent=>2 }, - -{ title=>' ' }, - -{ title=>'Logout', url=>'logout', size=>'+1', }, - -); - -foreach my $item ( @menu ) { - - $OUT .= '<TR><TD'; - if ( exists $item->{'url'} && $action eq $item->{'url'} ) { - $OUT .= ' BGCOLOR="#eeeeee" '. - ' STYLE="border-top: 1px solid black;'. - ' border-left: 1px solid black;'. - ' border-bottom: 1px solid black"'; - } else { - $OUT .= ' STYLE="border-right: 1px solid black"'; - } - $OUT.='>'; - - $OUT .= '<FONT SIZE="'. $item->{'size'}. '">' - if exists $item->{'size'}; - - $OUT .= ' ' x $item->{'indent'} - if exists $item->{'indent'}; - - $OUT .= '<A HREF="'. $url. $item->{'url'}. '">' - if exists $item->{'url'} && $action ne $item->{'url'}; - - $item->{'title'} =~ s/ / /g; - $OUT .= $item->{'title'}; - - $OUT .= '</FONT>' - if exists $item->{'size'}; - - $OUT .= '</A>' - if exists $item->{'url'} && $action ne $item->{'url'}; - - $OUT .= '</TD></TR>'; - -} - -%> - -<TR><TD STYLE="border-right: 1px solid black" HEIGHT="100%"><BR><BR><BR><BR></TD></TR> - -</TABLE> - -</TD> diff --git a/fs_selfservice/FS-SelfService/cgi/order_pkg.html b/fs_selfservice/FS-SelfService/cgi/order_pkg.html deleted file mode 100644 index 9cdd4cd6c..000000000 --- a/fs_selfservice/FS-SelfService/cgi/order_pkg.html +++ /dev/null @@ -1,75 +0,0 @@ -<SCRIPT TYPE="text/javascript"> -function enable_order_pkg () { - if ( document.OrderPkgForm.pkgpart.selectedIndex > 0 ) { - document.OrderPkgForm.submit.disabled = false; - } else { - document.OrderPkgForm.submit.disabled = true; - } -} -</SCRIPT> -<FONT SIZE=4>Purchase additional package</FONT><BR><BR> -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!; -} ''; %> -<FORM NAME="OrderPkgForm" ACTION="<%= $selfurl %>" METHOD=POST> -<INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>"> -<INPUT TYPE="hidden" NAME="action" VALUE="process_order_pkg"> -<INPUT TYPE="hidden" NAME="custnum" VALUE="<%= $custnum %>"> -<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0> -<TR> - <TD COLSPAN=2><SELECT NAME="pkgpart" onChange="enable_order_pkg()"> - <OPTION VALUE=""> - - <%= - foreach my $part_pkg ( @part_pkg ) { - $OUT .= '<OPTION VALUE="'. $part_pkg->{'pkgpart'}. '"'; - $OUT .= ' SELECTED' if $pkgpart && $part_pkg->{'pkgpart'} == $pkgpart; - $OUT .= '>'. $part_pkg->{'pkg'}; - } - %> - - </SELECT></TD> -</TR> -<TR> - <TD ALIGN="right">Username</TD> - <TD><INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Password</TD> - <TD><INPUT TYPE="password" NAME="_password" VALUE="<%= $_password %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Re-enter Password</TD> - <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $_password2 %>"></TD> -</TR> -<%= - if ( $security_phrase ) { - $OUT .= <<ENDOUT; -<TR> - <TD ALIGN="right">Security Phrase</TD> - <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> - </TD> -</TR> -ENDOUT - } else { - $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; - } -%> -<%= - if ( @svc_acct_pop ) { - $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'. - popselector( 'popnum' => $popnum, - 'pops' => \@svc_acct_pop, - 'init_popstate' => $init_popstate, - 'popac' => $popac, - 'acstate' => $acstate, - ). - '</TD></TR>'; - } else { - $OUT .= popselector(popnum=>$popnum, pops=>\@svc_acct_pop); - } -%> -</TABLE> -<INPUT NAME="submit" TYPE="submit" VALUE="Purchase" disabled> -</FORM> - diff --git a/fs_selfservice/FS-SelfService/cgi/passwd.cgi b/fs_selfservice/FS-SelfService/cgi/passwd.cgi deleted file mode 100755 index 87e5e6843..000000000 --- a/fs_selfservice/FS-SelfService/cgi/passwd.cgi +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/perl -T -#!/usr/bin/perl -Tw - -use strict; -use Getopt::Std; -use FS::SelfService qw(passwd); -use CGI; -use CGI::Carp qw(fatalsToBrowser); - -my $freeside_uid = scalar(getpwnam('freeside')); - -$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -die "passwd.cgi isn't running as freeside user\n" if $> != $freeside_uid; - -my $cgi = new CGI; - -$cgi->param('username') =~ /^([^\n]{0,255}$)/ or die "Illegal username"; -my $me = $1; - -$cgi->param('domain') =~ /^([^\n]{0,255}$)/ or die "Illegal domain"; -my $domain = $1; - -$cgi->param('old_password') =~ /^([^\n]{0,255}$)/ or die "Illegal old_password"; -my $old_password = $1; - -$cgi->param('new_password') =~ /^([^\n]{0,255}$)/ or die "Illegal new_password"; -my $new_password = $1; - -die "New passwords don't match" - unless $new_password eq $cgi->param('new_password2'); - -my $rv = passwd( - 'username' => $me, - 'domain' => $domain, - 'old_password' => $old_password, - 'new_password' => $new_password, -); - -my $error = $rv->{error}; - -if ($error) { - die $error; -} else { - print $cgi->header(), <<END; -<html> - <head> - <title>Password changed</title> - </head> - <body bgcolor="#e8e8e8"> - <h3>Password changed</h3> -<br>Your password has been changed. - </body> -</html> -END -} diff --git a/fs_selfservice/FS-SelfService/cgi/passwd.html b/fs_selfservice/FS-SelfService/cgi/passwd.html deleted file mode 100644 index 459c96aa8..000000000 --- a/fs_selfservice/FS-SelfService/cgi/passwd.html +++ /dev/null @@ -1,28 +0,0 @@ -<html> - <head> - <title>Change password</title> - </head> - <body bgcolor="#e8e8e8"> - <h3>Change password</h3> - <form action="passwd.cgi" method="post"> - <table bgcolor="#cccccc" border=0 cellspacing=2> - <tr><th align="right">Username</th> - <td><input type="text" name="username" size="18"></td> - </tr> - <tr><th align="right">Domain</th> - <td><input type="text" name="domain" size="18"></td> - </tr> - <tr><th align="right">Current password</th> - <td><input type="password" name="old_password" size="18"></td> - </tr> - <tr><th align="right">New password</th> - <td><input type="password" name="new_password" size="18"></td> - </tr> - <tr><th align="right">Re-enter new password</th> - <td><input type="password" name="new_password2" size="18"></td> - </tr> - </table> - <br><input type="submit" value="Change password"> - </body> -</html> - diff --git a/fs_selfservice/FS-SelfService/cgi/payment_results.html b/fs_selfservice/FS-SelfService/cgi/payment_results.html deleted file mode 100644 index 9fe400faf..000000000 --- a/fs_selfservice/FS-SelfService/cgi/payment_results.html +++ /dev/null @@ -1,16 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<FONT SIZE=4>Payment results</FONT><BR><BR> -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error processing your payment: $error</FONT>!; -} else { - $OUT .= 'Your payment was processed successfully. Thank you.'; -} %> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/process_change_bill.html b/fs_selfservice/FS-SelfService/cgi/process_change_bill.html deleted file mode 100644 index 66a71e6e8..000000000 --- a/fs_selfservice/FS-SelfService/cgi/process_change_bill.html +++ /dev/null @@ -1,13 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Information updated successfully.</FONT> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/process_change_password.html b/fs_selfservice/FS-SelfService/cgi/process_change_password.html deleted file mode 100644 index 4fdee79f3..000000000 --- a/fs_selfservice/FS-SelfService/cgi/process_change_password.html +++ /dev/null @@ -1,13 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Password changed for <%= $value %> <%= $label %>.</FONT> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/process_change_pay.html b/fs_selfservice/FS-SelfService/cgi/process_change_pay.html deleted file mode 100644 index 66a71e6e8..000000000 --- a/fs_selfservice/FS-SelfService/cgi/process_change_pay.html +++ /dev/null @@ -1,13 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Information updated successfully.</FONT> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/process_change_pkg.html b/fs_selfservice/FS-SelfService/cgi/process_change_pkg.html deleted file mode 100644 index 9347434ba..000000000 --- a/fs_selfservice/FS-SelfService/cgi/process_change_pkg.html +++ /dev/null @@ -1,13 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Package change successful.</FONT> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/process_change_ship.html b/fs_selfservice/FS-SelfService/cgi/process_change_ship.html deleted file mode 100644 index 66a71e6e8..000000000 --- a/fs_selfservice/FS-SelfService/cgi/process_change_ship.html +++ /dev/null @@ -1,13 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Information updated successfully.</FONT> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/process_order_pkg.html b/fs_selfservice/FS-SelfService/cgi/process_order_pkg.html deleted file mode 100755 index 79be5eba5..000000000 --- a/fs_selfservice/FS-SelfService/cgi/process_order_pkg.html +++ /dev/null @@ -1,13 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Package order successful.</FONT> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/process_order_recharge.html b/fs_selfservice/FS-SelfService/cgi/process_order_recharge.html deleted file mode 100644 index 851bbed44..000000000 --- a/fs_selfservice/FS-SelfService/cgi/process_order_recharge.html +++ /dev/null @@ -1,13 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4><%= $svc %> recharged successfully.</FONT> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/process_svc_acct.html b/fs_selfservice/FS-SelfService/cgi/process_svc_acct.html deleted file mode 100644 index 3b812919a..000000000 --- a/fs_selfservice/FS-SelfService/cgi/process_svc_acct.html +++ /dev/null @@ -1,13 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4><%= $svc %> setup successfully.</FONT> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/process_svc_external.html b/fs_selfservice/FS-SelfService/cgi/process_svc_external.html deleted file mode 100644 index 19fec737f..000000000 --- a/fs_selfservice/FS-SelfService/cgi/process_svc_external.html +++ /dev/null @@ -1,15 +0,0 @@ -<HTML><HEAD><TITLE><%= $error ? 'MyAccount' : sprintf("Your serial number is %010d-$title", $id) %></TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4><%= $svc %> setup successfully.</FONT> - -<BR><BR>Your serial number is <%= sprintf("%010d-$title", $id) %> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/promocode.html b/fs_selfservice/FS-SelfService/cgi/promocode.html deleted file mode 100644 index f8ee7f6eb..000000000 --- a/fs_selfservice/FS-SelfService/cgi/promocode.html +++ /dev/null @@ -1,14 +0,0 @@ -<HTML><HEAD><TITLE>ISP Signup</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>ISP Signup - promotional code</FONT><BR><BR> -<SCRIPT> -function gotoURL(object) { - window.location.href = 'signup.cgi?promo_code=' + object.promo_code.value; -} -</SCRIPT> -<FORM> -Enter promotional code <INPUT TYPE="text" NAME="promo_code"> -<INPUT type="submit" VALUE="Signup" onClick="gotoURL(this.form)"> - -</FORM> -</BODY> -</HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/provision.html b/fs_selfservice/FS-SelfService/cgi/provision.html deleted file mode 100644 index d31e6070b..000000000 --- a/fs_selfservice/FS-SelfService/cgi/provision.html +++ /dev/null @@ -1,10 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<%= include('provision_list') %> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/provision_list.html b/fs_selfservice/FS-SelfService/cgi/provision_list.html deleted file mode 100644 index 88d1c848b..000000000 --- a/fs_selfservice/FS-SelfService/cgi/provision_list.html +++ /dev/null @@ -1,92 +0,0 @@ -<FONT SIZE=4>Setup services</FONT><BR><BR> - -<SCRIPT> -function areyousure(href, message) { - if (confirm(message) == true) - window.location.href = href; -} -</SCRIPT> - -<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#ffffff"> - -<%= foreach my $pkg ( - grep { scalar(@{$_->{part_svc}}) - || scalar(@{$_->{cust_svc}}) - } @cust_pkg - ) { - - $OUT .= #'<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#ffffff">'. - '<TR><TH BGCOLOR="#6666ff" COLSPAN=2>'. - $pkg->{'pkg'}. '</TH><TH BGCOLOR="#6666ff" >' . - qq!(<A style="font-size: smaller;color: #000000" HREF="! . - qq!${url}customer_change_pkg;pkgnum=$pkg->{'pkgnum'};pkg=$pkg->{'pkg'}">! . - 'change</A>)</TH></TR>'; - - my $col1 = "ffffff"; - my $col2 = "dddddd"; - my $col = $col1; - - foreach my $cust_svc ( @{ $pkg->{cust_svc} } ) { - my $td = qq!<TD BGCOLOR="#$col"!; - - $OUT .= '<TR>'. - "$td ALIGN=right>". $cust_svc->{label}[0]. ': </TD>'. - "$td><B>". $cust_svc->{label}[1]. '</B>'; - $OUT .= '<BR><I>password: '. encode_entities($cust_svc->{_password}). '</I>' - if exists($cust_svc->{_password}); - $OUT .= '</TD>'. - "$td><FONT SIZE=-1>"; - - #if ( $cust_svc->{label}[2] eq 'svc_acct' ) { - # $OUT .= qq!(<A HREF="${url}changepw;svcnum=$cust_svc->{'svcnum'}">!. - # 'change pw) '; - #} - - unless ( $cust_svc->{'svcnum'} == $svcnum ) { - $OUT .= qq!(<A HREF="javascript:areyousure('${url}delete_svc;svcnum=$cust_svc->{svcnum}', 'This will permanently delete the $cust_svc->{label}[1] $cust_svc->{label}[0]. Are you sure?')">!. - 'delete</A>)'; - - } - $OUT .= '</FONT></TD></TR>'; - $col = $col eq $col1 ? $col2 : $col1; - } - - $OUT .= '<TR><TD COLSPAN=3 BGCOLOR="#000000"></TD></TR>' - if scalar(@{$pkg->{part_svc}}) && scalar(@{$pkg->{cust_svc}}); - - $col = $col1; - - foreach my $part_svc ( @{ $pkg->{part_svc} } ) { - - my $td = qq!<TD BGCOLOR="#$col"!; - - my $link; - - if ( $part_svc->{'svcdb'} eq 'svc_external' - #&& $conf->exists('svc_external-skip_manual') - ) { - $link = "${url}process_svc_external;". - "pkgnum=$pkg->{'pkgnum'};". - "svcpart=$part_svc->{'svcpart'}"; - } else { - $link = "${url}provision_svc;". - "pkgnum=$pkg->{'pkgnum'};". - "svcpart=$part_svc->{'svcpart'}"; - } - - $OUT .= "<TR>$td COLSPAN=3 ALIGN=center>". - qq!<A HREF="$link">!. 'Setup '. $part_svc->{'svc'}. '</A> '. - '('. $part_svc->{'num_avail'}. ' available)'. - '</TD></TR>' - #self-service only supports these services so far - if grep { $part_svc->{'svcdb'} eq $_ } qw( svc_acct svc_external ); - - $col = $col eq $col1 ? $col2 : $col1; - } - - #$OUT .= '</TABLE><BR>'; - $OUT .= '<TR><TD BGCOLOR="#eeeeee" COLSPAN=3> </TD></TR>'; - -} %> - -</TABLE> diff --git a/fs_selfservice/FS-SelfService/cgi/provision_svc_acct.html b/fs_selfservice/FS-SelfService/cgi/provision_svc_acct.html deleted file mode 100644 index 50540742a..000000000 --- a/fs_selfservice/FS-SelfService/cgi/provision_svc_acct.html +++ /dev/null @@ -1,11 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<%= include('svc_acct') %> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/recharge_prepay.html b/fs_selfservice/FS-SelfService/cgi/recharge_prepay.html deleted file mode 100644 index f8584597a..000000000 --- a/fs_selfservice/FS-SelfService/cgi/recharge_prepay.html +++ /dev/null @@ -1,36 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<FONT SIZE=4>Recharge with prepaid card</FONT><BR><BR> -<FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true"> -<INPUT TYPE="hidden" NAME="session" VALUE="<%=$session_id%>"> -<INPUT TYPE="hidden" NAME="action" VALUE="recharge_results"> -<TABLE BGCOLOR="#cccccc"> -<!-- -<TR> - <TD ALIGN="right">Amount Due</TD> - <TD> - <TABLE><TR><TD BGCOLOR="#ffffff"> - $<%=sprintf("%.2f",$balance)%> - </TD></TR></TABLE> - </TD> -</TR> ---> -<TR> - <TD ALIGN="right">Prepaid card number</TD> - <TD> - <INPUT TYPE="text" NAME="prepaid_cardnum" SIZE=20 MAXLENGTH=19 VALUE="<%=$prepaid_cardnum%>"> - </TD> -</TR> -</TABLE> -<BR> -<INPUT TYPE="hidden" NAME="paybatch" VALUE="<%=$paybatch%>"> -<INPUT TYPE="submit" NAME="process" VALUE="Recharge"> <!-- onClick="this.disabled=true"> --> -</FORM> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/recharge_results.html b/fs_selfservice/FS-SelfService/cgi/recharge_results.html deleted file mode 100644 index b1eb7cb7a..000000000 --- a/fs_selfservice/FS-SelfService/cgi/recharge_results.html +++ /dev/null @@ -1,24 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> -<FONT SIZE=4>Recharge results</FONT><BR><BR> -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error processing your prepaid card: $error</FONT>!; -} else { - $OUT .= 'Prepaid card recharge successful!<BR><BR>'; - - $OUT .= '$'. sprintf('%.2f', $amount). ' added to your account.<BR><BR>' - if $amount; - - $OUT .= $duration. ' added to your account.<BR><BR>' - if $seconds; - - $OUT .= 'Thank you.'; -} %> -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - diff --git a/fs_selfservice/FS-SelfService/cgi/regcode.html b/fs_selfservice/FS-SelfService/cgi/regcode.html deleted file mode 100644 index e639b9b53..000000000 --- a/fs_selfservice/FS-SelfService/cgi/regcode.html +++ /dev/null @@ -1,14 +0,0 @@ -<HTML><HEAD><TITLE>ISP Signup</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>ISP Signup - registration code</FONT><BR><BR> -<SCRIPT> -function gotoURL(object) { - window.location.href = 'signup.cgi?reg_code=' + object.reg_code.value; -} -</SCRIPT> -<FORM> -Enter registration code <INPUT TYPE="text" NAME="reg_code"> -<INPUT type="submit" VALUE="Signup" onClick="gotoURL(this.form)"> - -</FORM> -</BODY> -</HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi deleted file mode 100644 index 36557b662..000000000 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ /dev/null @@ -1,647 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use vars qw($DEBUG $cgi $session_id $form_max $template_dir); -use subs qw(do_template); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use Text::Template; -use HTML::Entities; -use Date::Format; -use Number::Format 1.50; -use FS::SelfService qw( login customer_info edit_info invoice - payment_info process_payment - process_prepay - list_pkgs order_pkg signup_info order_recharge - part_svc_info provision_acct provision_external - unprovision_svc change_pkg domainselector - list_svcs list_svc_usage list_support_usage - myaccount_passwd - ); - -$template_dir = '.'; - -$DEBUG = 1; - -$form_max = 255; - -$cgi = new CGI; - -unless ( defined $cgi->param('session') ) { - do_template('login',{}); - exit; -} - -if ( $cgi->param('session') eq 'login' ) { - - $cgi->param('username') =~ /^\s*([a-z0-9_\-\.\&]{0,$form_max})\s*$/i - or die "illegal username"; - my $username = $1; - - $cgi->param('domain') =~ /^\s*([\w\-\.]{0,$form_max})\s*$/ - or die "illegal domain"; - my $domain = $1; - - $cgi->param('password') =~ /^(.{0,$form_max})$/ - or die "illegal password"; - my $password = $1; - - my $rv = login( - 'username' => $username, - 'domain' => $domain, - 'password' => $password, - ); - if ( $rv->{error} ) { - do_template('login', { - 'error' => $rv->{error}, - 'username' => $username, - 'domain' => $domain, - } ); - exit; - } else { - $cgi->param('session' => $rv->{session_id} ); - $cgi->param('action' => 'myaccount' ); - } -} - -$session_id = $cgi->param('session'); - -#order|pw_list XXX ??? -$cgi->param('action') =~ - /^(myaccount|view_invoice|make_payment|make_ach_payment|payment_results|ach_payment_results|recharge_prepay|recharge_results|logout|change_bill|change_ship|change_pay|process_change_bill|process_change_ship|process_change_pay|customer_order_pkg|process_order_pkg|customer_change_pkg|process_change_pkg|process_order_recharge|provision|provision_svc|process_svc_acct|process_svc_external|delete_svc|view_usage|view_usage_details|view_support_details|change_password|process_change_password)$/ - or die "unknown action ". $cgi->param('action'); -my $action = $1; - -warn "calling $action sub\n" - if $DEBUG; -$FS::SelfService::DEBUG = $DEBUG; -my $result = eval "&$action();"; -die $@ if $@; - -if ( $result->{error} eq "Can't resume session" - || $result->{error} eq "Expired session" ) { #ick - - do_template('login',{}); - exit; -} - -#warn $result->{'open_invoices'}; -#warn scalar(@{$result->{'open_invoices'}}); - -warn "processing template $action\n" - if $DEBUG; -do_template($action, { - 'session_id' => $session_id, - 'action' => $action, #so the menu knows what tab we're on... - %{$result} -}); - -#-- - -sub myaccount { customer_info( 'session_id' => $session_id ); } - -sub change_bill { my $payment_info = - payment_info( 'session_id' => $session_id ); - return $payment_info if ( $payment_info->{'error'} ); - my $customer_info = - customer_info( 'session_id' => $session_id ); - return { - %$payment_info, - %$customer_info, - }; - } -sub change_ship { change_bill(@_); } -sub change_pay { change_bill(@_); } - -sub _process_change_info { - my ($erroraction, @fields) = @_; - - my $results = ''; - - $results ||= edit_info ( - 'session_id' => $session_id, - map { ($_ => $cgi->param($_)) } grep { defined($cgi->param($_)) } @fields, - ); - - - if ( $results->{'error'} ) { - no strict 'refs'; - $action = $erroraction; - return { - $cgi->Vars, - %{&$action()}, - 'error' => '<FONT COLOR="#FF0000">'. $results->{'error'}. '</FONT>', - }; - } else { - return $results; - } -} - -sub process_change_bill { - _process_change_info( 'change_bill', - qw( first last company address1 address2 city state - county state zip country daytime night fax ) - ); -} - -sub process_change_ship { - my @list = map { "ship_$_" } - qw( first last company address1 address2 city state - county zip country daytime night fax - ); - if ($cgi->param('same') eq 'Y') { - foreach (@list) { $cgi->param($_, '') } - } - - _process_change_info( 'change_ship', @list ); -} - -sub process_change_pay { - _process_change_info( 'change_pay', - qw( payby payinfo payinfo1 payinfo2 month year payname - address1 address2 city county state zip country auto paytype - paystate ss stateid stateid_state ) - ); -} - -sub view_invoice { - - $cgi->param('invnum') =~ /^(\d+)$/ or die "illegal invnum"; - my $invnum = $1; - - invoice( 'session_id' => $session_id, - 'invnum' => $invnum, - ); - -} - -sub customer_order_pkg { - my $init_data = signup_info( 'customer_session_id' => $session_id ); - return $init_data if ( $init_data->{'error'} ); - - my $customer_info = customer_info( 'session_id' => $session_id ); - return $customer_info if ( $customer_info->{'error'} ); - - return { - ( map { $_ => $init_data->{$_} } - qw( part_pkg security_phrase svc_acct_pop ), - ), - %$customer_info, - }; -} - -sub customer_change_pkg { - my $init_data = signup_info( 'customer_session_id' => $session_id ); - return $init_data if ( $init_data->{'error'} ); - - my $customer_info = customer_info( 'session_id' => $session_id ); - return $customer_info if ( $customer_info->{'error'} ); - - return { - ( map { $_ => $init_data->{$_} } - qw( part_pkg security_phrase svc_acct_pop ), - ), - ( map { $_ => $cgi->param($_) } - qw( pkgnum pkg ) - ), - %$customer_info, - }; -} - -sub process_order_pkg { - - my $results = ''; - - unless ( length($cgi->param('_password')) ) { - my $init_data = signup_info( 'customer_session_id' => $session_id ); - $results = { 'error' => $init_data->{msgcat}{empty_password} }; - $results = { 'error' => $init_data->{error} } if($init_data->{error}); - } - if ( $cgi->param('_password') ne $cgi->param('_password2') ) { - my $init_data = signup_info( 'customer_session_id' => $session_id ); - $results = { 'error' => $init_data->{msgcat}{passwords_dont_match} }; - $results = { 'error' => $init_data->{error} } if($init_data->{error}); - $cgi->param('_password', ''); - $cgi->param('_password2', ''); - } - - $results ||= order_pkg ( - 'session_id' => $session_id, - map { $_ => $cgi->param($_) } - qw( custnum pkgpart username _password _password2 sec_phrase popnum ) - ); - - - if ( $results->{'error'} ) { - $action = 'customer_order_pkg'; - return { - $cgi->Vars, - %{customer_order_pkg()}, - 'error' => '<FONT COLOR="#FF0000">'. $results->{'error'}. '</FONT>', - }; - } else { - return $results; - } - -} - -sub process_change_pkg { - - my $results = ''; - - $results ||= change_pkg ( - 'session_id' => $session_id, - map { $_ => $cgi->param($_) } - qw( pkgpart pkgnum ) - ); - - - if ( $results->{'error'} ) { - $action = 'customer_change_pkg'; - return { - $cgi->Vars, - %{customer_change_pkg()}, - 'error' => '<FONT COLOR="#FF0000">'. $results->{'error'}. '</FONT>', - }; - } else { - return $results; - } - -} - -sub process_order_recharge { - - my $results = ''; - - $results ||= order_recharge ( - 'session_id' => $session_id, - map { $_ => $cgi->param($_) } - qw( svcnum ) - ); - - - if ( $results->{'error'} ) { - $action = 'view_usage'; - if ($results->{'error'} eq '_decline') { - $results->{'error'} = "There has been an error processing your account. Please contact customer support." - } - return { - $cgi->Vars, - %{view_usage()}, - 'error' => '<FONT COLOR="#FF0000">'. $results->{'error'}. '</FONT>', - }; - } else { - return $results; - } - -} - -sub make_payment { - payment_info( 'session_id' => $session_id ); -} - -sub payment_results { - - use Business::CreditCard; - - #we should only do basic checking here for DoS attacks and things - #that couldn't be constructed by the web form... let process_payment() do - #the rest, it gives better error messages - - $cgi->param('amount') =~ /^\s*(\d+(\.\d{2})?)\s*$/ - or die "Illegal amount: ". $cgi->param('amount'); #!!! - my $amount = $1; - - my $payinfo = $cgi->param('payinfo'); - $payinfo =~ s/\D//g; - $payinfo =~ /^(\d{13,16})$/ - #or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - or die "illegal card"; #!!! - $payinfo = $1; - validate($payinfo) - #or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - or die "invalid card"; #!!! - - if ( $cgi->param('card_type') ) { - cardtype($payinfo) eq $cgi->param('card_type') - #or $error ||= $init_data->{msgcat}{not_a}. $cgi->param('CARD_type'); - or die "not a ". $cgi->param('card_type'); - } - - $cgi->param('paycvv') =~ /^\s*(.{0,4})\s*$/ or die "illegal CVV2"; - my $paycvv = $1; - - $cgi->param('month') =~ /^(\d{2})$/ or die "illegal month"; - my $month = $1; - $cgi->param('year') =~ /^(\d{4})$/ or die "illegal year"; - my $year = $1; - - $cgi->param('payname') =~ /^(.{0,80})$/ or die "illegal payname"; - my $payname = $1; - - $cgi->param('address1') =~ /^(.{0,80})$/ or die "illegal address1"; - my $address1 = $1; - - $cgi->param('address2') =~ /^(.{0,80})$/ or die "illegal address2"; - my $address2 = $1; - - $cgi->param('city') =~ /^(.{0,80})$/ or die "illegal city"; - my $city = $1; - - $cgi->param('state') =~ /^(.{2})$/ or die "illegal state"; - my $state = $1; - - $cgi->param('zip') =~ /^(.{0,10})$/ or die "illegal zip"; - my $zip = $1; - - my $save = 0; - $save = 1 if $cgi->param('save'); - - my $auto = 0; - $auto = 1 if $cgi->param('auto'); - - $cgi->param('paybatch') =~ /^([\w\-\.]+)$/ or die "illegal paybatch"; - my $paybatch = $1; - - process_payment( - 'session_id' => $session_id, - 'payby' => 'CARD', - 'amount' => $amount, - 'payinfo' => $payinfo, - 'paycvv' => $paycvv, - 'month' => $month, - 'year' => $year, - 'payname' => $payname, - 'address1' => $address1, - 'address2' => $address2, - 'city' => $city, - 'state' => $state, - 'zip' => $zip, - 'save' => $save, - 'auto' => $auto, - 'paybatch' => $paybatch, - ); - -} - -sub make_ach_payment { - payment_info( 'session_id' => $session_id ); -} - -sub ach_payment_results { - - #we should only do basic checking here for DoS attacks and things - #that couldn't be constructed by the web form... let process_payment() do - #the rest, it gives better error messages - - $cgi->param('amount') =~ /^\s*(\d+(\.\d{2})?)\s*$/ - or die "illegal amount"; #!!! - my $amount = $1; - - my $payinfo1 = $cgi->param('payinfo1'); - $payinfo1=~ /^(\d+)$/ - or die "illegal account"; #!!! - $payinfo1= $1; - - my $payinfo2 = $cgi->param('payinfo2'); - $payinfo2=~ /^(\d+)$/ - or die "illegal ABA/routing code"; #!!! - $payinfo2= $1; - - $cgi->param('payname') =~ /^(.{0,80})$/ or die "illegal payname"; - my $payname = $1; - - $cgi->param('paystate') =~ /^(.{0,2})$/ or die "illegal paystate"; - my $paystate = $1; - - $cgi->param('paytype') =~ /^(.{0,80})$/ or die "illegal paytype"; - my $paytype = $1; - - $cgi->param('ss') =~ /^(.{0,80})$/ or die "illegal ss"; - my $ss = $1; - - $cgi->param('stateid') =~ /^(.{0,80})$/ or die "illegal stateid"; - my $stateid = $1; - - $cgi->param('stateid_state') =~ /^(.{0,2})$/ or die "illegal stateid_state"; - my $stateid_state = $1; - - my $save = 0; - $save = 1 if $cgi->param('save'); - - my $auto = 0; - $auto = 1 if $cgi->param('auto'); - - $cgi->param('paybatch') =~ /^([\w\-\.]+)$/ or die "illegal paybatch"; - my $paybatch = $1; - - process_payment( - 'session_id' => $session_id, - 'payby' => 'CHEK', - 'amount' => $amount, - 'payinfo1' => $payinfo1, - 'payinfo2' => $payinfo2, - 'month' => '12', - 'year' => '2037', - 'payname' => $payname, - 'paytype' => $paytype, - 'paystate' => $paystate, - 'ss' => $ss, - 'stateid' => $stateid, - 'stateid_state' => $stateid_state, - 'save' => $save, - 'auto' => $auto, - 'paybatch' => $paybatch, - ); - -} - -sub recharge_prepay { - customer_info( 'session_id' => $session_id ); -} - -sub recharge_results { - - my $prepaid_cardnum = $cgi->param('prepaid_cardnum'); - $prepaid_cardnum =~ s/\W//g; - $prepaid_cardnum =~ /^(\w*)$/ or die "illegal prepaid card number"; - $prepaid_cardnum = $1; - - process_prepay ( 'session_id' => $session_id, - 'prepaid_cardnum' => $prepaid_cardnum, - ); -} - -sub logout { - FS::SelfService::logout( 'session_id' => $session_id ); -} - -sub provision { - my $result = list_pkgs( 'session_id' => $session_id ); - die $result->{'error'} if exists $result->{'error'} && $result->{'error'}; - $result; -} - -sub provision_svc { - - my $result = part_svc_info( - 'session_id' => $session_id, - map { $_ => $cgi->param($_) } qw( pkgnum svcpart ), - ); - die $result->{'error'} if exists $result->{'error'} && $result->{'error'}; - - $result->{'svcdb'} =~ /^svc_(.*)$/ - #or return { 'error' => 'Unknown svcdb '. $result->{'svcdb'} }; - or die 'Unknown svcdb '. $result->{'svcdb'}; - $action .= "_$1"; - - $result; -} - -sub process_svc_acct { - - my $result = provision_acct ( - 'session_id' => $session_id, - map { $_ => $cgi->param($_) } qw( - pkgnum svcpart username domsvc _password _password2 sec_phrase popnum ) - ); - - if ( exists $result->{'error'} && $result->{'error'} ) { - #warn "$result $result->{'error'}"; - $action = 'provision_svc_acct'; - return { - $cgi->Vars, - %{ part_svc_info( 'session_id' => $session_id, - map { $_ => $cgi->param($_) } qw( pkgnum svcpart ) - ) - }, - 'error' => $result->{'error'}, - }; - } else { - #warn "$result $result->{'error'}"; - return $result; - } - -} - -sub process_svc_external { - provision_external ( - 'session_id' => $session_id, - map { $_ => $cgi->param($_) } qw( pkgnum svcpart ) - ); -} - -sub delete_svc { - unprovision_svc( - 'session_id' => $session_id, - 'svcnum' => $cgi->param('svcnum'), - ); -} - -sub view_usage { - list_svcs( - 'session_id' => $session_id, - 'svcdb' => 'svc_acct', - 'ncancelled' => 1, - ); -} - -sub view_usage_details { - list_svc_usage( - 'session_id' => $session_id, - 'svcnum' => $cgi->param('svcnum'), - 'beginning' => $cgi->param('beginning') || '', - 'ending' => $cgi->param('ending') || '', - ); -} - -sub view_support_details { - list_support_usage( - 'session_id' => $session_id, - 'svcnum' => $cgi->param('svcnum'), - 'beginning' => $cgi->param('beginning') || '', - 'ending' => $cgi->param('ending') || '', - ); -} - -sub change_password { - list_svcs( - 'session_id' => $session_id, - 'svcdb' => 'svc_acct', - ); -}; - -sub process_change_password { - - my $result = myaccount_passwd( - 'session_id' => $session_id, - map { $_ => $cgi->param($_) } qw( svcnum new_password new_password2 ) - ); - - if ( exists $result->{'error'} && $result->{'error'} ) { - - $action = 'change_password'; - return { - $cgi->Vars, - %{ list_svcs( 'session_id' => $session_id, - 'svcdb' => 'svc_acct', - ) - }, - #'svcnum' => $cgi->param('svcnum'), - 'error' => $result->{'error'} - }; - - } else { - - return $result; - - } - -} - -#-- - -sub do_template { - my $name = shift; - my $fill_in = shift; - - $cgi->delete_all(); - $fill_in->{'selfurl'} = $cgi->self_url; - $fill_in->{'cgi'} = \$cgi; - - my $template = new Text::Template( TYPE => 'FILE', - SOURCE => "$template_dir/$name.html", - DELIMITERS => [ '<%=', '%>' ], - UNTAINT => 1, ) - or die $Text::Template::ERROR; - - print $cgi->header( '-expires' => 'now' ), - $template->fill_in( PACKAGE => 'FS::SelfService::_selfservicecgi', - HASH => $fill_in - ); -} - -#*FS::SelfService::_selfservicecgi::include = \&Text::Template::fill_in_file; - -package FS::SelfService::_selfservicecgi; - -#use FS::SelfService qw(regionselector expselect popselector); -use HTML::Entities; -use FS::SelfService qw(regionselector popselector domainselector); - -#false laziness w/agent.cgi -sub include { - my $name = shift; - my $template = new Text::Template( TYPE => 'FILE', - SOURCE => "$main::template_dir/$name.html", - DELIMITERS => [ '<%=', '%>' ], - UNTAINT => 1, - ) - or die $Text::Template::ERROR; - - $template->fill_in( PACKAGE => 'FS::SelfService::_selfservicecgi', - #HASH => $fill_in - ); - -} - diff --git a/fs_selfservice/FS-SelfService/cgi/signup-agentselect.html b/fs_selfservice/FS-SelfService/cgi/signup-agentselect.html deleted file mode 100755 index 7851c5601..000000000 --- a/fs_selfservice/FS-SelfService/cgi/signup-agentselect.html +++ /dev/null @@ -1,195 +0,0 @@ -<HTML><HEAD><TITLE>ISP Signup form</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>ISP Signup form</FONT><BR><BR> -<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT> -<FORM NAME="OneTrueForm" ACTION="<%= $self_url %>" METHOD=POST onSubmit="document.OneTrueForm.signup.disabled=true"> -<INPUT TYPE="hidden" NAME="magic" VALUE="process"> -<INPUT TYPE="hidden" NAME="ref" VALUE="<%= $referral_custnum %>"> -<INPUT TYPE="hidden" NAME="ss" VALUE=""> -Agent <SELECT NAME="agentnum"> -<%= - warn $init_data; - warn $init_data->{'agent'}; - foreach my $agent ( @{$init_data->{'agent'}} ) { - $OUT .= '<OPTION VALUE="'. $agent->{'agentnum'}. '"'; - $OUT .= ' SELECTED' if $agent->{'agentnum'} eq $agentnum; - $OUT .= '>'. $agent->{'agent'}; - } -%> -</SELECT><BR><BR> -Contact Information -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Contact name<BR>(last, first)</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="last" VALUE="<%= $last %>">, - <INPUT TYPE="text" NAME="first" VALUE="<%= $first %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Company</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="company" SIZE=70 VALUE="<%= $company %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address1" SIZE=70 VALUE="<%= $address1 %>"></TD> -</TR> -<TR> - <TD ALIGN="right"> </TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address2" SIZE=70 VALUE="<%= $address2 %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>City</TH> - <TD><INPUT TYPE="text" NAME="city" VALUE="<%= $city %>"></TD> - <TH ALIGN="right"><font color="#ff0000">*</font>State/Country</TH> - <TD> - <%= - ($county_html, $state_html, $country_html) = - regionselector( $county, $state, $country ); - - "$county_html $state_html"; - %> - </TD> - <TH><font color="#ff0000">*</font>Zip</TH> - <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="<%= $zip %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Country</TH> - <TD><%= $country_html %></TD> -<TR> - <TD ALIGN="right">Day Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="daytime" VALUE="<%= $daytime %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Night Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="night" VALUE="<%= $night %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Fax</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="fax" VALUE="<%= $fax %>" SIZE=12></TD> -</TR> -</TABLE><font color="#ff0000">*</font> required fields<BR> -<BR>Billing information<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR><TD> - - <%= - $OUT .= '<INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"'; - my @invoicing_list = split(', ', $invoicing_list ); - $OUT .= ' CHECKED' - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; - $OUT .= '>'; - %> - - Postal mail invoice -</TD></TR> -<TR><TD>Email invoice <INPUT TYPE="text" NAME="invoicing_list" VALUE="<%= join(', ', grep { $_ ne 'POST' } split(', ', $invoicing_list ) ) %>"> -</TD></TR> -<%= scalar(@payby) > 1 ? '<TR><TD>Billing type</TD></TR>' : '' %> -</TABLE> -<TABLE BGCOLOR="#c0c0c0" BORDER=1 WIDTH="100%"> -<TR> - - <%= - - my $cardselect = '<SELECT NAME="CARD_type"><OPTION></OPTION>'; - my %types = ( - 'VISA' => 'VISA card', - 'MasterCard' => 'MasterCard', - 'Discover' => 'Discover card', - 'American Express' => 'American Express card', - ); - foreach ( keys %types ) { - $selected = $cgi->param('CARD_type') eq $types{$_} ? 'SELECTED' : ''; - $cardselect .= qq!<OPTION $selected VALUE="$types{$_}">$_</OPTION>!; - } - $cardselect .= '</SELECT>'; - - my %payby = ( - 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", "12-2037"). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!, - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("COMP"), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="" MAXLENGTH=80>!, - ); - - my( $account, $aba ) = split('@', $payinfo); - my %paybychecked = ( - 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname">!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="$payname">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="$payname">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="$payname">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="$payinfo" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", $paydate). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!, - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("COMP", $paydate), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="$payinfo" MAXLENGTH=80>!, - ); - - for (@payby) { - if ( scalar(@payby) == 1) { - $OUT .= '<TD VALIGN=TOP>'. - qq!<INPUT TYPE="hidden" NAME="payby" VALUE="$_">!. - "$paybychecked{$_}</TD>"; - } else { - $OUT .= qq!<TD VALIGN=TOP><INPUT TYPE="radio" NAME="payby" VALUE="$_"!; - if ($payby eq $_) { - $OUT .= qq! CHECKED> $paybychecked{$_}</TD>!; - } else { - $OUT .= qq!> $payby{$_}</TD>!; - } - - } - } - %> - -</TR></TABLE><font color="#ff0000">*</font> required fields for each billing type -<BR><BR>First package -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TD COLSPAN=2><SELECT NAME="pkgpart"><OPTION VALUE="">(none) - - <%= - foreach my $package ( @{$packages} ) { - $OUT .= '<OPTION VALUE="'. $package->{'pkgpart'}. '"'; - $OUT .= ' SELECTED' if $pkgpart && $package->{'pkgpart'} == $pkgpart; - $OUT .= '>'. $package->{'pkg'}; - } - %> - - </SELECT></TD> -</TR> -<TR> - <TD ALIGN="right">Username</TD> - <TD><INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Password</TD> - <TD><INPUT TYPE="password" NAME="_password" VALUE="<%= $password %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Re-enter Password</TD> - <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $password2 %>"></TD> -</TR> -<%= - if ( $init_data->{'security_phrase'} ) { - $OUT .= <<ENDOUT; -<TR> - <TD ALIGN="right">Security Phrase</TD> - <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> - </TD> -</TR> -ENDOUT - } else { - $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; - } -%> -<%= - if ( scalar(@$pops) ) { - $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'. - popselector($popnum). '</TD></TR>'; - } else { - $OUT .= popselector($popnum); - } -%> -</TABLE> -<BR><BR><INPUT TYPE="submit" NAME="signup" VALUE="Signup" > -</FORM></BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/signup-alternate.html b/fs_selfservice/FS-SelfService/cgi/signup-alternate.html deleted file mode 100755 index 490cefa5e..000000000 --- a/fs_selfservice/FS-SelfService/cgi/signup-alternate.html +++ /dev/null @@ -1,218 +0,0 @@ -<HTML><HEAD><TITLE>ISP Signup form</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>ISP Signup form</FONT><BR><BR> -<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT> -<FORM NAME="dummy"> -<INPUT TYPE="hidden" NAME="magic" VALUE="process"> -<INPUT TYPE="hidden" NAME="ref" VALUE="<%= $referral_custnum %>"> -<INPUT TYPE="hidden" NAME="ss" VALUE=""> -<INPUT TYPE="hidden" NAME="agentnum" VALUE="3"> -Contact Information -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Contact name<BR>(last, first)</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="last" VALUE="<%= $last %>">, - <INPUT TYPE="text" NAME="first" VALUE="<%= $first %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Company</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="company" SIZE=70 VALUE="<%= $company %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address1" SIZE=70 VALUE="<%= $address1 %>"></TD> -</TR> -<TR> - <TD ALIGN="right"> </TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address2" SIZE=70 VALUE="<%= $address2 %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>City</TH> - <TD><INPUT TYPE="text" NAME="city" VALUE="<%= $city %>"></TD> - <TH ALIGN="right"><font color="#ff0000">*</font>State/Country</TH> - <TD><SELECT NAME="state" SIZE="1"> - - <%= - foreach ( @{$locales} ) { - my $value = $_->{'state'}; - $value .= ' ('. $_->{'county'}. ')' if $_->{'county'}; - $value .= ' / '. $_->{'country'}; - - $OUT .= qq(<OPTION VALUE="$value"); - $OUT .= ' SELECTED' if ( $state eq $_->{'state'} - && $county eq $_->{'county'} - && $country eq $_->{'country'} - ); - $OUT .= ">$value</OPTION>"; - } - %> - - </SELECT></TD> - <TH><font color="#ff0000">*</font>Zip</TH> - <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="<%= $zip %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Day Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="daytime" VALUE="<%= $daytime %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Night Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="night" VALUE="<%= $night %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Fax</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="fax" VALUE="<%= $fax %>" SIZE=12></TD> -</TR> -</TABLE><font color="#ff0000">*</font> required fields<BR> - -<BR><BR> -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Username</TH> - <TD><INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Password</TH> - <TD><INPUT TYPE="password" NAME="_password" VALUE="<%= $password %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Re-enter Password</TH> - <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $password2 %>"></TD> -</TR> - -<%= if ( $init_data->{'security_phrase'} ) { - <<ENDOUT; -<TR> - <TD ALIGN="right">Security Phrase</TD> - <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> - </TD> -</TR> -ENDOUT - } else { - '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; - } -%> - -<%= if ( scalar(@$pops) ) { - '<TR><TD ALIGN="right">Access number</TD><TD>'. - popselector($popnum). '</TD></TR>'; - } else { - popselector($popnum); - } -%> - -</TABLE><font color="#ff0000">*</font> required fields - -<BR><BR>First package - - <%= use Tie::IxHash; - my %pkgpart2payby = map { $_->{pkgpart} => $_->{payby}[0] } @{$packages}; - tie my %options, 'Tie::IxHash', - '' => '(none)', - map { $_->{pkgpart} => $_->{pkg} } - sort { $a->{recur} <=> $b->{recur} } - @{$packages} - ; - - use HTML::Widgets::SelectLayers 0.02; - my @form_text = qw( magic ref ss agentnum - last first company address1 address2 - city zip daytime night fax - username _password _password2 sec_phrase ); - my @form_select = qw( state ); #county country - if ( scalar(@$pops) == 0 or scalar(@$pops) == 1 ) { - push @form_text, 'popnum', - } else { - push @form_select, 'popnum', - } - my $widget = new HTML::Widgets::SelectLayers( - options => \%options, - selected_layer => $pkgpart, - form_name => 'dummy', - form_action => $self_url, - form_text => \@form_text, - form_select => \@form_select, - layer_callback => sub { - my $layer = shift; - my $html = qq( <INPUT TYPE="hidden" NAME="pkgpart" VALUE="$layer">); - - if ( $pkgpart2payby{$layer} eq 'BILL' ) { - $html .= <<ENDOUT; -<INPUT TYPE="hidden" NAME="payby" VALUE="BILL"> -<INPUT TYPE="hidden" NAME="invoicing_list_POST" VALUE=""> -<INPUT TYPE="hidden" NAME="BILL_payinfo" VALUE=""> -<INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"> -<INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037"> -<INPUT TYPE="hidden" NAME="BILL_payname" VALUE=""> -<BR><BR><INPUT TYPE="submit" VALUE="Signup"> -ENDOUT - } elsif ( $pkgpart2payby{$layer} eq 'CARD' ) { - my $postal_checked = ''; - my @invoicing_list = split(', ', $invoicing_list ); - $postal_checked = 'CHECKED' - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; - - $invoicing_list= join(', ', grep { $_ ne 'POST' } @invoicing_list ); - - my $expselect = expselect("CARD", $paydate); - - my $cardselect = '<SELECT NAME="CARD_type"><OPTION></OPTION>'; - my %types = ( - 'VISA' => 'VISA card', - 'MasterCard' => 'MasterCard', - 'Discover' => 'Discover card', - 'American Express' => 'American Express card', - ); - foreach ( keys %types ) { - $selected = - $cgi->param('CARD_type') eq $types{$_} ? 'SELECTED' : ''; - $cardselect .= - qq!<OPTION $selected VALUE="$types{$_}">$_</OPTION>!; - } - $cardselect .= '</SELECT>'; - - $html .= <<ENDOUT; -<INPUT TYPE="hidden" NAME="payby" VALUE="CARD"> -<BR><BR>Billing information -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0> -<INPUT TYPE="hidden" NAME="invoicing_list_POST" VALUE=""> -<TR> - <TD ALIGN="right">Email statement to </TD> - <TD><INPUT TYPE="text" NAME="invoicing_list" VALUE="$invoicing_list"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Credit card type</TH> - <TD>$cardselect</TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Card number</TH> - <TD><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>*</font>Exp</TH> - <TD>$expselect</TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Name on card</TH> - <TD><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname"></TD> -</TR> -</TABLE> -<font color="#ff0000">*</font> required fields -<BR><BR><INPUT TYPE="submit" VALUE="Signup"> -ENDOUT - } else { - $html = <<ENDOUT; -<BR>Please select a package.<BR> -ENDOUT - - } - - $html; - - }, - ); - - $widget->html; - - - %> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/signup-billaddress.html b/fs_selfservice/FS-SelfService/cgi/signup-billaddress.html deleted file mode 100755 index 3cf9d2505..000000000 --- a/fs_selfservice/FS-SelfService/cgi/signup-billaddress.html +++ /dev/null @@ -1,307 +0,0 @@ -<HTML><HEAD><TITLE>ISP Signup form</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8" onUnload="myclose()"> -<script language="JavaScript"><!-- - var mywindow = -1; - function myopen(filename,windowname,properties) { - myclose(); - mywindow = window.open(filename,windowname,properties); - } - function myclose() { - if ( mywindow != -1 ) - mywindow.close(); - mywindow = -1 - } -//--></script> -<FONT SIZE=7>ISP Signup form</FONT><BR><BR> -<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT> -<FORM NAME="OneTrueForm" ACTION="<%= $self_url %>" METHOD=POST onSubmit="document.OneTrueForm.signup.disabled=true"> -<INPUT TYPE="hidden" NAME="magic" VALUE="process"> -<INPUT TYPE="hidden" NAME="ref" VALUE="<%= $referral_custnum %>"> -<INPUT TYPE="hidden" NAME="ss" VALUE=""> -Where did you hear about our service? <SELECT NAME="refnum"> -<%= - $OUT .= '<OPTION VALUE="">' unless $refnum; - foreach my $part_referral ( @{$init_data->{'part_referral'}} ) { - $OUT .= '<OPTION VALUE="'. $part_referral->{'refnum'}. '"'; - $OUT .= ' SELECTED' if $part_referral->{'refnum'} eq $refnum; - $OUT .= '>'. $part_referral->{'referral'}; - } -%> -</SELECT><BR><BR> -Billing Address (where credit card statement is sent) -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Exact name on card<BR>(last, first)</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="last" VALUE="<%= $last %>" onChange="changed(this)">, - <INPUT TYPE="text" NAME="first" VALUE="<%= $first %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TD ALIGN="right">Company</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="company" SIZE=70 VALUE="<%= $company %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address1" SIZE=70 VALUE="<%= $address1 %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TD ALIGN="right"> </TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address2" SIZE=70 VALUE="<%= $address2 %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>City</TH> - <TD><INPUT TYPE="text" NAME="city" VALUE="<%= $city %>" onChange="changed(this)"></TD> - <TH ALIGN="right"><font color="#ff0000">*</font>State/Country</TH> - <TD> - <%= - ($county_html, $state_html, $country_html) = - regionselector( $county, $state, $country, '', 'changed(this)' ); - - "$county_html $state_html"; - %> - </TD> - <TH><font color="#ff0000">*</font>Zip</TH> - <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="<%= $zip %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Country</TH> - <TD><%= $country_html %></TD> -<TR> - <TD ALIGN="right">Day Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="daytime" VALUE="<%= $daytime %>" SIZE=18 onChange="changed(this)"></TD> -</TR> -<TR> - <TD ALIGN="right">Night Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="night" VALUE="<%= $night %>" SIZE=18 onChange="changed(this)"></TD> -</TR> -<TR> - <TD ALIGN="right">Fax</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="fax" VALUE="<%= $fax %>" SIZE=12 onChange="changed(this)"></TD> -</TR> -</TABLE> - -<SCRIPT> -function changed(what) { - what.form.same.checked = false; -} -function samechanged(what) { - if ( what.checked ) { - - <%= foreach (qw( - last first company address1 address2 city zip daytime night fax - )) { - $OUT .= "what.form.ship_$_.value = what.form.$_.value;\n"; - } - %> - - what.form.ship_country.selectedIndex = what.form.country.selectedIndex; - ship_country_changed(what.form.ship_country); - what.form.ship_state.selectedIndex = what.form.state.selectedIndex; - ship_state_changed(what.form.ship_state); - what.form.ship_county.selectedIndex = what.form.county.selectedIndex; - } -} -</SCRIPT> - -<BR><BR> -Service Address -(<INPUT TYPE="checkbox" NAME="same" VALUE="Y" onClick="samechanged(this)" <%= $same eq 'Y' ? 'CHECKED' : '' %>>same as billing address)<BR> -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Contact name<BR>(last, first)</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="ship_last" VALUE="<%= $ship_last %>" onChange="changed(this)">, - <INPUT TYPE="text" NAME="ship_first" VALUE="<%= $ship_first %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TD ALIGN="right">Company</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="ship_company" SIZE=70 VALUE="<%= $ship_company %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="ship_address1" SIZE=70 VALUE="<%= $ship_address1 %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TD ALIGN="right"> </TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="ship_address2" SIZE=70 VALUE="<%= $ship_address2 %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>City</TH> - <TD><INPUT TYPE="text" NAME="ship_city" VALUE="<%= $ship_city %>" onChange="changed(this)"></TD> - <TH ALIGN="right"><font color="#ff0000">*</font>State/Country</TH> - <TD> - <%= - ($ship_county_html, $ship_state_html, $ship_country_html) = - regionselector( $ship_county, - $ship_state, - $ship_country, - 'ship_', - 'changed(this)', - ); - - "$ship_county_html $ship_state_html"; - %> - </TD> - <TH><font color="#ff0000">*</font>Zip</TH> - <TD><INPUT TYPE="text" NAME="ship_zip" SIZE=10 VALUE="<%= $ship_zip %>" onChange="changed(this)"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Country</TH> - <TD><%= $ship_country_html %></TD> -<TR> - <TD ALIGN="right">Day Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="ship_daytime" VALUE="<%= $ship_daytime %>" SIZE=18 onChange="changed(this)"></TD> -</TR> -<TR> - <TD ALIGN="right">Night Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="ship_night" VALUE="<%= $ship_night %>" SIZE=18 onChange="changed(this)"></TD> -</TR> -<TR> - <TD ALIGN="right">Fax</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="ship_fax" VALUE="<%= $ship_fax %>" SIZE=12 onChange="changed(this)"></TD> -</TR> -</TABLE> - -<font color="#ff0000">*</font> required fields<BR> - -<BR>Billing information<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR><TD> - - <%= - $OUT .= '<INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"'; - my @invoicing_list = split(', ', $invoicing_list ); - $OUT .= ' CHECKED' - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; - $OUT .= '>'; - %> - - Postal mail invoice -</TD></TR> -<TR><TD>Email invoice <INPUT TYPE="text" NAME="invoicing_list" VALUE="<%= join(', ', grep { $_ ne 'POST' } split(', ', $invoicing_list ) ) %>"> -</TD></TR> -<%= scalar(@payby) > 1 ? '<TR><TD>Billing type</TD></TR>' : '' %> -</TABLE> -<TABLE BGCOLOR="#c0c0c0" BORDER=1 WIDTH="100%"> -<TR> - - <%= - - my $cardselect = '<SELECT NAME="CARD_type"><OPTION></OPTION>'; - my %types = ( - 'VISA' => 'VISA card', - 'MasterCard' => 'MasterCard', - 'Discover' => 'Discover card', - 'American Express' => 'American Express card', - ); - foreach ( keys %types ) { - $selected = $cgi->param('CARD_type') eq $types{$_} ? 'SELECTED' : ''; - $cardselect .= qq!<OPTION $selected VALUE="$types{$_}">$_</OPTION>!; - } - $cardselect .= '</SELECT>'; - - my %payby = ( - 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD"), #. qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD"), #. qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", "12-2037"). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!, - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("COMP"), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="" MAXLENGTH=80>!, - ); - - if ( $init_data->{'cvv_enabled'} ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 - $payby{$payby} .= qq!<BR>CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>) <INPUT TYPE="text" NAME=${payby}_paycvv VALUE="" SIZE=4 MAXLENGTH=4>!; - } - } - - my( $account, $aba ) = split('@', $payinfo); - my %paybychecked = ( - 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD", $paydate), #. qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname">!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD", $paydate), #. qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="$payname">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="$payname">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="$payname">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="$payinfo" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", $paydate). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!, - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("COMP", $paydate), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="$payinfo" MAXLENGTH=80>!, - ); - - if ( $init_data->{'cvv_enabled'} ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 - $paybychecked{$payby} .= qq!<BR>CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>) <INPUT TYPE="text" NAME=${payby}_paycvv VALUE="$paycvv" SIZE=4 MAXLENGTH=4>!; - } - } - - for (@payby) { - if ( scalar(@payby) == 1) { - $OUT .= '<TD VALIGN=TOP>'. - qq!<INPUT TYPE="hidden" NAME="payby" VALUE="$_">!. - "$paybychecked{$_}</TD>"; - } else { - $OUT .= qq!<TD VALIGN=TOP><INPUT TYPE="radio" NAME="payby" VALUE="$_"!; - if ($payby eq $_) { - $OUT .= qq! CHECKED> $paybychecked{$_}</TD>!; - } else { - $OUT .= qq!> $payby{$_}</TD>!; - } - - } - } - %> - -</TR></TABLE><font color="#ff0000">*</font> required fields for each billing type -<BR><BR>First package -<INPUT TYPE="hidden" NAME="promo_code" VALUE="<%= $cgi->param('promo_code') %>"> -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TD COLSPAN=2><SELECT NAME="pkgpart"> - - <%= - $OUT .= '<OPTION VALUE="">(none)' unless scalar(@$packages) == 1; - foreach my $package ( @{$packages} ) { - $OUT .= '<OPTION VALUE="'. $package->{'pkgpart'}. '"'; - $OUT .= ' SELECTED' - if ( $pkgpart && $package->{'pkgpart'} == $pkgpart ) - || scalar(@$packages) == 1; - $OUT .= '>'. $package->{'pkg'}; - } - %> - - </SELECT></TD> -</TR> -<TR> - <TD ALIGN="right">Username</TD> - <TD><INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Password</TD> - <TD><INPUT TYPE="password" NAME="_password" VALUE="<%= $password %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Re-enter Password</TD> - <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $password2 %>"></TD> -</TR> -<%= - if ( $init_data->{'security_phrase'} ) { - $OUT .= <<ENDOUT; -<TR> - <TD ALIGN="right">Security Phrase</TD> - <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> - </TD> -</TR> -ENDOUT - } else { - $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; - } -%> -<%= - if ( scalar(@$pops) ) { - $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'. - popselector($popnum). '</TD></TR>'; - } else { - $OUT .= popselector($popnum); - } -%> -</TABLE> -<BR><BR><INPUT TYPE="submit" NAME="signup" VALUE="Signup"> -</FORM></BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/signup-freeoption.html b/fs_selfservice/FS-SelfService/cgi/signup-freeoption.html deleted file mode 100755 index 40ad03c0b..000000000 --- a/fs_selfservice/FS-SelfService/cgi/signup-freeoption.html +++ /dev/null @@ -1,262 +0,0 @@ -<HTML><HEAD><TITLE>ISP Signup form</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8" onUnload="myclose()"> -<script language="JavaScript"><!-- - var mywindow = -1; - function myopen(filename,windowname,properties) { - myclose(); - mywindow = window.open(filename,windowname,properties); - } - function myclose() { - if ( mywindow != -1 ) - mywindow.close(); - mywindow = -1 - } -//--></script> -<FONT SIZE=7>ISP Signup form</FONT><BR><BR> -<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT> -<FORM NAME="OneTrueForm" ACTION="<%= $self_url %>" METHOD=POST onSubmit="document.OneTrueForm.signup.disabled=true"> -<INPUT TYPE="hidden" NAME="magic" VALUE="process"> -<INPUT TYPE="hidden" NAME="ref" VALUE="<%= $referral_custnum %>"> -<INPUT TYPE="hidden" NAME="ss" VALUE=""> -Where did you hear about our service? <SELECT NAME="refnum"> -<%= - $OUT .= '<OPTION VALUE="">' unless $refnum; - foreach my $part_referral ( @{$init_data->{'part_referral'}} ) { - $OUT .= '<OPTION VALUE="'. $part_referral->{'refnum'}. '"'; - $OUT .= ' SELECTED' if $part_referral->{'refnum'} eq $refnum; - $OUT .= '>'. $part_referral->{'referral'}; - } -%> -</SELECT><BR><BR> -Contact Information -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Contact name<BR>(last, first)</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="last" VALUE="<%= $last %>">, - <INPUT TYPE="text" NAME="first" VALUE="<%= $first %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Company</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="company" SIZE=70 VALUE="<%= $company %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address1" SIZE=70 VALUE="<%= $address1 %>"></TD> -</TR> -<TR> - <TD ALIGN="right"> </TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address2" SIZE=70 VALUE="<%= $address2 %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>City</TH> - <TD><INPUT TYPE="text" NAME="city" VALUE="<%= $city %>"></TD> - <TH ALIGN="right"><font color="#ff0000">*</font>State/Country</TH> - <TD> - <%= - ($county_html, $state_html, $country_html) = - regionselector( $county, $state, $country ); - - "$county_html $state_html"; - %> - </TD> - <TH><font color="#ff0000">*</font>Zip</TH> - <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="<%= $zip %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Country</TH> - <TD><%= $country_html %></TD> -<TR> - <TD ALIGN="right">Day Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="daytime" VALUE="<%= $daytime %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Night Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="night" VALUE="<%= $night %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Fax</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="fax" VALUE="<%= $fax %>" SIZE=12></TD> -</TR> -</TABLE><font color="#ff0000">*</font> required fields<BR> -<BR> -<%= - my $first_payby = $packages->[0]{'payby'}[0]; - unless ( grep { scalar( @{$_->{'payby'}} ) > 1 - || $_->{'payby'}->[0] ne $first_payby - } @$packages - ) { - @payby = ( $first_payby ); - } - - unless ( scalar(@payby) == 1 && $payby[0] eq 'BILL' ) { - - $OUT .= ' Billing information - <TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> - <TR><TD> - <INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"'; - - my @invoicing_list = split(', ', $invoicing_list ); - - $OUT .= ' CHECKED' - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; - - $OUT .= '> Postal mail invoice - </TD></TR> - <TR><TD>Email invoice - <INPUT TYPE="text" NAME="invoicing_list" VALUE="' - .join(', ', grep { $_ ne 'POST' } split(', ', $invoicing_list ) ). - '"></TD></TR>'; - - $OUT .= '<TR><TD>Billing type</TD></TR>' - if scalar(@payby) > 1; - - $OUT .= '</TABLE>'; - - } else { - $OUT .= '<INPUT TYPE="hidden" NAME="invoicing_list" VALUE=""> - <INPUT TYPE="hidden" NAME="invoicing_list_POST" VALUE="">'; - } - -%> - -<TABLE BGCOLOR="#c0c0c0" BORDER=1 WIDTH="100%"> -<TR> - - <%= - - my $cardselect = '<SELECT NAME="CARD_type"><OPTION></OPTION>'; - my %types = ( - 'VISA' => 'VISA card', - 'MasterCard' => 'MasterCard', - 'Discover' => 'Discover card', - 'American Express' => 'American Express card', - ); - foreach ( keys %types ) { - $selected = $cgi->param('CARD_type') eq $types{$_} ? 'SELECTED' : ''; - $cardselect .= qq!<OPTION $selected VALUE="$types{$_}">$_</OPTION>!; - } - $cardselect .= '</SELECT>'; - - my %payby = ( - 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => <<'END', -<INPUT TYPE="hidden" NAME="BILL_payinfo" VALUE=""> -<INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"> -<INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037"> -<INPUT TYPE="hidden" NAME="BILL_payname" VALUE=""> -END - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("COMP"), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="" MAXLENGTH=80>!, - ); - - if ( $init_data->{'cvv_enabled'} ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 - $payby{$payby} .= qq!<BR>CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>) <INPUT TYPE="text" NAME=${payby}_paycvv VALUE="" SIZE=4 MAXLENGTH=4>!; - } - } - - my( $account, $aba ) = split('@', $payinfo); - my %paybychecked = ( - 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname">!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="$payname">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="$payname">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="$payname">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="$payinfo" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => <<'END', -<INPUT TYPE="hidden" NAME="BILL_payinfo" VALUE=""> -<INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"> -<INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037"> -<INPUT TYPE="hidden" NAME="BILL_payname" VALUE=""> -END - - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("COMP", $paydate), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="$payinfo" MAXLENGTH=80>!, - ); - - if ( $init_data->{'cvv_enabled'} ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 - $paybychecked{$payby} .= qq!<BR>CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>) <INPUT TYPE="text" NAME=${payby}_paycvv VALUE="$paycvv" SIZE=4 MAXLENGTH=4>!; - } - } - - for (@payby) { - if ( scalar(@payby) == 1) { - $OUT .= '<TD VALIGN=TOP>'. - qq!<INPUT TYPE="hidden" NAME="payby" VALUE="$_">!. - "$paybychecked{$_}</TD>"; - } else { - $OUT .= qq!<TD VALIGN=TOP><INPUT TYPE="radio" NAME="payby" VALUE="$_"!; - if ($payby eq $_) { - $OUT .= qq! CHECKED> $paybychecked{$_}</TD>!; - } else { - $OUT .= qq!> $payby{$_}</TD>!; - } - - } - } - %> - -</TR></TABLE> -<%= unless ( scalar(@payby) == 1 && $payby[0] eq 'BILL' ) { - $OUT .= '<font color="#ff0000">*</font> required fields for each billing type'; - } - ''; -%> -<BR><BR>First package -<INPUT TYPE="hidden" NAME="promo_code" VALUE="<%= $cgi->param('promo_code') %>"><TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TD COLSPAN=2><SELECT NAME="pkgpart"> - - <%= - $OUT .= '<OPTION VALUE="">(none)' unless scalar(@$packages) == 1; - foreach my $package ( @{$packages} ) { - $OUT .= '<OPTION VALUE="'. $package->{'pkgpart'}. '"'; - $OUT .= ' SELECTED' - if ( $pkgpart && $package->{'pkgpart'} == $pkgpart ) - || scalar(@$packages) == 1; - $OUT .= '>'. $package->{'pkg'}; - } - %> - - </SELECT></TD> -</TR> -<TR> - <TD ALIGN="right">Username</TD> - <TD><INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Password</TD> - <TD><INPUT TYPE="password" NAME="_password" VALUE="<%= $password %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Re-enter Password</TD> - <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $password2 %>"></TD> -</TR> -<%= - if ( $init_data->{'security_phrase'} ) { - $OUT .= <<ENDOUT; -<TR> - <TD ALIGN="right">Security Phrase</TD> - <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> - </TD> -</TR> -ENDOUT - } else { - $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; - } -%> -<%= - if ( scalar(@$pops) ) { - $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'. - popselector($popnum). '</TD></TR>'; - } else { - $OUT .= popselector($popnum); - } -%> -</TABLE> -<BR><BR><INPUT TYPE="submit" NAME="signup" VALUE="Signup"> -</FORM></BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/signup-snarf.html b/fs_selfservice/FS-SelfService/cgi/signup-snarf.html deleted file mode 100755 index d167efbf9..000000000 --- a/fs_selfservice/FS-SelfService/cgi/signup-snarf.html +++ /dev/null @@ -1,228 +0,0 @@ -<HTML><HEAD><TITLE>ISP Signup form</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8" onUnload="myclose()"> -<script language="JavaScript"><!-- - var mywindow = -1; - function myopen(filename,windowname,properties) { - myclose(); - mywindow = window.open(filename,windowname,properties); - } - function myclose() { - if ( mywindow != -1 ) - mywindow.close(); - mywindow = -1 - } -//--></script> -<FONT SIZE=7>ISP Signup form</FONT><BR><BR> -<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT> -<FORM ACTION="<%= $self_url %>" METHOD=POST> -<INPUT TYPE="hidden" NAME="magic" VALUE="process"> -<INPUT TYPE="hidden" NAME="ref" VALUE="<%= $referral_custnum %>"> -<INPUT TYPE="hidden" NAME="ss" VALUE=""> -Contact Information -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Contact name<BR>(last, first)</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="last" VALUE="<%= $last %>">, - <INPUT TYPE="text" NAME="first" VALUE="<%= $first %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Company</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="company" SIZE=70 VALUE="<%= $company %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address1" SIZE=70 VALUE="<%= $address1 %>"></TD> -</TR> -<TR> - <TD ALIGN="right"> </TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address2" SIZE=70 VALUE="<%= $address2 %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>City</TH> - <TD><INPUT TYPE="text" NAME="city" VALUE="<%= $city %>"></TD> - <TH ALIGN="right"><font color="#ff0000">*</font>State/Country</TH> - <TD> - <%= - ($county_html, $state_html, $country_html) = - regionselector( $county, $state, $country ); - - "$county_html $state_html"; - %> - </TD> - <TH><font color="#ff0000">*</font>Zip</TH> - <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="<%= $zip %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Country</TH> - <TD><%= $country_html %></TD> -<TR> - <TD ALIGN="right">Day Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="daytime" VALUE="<%= $daytime %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Night Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="night" VALUE="<%= $night %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Fax</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="fax" VALUE="<%= $fax %>" SIZE=12></TD> -</TR> -</TABLE><font color="#ff0000">*</font> required fields<BR> -<BR>Billing information<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR><TD> - - <%= - $OUT .= '<INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"'; - my @invoicing_list = split(', ', $invoicing_list ); - $OUT .= ' CHECKED' - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; - $OUT .= '>'; - %> - - Postal mail invoice -</TD></TR> -<TR><TD>Email invoice <INPUT TYPE="text" NAME="invoicing_list" VALUE="<%= join(', ', grep { $_ ne 'POST' } split(', ', $invoicing_list ) ) %>"> -</TD></TR> -<%= scalar(@payby) > 1 ? '<TR><TD>Billing type</TD></TR>' : '' %> -</TABLE> -<TABLE BGCOLOR="#c0c0c0" BORDER=1 WIDTH="100%"> -<TR> - - <%= - - my $cardselect = '<SELECT NAME="CARD_type"><OPTION></OPTION>'; - my %types = ( - 'VISA' => 'VISA card', - 'MasterCard' => 'MasterCard', - 'Discover' => 'Discover card', - 'American Express' => 'American Express card', - ); - foreach ( keys %types ) { - $selected = $cgi->param('CARD_type') eq $types{$_} ? 'SELECTED' : ''; - $cardselect .= qq!<OPTION $selected VALUE="$types{$_}">$_</OPTION>!; - } - $cardselect .= '</SELECT>'; - - my %payby = ( - 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", "12-2037"). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!, - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("COMP"), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="" MAXLENGTH=80>!, - ); - - if ( $init_data->{'cvv_enabled'} ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 - $payby{$payby} .= qq!<BR>CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>) <INPUT TYPE="text" NAME=${payby}_paycvv VALUE="" SIZE=4 MAXLENGTH=4>!; - } - } - - my( $account, $aba ) = split('@', $payinfo); - my %paybychecked = ( - 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname">!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="$payname">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="$payname">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="$payname">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="$payinfo" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", $paydate). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!, - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("COMP", $paydate), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="$payinfo" MAXLENGTH=80>!, - ); - - if ( $init_data->{'cvv_enabled'} ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 - $paybychecked{$payby} .= qq!<BR>CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>) <INPUT TYPE="text" NAME=${payby}_paycvv VALUE="$paycvv" SIZE=4 MAXLENGTH=4>!; - } - } - - for (@payby) { - if ( scalar(@payby) == 1) { - $OUT .= '<TD VALIGN=TOP>'. - qq!<INPUT TYPE="hidden" NAME="payby" VALUE="$_">!. - "$paybychecked{$_}</TD>"; - } else { - $OUT .= qq!<TD VALIGN=TOP><INPUT TYPE="radio" NAME="payby" VALUE="$_"!; - if ($payby eq $_) { - $OUT .= qq! CHECKED> $paybychecked{$_}</TD>!; - } else { - $OUT .= qq!> $payby{$_}</TD>!; - } - - } - } - %> - -</TR></TABLE><font color="#ff0000">*</font> required fields for each billing type -<BR><BR>First package -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TD COLSPAN=2><SELECT NAME="pkgpart"><OPTION VALUE="">(none) - - <%= - foreach my $package ( @{$packages} ) { - $OUT .= '<OPTION VALUE="'. $package->{'pkgpart'}. '"'; - $OUT .= ' SELECTED' if $pkgpart && $package->{'pkgpart'} == $pkgpart; - $OUT .= '>'. $package->{'pkg'}; - } - %> - - </SELECT></TD> -</TR> -<TR> - <TD ALIGN="right">Username</TD> - <TD><INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Password</TD> - <TD><INPUT TYPE="password" NAME="_password" VALUE="<%= $password %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Re-enter Password</TD> - <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $password2 %>"></TD> -</TR> -<%= - if ( $init_data->{'security_phrase'} ) { - $OUT .= <<ENDOUT; -<TR> - <TD ALIGN="right">Security Phrase</TD> - <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> - </TD> -</TR> -ENDOUT - } else { - $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; - } -%> -<%= - if ( scalar(@$pops) ) { - $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'. - popselector($popnum). '</TD></TR>'; - } else { - $OUT .= popselector($popnum); - } -%> -</TABLE> -<BR><BR>Enter up to ten external accounts from which to retrieve email -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TH ALIGN="left">Mail server</TH> - <TH ALIGN="left">Username</TH> - <TH ALIGN="left">Password</TH> -</TR> -<%= - for my $num ( 1..10 ) { - no strict 'vars'; - $OUT .= qq!<TR><TD><INPUT TYPE="text" NAME="snarf_machine$num" VALUE="${"snarf_machine$num"}"></TD>!. - qq!<INPUT TYPE="hidden" NAME="snarf_protocol$num" VALUE="pop3">!. - qq!<TD><INPUT TYPE="text" NAME="snarf_username$num" VALUE="${"snarf_username$num"}"></TD>!. - qq!<TD><INPUT TYPE="password" NAME="snarf_password$num" VALUE="${"snarf_password$num"}"></TD>!. - qq!</TR>!; - } -%> -</TABLE> - -<BR><BR><INPUT TYPE="submit" VALUE="Signup"> -</FORM></BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/signup.cgi b/fs_selfservice/FS-SelfService/cgi/signup.cgi deleted file mode 100755 index e07b6ee5a..000000000 --- a/fs_selfservice/FS-SelfService/cgi/signup.cgi +++ /dev/null @@ -1,349 +0,0 @@ -#!/usr/bin/perl -T -#!/usr/bin/perl -Tw - -use strict; -use vars qw( @payby $cgi $init_data - $self_url $error $agentnum - - $ieak_file $ieak_template - $signup_html $signup_template - $success_html $success_template - $decline_html $decline_template - ); - -use subs qw( print_form print_okay print_decline - success_default decline_default - ); -use CGI; -#use CGI::Carp qw(fatalsToBrowser); -use Text::Template; -use Business::CreditCard; -use HTTP::BrowserDetect; -use FS::SelfService qw( signup_info new_customer ); - -#acceptable payment methods -# -#@payby = qw( CARD BILL COMP ); -#@payby = qw( CARD BILL ); -#@payby = qw( CARD ); -@payby = qw( CARD PREPAY ); - -$ieak_file = '/usr/local/freeside/ieak.template'; -$signup_html = -e 'signup.html' - ? 'signup.html' - : '/usr/local/freeside/signup.html'; -$success_html = -e 'success.html' - ? 'success.html' - : '/usr/local/freeside/success.html'; -$decline_html = -e 'decline.html' - ? 'decline.html' - : '/usr/local/freeside/decline.html'; - - -if ( -e $ieak_file ) { - my $ieak_txt = Text::Template::_load_text($ieak_file) - or die $Text::Template::ERROR; - $ieak_txt =~ /^(.*)$/s; #untaint the template source - it's trusted - $ieak_txt = $1; - $ieak_txt =~ s/\r//g; # don't double \r on old templates - $ieak_txt =~ s/\n/\r\n/g; - $ieak_template = new Text::Template ( TYPE => 'STRING', SOURCE => $ieak_txt ) - or die $Text::Template::ERROR; -} else { - $ieak_template = ''; -} - -$agentnum = ''; -if ( -e $signup_html ) { - my $signup_txt = Text::Template::_load_text($signup_html) - or die $Text::Template::ERROR; - $signup_txt =~ /^(.*)$/s; #untaint the template source - it's trusted - $signup_txt = $1; - $signup_template = new Text::Template ( TYPE => 'STRING', - SOURCE => $signup_txt, - DELIMITERS => [ '<%=', '%>' ] - ) - or die $Text::Template::ERROR; - if ( $signup_txt =~ - /<\s*INPUT TYPE="?hidden"?\s+NAME="?agentnum"?\s+VALUE="?(\d+)"?\s*>/si - ) { - $agentnum = $1; - } -} else { - #too much maintenance hassle to keep in this file - die "can't find ./signup.html or /usr/local/freeside/signup.html"; - #$signup_template = new Text::Template ( TYPE => 'STRING', - # SOURCE => &signup_default, - # DELIMITERS => [ '<%=', '%>' ] - # ) - # or die $Text::Template::ERROR; -} - -if ( -e $success_html ) { - my $success_txt = Text::Template::_load_text($success_html) - or die $Text::Template::ERROR; - $success_txt =~ /^(.*)$/s; #untaint the template source - it's trusted - $success_txt = $1; - $success_template = new Text::Template ( TYPE => 'STRING', - SOURCE => $success_txt, - DELIMITERS => [ '<%=', '%>' ], - ) - or die $Text::Template::ERROR; -} else { - $success_template = new Text::Template ( TYPE => 'STRING', - SOURCE => &success_default, - DELIMITERS => [ '<%=', '%>' ], - ) - or die $Text::Template::ERROR; -} - -if ( -e $decline_html ) { - my $decline_txt = Text::Template::_load_text($decline_html) - or die $Text::Template::ERROR; - $decline_txt =~ /^(.*)$/s; #untaint the template source - it's trusted - $decline_txt = $1; - $decline_template = new Text::Template ( TYPE => 'STRING', - SOURCE => $decline_txt, - DELIMITERS => [ '<%=', '%>' ], - ) - or die $Text::Template::ERROR; -} else { - $decline_template = new Text::Template ( TYPE => 'STRING', - SOURCE => &decline_default, - DELIMITERS => [ '<%=', '%>' ], - ) - or die $Text::Template::ERROR; -} - -$cgi = new CGI; - -$init_data = signup_info( 'agentnum' => $agentnum, - 'promo_code' => scalar($cgi->param('promo_code')), - 'reg_code' => uc(scalar($cgi->param('reg_code'))), - ); - -if ( ( defined($cgi->param('magic')) && $cgi->param('magic') eq 'process' ) - || ( defined($cgi->param('action')) && $cgi->param('action') eq 'process_signup' ) - ) { - - $error = ''; - - $cgi->param('agentnum', $agentnum) if $agentnum; - $cgi->param('reg_code', uc(scalar($cgi->param('reg_code'))) ); - - #false laziness w/agent.cgi, identical except for agentnum - my $payby = $cgi->param('payby'); - if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) { - #$payinfo = join('@', map { $cgi->param( $payby. "_payinfo$_" ) } (1,2) ); - $cgi->param('payinfo' => $cgi->param($payby. '_payinfo1'). '@'. - $cgi->param($payby. '_payinfo2') - ); - } else { - $cgi->param('payinfo' => $cgi->param( $payby. '_payinfo' ) ); - } - $cgi->param('paydate' => $cgi->param( $payby. '_month' ). '-'. - $cgi->param( $payby. '_year' ) - ); - $cgi->param('payname' => $cgi->param( $payby. '_payname' ) ); - $cgi->param('paycvv' => defined $cgi->param( $payby. '_paycvv' ) - ? $cgi->param( $payby. '_paycvv' ) - : '' - ); - $cgi->param('paytype' => defined $cgi->param( $payby. '_paytype' ) - ? $cgi->param( $payby. '_paytype' ) - : '' - ); - $cgi->param('paystate' => defined $cgi->param( $payby. '_paystate' ) - ? $cgi->param( $payby. '_paystate' ) - : '' - ); - - if ( $cgi->param('invoicing_list') ) { - $cgi->param('invoicing_list' => $cgi->param('invoicing_list'). ', POST') - if $cgi->param('invoicing_list_POST'); - } else { - $cgi->param('invoicing_list' => 'POST' ); - } - - if ( $cgi->param('_password') ne $cgi->param('_password2') ) { - $error = $init_data->{msgcat}{passwords_dont_match}; #msgcat - $cgi->param('_password', ''); - $cgi->param('_password2', ''); - } - - if ( $payby =~ /^(CARD|DCRD)$/ && $cgi->param('CARD_type') ) { - my $payinfo = $cgi->param('payinfo'); - $payinfo =~ s/\D//g; - - $payinfo =~ /^(\d{13,16})$/ - or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - $payinfo = $1; - validate($payinfo) - or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - cardtype($payinfo) eq $cgi->param('CARD_type') - or $error ||= $init_data->{msgcat}{not_a}. $cgi->param('CARD_type'); - } - - if ($init_data->{emailinvoiceonly} && (length $cgi->param('invoicing_list') < 1)) { - $error ||= $init_data->{msgcat}{illegal_or_empty_text}; - } - - unless ( $error ) { - my $rv = new_customer( { - ( map { $_ => scalar($cgi->param($_)) } - qw( last first ss company - address1 address2 city county state zip country - daytime night fax stateid stateid_state - - ship_last ship_first ship_company - ship_address1 ship_address2 ship_city ship_county ship_state - ship_zip ship_country - ship_daytime ship_night ship_fax - - payby payinfo paycvv paydate payname paystate paytype - invoicing_list referral_custnum promo_code reg_code - pkgpart username sec_phrase _password popnum refnum - agentnum - ), - grep { /^snarf_/ } $cgi->param - ), - 'payip' => $cgi->remote_host(), - } ); - $error = $rv->{'error'}; - } - #eslaf - - if ( $error eq '_decline' ) { - print_decline(); - } elsif ( $error ) { - #fudge the snarf info - no strict 'refs'; - ${$_} = $cgi->param($_) foreach grep { /^snarf_/ } $cgi->param; - print_form(); - } else { - print_okay( - 'pkgpart' => scalar($cgi->param('pkgpart')), - ); - } - -} else { - $error = ''; - print_form; -} - -sub print_form { - - $error = "Error: $error" if $error; - - my $r = { - $cgi->Vars, - %{$init_data}, - 'error' => $error, - }; - - $r->{pkgpart} ||= $r->{default_pkgpart}; - - $r->{referral_custnum} = $r->{'ref'}; - #$cgi->delete('ref'); - #$cgi->delete('init_popstate'); - $r->{self_url} = $cgi->self_url; - - print $cgi->header( '-expires' => 'now' ), - $signup_template->fill_in( PACKAGE => 'FS::SelfService::_signupcgi', - HASH => $r - ); -} - -sub print_decline { - print $cgi->header( '-expires' => 'now' ), - $decline_template->fill_in(); -} - -sub print_okay { - my %param = @_; - my $user_agent = new HTTP::BrowserDetect $ENV{HTTP_USER_AGENT}; - - $cgi->param('username') =~ /^(.+)$/ - or die "fatal: invalid username got past FS::SelfService::new_customer"; - my $username = $1; - $cgi->param('_password') =~ /^(.+)$/ - or die "fatal: invalid password got past FS::SelfService::new_customer"; - my $password = $1; - ( $cgi->param('first'). ' '. $cgi->param('last') ) =~ /^(.*)$/ - or die "fatal: invalid email_name got past FS::SelfService::new_customer"; - my $email_name = $1; #global for template - - #my %pop = (); - my %popnum2pop = (); - foreach ( @{ $init_data->{'svc_acct_pop'} } ) { - #push @{ $pop{ $_->{state} }->{ $_->{ac} } }, $_; - $popnum2pop{$_->{popnum}} = $_; - } - - my( $ac, $exch, $loc); - my $pop = $popnum2pop{$cgi->param('popnum')}; - #or die "fatal: invalid popnum got past FS::SelfService::new_customer"; - if ( $pop ) { - ( $ac, $exch, $loc ) = ( $pop->{'ac'}, $pop->{'exch'}, $pop->{'loc'} ); - } else { - ( $ac, $exch, $loc ) = ( '', '', ''); #presumably you're not using them. - } - - #global for template - my $part_pkg = ( grep { $_->{'pkgpart'} eq $param{'pkgpart'} } - @{ $init_data->{'part_pkg'} } - )[0]; - my $pkg = $part_pkg->{'pkg'}; - - if ( $ieak_template && $user_agent->windows && $user_agent->ie ) { - #send an IEAK config - print $cgi->header('application/x-Internet-signup'), - $ieak_template->fill_in(); - } else { #send a simple confirmation - print $cgi->header( '-expires' => 'now' ), - $success_template->fill_in( HASH => { - username => $username, - password => $password, - _password => $password, - email_name => $email_name, - ac => $ac, - exch => $exch, - loc => $loc, - pkg => $pkg, - part_pkg => \$part_pkg, - }); - } -} - -sub success_default { #html to use if you don't specify a success file - <<'END'; -<HTML><HEAD><TITLE>Signup successful</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>Signup successful</FONT><BR><BR> -Thanks for signing up! -<BR><BR> -Signup information for <%= $email_name %>: -<BR><BR> -Username: <%= $username %><BR> -Password: <%= $password %><BR> -Access number: (<%= $ac %>) / <%= $exch %> - <%= $local %><BR> -Package: <%= $pkg %><BR> -</BODY></HTML> -END -} - -sub decline_default { #html to use if there is a decline - <<'END'; -<HTML><HEAD><TITLE>Processing error</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>Processing error</FONT><BR><BR> -There has been an error processing your account. Please contact customer -support. -</BODY></HTML> -END -} - -# subs for the templates... - -package FS::SelfService::_signupcgi; -use HTML::Entities; -use FS::SelfService qw(regionselector expselect popselector); - diff --git a/fs_selfservice/FS-SelfService/cgi/signup.html b/fs_selfservice/FS-SelfService/cgi/signup.html deleted file mode 100755 index 42334eade..000000000 --- a/fs_selfservice/FS-SelfService/cgi/signup.html +++ /dev/null @@ -1,382 +0,0 @@ -<HTML><HEAD><TITLE><%= $agent || 'ISP' %> Signup form</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8" onUnload="myclose()"> -<script language="JavaScript"><!-- - var mywindow = -1; - function myopen(filename,windowname,properties) { - myclose(); - mywindow = window.open(filename,windowname,properties); - } - function myclose() { - if ( mywindow != -1 ) - mywindow.close(); - mywindow = -1 - } -//--></script> -<FONT SIZE=7><%= $agent || 'ISP' %> Signup form</FONT><BR><BR> -<FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT> -<FORM NAME="OneTrueForm" ACTION="<%= $self_url %>" METHOD=POST onSubmit="document.OneTrueForm.signup.disabled=true"> -<INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>"> -<INPUT TYPE="hidden" NAME="action" VALUE="process_signup"> -<INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<%= $referral_custnum %>"> -<INPUT TYPE="hidden" NAME="ss" VALUE=""> -<input type="hidden" name="payby" /> -<%= - $OUT = join("\n",map { my $method = $_ ; map { qq|<input type="hidden" name="${method}_$_" />| } qw / payinfo payinfo1 payinfo2 payname paystate paytype paycvv month year type / } @payby); -%> - -<%= - $OUT = join("\n", map { qq|<input type="hidden" name="$_" />| } qw / promo_code reg_code pkgpart username _password _password2 sec_phrase popnum / ); -%> - -Where did you hear about our service? <SELECT NAME="refnum"> -<%= - $OUT .= '<OPTION VALUE="">' unless $refnum; - foreach my $part_referral ( @part_referral ) { - $OUT .= '<OPTION VALUE="'. $part_referral->{'refnum'}. '"'; - $OUT .= ' SELECTED' if $part_referral->{'refnum'} eq $refnum; - $OUT .= '>'. $part_referral->{'referral'}; - } -%> -</SELECT><BR><BR> -Contact Information -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Contact name<BR>(last, first)</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="last" VALUE="<%= $last %>">, - <INPUT TYPE="text" NAME="first" VALUE="<%= $first %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Company</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="company" SIZE=70 VALUE="<%= $company %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address1" SIZE=70 VALUE="<%= $address1 %>"></TD> -</TR> -<TR> - <TD ALIGN="right"> </TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="address2" SIZE=70 VALUE="<%= $address2 %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>City</TH> - <TD><INPUT TYPE="text" NAME="city" VALUE="<%= $city %>"></TD> - <TH ALIGN="right"><font color="#ff0000">*</font>State/Country</TH> - <TD> - <%= - ($county_html, $state_html, $country_html) = - regionselector( { - selected_county => $county, - selected_state => $state, - selected_country => $country, - default_state => $statedefault, - default_country => $countrydefault, - locales => \@cust_main_county, - } ); - - "$county_html $state_html"; - %> - </TD> - <TH><font color="#ff0000">*</font>Zip</TH> - <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="<%= $zip %>"></TD> -</TR> -<TR> - <TH ALIGN="right"><font color="#ff0000">*</font>Country</TH> - <TD><%= $country_html %></TD> -<TR> - <TD ALIGN="right">Day Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="daytime" VALUE="<%= $daytime %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Night Phone</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="night" VALUE="<%= $night %>" SIZE=18></TD> -</TR> -<TR> - <TD ALIGN="right">Fax</TD> - <TD COLSPAN=5><INPUT TYPE="text" NAME="fax" VALUE="<%= $fax %>" SIZE=12></TD> -</TR> -<%= - $OUT = ''; - if ( $stateid_enabled ) { - my ($county_html, $state_html, $country_html) = - regionselector( { - prefix => 'stateid_', - default_state => $statedefault, - default_country => $countrydefault, - locales => \@cust_main_county, - } ); - $OUT .= qq!<TR><TD ALIGN="right">!. $label{stateid}.'</TD>'; - $OUT .= qq!<TD><INPUT TYPE="text" NAME="stateid" VALUE="$stateid" SIZE=12></TD>!; - $OUT .= qq!<TD ALIGN="right">!. $label{stateid_state} .'</TD>'; - $OUT .="<TD COLSPAN=3>$county_html $state_html</TD></TR>"; - } -%> -</TABLE><font color="#ff0000">*</font> required fields<BR> -<BR>Billing information<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR><TD> - - <%= - $OUT =''; - unless ( $emailinvoiceonly ) { - $OUT .= '<INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"'; - my @invoicing_list = split(', ', $invoicing_list ); - $OUT .= ' CHECKED' - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; - $OUT .= '> Postal mail invoice'; } - %> - - -</TD></TR> -<TR><TD><%= $OUT = ( $emailinvoiceonly ? q|<font color="#ff0000">*</font>| : q|| ) %> Email invoice <INPUT TYPE="text" NAME="invoicing_list" VALUE="<%= join(', ', grep { $_ ne 'POST' } split(', ', $invoicing_list ) ) %>"> -</TD></TR> -<%= ( scalar(@payby) > 1 or 1 ) ? '<TR><TD>Billing type ' : '' %> -<!--</TABLE> -<TABLE BGCOLOR="#c0c0c0" BORDER=1 WIDTH="100%"> -<TR>--> - - <%= - - my $cardselect = '<SELECT NAME="CARD_type"><OPTION></OPTION>'; - foreach ( keys %card_types ) { - $selected = $CARD_type eq $card_types{$_} ? 'SELECTED' : ''; - $cardselect .= qq!<OPTION $selected VALUE="$card_types{$_}">$_</OPTION>!; - } - $cardselect .= '</SELECT>'; - - my %payby = ( - 'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9> Type <SELECT NAME="CHEK_paytype">!. join('', map {qq!<OPTION VALUE="$_">$_</OPTION>!} @paytypes). qq!</SELECT><BR>{$r}Bank State <INPUT TYPE="text" NAME="CHEK_paystate" VALUE="" SIZE=5 MAXLENGTH=4><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="" MAXLENGTH=10> Type <SELECT NAME="DCHK_paytype">!. join('', map {qq!<OPTION VALUE="$_">$_</OPTION>!} @paytypes). qq!</SELECT><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><BR>{$r}Bank State <INPUT TYPE="text" NAME="DCHK_paystate" VALUE="" SIZE=5 MAXLENGTH=4><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" NAME="LECB_payinfo" VALUE="" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", "12-2037"). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!, - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("COMP"), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="" MAXLENGTH=80>!, - ); - - if ( $cvv_enabled ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 - $payby{$payby} .= qq!<TR><TD ALIGN="right">CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>)</TD><TD><INPUT TYPE="text" NAME=${payby}_paycvv VALUE="" SIZE=4 MAXLENGTH=4></TD></TR>!; - } - } - if ( $paystate_enabled ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CHEK DCHK) ) { - my ($county_html, $state_html, $country_html) = - regionselector( { - prefix => "${payby}_pay", - default_state => $statedefault, - default_country => $countrydefault, - locales => \@cust_main_county, - } ); - $payby{$payby} .= "<BR>${r}Bank state $county_html $state_html"; - } - } - - my( $account, $aba ) = split('@', $payinfo); - my %paybychecked = ( - 'CARD' => qq!<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"><TR><TD ALIGN="right"><font color="#ff0000">*</font> Card type</TD><TD>$cardselect</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Card number</TD><TD><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19></TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Expration</TD><TD>!. expselect("CARD", $paydate). qq!</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Name on card</TD><TD><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname"></TD></TR>!, - 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="$payname">!, - 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="$account" MAXLENGTH=10> Type <SELECT NAME="CHEK_paytype">!. join('', map {qq!<OPTION VALUE="$_"!.($paytype eq $_ ? 'SELECTED' : '').">$_</OPTION>"} @paytypes). qq!</SELECT><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="$payname">!, - 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="$account" MAXLENGTH=10> Type <SELECT NAME="DCHK_paytype">!. join('', map {qq!<OPTION VALUE="$_"!.($paytype eq $_ ? 'SELECTED' : '').">$_</OPTION>"} @paytypes). qq!</SELECT><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!, - 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="$payinfo" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!, - 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", $paydate). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!, - 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("COMP", $paydate), - 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="$payinfo" MAXLENGTH=80>!, - ); - - if ( $cvv_enabled ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 - $paybychecked{$payby} .= qq!<TR><TD ALIGN="right">CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>)</TD><TD><INPUT TYPE="text" NAME=${payby}_paycvv VALUE="$paycvv" SIZE=4 MAXLENGTH=4></TD></TR>!; - } - } - if ( $paystate_enabled ) { - foreach my $payby ( grep { exists $payby{$_} } qw(CHEK DCHK) ) { - my ($county_html, $state_html, $country_html) = - regionselector( { - prefix => "${payby}_pay", - selected_county => $county, - selected_state => $state, - selected_country => $country, - default_state => $statedefault, - default_country => $countrydefault, - locales => \@cust_main_county, - } ); - $paybychecked{$payby} .= "<BR>${r}Bank state $county_html $state_html"; - } - } - -use Tie::IxHash; -use HTML::Widgets::SelectLayers; - - my %payby_index = ( 'CARD' => qq/Credit Card/, - 'DCRD' => qq/Credit Card/, - 'CHEK' => qq/Check/, - 'DCHK' => qq/Check/, - 'LECB' => qq/Phone Bill Billing/, - 'BILL' => qq/Billing/, - 'COMP' => qq/Complimentary/, - 'PREPAY' => qq/Prepaid Card/, - ); - - -tie my %options, 'Tie::IxHash', (); - -foreach my $payby_option ( @payby ) { - $options{$payby_option} = $payby_index{$payby_option}; -} - -HTML::Widgets::SelectLayers->new( - options => \%options, - selected_layer => 'CARD', - form_name => 'dummy', - html_between => '</td></tr></table>', - form_action => 'dummy.cgi', - layer_callback => sub { my $layer = shift; return $paybychecked{$layer}. '</TABLE>'; }, -)->html; - - - %> - -</TR></TABLE><font color="#ff0000">*</font> required fields -<FORM name="signup_form" action="<%= $self_url %>" METHOD="POST" onsubmit="return fixup_form();"><BR><BR>First package -<INPUT TYPE="hidden" NAME="promo_code" VALUE="<%= $promo_code %>"> -<INPUT TYPE="hidden" NAME="reg_code" VALUE="<%= $reg_code %>"> -<TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%"> -<TR> - <TD COLSPAN=2><SELECT NAME="pkgpart"> - - <%= - $OUT .= '<OPTION VALUE="">(none)' - unless scalar(@part_pkg) == 1 or $default_pkgpart; - foreach my $part_pkg ( @part_pkg ) { - $OUT .= '<OPTION VALUE="'. $part_pkg->{'pkgpart'}. '"'; - $OUT .= ' SELECTED' if $pkgpart && $part_pkg->{'pkgpart'} == $pkgpart; - $OUT .= '>'. $part_pkg->{'pkg'}; - } - %> - - </SELECT></TD> -</TR> -<TR> - <TD ALIGN="right">Username</TD> - <TD><INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Password</TD> - <TD><INPUT TYPE="password" NAME="_password" VALUE="<%= $_password %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Re-enter Password</TD> - <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $_password2 %>"></TD> -</TR> -<%= - if ( $security_phrase ) { - $OUT .= <<ENDOUT; -<TR> - <TD ALIGN="right">Security Phrase</TD> - <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> - </TD> -</TR> -ENDOUT - } else { - $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; - } -%> -<%= - if ( @svc_acct_pop ) { - $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'. - popselector( 'popnum' => $popnum, - 'pops' => \@svc_acct_pop, - 'init_popstate' => $init_popstate, - 'popac' => $popac, - 'acstate' => $acstate, - ). - '</TD></TR>'; - } else { - $OUT .= popselector(popnum=>$popnum, pops=>\@svc_acct_pop); - } -%> -</TABLE> - -<%= -if ( @optional_packages ) { - my @html; - foreach my $ii ( 0 .. $#optional_packages) { - my $friendly_index = $ii + 1; - if ($optional_packages[$ii]) { - push @html, qq|<BR>Optional Package #$friendly_index <br />|,'<table bgcolor="#c0c0c0"><tr><td>'; - - push @html, qq|<select name="optional_package${ii}">|; - push @html, qq|<option value="none"></option>|; - push @html, map { qq|<option value="$_->{pkgpart}">$_->{pkg}</option>| } @{$optional_packages[$ii]}; - push @html, q|</select>|; - - push @html, '</td></tr></table>'; - } - $OUT = join("\n", @html); - } -} else { -$OUT = '' -} -%> - -<BR><INPUT TYPE="submit" NAME="signup" VALUE="Signup"> -<script language="JavaScript"> - -function fixup_form() { - - // copy payment method data up to OneTrueForm - - var payment_method_elements = new Array( 'payinfo', 'payinfo1', 'payinfo2', 'payname', 'paycvv' , 'paystate', 'paytype', 'month', 'year','type' ); - var payment_method_form_name = document.OneTrueForm.select.options[document.OneTrueForm.select.selectedIndex].value; - document.OneTrueForm.elements['payby'].value = payment_method_form_name; - var payment_method_form = document.forms[payment_method_form_name]; - - for ( ii = 0 ; ii < payment_method_elements.length ; ii++ ) { - var true_element_name = payment_method_form_name + '_' + payment_method_elements[ii]; - copyelement ( payment_method_form.elements[true_element_name], - document.OneTrueForm.elements[true_element_name] ); - } - - // Copy signup details to OneTrueForm - - var signup_elements = new Array ( 'promo_code', 'reg_code', - 'pkgpart', 'username', - '_password', '_password2', - 'sec_phrase', 'popnum' ); - - for ( ii = 0 ; ii < signup_elements.length ; ii ++ ) { - copyelement ( document.signup_form.elements[signup_elements[ii]], - document.OneTrueForm.elements[signup_elements[ii]]); - } - - document.OneTrueForm.submit(); - return false; -} - -function copyelement(from, to) { -// alert ( from + ' ' + to ); - - if ( from == undefined ) { - to.value = ''; - } else { - if ( from.type == 'select-one' ) { - to.value = from.options[from.selectedIndex].value; - } else if ( from.type == 'checkbox' ) { - if ( from.checked ) { - to.value = from.value; - } else { - to.value = ''; - } - } else { - if ( from.value == undefined ) { - to.value = ''; - } else { - to.value = from.value; - } - } -// alert(from.name + " (" + from.type + "): " + to.name + " => " + to.value); - } -} - -</script> -</FORM></BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/stateselect.html b/fs_selfservice/FS-SelfService/cgi/stateselect.html deleted file mode 100644 index ba55bff74..000000000 --- a/fs_selfservice/FS-SelfService/cgi/stateselect.html +++ /dev/null @@ -1,134 +0,0 @@ -<HTML><HEAD><TITLE>ISP Signup</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>ISP Signup - state selection</FONT><BR><BR> -<SCRIPT> -function gotoURL(object) { - window.location.href = object.options[object.selectedIndex].value; -} -</SCRIPT> -<FORM> -Select your state from the map or dropdown: -<MAP NAME=usmap> -<area shape=poly COORDS="264,157,286,155,292,193,276,195,270,199,264,157" href="signup.cgi?init_popstate=AL"> -<area shape=poly COORDS="28,197,46,185,72,199,72,241,88,243,102,261,92,263,70,241,42,243,28,257,12,259,34,243,20,233,16,223,34,215,22,207,30,205,28,197" href="../states/Alaska.html"> -<area shape=poly COORDS="70,137,106,137,100,189,84,187,60,173,70,133,70,137,70,137" href="signup.cgi?init_popstate=AZ"> -<area shape=poly COORDS="250,153,242,179,220,177,218,171,216,145,252,143,250,155,250,153" href="signup.cgi?init_popstate=AR"> -<area shape=poly COORDS="10,79,38,81,30,109,62,151,56,173,40,169,20,145,4,101,10,75,26,79,10,79,10,79" href="signup.cgi?init_popstate=CA"> -<area shape=poly COORDS="108,103,158,107,154,141,104,137,110,101,128,103,108,103" href="signup.cgi?init_popstate=CO"> -<area shape=poly COORDS="374,107,405,105,405,123,372,125,374,107" href="signup.cgi?init_popstate=CT"> -<area shape=poly COORDS="370,143,402,145,405,157,362,157,370,143" href="signup.cgi?init_popstate=DE"> -<area shape=poly COORDS="275,193,325,187,327,197,341,219,341,233,335,237,317,215,315,205,307,195,293,203,275,193" href="signup.cgi?init_popstate=FL"> -<area shape=poly COORDS="297,153,283,155,297,191,321,189,321,169,297,153" href="signup.cgi?init_popstate=GA"> -<area shape=poly COORDS="98,233,142,263,156,251,162,239,164,229,136,231,94,221,100,235,98,233" href="signup.cgi?init_popstate=HI"> -<area shape=poly COORDS="68,21,76,21,72,35,80,47,80,55,84,65,100,69,94,93,56,83,66,51,70,19,68,21" href="signup.cgi?init_popstate=ID"> -<area shape=poly COORDS="242,91,258,89,266,123,256,139,234,109,248,87,242,91" href="signup.cgi?init_popstate=IL"> -<area shape=poly COORDS="261,95,265,123,265,131,285,117,277,91,261,95" href="signup.cgi?init_popstate=IN"> -<area shape=poly COORDS="198,87,206,111,232,109,240,99,240,91,232,79,198,87" href="signup.cgi?init_popstate=IA"> -<area shape=poly COORDS="158,111,158,135,214,139,214,127,208,113,158,111" href="signup.cgi?init_popstate=KS"> -<area shape=poly COORDS="263,133,275,129,289,115,303,121,307,129,299,135,251,141,269,131,263,133" href="signup.cgi?init_popstate=KY"> -<area shape=poly COORDS="222,179,246,179,244,197,258,193,262,213,226,209,224,177,222,179" href="signup.cgi?init_popstate=LA"> -<area shape=poly COORDS="363,37,373,59,373,47,387,31,377,9,365,15,363,37" href="signup.cgi?init_popstate=ME"> -<area shape=poly COORDS="376,159,405,159,405,175,374,177,376,159" href="signup.cgi?init_popstate=MD"> -<area shape=poly COORDS="378,74,380,88,404,88,404,72,378,74" href="signup.cgi?init_popstate=MA"> -<area shape=poly COORDS="265,73,269,83,265,93,293,91,295,71,281,53,271,53,267,69,265,73,265,73" href="signup.cgi?init_popstate=MI"> -<area shape=poly COORDS="194,31,222,33,242,35,224,51,222,63,222,73,234,79,196,85,194,31" href="signup.cgi?init_popstate=MN"> -<area shape=poly COORDS="265,159,271,199,257,201,259,195,241,197,251,155,265,159" href="signup.cgi?init_popstate=MS"> -<area shape=poly COORDS="206,113,234,111,256,139,248,147,214,145,208,111,206,113" href="signup.cgi?init_popstate=MO"> -<area shape=poly COORDS="78,23,148,31,146,67,84,63,78,35,80,19,78,23" href="signup.cgi?init_popstate=MT"> -<area shape=poly COORDS="146,85,148,103,158,105,164,109,206,109,198,85,144,87,146,85" href="signup.cgi?init_popstate=NE"> -<area shape=poly COORDS="40,83,76,87,64,151,32,109,40,83,40,83" href="signup.cgi?init_popstate=NV"> -<area shape=poly COORDS="298,11,330,9,330,25,298,25,298,11" href="signup.cgi?init_popstate=NH"> -<area shape=poly COORDS="372,127,404,125,405,141,368,139,376,125,372,127" href="signup.cgi?init_popstate=NJ"> -<area shape=poly COORDS="106,137,100,191,122,187,148,187,150,139,106,137,106,137" href="signup.cgi?init_popstate=NM"> -<area shape=poly COORDS="313,79,331,63,337,45,349,45,359,65,357,79,345,65,315,77,313,79,313,79" href="signup.cgi?init_popstate=NY"> -<area shape=poly COORDS="309,137,295,151,319,149,337,153,357,131,351,129,309,137,309,137" href="signup.cgi?init_popstate=NC"> -<area shape=poly COORDS="146,31,148,57,198,57,190,31,146,31,146,31" href="signup.cgi?init_popstate=ND"> -<area shape=poly COORDS="281,93,285,113,299,121,311,101,309,85,299,93,281,93,281,93" href="signup.cgi?init_popstate=OH"> -<area shape=poly COORDS="148,145,174,145,174,163,218,171,216,143,150,139,150,145,156,143,148,145,148,145" href="signup.cgi?init_popstate=OK"> -<area shape=poly COORDS="20,41,8,73,16,77,22,77,28,77,36,79,42,81,48,83,56,83,66,49,20,41,20,41" href="signup.cgi?init_popstate=OR"> -<area shape=poly COORDS="309,83,345,71,351,93,313,105,309,83,309,83" href="signup.cgi?init_popstate=PA"> -<area shape=poly COORDS="376,93,405,93,405,107,376,105,376,93" href="signup.cgi?init_popstate=RI"> -<area shape=poly COORDS="301,155,321,149,337,155,325,175,301,157,301,155,301,155" href="signup.cgi?init_popstate=SC"> -<area shape=poly COORDS="146,59,198,61,198,83,146,83,148,57,146,59,146,59" href="signup.cgi?init_popstate=SD"> -<area shape=poly COORDS="255,145,251,157,297,153,311,133,255,145,255,145" href="signup.cgi?init_popstate=TN"> -<area shape=poly COORDS="150,145,172,145,174,167,198,173,218,173,228,207,204,221,198,231,202,247,180,241,154,207,146,219,120,189,154,189,152,145,150,145,150,145" href="signup.cgi?init_popstate=TX"> -<area shape=poly COORDS="78,89,96,91,96,103,110,103,106,135,70,133,78,89,78,89" href="signup.cgi?init_popstate=UT"> -<area shape=poly COORDS="298,29,332,29,332,47,294,45,298,29" href="signup.cgi?init_popstate=VT"> -<area shape=poly COORDS="307,127,297,137,351,127,349,113,341,111,341,105,329,107,315,131,307,127,307,127" href="signup.cgi?init_popstate=VA"> -<area shape=poly COORDS="32,13,68,19,64,47,20,39,20,13,30,19,32,13,32,13" href="signup.cgi?init_popstate=WA"> -<area shape=poly COORDS="303,119,313,129,329,103,311,105,299,121,313,127,303,119,303,119" href="signup.cgi?init_popstate=WV"> -<area shape=poly COORDS="228,51,256,55,254,89,238,89,234,77,224,71,230,49,236,53,228,51,228,51" href="signup.cgi?init_popstate=WI"> -<area shape=poly COORDS="146,71,144,103,96,99,102,63,148,69,146,71,146,71" href="signup.cgi?init_popstate=WY"> -</MAP> -<IMG SRC="map.gif" usemap=#usmap WIDTH=405 HEIGHT=270 border=0><BR> -<SELECT NAME="init_popstate" onChange="gotoURL(this.form.init_popstate)"> -<OPTION VALUE="stateselect.html"></OPTION> -<OPTION VALUE="signup.cgi?init_popstate=AL">Alabama</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=AK">Alaska</OPTION> -<!--<OPTION VALUE="signup.cgi?init_popstate=AS">American Samoa</OPTION>--> -<OPTION VALUE="signup.cgi?init_popstate=AZ">Arizona</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=AR">Arkansas</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=CA">California</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=CO">Colorado</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=CT">Connecticut</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=DE">Delaware</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=DC">District of Columbia</OPTION> -<!--<OPTION VALUE="signup.cgi?init_popstate=FM">Federated States of Micronesia</OPTION>--> -<OPTION VALUE="signup.cgi?init_popstate=FL">Florida</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=GA">Georgia</OPTION> -<!--<OPTION VALUE="signup.cgi?init_popstate=GU">Guam</OPTION>--> -<OPTION VALUE="signup.cgi?init_popstate=HI">Hawaii</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=ID">Idaho</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=IL">Illinois</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=IN">Indiana</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=IA">Iowa</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=KS">Kansas</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=KY">Kentucky</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=LA">Louisiana</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=ME">Maine</OPTION> -<!--<OPTION VALUE="signup.cgi?init_popstate=MH">Marshall Islands</OPTION>--> -<OPTION VALUE="signup.cgi?init_popstate=MD">Maryland</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=MA">Massachusetts</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=MI">Michigan</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=MN">Minnesota</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=MS">Mississippi</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=MO">Missouri</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=MT">Montana</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=NE">Nebraska</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=NV">Nevada</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=NH">New Hampshire</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=NJ">New Jersey</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=NM">New Mexico</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=NY">New York</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=NC">North Carolina</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=ND">North Dakota</OPTION> -<!--<OPTION VALUE="signup.cgi?init_popstate=MP">Northern Mariana Islands</OPTION>--> -<OPTION VALUE="signup.cgi?init_popstate=OH">Ohio</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=OK">Oklahoma</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=OR">Oregon</OPTION> -<!--<OPTION VALUE="signup.cgi?init_popstate=PW">Palau</OPTION>--> -<OPTION VALUE="signup.cgi?init_popstate=PA">Pennsylvania</OPTION> -<!--<OPTION VALUE="signup.cgi?init_popstate=PR">Puerto Rico</OPTION>--> -<OPTION VALUE="signup.cgi?init_popstate=RI">Rhode Island</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=SC">South Carolina</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=SD">South Dakota</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=TN">Tennessee</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=TX">Texas</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=UT">Utah</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=VT">Vermont</OPTION> -<!--<OPTION VALUE="signup.cgi?init_popstate=VI">Virgin Islands</OPTION>--> -<OPTION VALUE="signup.cgi?init_popstate=VA">Virginia</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=WA">Washington</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=WV">West Virginia</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=WI">Wisconsin</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=WY">Wyoming</OPTION> -<!--<OPTION VALUE="signup.cgi?init_popstate=AE">Armed Forces Africa</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=AA">Armed Forces Americas</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=AE">Armed Forces Canada</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=AE">Armed Forces Europe</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=AE">Armed Forces Middle East</OPTION> -<OPTION VALUE="signup.cgi?init_popstate=AP">Armed Forces Pacific</OPTION> ---> -</SELECT> -</FORM> -</BODY> -</HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/success-delayed.html b/fs_selfservice/FS-SelfService/cgi/success-delayed.html deleted file mode 100644 index 5eeed5957..000000000 --- a/fs_selfservice/FS-SelfService/cgi/success-delayed.html +++ /dev/null @@ -1,16 +0,0 @@ -<HTML><HEAD><TITLE>Signup successful</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>Signup successful</FONT><BR><BR> -Thanks for signing up! -<BR><BR> -Signup information for <%= $email_name %>: -<BR><BR> -Username: <%= $username %><BR> -Password: <%= $password %><BR> -Access number: (<%= $ac %>) / <%= $exch %> - <%= $local %><BR> -Package: <%= $pkg %><BR> -Charge: <%= sprintf('$%.2f', $part_pkg->{'options'}->{'setup_fee'}) %><BR> -In <%= $part_pkg->{'options'}->{'free_days'} %> days you will be charged - <%= sprintf('$%.2f', $part_pkg->{'options'}->{'recur_fee'}) %> -and <%= $part_pkg->{'freq_pretty'} %> thereafter.<BR> - -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/success.html b/fs_selfservice/FS-SelfService/cgi/success.html deleted file mode 100644 index 397cc6c30..000000000 --- a/fs_selfservice/FS-SelfService/cgi/success.html +++ /dev/null @@ -1,11 +0,0 @@ -<HTML><HEAD><TITLE>Signup successful</TITLE></HEAD> -<BODY BGCOLOR="#e8e8e8"><FONT SIZE=7>Signup successful</FONT><BR><BR> -Thanks for signing up! -<BR><BR> -Signup information for <%= $email_name %>: -<BR><BR> -Username: <%= $username %><BR> -Password: <%= $password %><BR> -Access number: (<%= $ac %>) / <%= $exch %> - <%= $local %><BR> -Package: <%= $pkg %><BR> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/svc_acct.html b/fs_selfservice/FS-SelfService/cgi/svc_acct.html deleted file mode 100644 index 00244386b..000000000 --- a/fs_selfservice/FS-SelfService/cgi/svc_acct.html +++ /dev/null @@ -1,58 +0,0 @@ -<FONT SIZE=4>Setup <%= $svc %></FONT><BR><BR> - -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error setting up $svc: $error!. - '</FONT><BR><BR>'; -} ''; %> -<FORM ACTION="<%= $selfurl %>" METHOD=POST> -<INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>"> -<INPUT TYPE="hidden" NAME="action" VALUE="process_svc_acct"> -<INPUT TYPE="hidden" NAME="custnum" VALUE="<%= $custnum %>"> -<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<%= $pkgnum %>"> -<INPUT TYPE="hidden" NAME="svcpart" VALUE="<%= $svcpart %>"> -<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#cccccc"> -<TR> - <TD ALIGN="right">Username</TD> - <TD><INPUT TYPE="text" NAME="username" VALUE="<%= $username %>"></TD> -</TR> -<%= - $OUT .= domainselector(pkgnum=>$pkgnum, svcpart=>$svcpart); -%> -<TR> - <TD ALIGN="right">Password</TD> - <TD><INPUT TYPE="password" NAME="_password" VALUE="<%= $_password %>"></TD> -</TR> -<TR> - <TD ALIGN="right">Re-enter Password</TD> - <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $_password2 %>"></TD> -</TR> -<%= - if ( $security_phrase ) { - $OUT .= <<ENDOUT; -<TR> - <TD ALIGN="right">Security Phrase</TD> - <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> - </TD> -</TR> -ENDOUT - } else { - $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; - } -%> -<%= - if ( @svc_acct_pop ) { - $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'. - popselector( 'popnum' => $popnum, - 'pops' => \@svc_acct_pop, - 'init_popstate' => $init_popstate, - 'popac' => $popac, - 'acstate' => $acstate, - ). - '</TD></TR>'; - } else { - $OUT .= popselector(popnum=>$popnum, pops=>\@svc_acct_pop); - } -%> -</TABLE> -<INPUT TYPE="submit" VALUE="Setup"> -</FORM> diff --git a/fs_selfservice/FS-SelfService/cgi/view_customer.html b/fs_selfservice/FS-SelfService/cgi/view_customer.html deleted file mode 100644 index 11e4432d0..000000000 --- a/fs_selfservice/FS-SelfService/cgi/view_customer.html +++ /dev/null @@ -1,29 +0,0 @@ -<HTML><HEAD><TITLE>Reseller</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>Reseller</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_menu') %> -<TD VALIGN="top"> - -<%= $message - ? "<FONT SIZE=\"+2\"><B>$message</B></FONT><BR><BR>" - : '' -%> - -<%= $small_custview %> - -<BR> - -<TABLE BORDER=0 CELLPADDING=4><TR> -<%= include('agent_customer_menu') %> -<TD VALIGN="top"> - -</TD></TR></TABLE> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - - - diff --git a/fs_selfservice/FS-SelfService/cgi/view_invoice.html b/fs_selfservice/FS-SelfService/cgi/view_invoice.html deleted file mode 100644 index ad2f4f419..000000000 --- a/fs_selfservice/FS-SelfService/cgi/view_invoice.html +++ /dev/null @@ -1,15 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<%= $invoice_html %> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> - - - diff --git a/fs_selfservice/FS-SelfService/cgi/view_support_details.html b/fs_selfservice/FS-SelfService/cgi/view_support_details.html deleted file mode 100644 index 270f9a81d..000000000 --- a/fs_selfservice/FS-SelfService/cgi/view_support_details.html +++ /dev/null @@ -1,80 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Support usage details for -<%= Date::Format::time2str('%b %o %Y', $beginning) %> - -<%= Date::Format::time2str('%b %o %Y', $ending) %> -</FONT><BR><BR> - -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!; -} ''; %> - -<TABLE WIDTH="100%"> - <TR> - <TD WIDTH="50%"> -<%= if ($previous < $beginning) { - $OUT .= qq!<A HREF="${url}view_support_details;svcnum=$svcnum;beginning=!; - $OUT .= qq!$previous;ending=$beginning">Previous period</A>!; - }else{ - ''; - } %> - </TD> - <TD WIDTH="50%" ALIGN="right"> -<%= if ($next > $ending) { - $OUT .= qq!<A HREF="${url}view_support_details;svcnum=$svcnum;beginning=!; - $OUT .= qq!$ending;ending=$next">Next period</A>!; - }else{ - ''; - }%> - </TD> - </TR> -</TABLE> -<TABLE BGCOLOR="#cccccc"> - <TR> - <TH ALIGN="left">Ticket</TH> - <TH ALIGN="center">Subject</TH> - <TH ALIGN="center">Staff</TH> - <TH ALIGN="center">Date</TH> - <TH ALIGN="center">Status</TH> - <TH ALIGN="right">Time</TH> - </TR> -<%= my $total = 0; - foreach my $usage ( @usage ) { - $OUT .= '<TR><TD ALIGN="left">'; - $OUT .= $usage->{'ticketid'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $usage->{'subject'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $usage->{'creator'}; - $OUT .= '</TD><TD ALIGN="left">'; - $OUT .= Date::Format::time2str('%T%P %a %b %o %Y', $usage->{'_date'}); - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $usage->{'status'}; - $OUT .= '</TD><TD ALIGN="right">'; - my $duration = $usage->{'support'}; - $total += $usage->{'support'}; - my $h = int($duration/3600); - my $m = sprintf("%02d", int(($duration % 3600) / 60)); - my $s = sprintf("%02d", $duration % 60); - $OUT .= $usage->{'support'} < 0 ? '-' : ''; - $OUT .= "$h:$m:$s"; - $OUT .= '</TD></TR>'; - } - my $h = int($total/3600); - my $m = sprintf("%02d", int(($total % 3600) / 60)); - my $s = sprintf("%02d", $total % 60); - $OUT .= qq!<TR><TD COLSPAN="5"></TD><TD ALIGN="right"><HR></TD></TR>!; - $OUT .= qq!<TR><TD COLSPAN="5"></TD><TD ALIGN="right">$h:$m:$s</TD></TR>!; - %> - -</TABLE> -<BR> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage.html b/fs_selfservice/FS-SelfService/cgi/view_usage.html deleted file mode 100644 index 79d07d4df..000000000 --- a/fs_selfservice/FS-SelfService/cgi/view_usage.html +++ /dev/null @@ -1,59 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Service usage</FONT><BR><BR> - -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!; -} ''; %> - -<TABLE BGCOLOR="#cccccc"> - <TR> - <TH ALIGN="left">Account</TH> - <TH ALIGN="right">Time remaining</TH> - <TH ALIGN="right">Upload remaining</TH> - <TH ALIGN="right">Download remaining</TH> - <TH ALIGN="right">Total remaining</TH> - </TR> -<%= foreach my $svc ( @svcs ) { - my $link = "${url}view_usage_details;". - "svcnum=$svc->{'svcnum'};beginning=0;ending=0"; - $OUT .= '<TR><TD>'; - $OUT .= qq!<A HREF="$link">!. $svc->{'label'}. ': '. $svc->{'value'}.'</A>'; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $svc->{'seconds'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $svc->{'upbytes'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $svc->{'downbytes'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $svc->{'totalbytes'}; - $OUT .= '</TD></TR>'; - if ( $svc->{'recharge_amount'} ) { - my $link = "${url}process_order_recharge;". - "svcnum=$svc->{'svcnum'}"; - $OUT .= '<TR><TD ALIGN="right">'; - $OUT .= qq!<A HREF="$link">!.'Recharge for $'; - $OUT .= $svc->{'recharge_amount'} . '</A> with'; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $svc->{'recharge_seconds'} if $svc->{'recharge_seconds'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $svc->{'recharge_upbytes'} if $svc->{'recharge_upbytes'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $svc->{'recharge_downbytes'} if $svc->{'recharge_downbytes'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= $svc->{'recharge_totalbytes'} if $svc->{'recharge_totalbytes'}; - $OUT .= '</TD></TR>'; - } - } %> - -</TABLE> -<BR> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage_details.html b/fs_selfservice/FS-SelfService/cgi/view_usage_details.html deleted file mode 100644 index 74a4c3d12..000000000 --- a/fs_selfservice/FS-SelfService/cgi/view_usage_details.html +++ /dev/null @@ -1,86 +0,0 @@ -<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD> -<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR> -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -<%= include('myaccount_menu') %> -<TD VALIGN="top"> - -<FONT SIZE=4>Service usage details for -<%= Date::Format::time2str('%b %o %Y', $beginning) %> - -<%= Date::Format::time2str('%b %o %Y', $ending) %> -</FONT><BR><BR> - -<%= if ( $error ) { - $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!; -} ''; %> - -<TABLE WIDTH="100%"> - <TR> - <TD WIDTH="50%"> -<%= if ($previous < $beginning) { - $OUT .= qq!<A HREF="${url}view_usage_details;svcnum=$svcnum;beginning=!; - $OUT .= qq!$previous;ending=$beginning">Previous period</A>!; - }else{ - ''; - } %> - </TD> - <TD WIDTH="50%" ALIGN="right"> -<%= if ($next > $ending) { - $OUT .= qq!<A HREF="${url}view_usage_details;svcnum=$svcnum;beginning=!; - $OUT .= qq!$ending;ending=$next">Next period</A>!; - }else{ - ''; - }%> - </TD> - </TR> -</TABLE> -<TABLE BGCOLOR="#cccccc"> - <TR> - <TH ALIGN="left">Account</TH> - <TH ALIGN="right">Start Time</TH> - <TH ALIGN="right">Duration</TH> - <TH ALIGN="right">Upload</TH> - <TH ALIGN="right">Download</TH> - </TR> -<%= my $total = 0; - my $utotal = 0; - my $dtotal = 0; - foreach my $usage ( @usage ) { - $OUT .= '<TR><TD>'; - $OUT .= $usage->{'username'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= Date::Format::time2str('%T%P %a %b %o %Y', $usage->{'acctstarttime'}); - $OUT .= '</TD><TD ALIGN="right">'; - my $duration = $usage->{'acctstoptime'} - $usage->{'acctstarttime'}; - $total += $duration; - my $h = int($duration/3600); - my $m = sprintf("%02d", int(($duration % 3600) / 60)); - my $s = sprintf("%02d", $duration % 60); - $OUT .= "$h:$m:$s"; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= Number::Format::format_bytes($usage->{'acctinputoctets'}, precision => 2); - $utotal += $usage->{'acctinputoctets'}; - $OUT .= '</TD><TD ALIGN="right">'; - $OUT .= Number::Format::format_bytes($usage->{'acctoutputoctets'}, precision => 2); - $dtotal += $usage->{'acctoutputoctets'}; - $OUT .= '</TD></TR>'; - } - my $h = int($total/3600); - my $m = sprintf("%02d", int(($total % 3600) / 60)); - my $s = sprintf("%02d", $total % 60); - $OUT .= qq!<TR><TD></TD><TD></TD>!; - $OUT .= qq!<TD ALIGN="right"><HR></TD>! x 3; - $OUT .= qq!</TR>!; - $OUT .= qq!<TR><TD></TD><TD></TD><TD ALIGN="right">$h:$m:$s</TD>!; - $OUT .= qq!<TD ALIGN="right">!; - $OUT .= Number::Format::format_bytes($utotal, precision => 2). qq!</TD>!; - $OUT .= qq!<TD ALIGN="right">!; - $OUT .= Number::Format::format_bytes($dtotal, precision => 2). qq!</TD>!; - $OUT .= qq!</TR>!; %> - -</TABLE> -<BR> - -</TD></TR></TABLE> -<HR> -<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> -</BODY></HTML> diff --git a/fs_selfservice/FS-SelfService/cgi/xmlrpc.cgi b/fs_selfservice/FS-SelfService/cgi/xmlrpc.cgi deleted file mode 100644 index 559ae04d8..000000000 --- a/fs_selfservice/FS-SelfService/cgi/xmlrpc.cgi +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use XMLRPC::Transport::HTTP; -use XMLRPC::Lite; # for XMLRPC::Serializer -use FS::SelfService::XMLRPC; - -my %typelookup = ( - base64 => [10, sub {$_[0] =~ /[^\x09\x0a\x0d\x20-\x7f]/}, 'as_base64'], - dateTime => [35, sub {$_[0] =~ /^\d{8}T\d\d:\d\d:\d\d$/}, 'as_dateTime'], - string => [40, sub {1}, 'as_string'], -); -my $serializer = new XMLRPC::Serializer(typelookup => \%typelookup); - -XMLRPC::Transport::HTTP::CGI->dispatch_to('FS::SelfService::XMLRPC') - ->serializer($serializer) - ->handle; - diff --git a/fs_selfservice/FS-SelfService/freeside-selfservice-clientd b/fs_selfservice/FS-SelfService/freeside-selfservice-clientd deleted file mode 100644 index bdc8e1547..000000000 --- a/fs_selfservice/FS-SelfService/freeside-selfservice-clientd +++ /dev/null @@ -1,272 +0,0 @@ -#!/usr/bin/perl -w -# -# freeside-selfservice-clientd -# -# This is run REMOTELY over ssh by freeside-selfservice-server - -use strict; -use subs qw(spawn logmsg lock_write unlock_write); -use Fcntl qw(:flock); -use POSIX qw(:sys_wait_h); -use Socket; -use Storable 2.09 qw(nstore_fd fd_retrieve); -use IO::Handle qw(_IONBF); -use IO::Select; -use IO::File; - -#STDOUT->setbuf(''); - -my $tag = scalar(@ARGV) ? '.'.shift : ''; - -use vars qw( $Debug ); -$Debug = 2; #2 will turn on child logging - #3 will log packet contents,#including passwords - #4 will log receipts of all packets from server including - # keepalives (big!) - -my $socket = "/usr/local/freeside/selfservice_socket$tag"; -my $pid_file = "$socket.pid"; - -my $log_file = "/usr/local/freeside/selfservice$tag.log"; - -my $lock_file = "/usr/local/freeside/selfservice$tag.writelock"; - -#my $me = '[client]'; - -$|=1; - -$SIG{__WARN__} = \&_logmsg; - -#read data to be cached or something -#warn "$me Reading init data\n" if $Debug; -#my $signup_init = - -warn "Creating $lock_file\n" if $Debug; -open(LOCKFILE,">$lock_file") or die "can't open $lock_file: $!"; -close LOCKFILE; - -warn "Creating $socket\n" if $Debug; -my $uaddr = sockaddr_un($socket); -my $proto = getprotobyname('tcp'); -socket(Server,PF_UNIX,SOCK_STREAM,0) or die "socket: $!"; -unlink($socket); -bind(Server, $uaddr) or die "bind: $!"; -listen(Server,SOMAXCONN) or die "listen: $!"; - -if ( -e $pid_file ) { - open(PIDFILE,"<$pid_file"); - my $old_pid = <PIDFILE>; - close PIDFILE; - if ( $old_pid =~ /^(\d+)$/ ) { - kill 'TERM', $1; - } -} -open(PIDFILE,">$pid_file"); -print PIDFILE "$$\n"; -close PIDFILE; - -#my $waitedpid; -#sub REAPER { $waitedpid = wait; $SIG{CHLD} = \&REAPER; } -#$SIG{CHLD} = \&REAPER; - -warn "enabling keep alives\n" if $Debug; -nstore_fd( { _packet => '_enable_keepalive' } , \*STDOUT ); - -warn "entering main loop\n" if $Debug; - -my %kids; - -my $s = new IO::Select; -$s->add(\*STDIN); -$s->add(\*Server); - -#for ( $waitedpid = 0; -# accept(Client,Server) || $waitedpid; -# $waitedpid = 0, close Client) -#{ -# next if $waitedpid; - -#$SIG{PIPE} = sub { warn "SIGPIPE received" }; -#$SIG{CHLD} = sub { warn "SIGCHLD received" }; - -#sub REAPER { warn "SIGCHLD received"; my $pid = wait; $SIG{CHLD} = \&REAPER; } -#sub REAPER { my $pid = wait; $SIG{CHLD} = \&REAPER; } -#sub REAPER { my $pid = wait; delete $kids{$pid}; $SIG{CHLD} = \&REAPER; } -#$SIG{CHLD} = \&REAPER; - -my $undisp = 0; -while (1) { - - &reap_kids; - - warn "waiting for connection\n" if $Debug && !$undisp; - - #my @handles = $s->can_read(); - my @handles = $s->can_read(5); - $undisp = !scalar(@handles); - foreach my $handle ( @handles ) { - - if ( $handle == \*STDIN ) { - - warn "receiving packet from server\n" if $Debug > 3; - - my $packet = fd_retrieve(\*STDIN); - my $token = $packet->{'_token'}; - - if ( $token eq '_keepalive' ) { - $undisp = 1; - next; - } - - warn "received packet from server with token $token\n". - ( $Debug > 2 - ? join('', map { " $_=>$packet->{$_}\n" } keys %$packet ) - : '' ) - if $Debug; - - if ( exists($kids{$token}) ) { - warn "sending return packet to $token via $kids{$token}\n" - if $Debug; - nstore_fd($packet, $kids{$token}); - warn "flushing to $token\n" if $Debug; - until ( $kids{$token}->flush ) { - warn "WARNING: error flushing: $!"; - sleep 1; - } - #no close or delete here - will block waiting for child - warn "done with $token\n" if $Debug; - } else { - warn "WARNING: unknown token $token, discarding message"; - } - - } elsif ( $handle == \*Server ) { - - until ( accept(Client, Server) ) { - warn "WARNING: accept failed: $!"; - next; - } - - warn "received local connection; forking\n" if $Debug; - - spawn sub { #child - warn "[child-$$] reading packet from local client" if $Debug > 1; - my $packet = fd_retrieve(\*Client); - warn "[child-$$] packet received:\n". - join('', map { " $_=>$packet->{$_}\n" } keys %$packet ) - if $Debug > 2; - my $command = $packet->{'command'}; - #handle some commands weirdly? - $packet->{_token}=$$; - - warn "[child-$$] locking write stream\n" if $Debug > 1; - lock_write; - - warn "[child-$$] sending packet to remote server\n" if $Debug > 1; - nstore_fd($packet, \*STDOUT) or die "FATAL: can't send response: $!"; - - warn "[child-$$] flushing write stream\n" if $Debug > 1; - STDOUT->flush or die "FATAL: can't flush: $!"; - - warn "[child-$$] releasing write lock\n" if $Debug > 1; - unlock_write; - - warn "[child-$$] closing write stream\n" if $Debug > 1; - close STDOUT or die "FATAL: can't close write stream: $!"; #??! - - warn "[child-$$] waiting for response from parent\n" if $Debug > 1; - my $w = new IO::Select; - $w->add(\*STDIN); - until ( $w->can_read ) { - warn "[child-$$] WARNING: interrupted select: $!\n"; - } - my $rv = fd_retrieve(\*STDIN); - - #close STDIN; - - warn "[child-$$] sending response to local client" if $Debug > 1; - nstore_fd($rv, \*Client); - Client->flush or die "FATAL: can't flush to local client: $!"; - close Client or die "FATAL: can't close connection to local client: $!"; - - warn "[child-$$] child exiting" if $Debug > 1; - exit; - - }; #eo child - - #close Client; - - } else { - die "wtf? $handle"; - } - - } - -} - -sub reap_kids { - #warn "reaping kids\n"; - foreach my $pid ( keys %kids ) { - my $kid = waitpid($pid, WNOHANG); - if ( $kid > 0 ) { - close $kids{$kid}; - delete $kids{$kid}; - } - } - #warn "done reaping\n"; -} - -sub spawn { - my $coderef = shift; - - unless (@_ == 0 && $coderef && ref($coderef) eq 'CODE') { - use Carp; - confess "usage: spawn CODEREF"; - } - - my $pid; - #if (!defined($pid = fork)) { - my $kid = new IO::Handle; - if (!defined($pid = open($kid, '|-'))) { - warn "WARNING: cannot fork: $!"; - return; - } elsif ($pid) { - warn "begat $pid" if $Debug; - $kids{$pid} = $kid; - #$kids{$pid}->autoflush; - return; # I'm the parent - } - # else I'm the child -- go spawn - -# open(STDIN, "<&Client") || die "can't dup client to stdin"; -# open(STDOUT, ">&Client") || die "can't dup client to stdout"; -# open(STDERR, ">&STDOUT") || die "can't dup stdout to stderr"; - exit &$coderef(); -} - -sub _logmsg { - chomp( my $msg = shift ); - my $log = new IO::File ">>$log_file"; - die "can't open $log_file: $!" unless defined($log); - flock($log, LOCK_EX); - seek($log, 0, 2); - print $log "[client] [". scalar(localtime). "] [$$] $msg\n"; - flock($log, LOCK_UN); - close $log; -} - -sub lock_write { - #broken on freebsd? - #flock(STDOUT, LOCK_EX) or die "FATAL: can't lock write stream: $!"; - - #open a new one for each kid to get a unique lock - open(LOCKFILE,">$lock_file") or die "can't open $lock_file: $!"; - - flock(LOCKFILE, LOCK_EX) or die "FATAL: can't lock $lock_file: $!"; -} - -sub unlock_write { - #broken on freebsd? - #flock(STDOUT, LOCK_UN) or die "FATAL: can't release write lock: $!"; - - flock(LOCKFILE, LOCK_UN) or die "FATAL: can't unlock $lock_file: $!"; -} diff --git a/fs_selfservice/FS-SelfService/freeside-selfservice-xmlrpc-server b/fs_selfservice/FS-SelfService/freeside-selfservice-xmlrpc-server deleted file mode 100644 index bd4f83b3c..000000000 --- a/fs_selfservice/FS-SelfService/freeside-selfservice-xmlrpc-server +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/perl -w -# -# freeside-selfservice-xmlrpc-server -# - -use strict; -use Fcntl qw(:flock); -use POSIX; -use Getopt::Std; -use XMLRPC::Transport::HTTP; -use XMLRPC::Lite; # for XMLRPC::Serializer; -use FS::SelfService::XMLRPC; - -use vars qw( $opt_p $opt_d ); -use vars qw( $DEBUG ); - -getopts("p:d"); -$DEBUG = $opt_d; -my $tag = $opt_p ? ':'.$opt_p : ''; - -my %typelookup = ( - base64 => [10, sub {$_[0] =~ /[^\x09\x0a\x0d\x20-\x7f]/}, 'as_base64'], - dateTime => [35, sub {$_[0] =~ /^\d{8}T\d\d:\d\d:\d\d$/}, 'as_dateTime'], - string => [40, sub {1}, 'as_string'], -); -my $serializer = new XMLRPC::Serializer(typelookup => \%typelookup); - -my $log_file = "/usr/local/freeside/selfservice.xmlrpc$tag.log"; - -my $pid = fork; -defined($pid) or die "Can't fork to start: $!"; -print "Started daemon with pid $pid\n" if $pid; -exit if $pid; - -POSIX::setsid(); -open STDIN, "/dev/null" or die "Can't get rid of STDIN"; -open STDOUT, ">/dev/null" or die "Can't get rid of STDOUT"; -open STDERR, ">&STDOUT" or die "Can't get rid of STDERR"; - -$SIG{__WARN__} = \&_logmsg; -$SIG{__DIE__} = sub { &_logmsg(@_); exit }; - -my $daemon = XMLRPC::Transport::HTTP::Daemon - ->new(LocalPort => $opt_p ? $opt_p : 8080) - ->dispatch_to('FS::SelfService::XMLRPC') - ->serializer($serializer); - -warn "Handling request at ", $daemon->url, "\n"; -$daemon->handle; - -sub _logmsg { - chomp( my $msg = shift ); - my $log = new IO::File ">>$log_file"; - flock($log, LOCK_EX); - seek($log, 0, 2); - print $log "[". scalar(localtime). "] [$$] $msg\n"; - flock($log, LOCK_UN); - close $log; -} diff --git a/fs_selfservice/FS-SelfService/ieak.template b/fs_selfservice/FS-SelfService/ieak.template deleted file mode 100755 index 52edaa951..000000000 --- a/fs_selfservice/FS-SelfService/ieak.template +++ /dev/null @@ -1,40 +0,0 @@ -[Entry] -Entry_Name = The Internet -[Phone] -Dial_As_Is=no -Phone_Number = { $exch. $loc } -Area_Code = { $ac } -Country_Code = 1 -Country_Id = 1 -[Server] -Type = PPP -SW_Compress = Yes -PW_Encrypt = Yes -Negotiate_TCP/IP = Yes -Disable_LCP = No -[TCP/IP] -Specify_IP_Address = No -Specity_Server_Address = No -IP_Header_Compress = Yes -Gateway_On_Remote = Yes -[User] -Name = { $username } -Password = { $password } -Display_Password = Yes -[Internet_Mail] -Email_Name = { $email_name } -Email_Address = { $username }\@domain.tld -POP_Server = mail.domain.tld -POP_Server_Port_Number = 110 -POP_Login_Name = { $username } -POP_Login_Password = { $password } -SMTP_Server = mail.domain.tld -SMTP_Server_Port_Number = 25 -Install_Mail = 1 -[Internet_News] -NNTP_Server = news.domain.tld -NNTP_Server_Port_Number = 119 -Logon_Required = No -Install_News = 1 -[Branding] -Window_Title = The Internet diff --git a/fs_selfservice/FS-SelfService/test.pl b/fs_selfservice/FS-SelfService/test.pl deleted file mode 100644 index 7468ea471..000000000 --- a/fs_selfservice/FS-SelfService/test.pl +++ /dev/null @@ -1,17 +0,0 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' - -######################### - -# change 'tests => 1' to 'tests => last_test_to_print'; - -use Test; -BEGIN { plan tests => 1 }; -use FS::SelfService; -ok(1); # If we made it this far, we're ok. - -######################### - -# Insert your test code below, the Test module is use()ed here so read -# its man page ( perldoc Test ) for help writing this test script. - diff --git a/fs_selfservice/fs_passwd_test b/fs_selfservice/fs_passwd_test deleted file mode 100755 index 4f8b8a888..000000000 --- a/fs_selfservice/fs_passwd_test +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use FS::SelfService qw(passwd); - -my $rv = passwd( - 'username' => 'ivan', - 'old_password' => 'heyhoo', - 'new_password' => 'haloo', -); -my $error = $rv->{error}; - -if ( $error eq 'Incorrect password.' ) { - exit; -} else { - die $error if $error; - die "no error"; -} - diff --git a/fs_selfservice/php/freeside.class.php b/fs_selfservice/php/freeside.class.php deleted file mode 100644 index 21e89b47f..000000000 --- a/fs_selfservice/php/freeside.class.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -class FreesideSelfService { - - //Change this to match the location of your selfservice xmlrpc.cgi or daemon - var $URL = 'https://www.example.com/selfservice/xmlrpc.cgi'; - - function FreesideSelfService() { - $this; - } - - public function __call($name, $arguments) { - - error_log("[FreesideSelfService] $name called, sending to ". $this->URL); - - $request = xmlrpc_encode_request("FS.SelfService.XMLRPC.$name", $arguments); - $context = stream_context_create( array( 'http' => array( - 'method' => "POST", - 'header' => "Content-Type: text/xml", - 'content' => $request - ))); - $file = file_get_contents($this->URL, false, $context); - $response = xmlrpc_decode($file); - if (xmlrpc_is_fault($response)) { - trigger_error("[FreesideSelfService] XML-RPC communication error: $response[faultString] ($response[faultCode])"); - } else { - //error_log("[FreesideSelfService] $response"); - return $response; - } - } - -} - -?> diff --git a/fs_selfservice/php/freeside.login_example.php b/fs_selfservice/php/freeside.login_example.php deleted file mode 100644 index 69174a40a..000000000 --- a/fs_selfservice/php/freeside.login_example.php +++ /dev/null @@ -1,37 +0,0 @@ -<? - -require('freeside.class.php'); -$freeside = new FreesideSelfService(); - -$domain = 'example.com'; - -$response = $freeside->login( array( - 'username' => strtolower($_POST['username']), - 'domain' => $domain, - 'password' => strtolower($_POST['password']), -) ); - -error_log("[login] received response from freeside: $response"); -$error = $response['error']; - -if ( ! $error ) { - - // sucessful login - - $session_id = $response['session_id']; - - error_log("[login] logged into freeside with session_id=$session_id"); - - // store session id in your session store, to be used for other calls - -} else { - - // unsucessful login - - error_log("[login] error logging into freeside: $error"); - - // display error message to user - -} - -?> diff --git a/fs_selfservice/php/freeside_signup_example.php b/fs_selfservice/php/freeside_signup_example.php deleted file mode 100644 index 8b1dc193c..000000000 --- a/fs_selfservice/php/freeside_signup_example.php +++ /dev/null @@ -1,49 +0,0 @@ -<? - -require('freeside.class.php'); -$freeside = new FreesideSelfService(); - -$response = $freeside->new_customer( array( - 'agentnum' => 1, - - 'first' => $_POST['first'], - 'last' => $_POST['last'], - 'address1' => $_POST['address1'], - 'address2' => $_POST['address2'], - 'city' => $_POST['city'], - 'state' => $_POST['state'], - 'zip' => $_POST['zip'], - 'country' => 'US', - 'daytime' => $_POST['daytime'], - 'fax' => $_POST['fax'], - - 'payby' => 'BILL', - 'invoicing_list' => $_POST['email'], - - 'pkgpart' => 2, - 'username' => strtolower($_POST['username']), - '_password' => strtolower($_POST['password']) -) ); - -error_log("[new_customer] received response from freeside: $response"); -$error = $response['error']; - -if ( ! $error ) { - - // sucessful signup - - $custnum = $response['custnum']; - - error_log("[new_customer] signup up with custnum $custnum"); - -} else { - - // unsucessful signup - - error_log("[new_customer] signup error:: $error"); - - // display error message to user - -} - -?> |