#!/usr/bin/perl ############################################## # The input query string is in the form # auction.cgi?[category]&[number]&[r|n|u|c|v] require "daddons.cgi"; require "justme.pl"; require "justmail.pl"; require "thevarsd.pl"; #require "d1admin.pl"; $mailserver = "206.152.180.10"; $basepath = '/u1/www/transportuniverse/supertrain/'; $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
Premier Dealerships 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; #$ARGV[1] =~ s/\D//g; if ($form{'action'} eq 'bid') { &procbid; } ###elsif ($ARGV[1] eq 'subcat') { &dispsubcat; } elsif ($ARGV[2] eq 'xxx') { &dealerconvert; } elsif ($form{'action'} eq 'drop') { &drop; } elsif ($form{'action'} eq 'FINDIT') { &findit; } elsif ($form{'action'} eq 'accepted') { &accepted; } elsif ($form{'action'} eq 'bid2') { &procbid2; } elsif ($form{'action'} eq 'new') { &procnew; } elsif ($form{'action'} eq 'reg') { &procreg; } elsif ($form{'action'} eq 'creg') { &proccreg; } elsif ($form{'action'} eq 'citm') { &changeitem; } elsif ($form{'action'} eq 'repost') { &newitem; } elsif ($form{'action'} eq 'lookup2') { &lookup2; } elsif ($ARGV[2] eq 'lookup') { &lookup; } elsif ($form{'action'} eq 'closeditems1') { &viewclosed1; } elsif ($form{'action'} eq 'closeditems2') { &viewclosed2; } elsif ($form{'action'} eq 'feederadd') { &feederadd; } elsif ($form{'action'} eq 'feedersearch') { &feedersearch; } elsif ($form{'searchstring'}) { &procsearch; } elsif ($form{'action'} eq 'mailto') { &mailtosend; } elsif ($ARGV[0] eq 'mailto') { &mailto; } elsif ($form{'action'} eq 'justmedone') { &justmesave; } elsif ($form{'action'} eq 'justedit') { &justmeedit; } elsif ($form{'action'} eq 'justmepre') { &justmepre; } elsif ($ARGV[0] eq 'table') { &table; } elsif ($ARGV[0] eq 'justedit') { &justmelogon; } elsif ($ARGV[0] eq 'justme') { &justmecreate; } elsif ($ARGV[0] eq 'justdisp') { &disppage; } elsif ($ARGV[0] eq 'userprofile') { &userprofile; } elsif ($ARGV[2] eq 'el') { &editlogon; } elsif ($ARGV[0] eq 'help4') { &faq; } elsif ($ARGV[0] eq 'feat') { &dispfeat; } elsif ($form{'action'} eq 'selled') { &sellerchange; } elsif ($form{'action'} eq 'se') {&selleredit; } elsif ($form{'action'} eq 'selldel') { &selldel1; } elsif ($form{'action'} eq 'password1') { &password2; } elsif ($ARGV[2] eq 'password') { &password; } elsif ($ARGV[0] eq $adminpass) { &admin; } elsif (($ARGV[0] eq 'moveuser') && ($ARGV[2] eq $adminpass)) { print "

ERROR MOVING FILE

" unless &movefile("$basepath$regdir/$ARGV[3]", "$basepath$oldreg/$ARGV[3]"); } elsif ($ARGV[0] eq 'all') { &allcategory; } elsif ($ARGV[0] eq 'alldutch') { &alldutch; } elsif ($ARGV[0] eq 'disp') { &disp; } elsif ($ARGV[2] eq 's') { &user; } elsif ($ARGV[2] eq 'u') { &newreg; } elsif ($ARGV[2] eq 'c') { &changereg; } elsif ($ARGV[2] eq 'v') { &viewclosed; } elsif ($ARGV[2] eq 'n') { &newitem; } elsif ($ARGV[2] eq 'q') { &qonvert; } elsif ($form{'action'} eq 'usr') { &newreg; } elsif ($ARGV[0] eq 'userassist') { &userassist; } elsif ($form{'action'} eq 'news') { &procnews; } elsif ($form{'action'} eq 'creg') { &proccreg; } elsif ($form{'action'} eq 'citm') { &changeitem; } elsif ($form{'action'} eq 'bidderview') { &bidderview; } elsif ($form{'action'} eq 'listreg') { &listreg; } elsif ($form{'action'} eq 'listitem') { &newitems; } elsif ($form{'action'} eq 'selleredit') { &selleredit; } elsif ($form{'action'} eq 'sellerremove') { &sellerremove; } elsif ($form{'action'} eq 'sellerreq') { &sellerreq; } elsif ($form{'action'} eq 'procclistreg') { &procclistreg; } elsif ($ARGV[2] eq 'lc') { &changlistreg; } elsif ($ARGV[2] eq 'lr') { &listremitem; } elsif ($ARGV[2] eq 'f') { &feeder; } elsif ($ARGV[2] eq 'fs') { &feedersearch; } elsif ($form{'action'} eq 'feat') { &dispfeat; } elsif (($regdir ne "") && ($ARGV[0] eq $regdir)) { &dispcat; } # be sure nobody is trying to hack the user dir elsif (!(($ARGV[0]) && (-d "$basepath$ARGV[0]"))) { &dispcat; } elsif ($ARGV[1] eq 'subcat') { &dispsubcat; } elsif ($ARGV[2] eq 'r') { &remitem; } elsif ($ARGV[2] eq 'x') { &autoclose; } elsif ($ARGV[2] eq 'e') { &editem; } elsif (!(($ARGV[1]) && (-f "$basepath$ARGV[0]/$ARGV[1].dat"))) { &displist; } else { &dispitem; } ############################################## # 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 ; ########################################### # Featured sub dispfeat { print "
Premier Dealerships
\n"; print "\n"; foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; @firstbid = split(/\[\]/,$bids[0]); $timediff = ($file - time); $featitemnum = "YES"; ## ADDON: Select alternating row color. if ($i % 2 == 1) { $colortablebody = $odd_row_color; } else { $colortablebody = $even_row_color; } $i++; $ii++; ## END: Select alternating row color. print "\n" if ($feat eq $featitemnum); } else { print ""; } } } print "
$conam $costate
\n"; } ############################################## # Sub: Display List Of Categories # This creates a "nicer" list of categories. # Written by Mike W AKA Madclicker with # credits to both kamui and Jared # it is a combination of my work in conjunction with theirs # that made this possible!! sub dispcat { print "
Premier Dealers

\n"; foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($b) <=> int($a) } @allfiles) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; @firstbid = split(/\[\]/,$bids[0]); $timediff = ($file - time); $featitemnum = "YES"; print "$head\n"; ################### NEED PAGE BREAK HERE ##################### } else { print ""; } } } print "
\n"; } ############################################## # Sub: Display List Of Items sub displist { print "
$ARGV[0]
\n"; print "\n"; opendir THEDIR, "$basepath$ARGV[0]" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; ##################################### ####### foreach $file (sort { int($a) <=> int($b) } @allfiles) { ######## the old line ######## my $pagelength = 25; $ENV{QUERY_STRING}=~/\&page=(\d*)/; $form{page} = int $1; $ENV{QUERY_STRING}=~/\&+pb=(\d*)/; $form{pb} = int $1; $ENV{QUERY_STRING} = join("&", @ARGV[0..6]); my $pagebreak = $form{pb} || $pagelength; my ($icount, $pcount) = (0,0); foreach $file (sort { int($b) <=> int($a) } @allfiles) { next if $file=~/^\.{1,2}$/; if(++$icount > $pagebreak){$icount=1; $pcount++} next if $pcount != $form{page}; ##################################### ## ADDON: Select alternating row color. if ($i % 2 == 1) { $colortablebody = $odd_row_color; } else { $colortablebody = $even_row_color; } $i++; $ii++; ## END: Select alternating row color. if (-T "$basepath$ARGV[0]/$file") { open THEFILE, "$basepath$ARGV[0]/$file"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; $featitemnum = "YES"; print "\n"; } } print "
$conam $costate

\n"; #-------------------------------------------------------------------# # Previous Link if($form{page} > 0){print " Previous Page "} else{print " Previous Page "} print "["; # Numbers: for(0..$form{page}-1){print " @{[$_+1]} "} # Current page number: print " ", int($form{page})+1, " "; # Numbers again: for($form{page}+1..$pcount){print " @{[$_+1]} "} # All-Link, comment out if not used: if($pcount>0){print " All "} print "]"; # Next Link if($form{page} < $pcount){print " Next Page "} else{print " Next Page "} #------------------------------------------------------------------# print "
\n"; } ############################################## # Sub: Display Item sub dispitem { open THEFILE, "$basepath$ARGV[0]/$ARGV[1].dat"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @firstbid = split(/\[\]/,$bids[0]); @lastbid = split(/\[\]/,$bids[$#bids]); $nowtime = localtime(time); $closetime = localtime($ARGV[1]); $reservemet = ""; $reservemet = "(reserve price not yet met)" if ($lastbid[2] < $reserve); $reservemet = "(reserve price met)" if (($lastbid[2] >= $reserve) && ($reserve > 0)); $desired_file = $ARGV[1] . "r" . ".txt"; #################### $head = "
$conam
$cocity, $costate  $telno
$url
"; print "
$desc
$head
Inventory 
$inventory

