#!/usr/bin/perl require 'supervars.pl'; $mailserver = "206.152.180.10"; $signature = " =================================================================== Transport Universe -- The World Of Transportation Under One Roof Any Vehicle Ever Made Is At Your Fingertips! Auctions-Classifieds-Wanted-Employment-Dealers Business To Business-Global Village-Directory Box 366 Pittsfield, New Hampshire 03263 Tel: (603) 435 6672 Fax: (603) 435 6329 =================================================================== "; ############################################## # Print The Page Header # print "Content-type: text/html\n\n"; print <<"EOF"; Transport Universe - Transportation Auction and Car Auctions
Search Transport Universe
Any Vehicle Ever Made Is
At Your Fingertips!
      

CLASSIFIEDS
Universal Registration FREE AND EASY REGISTRATION
CLICK HERE!
AUCTIONS
DEALERS

WANTED
JOBS

B2B

Our Exclusive Condition Reports Show Every Detail!
SEE EXAMPLE


ADD REPORT TO YOUR ITEM




Millions of page views every month!


 Over 1800 Transportation Categories.


EOF ; ########################################### &get_form_data; # parse arguments from post @ARGV = split(/\\*\&/, $ENV{'QUERY_STRING'}); $ARGV[0] =~ s/\W//g; if ($form{'action'} eq 'new') { &procnew; } elsif ($form{'action'} eq 'reg') { &procreg; } elsif ($form{'action'} eq 'creg') { &proccreg; } elsif ($form{'action'} eq 'closeditems1') { &viewclosed1; } elsif ($form{'action'} eq 'closeditems2') { &viewclosed2; } ####################################### next 3 lines added for seller edit. elsif ($form{'action'} eq 'selled') { &sellerchange; } elsif ($form{'action'} eq 'se') {&selleredit; } elsif ($form{'action'} eq 'selldel') { &selldel1; } ####################################### elsif ($ARGV[2] eq 'c') { &changereg; } else { &newreg; } ############################################## # Print The Page Footer # print <<"EOF";





Copyright © 1999/2000 Transport Universe Inc. All Rights Reserved.
 Use of this Web site constitutes acceptance of the TRANSPORT UNIVERSE User Agreement

EOF ; ############################################## # Sub: Change Registration sub changereg { print <<"EOF";

CHANGE YOUR REGISTRATION or PASSWORD

ONCE YOU HAVE COMPLETED REGISTRATION AND AN OFFICIAL PASSWORD HAS BEEN ISSUED TO YOU. WE RECOMMEND THAT USERS TAKE ADVANTAGE OF THIS FORM TO CHANGE THEIR OFFICIAL PASSWORD INTO ONE THAT IS PERSONALLY CONSISTENT OR EASIER TO REMEMBER
You must retain your origional USERNAME. But, you may change your registration information including your address and password at any time with this form. Thank you.
Your USERNAME:
Required

This must remain the same, cannot be changed and is required for origional verification.
Your Current Password:
Required

If You do not remember it please, Email us at service\@transportuniverse\.com and we will resend your previous password
Your New Password:
You May Change Your Password Here

If you wish to retain your present password please, leave this field blank. Otherwise you may take this opportunity now to change your present password for another NEW password which may be more consistent or easier for you to remember.
Your New Password Again:
Required If You Have Entered A New Password Above

If you have entered a new password above please RE-ENTER it here. Otherwise leave this space blank if there are no changes to be made to your present password.
Contact Information:
If There are no changes to be made here please, leave these fields blank.
Full Name:

Street Address:

City, State, ZIP:

Phone Number:

