#!/usr/bin/perl # .Copyright (C) 1999-2001 TUCOWS.com Inc. # .Created: 11/19/1999 # .Contactid: # .Url: http://www.opensrs.org # .Originally Developed by: # VPOP Technologies, Inc. for Tucows/OpenSRS # .Authors: Joe McDonald, Tom McDonald, Matt Reimer, Brad Hilton, # Daniel Manley, Evgeniy Pirogov # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, # Inc., 675 Mass Ave, Cambridge, MA 02139, USA. use vars qw( %in $cgi $path_templates %actions $action %cc_types $XML_Client %contact_keys %data %cc_mons @cc_types ); ( %in, $cgi, $path_templates, %actions, $action, %cc_mons, %cc_types, $XML_Client, %contact_keys, %data ) = (); # pull in conf file with defined values # XXX NOTE XXX Update this configuration file BEGIN { do "/www/data_storage/OpenSRS.conf"; } use strict; use lib $PATH_LIB; use CGI ':cgi-lib'; use RACE; RACE::Initialise(%RACESETTINGS); RACE::UseRace($USE_RACE); use OpenSRS::XML_Client qw(:default); use OpenSRS::ClientCommon qw(send_email); # global defines $cgi = $ENV{SCRIPT_NAME}; $path_templates = "$PATH_TEMPLATES/reg_system"; %in = (); # list of valid actions to execute %actions = ( bulk_start => undef, # reljr bulk_transfer_start => undef, # reljr bulk_verify => undef, # reljr lookup => undef, check_transfer => undef, setup_profile => undef, do_setup_profile => undef, verify_order => undef, register => undef, bulk_order => undef, bulk_order_ca => undef, bulk_transfer => undef, do_bulk_transfer => undef, purchase_webcert => undef, verify_purchase_webcert => undef, do_purchase_webcert => undef, ); %cc_types = ( visa => "Visa", mastercard => "Mastercard", amex => "American Express", discover => "Discover", ); @cc_types = qw (visa mastercard amex discover); %cc_mons = (1=>"01", 2=>"02", 3=>"03", 4=>"04", 5=>"05", 6=>"06", 7=>"07", 8=>"08",9=>"09",10=>"10",11=>"11",12=>"12",); %contact_keys = ( first_name => undef, last_name => undef, address1 => undef, address2 => undef, address3 => undef, city => undef, state => undef, postal_code => undef, country => undef, email => undef, url => undef, fax => undef, phone => undef, org_name => undef, ); ############################################### ############################################### print "Content-type: text/html\n\n"; # set debugging level start_up(); # create a client object which we will use to connect to the OpenSRS server $XML_Client = new OpenSRS::XML_Client(%OPENSRS); $XML_Client->login; # read in the form data ReadParse(\%in); ##########start flux prep # # reljr adjustments to the order processing begins here up to RELJR END # use Data::Dumper; unlink grep {-M > 1.0} glob "$AU_FIELDS{DATA_DIRECTORY}/[0-9]*[0-9].data"; # Clean up old data files. sub bulk_start { $in{reg_type} = 'new'; bulk_init(); } sub bulk_transfer_start { $in{reg_type} = 'transfer'; bulk_init(); } sub bulk_init { my (%HTML); my $options; $HTML{reg_type} = $in{reg_type}; if ($HTML{reg_type} eq 'new') { $HTML{PERIOD_LIST} = build_select_menu(\%REG_PERIODS,1); $HTML{WHAT} = 'Order'; $options = join "\n", map { qq(