\n"; if ((time > $ARGV[1]) && (time > (60 * $aftermin + $thebid[3]))) { &sendemail('postmaster@transportuniverse.com', 'DEALER PAGE VIEWED', 'nobody', $mailserver, "This annual dealership membership has expired but is still listed on the site. Now, let's update the information and double the fees.\n\nALIAS\: $alias\nCOMPANY\: $conam\nCATEGORY\: $ARGV[0]\n"); } print <<"EOF";
This dealership may enter both username and password
to update the inventory listed here.


UserName:
Password:

EOF $nowbid = &parsebid($lastbid[2]); &sendemail('postmaster@transportuniverse.com', 'DEALER PAGE VIEWED', 'nobody', $mailserver, "Someone has viewed this dealership page\n\nALIAS\: $alias\nCOMPANY\: $conam\nCATEGORY\: $ARGV[0]\n"); } ############################################## # Sub: Add New Item # This allows a new item to be put up for sale sub newitem { $inc = "1.00"; if ($form{'REPOST'}) { if (open (THEFILE, "$basepath$closedir/$form{'REPOST'}.dat")) { ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; } } print "
ADD YOUR DEALERSHIP PAGE
\n"; print "
\n"; print <<"EOF";
State or Region:
Select a Region
Category:
Select a Category
Inventory Status:
Select One
For This Category.  New Only, Used Only, or New and Used?
Header:  May include HTML

Include any company information you wish to be displayed above
your inventory. Put your advertising in here with financing information,
special deals, logo graphics, slogans, etc.
Inventory:  May include HTML

You may update this inventory list at any time with ease.
Cut and paste inventory information from your website or database!
Your UserName:
Your Password:
EOF } ############################################## # Sub: Preview # This displays items before they are posted. sub preview { $nowtime = localtime(time); $closetime = localtime($form{'ITEM'}); print "

PREVIEW OF LISTING

\n"; $nowtime = localtime(time); $bidstart = localtime(time); $location = $firstbid[6]; $desc = "$form{'DESC'}" if ($form{'DESC'}); $inventory = "$form{'INVENTORY'}" if ($form{'INVENTORY'}); # print "

$title


Information
\n"; $reservemet = ""; $reservemet = "(reserve price not yet met)" if ($lastbid[2] < $reserve); $reservemet = "(reserve price met)" if (($lastbid[2] >= $reserve) && ($reserve > 0)); if ($form{'url'} eq "http://") { $head = "
$form{'CONAM'}
$form{'USED'} $form{'CATEGORY'}
$form{'COCITY'}, $form{'COSTATE'}  $form{'TELNO'}

"; } else { $head = "
$form{'CONAM'}
$form{'USED'} $form{'CATEGORY'}
$form{'COCITY'}, $form{'COSTATE'}  $form{'TELNO'}

$form{'url'}

"; } ###################Madclicker Dutch ################ if ($form{'DUTCH'} eq $godutch){ $dutchstatus = "YES"; } if ($form{'DUTCH'} eq $nodutch){ $dutchstatus = "NO"; } ################ End Madclicker Dutch ####### # Add-on: No Reserve ################## $reservemet = "No reserve" if ($reserve <= 0); # End Add-on ########################## # Add-on: Feedback #################### $usersfeed = &feeder($firstbid[0],2); $bidderfeed = &feeder($lastbid[0],2); # End Add-on ########################## # Add-on: JustMe ###################### if (-f "$basepath$pagedir/$firstbid[0].page") { $usersfeed = ($usersfeed . "" . $justmeicon . ""); } if (-f "$basepath$pagedir/$lastbid[0].page") { $bidderfeed = ($bidderfeed . "" . $justmeicon . ""); } if ($usersfeed eq $bidderfeed) { $bidderfeed = '' ; } # End Add-on ########################## print "
unless you wish to change anything.
Use your browser\'s BACK button to edit the item.

\n"; print <<"EOF";
$head

$desc



Inventory

$inventory


EOF foreach $key (keys %form) { $form{$key} =~ s/\>/\[greaterthansign\]/gs; $form{$key} =~ s/\\n"; } print "\n"; &count_post } ############################################## # Sub: Process New Item # This processes new item to be put up for # sale from a posted form sub procnew { if ($regdir ne "") { $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, $form{'regtype'}, $form{'ALIAS'}, $form{'CONAM'}, $form{'COSTREET'}, $form{'COCITY'}, $form{'COSTATE'}, $form{'COZIP'}, $form{'TELNO'}, $form{'EMAIL'}, $form{'COBANNER'}, $form{'PTELL'}, $form{'url'}, @userbids) = ; close REGFILE; chomp($password, $form{'regtype'}, $form{'ALIAS'}, $form{'CONAM'}, $form{'COSTREET'}, $form{'COCITY'}, $form{'COSTATE'}, $form{'COZIP'}, $form{'TELNO'}, $form{'EMAIL'}, $form{'COBANNER'}, $form{'PTELL'}, $form{'url'}, @userbids); &oops('PASSWORD') unless ((lc $password) eq (lc $form{'PASSWORD'})); } &oops('CATEGORY') unless (-d "$basepath$form{'CATEGORY'}"); &oops('CONAM') unless ($form{'CONAM'}); # &oops('TELNO') unless ($form{'TELNO'}); $form{'ITEM'} = ($form{'DAYS'} * 86400 + time); $form{'ITEM'} = ($form{'DAYS'} * 86400 + time) until (!(-f "$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat")); if ($form{'FROMPREVIEW'}) { foreach $key (keys %form) { $form{$key} =~ s/\[greaterthansign\]/\>/gs; $form{$key} =~ s/\[lessthansign\]/\$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat")); print NEWAUCTION "$form{'ALIAS'}\n$form{'CONAM'}\n$form{'COSTREET'}\n$form{'COCITY'}\n$form{'COSTATE'}\n$form{'COZIP'}\n$form{'TELNO'}\n$form{'EMAIL'}\n$form{'COBANNER'}\n$form{'PTELL'}\n$form{'url'}\n$form{'INVENTORY'}\n$form{'REGION'}\n$form{'DESC'}\n$form{'SHIPPING'}\n$form{'USED'}\n$form{'FEAT'}\n$form{'BOLD'}\n$form{'GRABBER'}\n$form{'DUTCH'}\n$form{'QTY'}\n$form{'GALLERY'}"; close NEWAUCTION; print "

$form{'TITLE'}
Featured Dealer Page Has Just Been Posted Under $category{$form{'CATEGORY'}}

\n"; $newbidflag=1; &thankyou; } else { &preview; } } ############################################## # Sub: Ad Has Been Placed! sub thankyou { if (($regdir ne "") && !($newbidflag)) { $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, $form{'regtype'}, $form{'ALIAS'}, $form{'CONAM'}, $form{'COSTREET'}, $form{'COCITY'}, $form{'COSTATE'}, $form{'COZIP'}, $form{'TELNO'}, $form{'EMAIL'}, $form{'COBANNER'}, $form{'PTELL'}, $form{'url'}, @userbids) = ; close REGFILE; chomp($password, $form{'regtype'}, $form{'ALIAS'}, $form{'CONAM'}, $form{'COSTREET'}, $form{'COCITY'}, $form{'COSTATE'}, $form{'COZIP'}, $form{'TELNO'}, $form{'EMAIL'}, $form{'COBANNER'}, $form{'PTELL'}, $form{'url'}, @userbids); &oops('PASSWORD') unless ((lc $password) eq (lc $form{'PASSWORD'})); } &oops('ALIAS') unless ($form{'ALIAS'}); # &oops('EMAIL') unless ($form{'EMAIL'} =~ /.+\@.+/); # &oops('BID') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/); $form{'BID'} = &parsebid($form{'BID'}); # &oops('ADDRESS1') unless ($form{'ADDRESS1'}); # &oops('ADDRESS2') unless ($form{'ADDRESS2'}); # &oops('ADDRESS3') unless ($form{'ADDRESS3'}); $timenum = time; $thetime = localtime(time); &oops('ITEM') unless (open ITEM, "$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat"); ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close ITEM; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); if ((((time <= $form{'ITEM'}) || (time <= (60 * $aftermin + $lastbid[3]))) && ($form{'BID'} >= $lastbid[2] + $inc)) || ($newbidflag == 1)) { &oops('ITEM') unless (open NEWITEM, ">>$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat"); &filelock if ($flock); print NEWITEM "\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$form{'BID'}\[\]$timenum\[\]$form{'COSTREET'}\[\]$form{'COCITY'}\[\]$form{'COSTATE'}\[\]$form{'COZIP'}"; close NEWITEM; print "
$form{'ALIAS'}, your Listing Number is $form{'ITEM'}.
Your listing has been posted in the $form{'CATEGORY'} category.
You may wish to print this notice as confirmation of your Premier Dealer Listing.
\n"; print "CLICK HERE
to see your listing