ALL REQUIRED FIELDS MUST BE COMPLETED INORDER TO PROCESS SUBMISSIONS AND OBTAIN A FULL CONFIRMATION (Incomplete \"REQUIRED\" fields will produce a static response after clicking the SUBMIT button below).



EOF } ############################################## # Sub: Process Changed Registration sub proccreg { if ($regdir) { &oops('ALIAS') unless ($form{'ALIAS'}); &oops('OLD PASSWORD') unless ($form{'OLDPASS'}); if ($form{'ADDRESS1'}) { &oops('ADDRESS2') unless ($form{'ADDRESS2'}); &oops('ADDRESS3') unless ($form{'ADDRESS3'}); &oops('ADDRESS4') unless ($form{'ADDRESS4'}); } if ($form{'NEWPASS1'}) { &oops('NEW PASSWORD VERIFICATION') unless ($form{'NEWPASS2'} eq $form{'NEWPASS1'}); } $form{'ALIAS'} =~ s/\W//g; $form{'ALIAS'} = lc($form{'ALIAS'}); $form{'ALIAS'} = ucfirst($form{'ALIAS'}); if (-f "$basepath$regdir/$form{'ALIAS'}.dat") { &oops('ALIAS') unless (open(REGFILE, "$basepath$regdir/$form{'ALIAS'}.dat")); ($password,$email,$add1,$add2,$add3,@junk) = ; chomp($password,$email,$add1,$add2,$add3,@junk); close REGFILE; &oops('OLD PASSWORD') unless ((lc $password) eq (lc $form{'OLDPASS'})); $form{'NEWPASS1'} = $password if !($form{'NEWPASS1'}); $form{'ADDRESS1'} = $add1 if !($form{'ADDRESS1'}); $form{'ADDRESS2'} = $add2 if !($form{'ADDRESS2'}); $form{'ADDRESS3'} = $add3 if !($form{'ADDRESS3'}); $form{'ADDRESS4'} = $add4 if !($form{'ADDRESS4'}); &oops('ALIAS') unless (open NEWREG, ">$basepath$regdir/$form{'ALIAS'}.dat"); print NEWREG "$form{'NEWPASS1'}\n$email\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'} Phone\:$form{'ADDRESS4'}"; foreach $bid (@junk) { print NEWREG "\n$bid"; } close NEWREG; ####################### ############## ############### open (NEWREG2, ">/u1/www/transportuniverse/auction/reg/$form{'ALIAS'}.dat"); print NEWREG2 "$form{'NEWPASS1'}\n$email\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'} Phone\:$form{'ADDRESS4'}"; foreach $bid (@junk) { print NEWREG2 "\n$bid"; } close NEWREG2; open (NEWREG3, ">/u1/www/transportuniverse/tender/reg/$form{'ALIAS'}.dat"); print NEWREG3 "$form{'NEWPASS1'}\n$email\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'} Phone\:$form{'ADDRESS4'}"; foreach $bid (@junk) { print NEWREG3 "\n$bid"; } close NEWREG3; open (NEWREG4, ">/u1/www/transportuniverse/employee/reg/$form{'ALIAS'}.dat"); print NEWREG4 "$form{'NEWPASS1'}\n$email\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'} Phone\:$form{'ADDRESS4'}"; foreach $bid (@junk) { print NEWREG4 "\n$bid"; } close NEWREG4; print "\n\n\n\n
$form{'ALIAS'}, YOUR INFORMATION HAS SUCCESSFULLY
BEEN CHANGED ON THE FOLLOWING SITES\n"; print <<"EOF";

LIVE AUCTIONS   SUPER CLASSIFIEDS   WANTED

PLEASE, BE SURE TO TAKE NOTE OF YOUR NEW INFORMATION.
EOF &sendemail('postmaster@transportuniverse.com', 'USER UPDATED REGITRATION standard', 'nobody', $mailserver, "This Standard User has successfully updated his\/her password\n\nUserName\: $form{'ALIAS'}\n$form{'EMAIL'}\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'}\n$form{'ADDRESS4'}\n$signature\n"); } else { print "Sorry... That Username is not valid. If you do not have an Username (or cannot remember it) you should create a new account.\n"; } } else { print "there May Be A Problem With The Registration Process. If This Situation Persists Please Notify Transport Universe Administration At\: service\@transportuniverse...\n"; } } ############################################## # Sub: New Registration # This creates a form for registration sub newreg { print <<"EOF";

