#!/usr/bin/perl # Required stuff use LWP; use CommonCgi; use CommonCookie; require "cgi-lib.pl"; &ReadParse; # Check whether to display form or not $email=$in{email}; if($email) { $checkBox1 = "no"; #default value for checkbox1 $checkBox2 = "no"; # Post registration information to the relevant list on www.cooleremail.com my $browser = LWP::UserAgent->new; $browser->agent("$0/0.1 " . $browser->agent); $browser->agent("Mozilla/8.0"); if($in{interest1} == 1) { $checkBox1 = "yes"; } if($in{interest2} == 2) { $checkBox2 = "yes"; } if($in{event} eq "adRevenueWebinar"){ my $response = $browser->post('http://www.icebase.com/multisubscribe.ice', [ "email" => "$in{email}", "firstname" => "$in{firstname}", "lastname"=> "$in{lastname}", "company" => "$in{company}", "position" => "$in{prof_title}", "address" => "$in{address}", "address2" => "$in{address2}", "city" => "$in{city}", "state" => "$in{state}", "zip" => "$in{zip}", "country" => "$in{country}", "phone" => "$in{telephone}", "user1" => "$in{event}", "user2" => "$checkBox1", "user3" => "$checkBox2", "username" => "bwarnick", "list1" => "adRevenueWebinar", "trigger" => "adRevenueWebinar_Confirmation" ] ); } else{ # else it is a whitepaper event... only Post to the regular website list my $response = $browser->post('http://www.icebase.com/multisubscribe.ice', [ "email" => "$in{email}", "firstname" => "$in{firstname}", "lastname" => "$in{lastname}", "company" => "$in{company}", "position" => "$in{prof_title}", "address" => "$in{address}", "address2" => "$in{address2}", "city" => "$in{city}", "state" => "$in{state}", "zip" => "$in{zip}", "country" => "$in{country}", "phone" => "$in{telephone}", "user1" => "$in{event}", "user2" => "$checkBox1", "user3" => "$checkBox2", "username" => "bwarnick", "list6" => "Website", "trigger" => "Website_Welcome" ] ); } # Print html header print "Content-type: text/html\n\n\n"; # Write registration values to text file: /ec_data/ecnext_reg.txt &OpenOutFile('/ecnext/comsite4/web/ecnext/ec_data/ecnext_reg.txt'); &WriteValues; &CloseOutFile('/ecnext/comsite4/web/ecnext/ec_data/ecnext_reg.txt'); # Write session cookie &WriteJSCookieValue('logininfo', 1, '', '/', 'test.ecnext.com', ''); $event = $in{event}; if($event ne "whitepapers"){ $webinar_conf_url = 'http://www.ecnext.com/ecnext/news/webinar/'.$in{event}.'_conf.shtml'; print ""; } else{ print ""; } } else { print "Content-type: text/html\n\n\n"; print< Webinar Registration - ECNext
ECNext, Making your e-Content Work for You
Home Services Insights Successes About Us News and Events Contact Us
Current Releases2005 ArchivesEarlier ArchivesUpcoming EventsWebinar
BLOCK1 print<

Visit ECNext at these upcoming industry events:

BLOCK2 &RegForm; print<

home | services | insights | successes | about us | news and events | contact us
©2006, ECNext, Inc. All Rights Reserved
BLOCK3 print<
BLOCK4 } #--------------------------------------------------------------------- sub RegForm { print< FORMa $event = $in{e}; print<   FORMb # The hidden field which identifies from where the user got to this form print "\n"; print< *First Name:    *Last Name:    Title:    *E-mail:    Telephone:    *Company:    *Address1:    Address2:    *City:    *State/Province:    *Postal Code:    *Country:              Please send occasional ECNext solution update emails     Please email future webinar announcements         FORMc } sub OpenOutFile { my ($filename)=@_; open (OUTFILE,">>$filename") || die "Problem opening $filename\n$!\n"; # append OUTFILE->autoflush(1); } sub WriteValues { my $row; foreach my $key (sort keys %in) { $row.="$key|$in{$key}|"; } print OUTFILE "$row\n"; } sub CloseOutFile { close OUTFILE; } sub DrawHtml { my ($filename)=@_; open (INFILE,"$filename"); @slurp=; close INFILE; print @slurp; } exit;