\n"; $flag=0; foreach $userbid(@userbids) { $flag=1 if ("$form{'CATEGORY'}$form{'ITEM'}" eq $userbid); } if ($flag==0 && $regdir ne "") { &oops('ALIAS') unless (open(REGFILE, ">>$basepath$regdir/$form{'ALIAS'}.dat")); print REGFILE "\n$form{'CATEGORY'}$form{'ITEM'}"; close REGFILE; } $bob=1; } else { $bob=1; } } ############################################## # Sub: Place Bid on Item # This allows a user to place a new bid on # something. sub placebid { $lowbid = &parsebid($lastbid[2] + $inc); if ($regdir eq "") { print <<"EOF";

Your Handle/Alias: (used to track your bid)
Your E-Mail Address: (must be valid)
Your Bid: \$

Contact Information: (will be given out only to the seller)
Full Name:

Street Address:

City, State, ZIP:

EOF } else { print <<"EOF";

Place A Bid
The High Bid Is: \$$lastbid[2]\ \;\ \;\ \; The Lowest You May Bid Is: \$$lowbid

Type only numerals and the decimal point (if required).No special characters.
Placing a bid is a binding contract in many states. Do not bid unless you intend to buy this item at the amount of your bid.
Proxy bidding for all bids: Please bid the maximum amount you are willing to pay for this item. Your maximum amount will be kept secret, $sitename will bid on your behalf as necessary by increasing your bid by the current bid increment up until your maximum is reached. This saves you the trouble of having to keep track of the auction as it proceeds and prevents you from being outbid at the last minute unless your spending limit is exceeded. Also, in case of a tie for high bidder, earlier bids take precedence. And, keep in mind that you cannot reduce your maximum bid at a later date. If you have bid on this item before, note that your new bid must be greater than your previous bid.

\ \;UserName:\ \;\ \;Password:\ \;\ \;Your Maximum Bid:\ \; \$\ \;
\ \;\ \;\ \;Place Bid:\ \;\ \;\ \;Seller Modify Auction:\ \;\ \;\ \;
EOF } } ###################################### # Sub: Process Bid # This processes new bids from a posted form sub procbid { if (($regdir ne "") && !($newbidflag)) { $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, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids) = ; close REGFILE; chomp($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids); &oops('PASSWORD') unless ((lc $password) eq (lc $form{'PASSWORD'})); } &oops('ALIAS') unless ($form{'ALIAS'}); &oops('EMAIL') unless ($form{'EMAIL'} =~ /.+\@.+/); &oops('BID') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/); $form{'BID'} = &parsebid($form{'BID'}); &oops('ADDRESS1') unless ($form{'ADDRESS1'}); &oops('ADDRESS2') unless ($form{'ADDRESS2'}); &oops('ADDRESS3') unless ($form{'ADDRESS3'}); $timenum = time; $thetime = localtime(time); &oops('ITEM') unless (open ITEM, "$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat"); ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close ITEM; chomp ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); ################## max bidding ################## if ($lastbid[7] eq ""){$lastbid[7] = $lastbid[2]}; #ongoing auctions OK $newmin = $form{'BID'} + $inc; $newmin = &parsebid($newmin); if ((((time <= $form{'ITEM'}) || (time <= (60 * $aftermin + $lastbid[3]))) && ($form{'BID'} >= $lastbid[2] + $inc) && ($form{'BID'} <= $lastbid[7])) || ($newbidflag == 1)) { &oops('ITEM') unless (open NEWITEM, ">>$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat"); &filelock if ($flock); $bid = $lastbid[2] + $inc; print NEWITEM "\n$lastbid[0]\[\]$lastbid[1]\[\]$form{'BID'}\[\]$timenum\[\]$lastbid[4]\[\]$lastbid[5]\[\]$lastbid[6]\[\]$lastbid[7]"; close NEWITEM; print "
$form{'ALIAS'}, your bid for $title has been beaten by a proxy bid.

The minimum bid is now \$$newmin

Click here to go back to the item to bid higher ...

\n"; } elsif ((((time <= $form{'ITEM'}) || (time <= (60 * $aftermin + $lastbid[3]))) && ($form{'BID'} >= $lastbid[2] + $inc) && ($form{'BID'} >= $lastbid[6])) || ($newbidflag == 1)) { &oops('ITEM') unless (open NEWITEM, ">>$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat"); &filelock if ($flock); $bid = $lastbid[2] + $inc; if (($form{'BID'} >= $reserve) && ($reserve > $lastbid[7])){ $bidmax = $reserve; } elsif (($form{'BID'} < $reserve) && ($form{'BID'} < $lastbid[7])){ $bidmax = $lastbid[2]+$inc; } elsif (($form{'BID'} < $reserve) && ($form{'BID'} >= ($lastbid[7] + $inc))){ $bidmax = $lastbid[7]+$inc; } elsif (($form{'BID'} < $reserve) && ($form{'BID'} > ($lastbid[7]))){ $bidmax = $form{'BID'}; } elsif (($form{'BID'} > $reserve) && ($form{'BID'} > ($lastbid[7] + $inc))){ $bidmax = $lastbid[7]+$inc; } else { $bidmax = $form{'BID'}; } $bidmax = &parsebid($bidmax); ################## max bidding ################## print NEWITEM "\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$bidmax\[\]$timenum\[\]$form{'ADDRESS1'}\[\]$form{'ADDRESS2'}\[\]$form{'ADDRESS3'}\[\]$form{'BID'}"; close NEWITEM; print "$form{'ALIAS'}, your bid has been placed on $title(item number $form{'ITEM'}) for \$$bidmax with a maximum bid of \$$form{'BID'} on $thetime.
You may want to print this notice as confirmation of your bid.

Go back to the item\n"; $flag=0; foreach $userbid(@userbids) { $flag=1 if ("$form{'CATEGORY'}$form{'ITEM'}" eq $userbid); } if ($flag==0 && $regdir ne "") { &oops('ALIAS') unless (open(REGFILE, ">>$basepath$regdir/$form{'ALIAS'}.dat")); print REGFILE "\n$form{'CATEGORY'}$form{'ITEM'}"; close REGFILE; } &sendemail($lastbid[1], 'You\'ve been outbid!', 'nobody', $mailserver, "You have been outbid on $title\! If you want to place a higher bid, please visit\:\n\n\thttp://$scripturl$ENV{'SCRIPT_NAME'}\?$form{'CATEGORY'}\&$form{'ITEM'}\n\nThe current high bid is \$$form{'BID'}.") if (($newbidflag != 1) && $scripturl); } else { print "Either the auction is closed or your bid is too low.
Hit the back button and reload to get the latest auction stats, then try again!\n"; } &count_bid } ########################################################################## # Sub: Process Bid # This processes new bids from a posted form sub procbid1 { if (($regdir ne "") && !($newbidflag)) { $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, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids) = ; close REGFILE; chomp($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids); &oops('PASSWORD') unless ((lc $password) eq (lc $form{'PASSWORD'})); } &oops('ALIAS') unless ($form{'ALIAS'}); &oops('EMAIL') unless ($form{'EMAIL'} =~ /.+\@.+/); &oops('BID') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/); $form{'BID'} = &parsebid($form{'BID'}); &oops('ADDRESS1') unless ($form{'ADDRESS1'}); &oops('ADDRESS2') unless ($form{'ADDRESS2'}); &oops('ADDRESS3') unless ($form{'ADDRESS3'}); $timenum = time; $thetime = localtime(time); &oops('ITEM') unless (open ITEM, "$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat"); ($title, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close ITEM; chomp($title, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); if ((((time <= $form{'ITEM'}) || (time <= (60 * $aftermin + $lastbid[3]))) && ($form{'BID'} >= $lastbid[2] + $inc)) || ($newbidflag == 1)) { &oops('ITEM') unless (open NEWITEM, ">>$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat"); &filelock if ($flock); print NEWITEM "\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$form{'BID'}\[\]$timenum\[\]$form{'COSTREET'}\[\]$form{'COCITY'}\[\]$form{'COSTATE'}\[\]$form{'COZIP'}";close NEWITEM; print "$form{'ALIAS'}, your bid has been placed on item number $form{'ITEM'} for \$$form{'BID'} on $thetime.
You may want to print this notice as confirmation of your bid.