FREE AND EASY REGISTRATION

This form will register you as a buyer and seller
on The following TRANSPORT UNIVERSE sites:
LIVE AUCTIONS   SUPER CLASSIFIEDS   WANTED AUCTIONS

Click here for Premier Dealership Registration


You must enter accurate data, and your new password will be instantly e-mailed to you. By registering on TRANSPORT UNIVERSE, you are stating that you fully accept the conditions set forth in the Transport Universe User Agreement.
Your information is used only for transactions on Transport Universe.  We will never give or sell your information to ANYONE else EVER!

Create your User Name:
Used to organize your listings. This name will represent you on all three of the above sites.
Your E-Mail Address:
Must be valid
Contact Information:
Used only for transactions
Street Address:
City, State, Zip:
Full Name:

Street Address:

City, State, ZIP:

Phone Number:
Once you have obtained your temporary password,
you will have the option to keep it or pick a more personal password.

 

EOF } ############################################## # Sub: Process Registration sub procreg { if ($regdir) { umask(000); # UNIX file permission junk mkdir("$basepath$regdir", 0777) unless (-d "$basepath$regdir"); &oops('ALIAS') unless ($form{'ALIAS'}); &oops('EMAIL') unless ($form{'EMAIL'} =~ /.+\@.+/); &oops('ADDRESS1') unless ($form{'ADDRESS1'}); &oops('ADDRESS2') unless ($form{'ADDRESS2'}); &oops('ADDRESS3') unless ($form{'ADDRESS3'}); &oops('ADDRESS4') unless ($form{'ADDRESS4'}); $form{'ALIAS'} =~ s/\W//g; $form{'ALIAS'} = lc($form{'ALIAS'}); $form{'ALIAS'} = ucfirst($form{'ALIAS'}); if (!(-f "$basepath$regdir/$form{'ALIAS'}.dat")) { &oops('NEWREG') unless (open NEWREG, ">$basepath$regdir/$form{'ALIAS'}.dat"); $newpass = &randompass; print NEWREG "$newpass\n$form{'EMAIL'}\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'} Phone\:$form{'ADDRESS4'}"; close NEWREG; open (NEWREG2, ">/u1/www/transportuniverse/auction/reg/$form{'ALIAS'}.dat"); print NEWREG2 "$newpass\n$form{'EMAIL'}\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'} Phone\:$form{'ADDRESS4'}"; close NEWREG2; open (NEWREG3, ">/u1/www/transportuniverse/tender/reg/$form{'ALIAS'}.dat"); print NEWREG3 "$newpass\n$form{'EMAIL'}\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'} Phone\:$form{'ADDRESS4'}"; close NEWREG3; open (NEWREG4, ">/u1/www/transportuniverse/employee/reg/$form{'ALIAS'}.dat"); print NEWREG4 "$newpass\n$form{'EMAIL'}\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'} Phone\:$form{'ADDRESS4'}"; close NEWREG4; print "


CONGRATULATIONS, $form{'ALIAS'}, YOUR REGISTRATION WAS SUCCESSFUL. YOU WILL RECEIVE AN EMAIL NOTIFICATION AT $form{'EMAIL'} IN JUST A FEW MOMENTS. IT WILL CONTAIN THE YOUR PASSWORD AND SOME LINKS TO GET YOU STARTED.
If you do not get an e-mail, please register again or contact us through the site.