Go back to the item\n"; $flag=0; foreach $userbid(@userbids) { $flag=1 if ("$form{'CATEGORY'}$form{'ITEM'}" eq $userbid); } if ($flag==0 && $regdir ne "") { &oops('ALIAS') unless (open(REGFILE, ">>$basepath$regdir/$form{'ALIAS'}.dat")); print REGFILE "\n$form{'CATEGORY'}$form{'ITEM'}"; close REGFILE; } &sendemail($lastbid[1], 'You\'ve been outbid!', 'nobody', $mailserver, "You have been outbid on $title\! If you want to place a higher bid, please visit\:\n\n\thttp://$scripturl$ENV{'SCRIPT_NAME'}\?$form{'CATEGORY'}\&$form{'ITEM'}\n\nThe current high bid is \$$form{'BID'}.") if (($newbidflag != 1) && $scripturl); } else { print "Either the auction is closed or your bid is too low.
Hit the back button and reload to get the latest auction stats, then try again!\n"; } &count_bid } ###################################### # Sub: Close Auction # This sets an item's status to closed. sub closeit { if ($ARGV[0] ne $closedir) { # We'll use the @firstbid and @lastbid info defined in &dispitem if ($closedir) { umask(000); # UNIX file permission junk mkdir("$basepath$closedir", 0777) unless (-d "$basepath$closedir"); print "Please notify the site admin that this item cannot be copied to the closed directory even though it is closed.\n" unless &movefile("$basepath$ARGV[0]/$ARGV[1].dat", "$basepath$closedir/$ARGV[0]$ARGV[1].dat"); } else { print "Please notify the site admin that this item cannot be removed even though it is closed.\n" unless unlink("$basepath$ARGV[0]/$ARGV[1].dat"); } if ($lastbid[2] >= $reserve) { &sendemail($lastbid[1], "Auction Close: $title", $firstbid[1], $mailserver, "Congratulations! You are the winner of auction number $ARGV[1].\nYour winning bid was \$$lastbid[2].\n\nPlease contact the seller to make arrangements for payment and shipping:\n\n$firstbid[4]\n$firstbid[5]\n$firstbid[6]\n$firstbid[1]\n\nThanks for using $sitename!"); } else { &sendemail($lastbid[1], "Auction Close: $title", $firstbid[1], $mailserver, "Congratulations! You were the high bidder on auction number $ARGV[1].\nYour bid was \$$lastbid[2].\n\nUnfortunately, your bid did not meet the seller\'s reserve price...\n\nYou may still wish to contact the seller to negotiate a fair price:\n\n$firstbid[4]\n$firstbid[5]\n$firstbid[6]\n$firstbid[1]\n\nThanks for using $sitename!"); } &sendemail($firstbid[1], "Auction Close: $title", $lastbid[1], $mailserver, "Auction Number $ARGV[1] Is Now Closed.\nThe high bid was \$$lastbid[2] (Your reserve was: \$$reserve).\n\nPlease contact the high bidder to make any necessary arrangements:\n\n$lastbid[4]\n$lastbid[5]\n$lastbid[6]\n$lastbid[1]\n\nThanks for using $sitename!"); } } ###################################################3 # Sub: Process Bid on a New Auction Posting # This processes new posting bid from a posted form sub procbid3 { if (($regdir ne "") && !($newbidflag)) { $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, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids) = ; close REGFILE; chomp($password, $form{'EMAIL'}, $form{'ADDRESS1'}, $form{'ADDRESS2'}, $form{'ADDRESS3'}, @userbids); &oops('PASSWORD') unless ((lc $password) eq (lc $form{'PASSWORD'})); } &oops('ALIAS') unless ($form{'ALIAS'}); &oops('EMAIL') unless ($form{'EMAIL'} =~ /.+\@.+/); &oops('BID') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/); $form{'BID'} = &parsebid($form{'BID'}); $form{'BIDON'} =($form{'BIDON'}); &oops('ADDRESS1') unless ($form{'ADDRESS1'}); &oops('ADDRESS2') unless ($form{'ADDRESS2'}); &oops('ADDRESS3') unless ($form{'ADDRESS3'}); $timenum = time; $thetime = localtime(time); &oops('ITEM') unless (open ITEM, "$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat"); ($title, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close ITEM; chomp($title, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @firstbid = split(/\[\]/,$bids[0]); @lastbid = split(/\[\]/,$bids[$#bids]); if ((((time <= $form{'ITEM'}) || (time <= (60 * $aftermin + $lastbid[3]))) && ($form{'BID'} >= $lastbid[2] + $inc)) || ($newbidflag == 1)) { &oops('ITEM') unless (open NEWITEM, ">>$basepath$form{'CATEGORY'}/$form{'ITEM'}.dat"); &filelock if ($flock); print NEWITEM "\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$form{'BID'}\[\]$timenum\[\]$form{'ADDRESS1'}\[\]$form{'ADDRESS2'}\[\]$form{'ADDRESS3'}\[\]$form{'BIDON'}\[\]"; close NEWITEM; print <
confirmation # $form{'ITEM'}

$form{'ALIAS'}, your item has been listed and is now live!
For confirmation, an email has been sent to you for your personal use.

Click here to go to Your Auction.

endofconfirm ####################### Send confirm message $m1 = " Hello $form{'ALIAS'}, Thank you for placing your item for auction at $sitename! We take great pride in providing our community with the best possible online auctioning experience. Your item has been listed to the site, and is already available to be bid upon. The item information posted is as follows : Item number : $form{'ITEM'} Category : $form{'CATEGORY'} Thank you for using $sitename! Sincerely, $sitename "; &sendemail($form{'EMAIL'},'Auction #' . $form{'ITEM'}, 'nobody', $mailserver, $m1); ###################### end send confirm message $flag=0; foreach $userbid(@userbids) {$flag=1 if ("$form{'CATEGORY'}$form{'ITEM'}" eq $userbid);} if ($flag==0 && $regdir ne "") { &oops('incorrect username') unless (open(REGFILE, ">>$basepath$regdir/$form{'ALIAS'}.dat")); print REGFILE "\n$form{'CATEGORY'}$form{'ITEM'}"; close REGFILE; } else { print <
$tdfont An error has occured in processing. Most likely this error is due to the auction already ending or your bid was too low.

Click here to return to the auction to remedy the problem.

endofconfirm } } } ############################################## # Sub: Remove Item # This removes an item from the auction # database. sub remitem { if ($ARGV[3] eq $adminpass) { if (unlink("$basepath$ARGV[0]/$ARGV[1].dat")) { print "File Successfully Removed!\n"; } else { print "File Could Not Be Removed!\n"; } } else { print "Sorry... Incorrect administrator password for delete!\n"; } } ############################################## ############################################## # Sub: Process Search sub procsearch { print "

Search Results - $form{'searchstring'}

"; print "\n"; print "\n"; foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; print "\n" if ((((($inventory =~ /$form{'searchstring'}/i) || ($desc =~ /$form{'searchstring'}/i) || ($alias =~ /$form{'searchstring'}/i) || ($conam =~ /$form{'searchstring'}/i) || ($file =~ /$form{'searchstring'}/i))))); #print "\n" if ($basepath$key\/$file =~ /$form{'searchstring'}/i); $flag = 0; } } } print "
Dealership City State / Region
$conam$cocity$costate
$conam$cocity$costate
\n"; } ############################################## # Sub: Change Registration # This allows a user to change information sub changereg { print <<"EOF";
Your USERNAME:
This must remain the same, cannot be changed and is required for original verification.
Your Current Password:
Your original password is contained in the email you received after registration.
Your New Password:
Your New Password Again:



EOF } ############################################## # Sub: Process Changed Registration # This modifies an account sub proccreg { if ($regdir) { &oops('ALIAS') unless ($form{'ALIAS'}); &oops('OLD PASSWORD') unless ($form{'OLDPASS'}); 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,$regtype,$alias,$conam,$costreet,$cocity,$costate,$cozip,$telno,$email,$cobanner,$ptell,$url,@junk) = ; chomp($password,$regtype,$alias,$conam,$costreet,$cocity,$costate,$cozip,$telno,$email,$cobanner,$ptell,$url,@junk); close REGFILE; &oops('OLD PASSWORD') unless ((lc $password) eq (lc $form{'OLDPASS'})); $form{'NEWPASS1'} = $password if !($form{'NEWPASS1'}); &oops('ALIAS') unless (open NEWREG, ">$basepath$regdir/$form{'ALIAS'}.dat"); print NEWREG "$form{'NEWPASS1'}\n$regtype\n$alias\n$conam\n$costreet\n$cocity\n$costate\n$cozip\n$telno\n$email\n$cobanner\n$ptell\n$url"; foreach $bid (@junk) { print NEWREG "\n$bid"; ########## douche 1 open (NEWREG1, ">/u1/www/transportuniverse/auction/reg/$form{'ALIAS'}.dat"); print NEWREG1 "$form{'NEWPASS1'}\n$email\n$costreet, $cocity\n$costate, $cozip\n$telno"; foreach $bid (@junk) { print NEWREG1 "\n$bid"; } close NEWREG1; open (NEWREG2, ">/u1/www/transportuniverse/super/reg/$form{'ALIAS'}.dat"); print NEWREG2 "$form{'NEWPASS1'}\n$email\n$costreet, $cocity\n$costate, $cozip\n$telno"; 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$costreet, $cocity\n$costate, $cozip\n$telno"; 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$costreet, $cocity\n$costate, $cozip\n$telno"; foreach $bid (@junk) { print NEWREG4 "\n$bid"; } close NEWREG4; ######## douched 1 } close NEWREG; print "
$form{'ALIAS'}, YOUR PASSWORD AND USER INFORMATION HAS SUCCESSFULLY BEEN CHANGED. PLEASE, BE SURE TO TAKE NOTE OF YOUR NEW PASSWORD

CLICK HERE
to list your dealership and inventory on the Premier Dealership Site!\n"; } else { print "Sorry... That Username is not valid. If you do not have an alias (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";
DEALER REGISTRATION
TRANSPORT UNIVERSE will never share information about our users with anyone. Please read our Privacy Policy for more information. A secure, random password will be e-mailed to the address you enter, and you will have the option to change this password at any time. CLICK HERE to see an example dealer page.

Choose a UserName:
Used with your password to place your listings.
Company Name:
Street Address:
City:
State or Providence:
Use 2 letter, capital abbreviations for states.
Country or Region:
Zip Code if in USA
Use 5 digit zip code only.
Telephone Number:
Your E-Mail Address:
Must be valid. Your password will be sent here.
Your Website's URL:
Enter the full URL of your website if you have one.
Agent User Name:
If referred by an Agent, the Agent User Name will be on your brochure.
For a low monthly fee of only \$69.95, you receive the following unlimited services. All of these services can be yours for less than what you pay to run a newspaper ad for just one day!

What you get:


Transport Universe is your one stop shop for all your transportation needs. This is the place to buy, sell, ship, finance, insure, or locate any vehicle, equipment, part, accessory from a spark plug to a space station.

We deliver consistent top ten placement in all the major search engines.
We deliver millions of page views per month every month.
We deliver an unparalleled ability to cross-merchandised a sophisticated audience  of serious buyers. We take you to every sector of the transportation industry.
Your annual membership includes full 24/7 easy access to the Premier Dealer, Super Classifieds, and Live Auction sites.  There is no limit to the amount of inventory you can list on each of these sites!
The Premier Dealer Site:  Pay only once to list all of your dealerships in as many categories as you want.
The Super Classified Site:  List your individual vehicles side by side with private sellers until sold.  These listings will remain active, driving traffic to your site until you remove them.  This effectively lets you create as many web pages as you want in full view of millions of consumers and businesses.
Live Auction Site:  Sell to the highest bidder while building a customer base clearly expressing their willingness buy.  All bidders become your potential customers.
Earn additional income from transportation services that pay you to use their links.
Use our comprehensive Condition Reports to fully describe your vehicles.
Use our top search engine rankings to drive unlimited traffic to your own web site.  You have spent time and money to build your web site.  Now, take your local dealership global.
EOF } ############################################## # Sub: Process Registration # This adds new accounts to the database sub procreg { if ($regdir) { umask(000); # UNIX file permission junk mkdir("$basepath$regdir", 0777) unless (-d "$basepath$regdir"); &oops('ALIAS') unless ($form{'ALIAS'}); &oops('CONAM') unless ($form{'CONAM'}); # &oops('TELNO') unless ($form{'TELNO'}); &oops('EMAIL') unless ($form{'EMAIL'} =~ /.+\@.+/); $form{'ALIAS'} =~ s/\W//g; $form{'ALIAS'} = lc($form{'ALIAS'}); $form{'ALIAS'} = ucfirst($form{'ALIAS'}); $form{'PTELL'} =~ s/\W//g; $form{'PTELL'} = lc($form{'PTELL'}); $form{'PTELL'} = ucfirst($form{'PTELL'}); if ($form{'COZIP'} eq "") { $form{'COZIP'} = $form{'COCOUNTRY'}; } if (!(-f "$basepath$regdir/$form{'ALIAS'}.dat")) { &oops('NEWREG') unless (open NEWREG, ">$basepath$regdir/temp/$form{'ALIAS'}.dat"); $newpass = &randompass; print NEWREG "$newpass\n$form{'regtype'}\n$form{'ALIAS'}\n$form{'CONAM'}\n$form{'COSTREET'}\n$form{'COCITY'}\n$form{'COSTATE'}\n$form{'COZIP'}\n$form{'TELNO'}\n$form{'EMAIL'}\n$form{'COBANNER'}\n$form{'PTELL'}\n$form{'url'}"; close NEWREG; # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # writes the payment info into the Agents /IDs/waiting file # $iddir = "IDs"; if (-e "/u1/www/transportuniverse/agents/$iddir/$form{'PTELL'}.dat") { open(AGENTFILE, "/u1/www/transportuniverse/agents/$iddir/$form{'PTELL'}.dat"); ($password, $email, $name, $address1, $address2, $phone, $referal) = ; close AGENTFILE; chomp($password, $email, $name, $address1, $address2, $phone, $referal); &oops('AGENTWAITING') unless (open AGENTWAITING, ">/u1/www/transportuniverse/agents/$iddir/waiting/dealer\>$form{'ALIAS'}\>$form{'PTELL'}.dat"); print AGENTWAITING "1000\n$referal\nDEALER\n$form{'COZIP'}\n$form{'ALIAS'}\n"; close AGENTWAITING; } # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ############# this is where i cut sub accepted from and put the link to the payment process ################### ################################################## #EXPERIMENT ALL TRASH AND NO STAR # $formuser = $form{'ALIAS'}; $formsite = "dealer"; $formagent = $form{'PTELL'}; $formurl = $form{'url'}; print <<"EOF";


You will have the option of paying by credit card or check.
For a low monthly fee of only \$69.95,
you receive the following services:

What you get:


Transport Universe is your one stop shop for all your transportation needs. This is the place to buy, sell, ship, finance, insure, or locate any vehicle, equipment, part, accessory from a spark plug to a space station.

We deliver consistent top ten placement in all the major search engines.
We deliver millions of page views per month every month.
We deliver an unparalleled ability to cross-merchandised a sophisticated audience  of serious buyers. We take you to every sector of the transportation industry.
Your annual membership includes full 24/7 easy access to the Premier Dealer, Super Classifieds, and Live Auction sites.  There is no limit to the amount of inventory you can list on each of these sites!
The Premier Dealer Site:  Pay only once to list all of your dealerships in as many categories as you want.
The Super Classified Site:  List your individual vehicles side by side with private sellers until sold.  These listings will remain active, driving traffic to your site until you remove them.  This effectively lets you create as many web pages as you want in full view of millions of consumers and businesses.
Live Auction Site:  Sell to the highest bidder while building a customer base clearly expressing their willingness buy.  All bidders become your potential customers.
Earn additional income from transportation services that pay you to use their links.
Use our comprehensive Condition Reports to fully describe your vehicles.
Use our top search engine rankings to drive unlimited traffic to your own web site.  You have spent time and money to build your web site.  Now, take your local dealership global.


EOF # # ################################################################## } 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 # This generates psudo-random 8-letter # passwords 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; } ######################################### #accepted sub # sub accepted { open REGFILE, "$basepath$regdir/temp/$form{'PALIAS'}.dat"; ($password,$regtype,$alias,$conam,$costreet,$cocity,$costate,$cozip,$telno,$email,$cobanner,$ptell,$url,@junk) = ; chomp($password,$regtype,$alias,$conam,$costreet,$cocity,$costate,$cozip,$telno,$email,$cobanner,$ptell,$url,@junk); close REGFILE; open NEWREG, ">$basepath$regdir/$form{'PALIAS'}.dat"; print NEWREG "$password\n$regtype\n$alias\n$conam\n$costreet\n$cocity\n$costate\n$cozip\n$telno\n$email\n$cobanner\n$ptell\n$url\n@junk\n"; close NEWREG; ############### douche 2 open (NEWREG1, ">/u1/www/transportuniverse/auction/reg/$form{'PALIAS'}.dat"); print NEWREG1 "$password\n$email\n$costreet, $cocity\n$costate, $cozip\n$telno"; close NEWREG1; open (NEWREG2, ">/u1/www/transportuniverse/super/reg/$form{'PALIAS'}.dat"); print NEWREG2 "$password\n$email\n$costreet, $cocity\n$costate, $cozip\n$telno"; close NEWREG2; open (NEWREG3, ">/u1/www/transportuniverse/tender/reg/$form{'PALIAS'}.dat"); print NEWREG3 "$password\n$email\n$costreet, $cocity\n$costate, $cozip\n$telno"; close NEWREG3; open (NEWREG4, ">/u1/www/transportuniverse/employer/reg/$form{'PALIAS'}.dat"); print NEWREG4 "$password\n$email\n$costreet, $cocity\n$costate, $cozip\n$telno"; close NEWREG4; ################ douched 2 # # # # # # # # # # # # # # # # # # # # # # # # # # # #List all paid registrations in /IDs/paythese/ to see what agents are due payment # $iddir = "IDs"; if (-e "/u1/www/transportuniverse/agents/$iddir/$form{'PAGENT'}.dat") { open AGENTPAID, "/u1/www/transportuniverse/agents/$iddir/waiting/dealer\>$form{'PALIAS'}\>$form{'PAGENT'}.dat"; ($payout,$referal,$trantype,$dealerzip,$lister) = ; chomp($payout,$referal,$trantype,$dealerzip,$lister); close AGENTPAID; open NEWPAY, ">>/u1/www/transportuniverse/agents/$iddir/paythese/$form{'PAGENT'}.dat"; print NEWPAY "1000\[\]$referal\[\]$trantype\[\]$dealerzip\[\]$lister\[\]nocat\[\]nocat2\[\]nocat3\[\]nocat4\n"; close NEWPAY; open NEWPAYAGENT, ">>/u1/www/transportuniverse/agents/$iddir/$form{'PAGENT'}.dat"; print NEWPAYAGENT "1000\[\]$referal\[\]$trantype\[\]$dealerzip\[\]$lister\[\]nocat\[\]nocat2\[\]nocat3\[\]nocat4\n"; close NEWPAYAGENT; unlink("/u1/www/transportuniverse/agents/$iddir/waiting/dealer\>$form{'PALIAS'}\>$form{'PAGENT'}.dat"); } # ################################## print "
Welcome, $form{'PALIAS'}!