\n"; &sendemail($form{'EMAIL'}, 'Transport Universe Password', 'nobody', $mailserver, "PLEASE DO NOT REPLY TO THIS E-MAIL.\n\nSUBJECT: Your Live Auctions Password\n Congratulations, You are now able to BUY and SELL in the following TRANSPORT UNIVERSE sites:\n\nLIVE AUCTIONS SUPER CLASSIFIEDS WANTED\n\nYOUR TEMPORARY PASSWORD IS: $newpass\nYOUR USERNAME IS: \nClick on the link below to change your password to anything you wish.\n\nhttp://www.transportuniverse.com/cgi-transportuniverse/c-reg.cgi?1&1&c\n\nIf You Require any assistance please do not hesitate to contact us at\nservice\@transportuniverse.com \n$signature\n"); &sendemail('postmaster@transportuniverse.com', 'NEW USER REGISTERED standard', 'nobody', $mailserver, "UserName\: $form{'ALIAS'}\n$form{'EMAIL'}\n$form{'ADDRESS1'}\n$form{'ADDRESS2'}\n$form{'ADDRESS3'}\n$form{'ADDRESS4'}\n$signature\n"); } else { print "SORRY....THAT USERNAME IS TAKEN. PLEASE, HIT THE BACK BUTTON ON YOUR BROWSER AND TRY AGAIN, THANK YOU!\n"; } } else { print "There may be a problem with the registration Procedure. if this condition persists please notify the site administrator at Transport Universe...\n"; } } ############################################## # Sub: Random Password sub randompass { srand(time ^ $$); @passset = ('a'..'k', 'm'..'n', 'p'..'z', '2'..'9'); $randpass = ""; for ($i = 0; $i < 8; $i++) { $randum_num = int(rand($#passset + 1)); $randpass .= $passset[$randum_num]; } return $randpass; } ############################################## # Sub: Closed items 1 # This displays closed items sub viewclosed1 { $form{'ALIAS'} =~ s/\W//g; $form{'ALIAS'} = lc($form{'ALIAS'}); $form{'ALIAS'} = ucfirst($form{'ALIAS'}); &oops('ALIAS') unless (open(REGFILE, "$basepath$regdir/$form{'ALIAS'}.dat")); ($password,$email,$add1,$add2,$add3,@junk) = ; chomp($password,$email,$add1,$add2,$add3,@junk); close REGFILE; &oops('PASSWORD') unless ((lc $password) eq (lc $form{'PASSWORD'})); print "\n"; print "
\n"; } ############################################## # Sub: Closed items 2 # This displays closed items sub viewclosed2 { $form{'bidtoview'} =~ s/\W//g; open (THEFILE, "$basepath$closedir/$form{'bidtoview'}.dat") or &oops('ITEM'); ($title, $reserve, $inc, $desc, $loca, $cont, $image, $image2, $image3, $image4, $cat1, $cat2, $cat3, $cat4, @bids) = ; close THEFILE; chomp($title, $reserve, $inc, $desc, $loca, $cont, $image, $image2, $image3, $image4, $cat1, $cat2, $cat3, $cat4, @bids); @firstbid = split(/\[\]/,$bids[0]); @lastbid = split(/\[\]/,$bids[$#bids]); print "

$title

\n"; print "
Description
$desc"; print "
Bid History
\n"; print "START: "; foreach $bid (@bids) { @thebid = split(/\[\]/,$bid); $bidtime = localtime($thebid[3]); print "$thebid[0] \($bidtime\) - \$$thebid[2]
\n"; } print "

Reserve was: \$$reserve
\n"; print "


Contact Information
\n"; if ($form{'ALIAS'} eq $firstbid[0]) { print "You were the seller...

\n"; print "Buyer Information:
Alias: $lastbid[0]
E-Mail: $lastbid[1]
Address: $lastbid[4]
$lastbid[5]
$lastbid[6]

High Bid: \$$lastbid[2]\n"; print "

Unsuccessful Bid Contacts:
\n"; foreach $bid (@bids) { @thebid = split(/\[\]/,$bid); print "$thebid[0] - $thebid[1]
\n"; } print "

You may repost this item if you want to:
\n"; } elsif ($form{'ALIAS'} eq $lastbid[0]) { print "You were a high bidder...