You are now registered as a Premier Dealer on Transport Universe. All benefits and privileges of membership are yours for one full year. You will receive an email shortly at $email with your registration information. You have been assigned a secure, random password wich you may change at any time to a more memorable one. Your email will once again state your membership benifits and include links to get you started right away! We would like to thank you for registering, and assure you that we will always be commited to your continued success and enjoyment of the Transport Universe experience!



\n"; &sendemail($email, 'Transport Universe Premier Dealership Password', 'nobody', $mailserver, "SUBJECT: Your PREMIER DEALERSHIP password\n\nYour annual mebership registration is complete.\n\nYOUR USERNAME IS: $form{'PALIAS'}\nYOUR PASSWORD IS: $password\nClick on the link below to change your password to anything you wish.\nhttp://www.transportuniverse.com/cgi-transportuniverse/dealer.cgi?1&1&c\n\nYou are now able to advertise your dealership in every relevant category on the PREMIER DEALERSHIPS site.\nClick on the link below to start posting your dealership and inventory.\nhttp://www.transportuniverse.com/cgi-transportuniverse/dealer.cgi?1&1&n\n\nYou may list individual vehicles, parts, and accessories on both the SUPER CLASSIFIEDS site and the LIVE AUCTION site for unprecedented exposure.\nClick on the link below to start posting your individual listings on the SUPER CLASSIFIEDS site.\nhttp://www.transportuniverse.com/cgi-transportuniverse/s.cgi\n\nOr list on the LIVE AUCTION site at\:\nhttp://www.transportuniverse.com/cgi-transportuniverse/a.cgi?1&1&n\n\nIf You Require any assistance please do not hesitate to contact us at Service\@transportuniverse.com \nThank You For registering to use Transport Universe!\n"); &sendemail('postmaster@transportuniverse.com', ' PAID DEALERSHIP REGISTERED', 'nobody', $mailserver, "Someone has registered and PAID on the Premier Dealership site\nUSER NAME\: $form{'PALIAS'}\nCOMPANY NAME\: $conam\nEMAIL\: $email\nAGENT REFERRED BY\; $ptell\n"); } ############################################## # Sub: parse bid # This formats a bid amount to look good... # ie. $###.## sub parsebid { $_[0] =~ s/\,//g; @bidamt = split(/\./, $_[0]); $bidamt[0] = "0" if (!($bidamt[0])); $bidamt[0] = int($bidamt[0]); $bidamt[1] = substr($bidamt[1], 0, 2); $bidamt[1] = "00" if (length($bidamt[1]) == 0); $bidamt[1] = "$bidamt[1]0" if (length($bidamt[1]) == 1); return "$bidamt[0].$bidamt[1]"; } ############################################## # Sub: Oops! # This generates an error message and dies. sub oops { print "

Please hit your browser's BACK button to check the $_[0] entry on the form.

\n"; exit; } ############################################## # Sub: Movefile(file1, file2) # This moves a file. Quick and dirty! sub movefile { ($firstfile, $secondfile) = @_; return 0 unless open(FIRSTFILE,$firstfile); @lines=; close FIRSTFILE; return 0 unless open(SECONDFILE,">$secondfile"); foreach $line (@lines) { print SECONDFILE $line; } close SECONDFILE; return 0 unless unlink($firstfile); return 1; } ########################################## # 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); } ############################################## # Sub: Get Form Data # This gets data from a post. 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: Closed items # This displays closed items sub viewclosed { print <<"EOF";

View Closed Items

This form will allow you to view the status and contact information for closed auction items you bid on or listed for auction.
Your Username:
Required for verification
Your Password:
Required for verification
EOF } ############################################## # 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'); ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @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: File Lock # This locks files when bidding takes place sub filelock { flock (NEWITEM, 2); seek(NEWITEM, 0, 2); } ############################################## # Sub: Seller edit auction # This allows the seller to add comments to his/her 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,$regtype,$alias,$conam,$cocity,$costate,$cozip,$telno,$email,$cobanner,$ptell,$url,@junk) = ; chomp($password,$regtype,$alias,$conam,$cocity,$costate,$cozip,$telno,$email,$cobanner,$ptell,$url,@junk); close REGFILE; open THEFILE, "$basepath$form{'CAT'}/$form{'ITEM'}.dat"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); close THEFILE; @firstbid = split(/\[\]/,$bids[0]); @lastbid = split(/\[\]/,$bids[$#bids]); if ($alias eq $form{'ALIAS'}) { if (lc($password) eq lc($form{'PASSWORD'})) { $head = "
$conam
$used $form{'CAT'}
$cocity, $costate  $telno

$url

"; print <<"EOF";

UPDATE INVENTORY FOR:

EOF print "$head\n"; print <<"EOF";
In the $form{'CAT'} category
Header:
Here is your dealership information. You may edit this or completely replace it.
HTML is encouraged.
Inventory:
Here is your current inventory. You may edit this or completely replace it.
HTML is encouraged.
Offered By:$alias

You may click DELETE below to completely remove this listing.
THIS WILL DELETE YOUR LISTING!
EOF } else { print "
\n"; print "Incorrect Password!\n"; print "
\n"; } } else { print "
\n"; print "Only the seller may make modifications to the auction!\n"; print "
\n"; } } ############################################## # Sub: Process Modified Auction # This modifies an auction for the seller sub sellerchange { &oops('ITEM') unless ($form{'ITEM'}); $form{'ITEM'} =~ s/\W//g; &oops('ITEM') unless (open(THEFILE, "$basepath$form{'CAT'}/$form{'ITEM'}.dat")); ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inv, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inv, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @firstbid = split(/\[\]/,$bids[0]); @lastbid = split(/\[\]/,$bids[$#bids]); #$form{'SHIPPING'} = $shipping if !($form{'SHIPPING'}); #$form{'USED'} = $used if !($form{'USED'}); $commtime = localtime(time); if ($form{'NEWDESC'} ne "") { $description = $form{'NEWDESC'}; } else { $description = $desc; } if ($form{'NEWINV'} ne "") { $inventory = $form{'NEWINV'}; $inventory .= "
"; $inventory .= "Inventory updated on $commtime\:"; } else { $inventory = $inv; } &oops('ITEM') unless (open NEWITEM, ">$basepath$form{'CAT'}/$form{'ITEM'}.dat"); print NEWITEM "$alias\n$conam\n$costreet\n$cocity\n$costate\n$cozip\n$telno\n$email\n$cobanner\n$ptell\n$url\n$inventory\n$region\n$description\n$shipping\n$used\n$feat\n$bold\n$grabber\n$dutch\n$qty\n$gallery)"; 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] \[\]$thebid[8]"; $message = "This item has a bidding history that was not changed!"; } close NEWITEM; print "
\n"; print "Your listing in the $form{'CAT'} category has been successfully updated.
CLICK HERE
to see the updated version of your listing.\n"; #print $message; print "
\n"; &sendemail('postmaster@transportuniverse.com', ' A DEALER HAS UPDATED HIS PAGE', 'nobody', $mailserver, "A PREMIER DEALERSHIP PAGE HAS BEEN UPDATED.\n\nUSER NAME\: $alias\n\n See the astonishing results of this critical, crucial, strategic data manipulation in all it's glory at the following exclusive url, reserves specifically for this listing:\nhttp://$scripturl$ENV{'SCRIPT_NAME'}?$form{'CAT'}\&$form{'ITEM'}"); } ############################################## # Sub: Remove Item # This removes an item from the auction # database. sub selldel1 { if (unlink("$basepath$form{'CAT'}/$form{'ITEM'}.dat")) { print "
\n"; print "\n"; print "your Auction has been deleted!\n"; print "
\n"; } else { print "
\n"; print "\n"; print "File Could Not Be Removed!\n"; print "
\n"; } } ############################################## # Sub: Automate Close Auctions 1.1 # This allows admin to close all items that # have passed their closing time, w/o having # to go to each item seperately sub autoclose { foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (time > $file) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @firstbid = split(/\[\]/,$bids[0]); @lastbid = split(/\[\]/,$bids[$#bids]); $nowtime = localtime(time); $closetime = localtime($file); foreach $bid (@bids) { @thebid = split(/\[\]/,$bid); $bidtime = localtime($thebid[3]); } close THEFILE; if ($key ne $closedir) { ######################################################## # PUT AUTO RELIST HERE... ######################################################## sleep 2; $oldreport = $file; $oldreport =~ s/\.dat//; $oldreport = $oldreport . "r"; $repost = 29; # Auction length in days $doit =0; # Set to 0 initially if (($lastbid[2] < $reserve) && ($reserve > 0) && ($firstbid[0] ne $lastbid[0])) { $doit = 1; $new = ($repost * 86400 + time); $newreport = $new . "r"; rename("$basepath$cat1/$file", "$basepath$cat1/$new.dat"); rename("$basepath$cat2/$file", "$basepath$cat2/$new.dat"); rename("$basepath$cat3/$file", "$basepath$cat3/$new.dat"); rename("$basepath$cat4/$file", "$basepath$cat4/$new.dat"); &oops('incorrect alias') unless (open(REGFILE, ">>$basepath$regdir/$firstbid[0].dat")); print REGFILE "\n$key$new"; close REGFILE; } if ($firstbid[0] eq $lastbid[0]) { $doit = 1; $new = ($repost * 86400 + time); $newreport = $new . "r"; rename("$basepath$cat1/$file", "$basepath$cat1/$new.dat"); rename("$basepath$cat2/$file", "$basepath$cat2/$new.dat"); rename("$basepath$cat3/$file", "$basepath$cat3/$new.dat"); rename("$basepath$cat4/$file", "$basepath$cat4/$new.dat"); &oops('incorrect alias') unless (open(REGFILE, ">>$basepath$regdir/$firstbid[0].dat")); print REGFILE "\n$key$new"; close REGFILE; } ######################################## # # THIS does WIPE OUT THE OLD BIDS... and works great # # # &oops('ITEM') unless (open NEWITEM, ">$basepath$key/$new.dat"); # print NEWITEM # "$head\n$reserve\n$inc\n$desc\n$loca\n$image\n$image2\n$image3\n$image4\n$thebid[0]\[\]$thebi # d[1]\[\]$thebid[2]\[\]$thebid[3]\[\]$thebid[4]\[\]$thebid[5]\[\]$thebid[6]\[\]$thebid[7]"; # close NEWITEM; # # ######################################## if ($doit == 1) { $resend = " Hello $firstbid[0], The auction you posted on Transport Universe has ended. Either you received no bids or your reserve was not met. Your item will be automatically relisted at no charge to you. The only change is a new item number that is listed below. Title : $title Categories: $cat1 $cat2 $cat3 $cat4 New Item number : $new If wish to change your ad in length or content, click on the link below to your item, and use the SELLER MODIFY AUCTION option. If you wish to stop the auction and remove your listing, simply REPLY to this email with DELETE AUCTION as the subject. Link to your item description: http://$scripturl$ENV{'SCRIPT_NAME'}\?$cat1\&$new Thank you for using Transport Universe, The world of Transportation under one roof. "; &sendemail($firstbid[1],"Relist of your T.U. Auction", "nobody", $mailserver, "$resend"); } ######################################################## # END AUTO RELIST HERE... ######################################################## if ($closedir) { umask(000); # UNIX file permission junk mkdir("$basepath$closedir", 0777) unless (-d "$basepath$closedir"); print "Please notify Transport Universe admin that this item cannot be copied to the closed directory even though it is closed.\n" unless &movefile("$basepath$key/$file", "$basepath$closedir/$key$file"); # print "

$category{$key}\: $title closed


"; $numauct = $file; $numauct =~ s/\.dat//; #makes it just the number, rather than number.dat } else { print "Please notify the site admin that this item cannot be removed even though it is closed.\n" unless unlink("$basepath$key/$file"); } if (($lastbid[2] >= $reserve) && ($lastbid[0] ne $firstbid[0])) { &sendemail($lastbid[1], "Transport Universe Live Auction Close: $title", $firstbid[1], $mailserver, "Congratulations! You are the winner of Transport Universe Auction Item Number $ARGV[1].\nYour winning bid was \$$lastbid[2].\n\nPlease contact the seller to make arrangements for payment and shipping:\n\n$firstbid[1]\n\n\n Thank You For using Transport Universe!\n The World of Transportation Under One Roof! \n Auctions, Classifieds, Wanted, Employment, Featured Dealers, Business To Business"); $reservemsg = "\nThe winning bid was \$$lastbid[2] (Your reserve was: \$$reserve).\n\nPlease contact the high bidder to make any necessary arrangements:\n\n$lastbid[4]\n$lastbid[5]\n$lastbid[6]\n$lastbid[1] "; &sendemail($firstbid[1], "Auction Close: $title", "Winner <$lastbid[1]>", $mailserver, "Auction Number $numauct Is Now Closed.\nThe high bid was \$$lastbid[2] (Your reserve was: \$$reserve).\n\n$reservemsg\n\nPlease contact the high bidder to make any necessary arrangements:\n\n$lastbid[4]\n$lastbid[5]\n$lastbid[6]\n$lastbid[1]\n\nThanks for using $sitename!"); } else { if ($firstbid[2] ne $lastbid[2]) { &sendemail($lastbid[1], "Transport Universe Auction Close: $title", $firstbid[1], $mailserver, "Notice\: You were the high bidder on auction number $ARGV[1].\nYour bid was \$$lastbid[2].\n\nUnfortunately, your bid did not meet the seller\'s reserve price. If the seller chooses to relist this item, you may bid again at the following address\:\n\nhttp://$scripturl$ENV{'SCRIPT_NAME'}\?$key\&$new\n\n Thank You For using Transport Universe!\n The World of Transportation Under One Roof! \n Auctions, Classifieds, Wanted, Employment, Featured Dealers, Business To Business"); $bob=1; } else { $bob=1; } } } } } } } } ############################################## # Sub: Show all items # This allows a user to see all items in auction sub allcategory { print "

All Items