\n"; print "Seller Information:
Alias: $firstbid[0]
E-Mail: $firstbid[1]
Address: $firstbid[4]
$firstbid[5]
$firstbid[6]

Your High Bid: \$$lastbid[2]

\n"; print "Remember, the seller is not required to sell unless your bid price was above the reserve price..."; } else { print "You were not a winner... No further contact information is available.\n"; } } ############################################## # Sub: Seller edit auction sub selleredit { &oops('ALIAS') unless ($form{'ALIAS'}); &oops('PASSWORD') unless ($form{'PASSWORD'}); $form{'ALIAS'} =~ s/\W//g; $form{'ALIAS'} = lc($form{'ALIAS'}); $form{'ALIAS'} = ucfirst($form{'ALIAS'}); open REGFILE, "$basepath$regdir/$form{'ALIAS'}.dat"; ($password,$email,$add1,$add2,$add3,@junk) = ; chomp($password,$email,$add1,$add2,$add3,@junk); close REGFILE; open THEFILE, "$basepath$form{'CAT'}/$form{'ITEM'}.dat"; ($title, $reserve, $inc, $desc, $loca, $cont, $image, $image2, $image3, $image4, $cat1, $cat2, $cat3, $cat4, @bids) = ; $title =~ s/\"//g; # quotes cause problems for a text input field chomp($title, $reserve, $inc, $desc, $loca, $cont, $image, $image2, $image3, $image4, $cat1, $cat2, $cat3, $cat4, @bids); close THEFILE; @firstbid = split(/\[\]/,$bids[0]); @lastbid = split(/\[\]/,$bids[$#bids]); if ($firstbid[0] eq $form{'ALIAS'}) { if (lc($password) eq lc($form{'PASSWORD'})) { print <<"EOF";