\n"; print "\n"; print "\n"; foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; $hoticon=""; $hoticon=$hoticonpath if ($hotitemnum <= $#bids); $newicon=""; $newicon=$newiconpath if (time<($newdays * 86400 + $firstbid[3])); $timediff=($file - time); $endicon=""; $endicon=$endiconpath if ($timediff < ($endhours * 3600)); $camera=""; # $camera =$piciconpath if ($image); $dicon = ""; $dicon = $diconpath if ($dutch eq $godutch); $grabberpic=""; $grabberpic = $grabber1 if ($grabber eq siren); $grabberpic = $grabber2 if ($grabber eq look); $grabberpic = $grabber3 if ($grabber eq up); $grabberpic = $grabber4 if ($grabber eq cool); $grabberpic = $grabber5 if ($grabber eq wild); $grabberpic = $grabber6 if ($grabber eq key); $grabberpic = $grabber7 if ($grabber eq smiley); $grabberpic = $grabber8 if ($grabber eq star); ## ADDON: Select alternating row color. 09/04/98. if ($i % 2 == 1) { $colortablebody = $odd_row_color; } else { $colortablebody = $even_row_color; } $i++; $ii++; ## END: Select alternating row color. print "\n"; } } } print "
ItemClosesNum BidsHigh Bid
$title
Location\: $region$usedDelivery\: $shipping
\n"; } ############################# # Sub: Count Bids 1.0 # This increments the number for the stats sub count_bid { open (DAT, "$basepath/no_bids.txt"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); #Locks the file } $bid = ; close(DAT); $new_bid = $bid + 1; open (OUT, ">$basepath/no_bids.txt"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); #Locks the file } print OUT "$new_bid"; close(OUT); } ############################################## # Sub: Count Posts 1.0 # This increments the number for the stats sub count_post { open (DAT, "$basepath/no_post.txt"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); #Locks the file } $post = ; close(DAT); $new_post = $post + 1; open (OUT, ">$basepath/no_post.txt"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); #Locks the file } print OUT "$new_post"; close(OUT); } ############################################## # Sub: Count Viewed 1.0 # This increments the number for the stats sub count_viewed { open (DAT, "$basepath/no_viewed.txt"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); #Locks the file } $viewed = ; close(DAT); $new_viewed = $viewed + 1; open (OUT, ">$basepath/no_viewed.txt"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); #Locks the file } print OUT "$new_viewed"; close(OUT); } ############################################## # Sub: Count regs 1.0 # This increments the number for the stats sub count_regs { open (DAT, "$basepath/no_regs.txt"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); #Locks the file } $regs = ; close(DAT); $new_regs = $regs + 1; open (OUT, ">$basepath/no_regs.txt"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); #Locks the file } print OUT "$new_regs"; close(OUT); } ############################################## # Sub: time left # revised w/ proper english - smarter output sub timeleft { ($second, $minute, $hour, $dayofmonth, $month, $year, $weekday, $dayofyear, $iddst) = localtime($_[0]); ($csecond, $cminute, $chour, $cdayofmonth, $cmonth, $cyear, $cweekday, $cdayofyear, $ciddst) = localtime(time); ############## Fixed timeleft with date for a new year #################### ## Turn of a non leap new year ## if ($dayofyear < 31) { if ($cmonth == 12) { if (($cyear ne 99) or ($cyear ne 03) or ($cyear ne 07) or ($cyear ne 11)) { $i = 365; $dayofyear = ($dayofyear + 365); } } } ### Y2K ### if (($cmonth == 11) and ($cyear == 99)) { $i = 365; $dayofyear = ($dayofyear + 365); } ## Leap Year ### if (($cmonth == 11) and ($cyear == 03) or ($cyear == 07) or ($cyear == 11)) { $i = 366; $dayofyear = ($dayofyear + 366); } if ($dayofyear > $i) { $dayofyear = $dayofyear - $i; } if ($dayofyear < $cdayofyear) { $dayofyear = $dayofyear + $i; } ############################################ if ($second >= $csecond) { $rsecond = ($second - $csecond); } else { $rsecond = (($second + 60) - $csecond); $minute = ($minute - 1); } if ($minute >= $cminute) { $rminute = ($minute - $cminute); } else { $rminute = (($minute + 60) - $cminute); $hour = ($hour - 1); } if ($hour >= $chour) { $rhour = ($hour - $chour); } else { $rhour = (($hour + 24) - $chour); $dayofyear = ($dayofyear - 1); } if ($dayofyear == $cdayofyear) { if($rhour < 1) { if($rminute < 1) { if ($rminute = 0) { $timeremain = " auction closed"; } else { $timeremain = sprintf('%02d seconds', $rsecond); @s = split / /, $timeremain; if ($s[0] eq "01") {$s[1] = "second";} $timeremain = " " . "$s[0] $s[1]"; }} else { $timeremain = sprintf('%02d minutes %02d seconds', $rminute, $rsecond); @s = split / /, $timeremain; if ($s[0] eq "01") {$s[1] = "minute";} if ($s[2] eq "01") {$s[3] = "second";} $timeremain = " " . "$s[0] $s[1] $s[2] $s[3]"; }} else { $timeremain = sprintf('%02d hours %02d minutes', $rhour, $rminute); @s = split / /, $timeremain; if ($s[0] eq "01") {$s[1] = "hour";} if ($s[2] eq "01") {$s[3] = "minute";} $timeremain = " " . "$s[0] $s[1] $s[2] $s[3]"; }} else { $rday = ($dayofyear - $cdayofyear); if ($rday <= -1) { $timeremain = " auction closed"; } else { $timeremain = sprintf('%02d days %02d hours +', $rday, $rhour); @s = split / /, $timeremain; if ($s[0] eq "01") {$s[1] = "day";} if ($s[2] eq "01") {$s[3] = "hour";} if ($s[2] eq "00") {($s[3], $s[2], $s[4]) = (" 1 hour","\<","");} $timeremain = "$s[0] $s[1] $s[2] $s[3] $s[4]"; } } return "$timeremain"; } ############################### sub drop { print "$action, $regiondrop, $catdrop ...those are ARGVs\n"; print "$form{'regiondrop'}, $form{'catdrop'} ... those should be in the script\n"; foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; print "$head\n" if ((($head =~ /$form{'catdrop'}/i) || ($desc =~ /$form{'catdrop'}/i) || ($inventory =~ /$form{'catdrop'}/i)) || (($head =~ /$form{'regiondrop'}/i) || ($desc =~ /$form{'regiondrop'}/i) || ($inventory =~ /$form{'regiondrop'}/i))); print "cake\n"; } } } print "\n"; } sub table { print "
Dealership Registration Files
\n"; $reg = "reg"; opendir THEDIR, "$basepath$reg" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$reg/$file") { open THEFILE, "$basepath$reg/$file"; ($password,$regtype,$alias,$conam,$costreet,$cocity,$costate,$cozip,$telno,$email,$cobanner,$ptell,$url,@junk) = ; close THEFILE; chomp($password,$regtype,$alias,$conam,$costreet,$cocity,$costate,$cozip,$telno,$email,$cobanner,$ptell,$url,@junk); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; print "\n"; } else { print ""; } } print "
UsernamePasswordURLEmail Address
$alias$password$url$email
\n"; } #################################################################### sub dealerconvert { opendir THEDIR, "$basepath$regdir" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$regdir/$file") { open THEFILE, "$basepath$regdir/$file"; ($password, $form{'regtype'}, $form{'ALIAS'}, $form{'CONAM'}, $form{'COSTREET'}, $form{'COCITY'}, $form{'COSTATE'}, $form{'COZIP'}, $form{'TELNO'}, $form{'EMAIL'}, $form{'COBANNER'}, $form{'PTELL'}, $form{'url'}, @userbids) = ; close THEFILE; chomp($password, $form{'regtype'}, $form{'ALIAS'}, $form{'CONAM'}, $form{'COSTREET'}, $form{'COCITY'}, $form{'COSTATE'}, $form{'COZIP'}, $form{'TELNO'}, $form{'EMAIL'}, $form{'COBANNER'}, $form{'PTELL'}, $form{'url'}, @userbids); print "$form{'ALIAS'}
\n"; foreach $bid (@userbids) { $catty = $bid; $catty =~ s/[\d\d\d\d\d\d\d\d\d\d]//g; $numero = $bid; $numero =~ s/[A-Za-z_\.]//g; $numero = $numero . ".dat"; if ($catty ne "") { print "$catty ------------ $numero
\n"; open NEWFILE, "/u1/www/transportuniverse/dealer/$catty/$numero"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); close NEWFILE; open NEWFILE, ">/u1/www/transportuniverse/dealer/$catty/$numero"; &filelock if ($flock); print NEWFILE "$form{'ALIAS'}\n$form{'CONAM'}\n$form{'COSTREET'}\n$form{'COCITY'}\n$form{'COSTATE'}\n$form{'COZIP'}\n$form{'TELNO'}\n$form{'EMAIL'}\n$form{'COBANNER'}\n$form{'PTELL'}\n$form{'url'}\n$inventory\n$form{'REGION'}\n$desc\n$form{'SHIPPING'}\n$form{'USED'}\n$form{'FEAT'}\n$form{'BOLD'}\n$form{'GRABBER'}\n$form{'DUTCH'}\n$form{'QTY'}\n$form{'GALLERY'}"; close NEWFILE; } else { print "files unchanged
\n"; } } } } } ######################################### ############################################## ############################################## # Sub: Process Dealer FINDIT sub findit { print "

Your Dealership Pages - $form{'ALIAS'}


Click on your Dealership Name to see your current Dealership Pages
"; $form{'ALIAS'} =~ s/\W//g; $form{'ALIAS'} = lc($form{'ALIAS'}); $form{'ALIAS'} = ucfirst($form{'ALIAS'}); print "\n"; print "\n"; foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; if ($form{'ALIAS'} eq $alias) { print "\n" } } } } print "
Dealership City State / Region
$conam$cocity$costate
\n"; } ##################################################################### read all nusuper files and write a noonan.dat DB sub qonvert { foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (sort { int($a) <=> int($b) } @allfiles) { if (-T "$basepath$key/$file") { open THEFILE, "$basepath$key/$file"; ($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids) = ; close THEFILE; chomp($alias, $conam, $costreet, $cocity, $costate, $cozip, $telno, $email, $cobanner, $ptell, $url, $inventory, $region, $desc, $shipping, $used, $feat, $bold, $grabber, $dutch, $qty, $gallery, @bids); $filenumba = $file; $filenumba =~ s/\D//g; open DATFILE, ">>/u1/www/transportuniverse/db1/dealer.txt"; &filelock if ($flock); print DATFILE "$alias\|$conam\|$costreet\|$cocity\|$costate\|$cozip\|$telno\|$email\|$cobanner\|$ptell\|$url\|$region\n"; close DATFILE; } } } } #####################################################################