Add To Classified Description
Title/Item Name:
No HTML
$title
Description:
This is the description originally placed with the classified ad:
$desc
New Text:
Anything you would like to add to your description.
HTML is permitted.
Offered By:$firstbid[0]
EOF if ($firstbid[0] eq $lastbid[0]) { print <<"EOF";
You may delete this auction if you wish. WARNING!!! By pressing the delete button your Classified ad will be permanently deleted! This action cannot be undone!
EOF } } else { print "
\n"; print "Incorrect Password!\n"; print "
\n"; } } else { print "
\n"; print "Only the seller may make modifications to the listing!\n"; print "
\n"; } } ############################################## # Sub: Process Modified Auction sub sellerchange { &oops('ITEM') unless ($form{'ITEM'}); $form{'ITEM'} =~ s/\W//g; &oops('ITEM') unless (open(THEFILE, "$basepath$form{'CAT'}/$form{'ITEM'}.dat")); ($title, $reserve, $inc, $desc, $loca, $cont, $image, $image2, $image3, $image4, $cat1, $cat2, $cat3, $cat4, @bids) = ; close THEFILE; chomp($title, $reserve, $inc, $desc, $loca, $cont, $image, $image2, $image3, $image4, $cat1, $cat2, $cat3, $cat4, @bids); @firstbid = split(/\[\]/,$bids[0]); @lastbid = split(/\[\]/,$bids[$#bids]); $form{'IMAGE'} = $image if !($form{'IMAGE'}); $commtime = localtime(time); if ($form{'NEWDESC'} ne "") { $desc1 = $desc; $desc1 .= "
"; $desc1 .= "Added by the Seller on $commtime\:
$form{'NEWDESC'}"; } else { $desc1 = $desc; } &oops('ITEM') unless (open NEWITEM, ">$basepath$form{'CAT'}/$form{'ITEM'}.dat"); print NEWITEM "$title\n$reserve\n$inc\n$desc1\n$loca\n$cont\n$image\n$image2\n$image3\n$image4\n$cat1\n$cat2\n$cat3\n$cat4"; foreach $bad (@bids) { @thebid = split(/\[\]/,$bad); $bidtime = localtime($thebid[3]); print NEWITEM "\n$thebid[0]\[\]$thebid[1]\[\]$thebid[2]\[\]$thebid[3]\[\]$thebid[4]\[\]$thebid[5]\[\]$thebid[6]\[\]$thebid[7]"; $message = "This item has a bidding history that was not changed!"; } close NEWITEM; print "
\n"; print "$form{'TITLE'} has been successfully changed.
\n"; ##print "$message\n"; print "
\n"; } ############################################## # Sub: Remove Item sub selldel1 { if (unlink("$basepath$form{'CAT'}/$form{'ITEM'}.dat")) { print "
\n"; print "\n"; print "Your SUPER CLASSIFIED AD has been deleted!\n"; print "
\n"; } else { print "
\n"; print "\n"; print "File Could Not Be Removed!\n"; print "
\n"; } } ############################################## # Sub: Oops! sub oops { print "

E R R O R

Something is wrong with the $_[0] section.

Please hit BACK to try again!

\n"; exit; } ############################################## # Sub: Get Form Data sub get_form_data { $buffer = ""; read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs=split(/&/,$buffer); foreach $pair (@pairs) { @a = split(/=/,$pair); $name=$a[0]; $value=$a[1]; $value =~ s/\+/ /g; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/~!/ ~!/g; $value =~ s/[\n\r]/ /sg; #remove \n $value =~ s/\[\]//g; #remove [] push (@data,$name); push (@data, $value); } %form=@data; %form; } ############################################## # Sub: File Lock sub filelock { flock (NEWITEM, 2); seek(NEWITEM, 0, 2); } ################################# sub Parse_Form { if ($ENV{'REQUEST_METHOD'} eq 'GET') { @pairs = split(/&/, $ENV{'QUERY_STRING'}); } elsif ($ENV{'REQUEST_METHOD'} eq 'POST') { read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); if ($ENV{'QUERY_STRING'}) { @getpairs =split(/&/, $ENV{'QUERY_STRING'}); push(@pairs,@getpairs); } } else { print "Content-type: text/html\n\n"; print "

Use Post or Get"; } foreach $pair (@pairs) { ($key, $value) = split (/=/, $pair); $key =~ tr/+/ /; $key =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~s///g; if ($formdata{$key}) { $formdata{$key} .= ", $value"; } else { $formdata{$key} = $value; } } } ############################################## # SUB: Send E-mail sub sendemail { use Socket; $TO=$_[0]; @TO=split('\0',$TO); $SUBJECT=$_[1]; $REPLYTO=$_[2]; $REMOTE = $_[3]; $THEMESSAGE = $_[4]; if ($REMOTE =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) { $addr = pack('C4', $1, $2, $3, $4); } else { die("Bad IP address: $!"); } $port = 25 unless $port; $port = getservbyname($port,'tcp') if $port =~ /\D/; $proto = getprotobyname('tcp'); socket(S, PF_INET, SOCK_STREAM, $proto) or die("Socket failed: $!"); $sockaddr = 'S n a4 x8'; # shouldn't this be in Socket.pm? connect(S, pack($sockaddr, AF_INET, $port, $addr)) or die("Unable to connect: $!"); select(S); $| = 1; select(STDOUT); $a=; print S "HELO ${SERVERNAME}\n"; $a=; print S "MAIL FROM:postmaster\@transportuniverse\.com\n"; $a=; print S "RCPT TO:<$TO[0]>\n"; $a=; if ($#TO > 0) { foreach (1..$#TO) { print S "RCPT TO: $TO[$_]\n";$a=; } } print S "DATA \n"; $a=; print S "To: $TO[0]\n"; if ($#TO > 0) { foreach (1..$#TO) { print S "Cc: $TO[$_]\n"; } } print S "Subject: $SUBJECT\n"; # Print the body print S "$THEMESSAGE\n"; print S ".\n"; $a=; print S "QUIT"; close (S); }