#!/usr/bin/perl use vars qw(%config %category %form %Cats1 %Cats2 %Cats3 %Cats4 %Cats5 %Cats6 %02d); use strict; #-########################################################################### # /usr/bin/perl # EveryAuction Release Version 1.5 Beta 5 (2/16/00) # Copyright (C) 2000 EverySoft # http://www.everysoft.com/ # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # #-########################################################################### # # Modification Log: # * Matt Hahnfeld (matth@everysoft.com) - Original Concept and Design # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Subcategories # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - User Stats # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - All Items # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Hot Items # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - New Items # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Ending Items # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Classifieds & Wanted Ads # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - User Agreement # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Search Modification # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Display Category with Subcategories # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Quick Navigation on item display # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Buy-It Button # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Feedback 1.8 # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - lost password 1.8 # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Forgot Alias 1.8 # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Phone Number 1.8 # * Lion (unknown email)(unknown website) - Auto Close - Used with permission 1.8 # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Help Bid 1.8 # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Help Post 1.8 # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - FAQ 1.8 # * Michael Bruce (ezcomp@worldspy.net)(http://www.e-zauctionsoftware.com/) - Minor formatting changes 1.8 # #-########################################################################### #-############################################# # Configuration Section # Edit these variables! local %config; # The Base Directory. We need an # absolute path for the base directory. # Include the trailing slash. THIS SHOULD # NOT BE WEB-ACCESSIBLE! $config{'basepath'} = '/var/www/html/auctions/'; my $no_bids1; open THEBIDS, "$config{'basepath'}/no_bids1.txt"; ($no_bids1) = ; close THEBIDS; my $no_post; open THEPOST, "$config{'basepath'}/no_post1.txt"; ($no_post) = ; close THEPOST; my $no_viewed; open THEVIEWED, "$config{'basepath'}/no_viewe1.txt"; ($no_viewed) = ; close THEVIEWED; my $no_user; open THEUSER, "$config{'basepath'}/no_user1.txt"; ($no_user) = ; close THEUSER; # Define Help bid File location $config{'helpbid'} = 'http://www.infoceptor.net/aucimages/helpbid.txt'; # Define Help Post File location $config{'helppost'} = 'http://www.infoceptor.net/aucimages/helppost.txt'; # Define Help FAQ File location $config{'helpfaq'} = 'http://www.infoceptor.net/aucimages/faq.txt'; # Define Help User Agreement File location $config{'helpagree'} = 'http://www.infoceptor.net/aucimages/agreement.txt'; ################################ Buttons for item display ############################ $config{'vf'} = "\"http://www.infoceptor.net/aucimages/userfeed.jpg\" WIDTH=\"120\" HEIGHT=\"40\" BORDER=\"0\" ALT=\"View Users Feedback\""; $config{'bn'} = "\"http://www.infoceptor.net/aucimages/buyit.jpg\" WIDTH=\"120\" HEIGHT=\"40\" BORDER=\"0\" ALT=\"Buy-It Now !! Need it NOW? Get it NOW!\""; $config{'pb'} = "\"http://www.infoceptor.net/aucimages/placebid.jpg\" WIDTH=\"120\" HEIGHT=\"40\" BORDER=\"0\" ALT=\"Place your bid for this item\""; $config{'vn'} = "\"http://www.infoceptor.net/aucimages/viewmore.jpg\" WIDTH=\"120\" HEIGHT=\"40\" BORDER=\"0\" ALT=\"View other items like this.\""; # Feedback Directory # This is where feedback will be stored $config{'feeddata'} = 'feed'; # Feedback Script # This is where feedback Script is located $config{'feedscript'} = 'http://www.infoceptor.net/auction/feed.cgi'; # Closed Auction Directory # This is where closed auction items are stored. # Leave this blank if you don't want to store # closed auctions. It can potentially take # up quite a bit of disk space. $config{'closedir'} = 'closed'; # User Registration Directory # This is where user registrations are stored. # Leave this blank if you don't want to # require registration. It can potentially # take up quite a bit of disk space. $config{'regdir'} = 'reg'; ##################### # Pic Icon $config{'imageiconpath'} = ""; #################### # View new items # $newdays = number of days item is considered new # $newiconpath = URL to an icon for displaying $config{'newdays'} = 1; $config{'newiconpath'} = ""; ################### # View Hot Items $config{'hotitemnum'} = 3; $config{'hoticonpath'} = ""; ######################3 # View ending soon items # $endhours = number of hours left in auction to be considered closing soon # $endiconpath = URL to an icon for displaying $config{'endhours'} = 14; $config{'endiconpath'} =""; # List each directory and its associated # category name. These directories should # be subdirectories of the base directory. %category = ( category01 => 'USEast-Armor', category02 => 'USEast-Weapons', category03 => 'USEast-Set Items', category04 => 'USEast-Jewelry and Gems', category05 => 'USEast-Miscellaneous', category06 => 'USWest-Armor', category07 => 'USWest-Weapons', category08 => 'USWest-Set Items', category09 => 'USWest-Jewelry and Gems', category10 => 'USWest-Miscellaneous', category11 => 'Europe-Armor', category12 => 'Europe-Weapons', category13 => 'Europe-Set Items', category14 => 'Europe-Jewelry and Gems', category15 => 'Europe-Miscellaneous', category16 => 'Asia-Armor', category17 => 'Asia-Weapons', category18 => 'Asia-Set Items', category19 => 'Asia-Jewelry and Gems', category20 => 'Asia-Miscellaneous', category21 => 'Open-Armor', category22 => 'Open-Weapons', category23 => 'Open-Set Items', category24 => 'Open-Jewelry and Gems', category25 => 'Open-Miscellaneous', category26 => 'USEast-HardCoreItems', category27 => 'USWest-HardCoreItems', category28 => 'Europe-HardCoreItems', category29 => 'Asia-HardCoreItems', category30 => 'Open-HardCoreItems', ); %Cats1 = ( category01 => 'Armor', category02 => 'Weapons', category03 => 'Set Items', category04 => 'Jewelry and Gems', category05 => 'Miscellaneous', category26 => 'HardCoreItems', ); %Cats2 = ( category06 => 'Armor', category07 => 'Weapons', category08 => 'Set Items', category09 => 'Jewelry and Gems', category10 => 'Miscellaneous', category27 => 'HardCoreItems', ); %Cats3 = ( category11 => 'Armor', category12 => 'Weapons', category13 => 'Set Items', category14 => 'Jewelry and Gems', category15 => 'Miscellaneous', category28 => 'HardCoreItems', ); %Cats4 = ( category16 => 'Armor', category17 => 'Weapons', category18 => 'Set Items', category19 => 'Jewelry and Gems', category20 => 'Miscellaneous', category29 => 'HardCoreItems', ); %Cats5 = ( category21 => 'Armor', category22 => 'Weapons', category23 => 'Set Items', category24 => 'Jewelry and Gems', category25 => 'Miscellaneous', category30 => 'HardCoreItems', ); # This is the password for deleting auction # items. $config{'adminpass'} = 'ceptor123'; # You need to assign either a mail program or # a mail host so confirmation e-mails can # be sent out. # Leave one commented and one uncommented. # # YOU NEED EITHER A MAIL PROGRAM $config{'mailprog'} = '/usr/sbin/sendmail -t'; # # OR YOU NEED A MAIL HOST (SMTP) #$config{'mailhost'} = 'localhost'; # This line should be your e-mail address $config{'admin_address'} = 'osiris\@infoceptor.net'; # This line should point to the URL of # your server. It will be used for sending # "you have been outbid" e-mail. The script # name and auction will be appended to the # end automatically, so DO NOT use a trailing # slash. If you do not want to send outbid # e-mail, leave this blank. $config{'scripturl'} = 'www.infoceptor.net'; # This will let you define colors for the # tables that are generated and the # other page colors. The default colors # create a nice "professional" look. Must # be in hex format. $config{'colortablehead'} = '#3B3B3B'; $config{'colortablebody'} = '#55515E'; $config{'colortablebody2'} = '#55515E'; $config{'colortableborder'} = '#000000'; # Site Name (will appear at the top of each page) $config{'sitename'} = 'Infoceptor'; $config{'sitename2'} = 'Inf'; $config{'mailurl'} = 'http://www.infoceptor.net'; # You can configure your own header which will # be appended to the top of each page. $config{'header'} =<<"EOF"; $config{'sitename'}

 

back Go Register Post Viinfoceptor.netew

-- Registration Is Required In Order To be Able To Sell or Buy an Item --
EOF # You can configure your own footer which will # be appended to the bottom of each page. # Although not required, a link back to # everysoft.com or E-Z Auction Software will help to support future # development. $config{'footer'} =<<"EOF";


$config{'dsl'}


$config{'va'}

EOF # Sniper Protection... How many minutes # past last bid to hold auction. If auctions # should close at exactly closing time, set # to zero. $config{'aftermin'} = 5; # File locking enabled? Should be 1 (yes) # for most systems, but set to 0 (no) if you # are getting flock errors or the script # crashes. $config{'flock'} = 0; # User Posting Enabled- 1=yes 0=no $config{'newokay'} = 1; #-############################################# # Main Program # You do not need to edit anything below this # line. #-############################################# # Print The Page Header # print "Content-type: text/html\n\n"; print $config{'header'}; # #-############################################# local %form = &get_form_data; if ($form{'action'} eq 'new') { &new; } elsif ($form{'action'} eq 'repost') { &new; } elsif ($form{'action'} eq 'repostc') { &newc; } #repost classified elsif ($form{'action'} eq 'repostw') { &newwa; } #repost Wanted elsif ($form{'action'} eq 'newc') { &newc; } #classified elsif ($form{'action'} eq 'neww') { &newwa; } #wanted elsif ($form{'action'} eq 'dc') { &dispclass; } # viewclassified elsif ($form{'action'} eq 'wa') { &dispwa; } # viewwanted elsif ($form{'action'} eq 'buyit') { &dispbuy; } # allows buying elsif ($form{'action'} eq 'buyitc') { &dispbuyc; } # allows buying classifieds elsif ($form{'action'} eq 'procbuy') { &procbuy; } # Processes Buying elsif ($form{'action'} eq 'procbuyc') { &procbuyc; } # Processes Buying classifieds elsif ($form{'action'} eq 'procnew') { &procnew; } elsif ($form{'action'} eq 'procbid') { &procbid; } elsif ($form{'action'} eq 'allnew') { &allnew; } #all new elsif ($form{'action'} eq 'allhot') { &allhot; } #all hot elsif ($form{'action'} eq 'allend') { &allend; } #all ending elsif ($form{'action'} eq '1') { &scat1; } #Show Main Cat 1 elsif ($form{'action'} eq '2') { &scat2; } #Show Main Cat 2 elsif ($form{'action'} eq '3') { &scat3; } #Show Main Cat 3 elsif ($form{'action'} eq '4') { &scat4; } #Show Main Cat 4 elsif ($form{'action'} eq '5') { &scat5; } #Show Main Cat 5 elsif ($form{'action'} eq '6') { &scat6; } #Show Main Cat 6 elsif ($form{'action'} eq 'lp') { &lp; } #lost password form elsif ($form{'action'} eq 'lp2') { &lp2; } # processes lost password elsif ($form{'action'} eq 'la') { &la; } #lost alias form elsif ($form{'action'} eq 'la2') { &la2; } # processes lost alias elsif ($form{'action'} eq 'reg') { ® } elsif ($form{'action'} eq 'creg') { &creg; } elsif ($form{'action'} eq 'procreg') { &procreg; } elsif ($form{'action'} eq 'chreg') { &chreg; } elsif ($form{'action'} eq 'proccreg') { &proccreg; } elsif ($form{'action'} eq 'helpbid') { &helpbid; } # Display Help bid File elsif ($form{'action'} eq 'helppost') { &helppost; } # Display Help Post File elsif ($form{'action'} eq 'helpfaq') { &helpfaq; } # Display Help Faq File elsif ($form{'action'} eq 'helpagree') { &helpagree; } # Display Help File elsif ($form{'action'} eq 'closed') { &viewclosed1; } elsif ($form{'action'} eq 'closed2') { &viewclosed2; } elsif ($form{'action'} eq 'closed3') { &viewclosed3; } elsif ($form{'action'} eq 'admin') { &admin; } elsif ($form{'action'} eq 'procadmin') { &procadmin; } elsif ($form{'action'} eq 'search1') { &start_search; } elsif ($form{'action'} eq 'search') { &procsearch; } elsif ($form{'action'} eq 'all') { &view_all; } elsif ($form{'item'} eq int($form{'item'}) and $category{$form{'category'}}) { &dispitem; } elsif ($category{$form{'category'}}) { &displist; } else { &dispcat; } #-############################################# # Print The Page Footer # print "

[Realms List]  "; print "[Post New Item]  " if ($config{'newokay'}); print "[New Registration]  " if ($config{'regdir'}); print "[Change Password]  " if ($config{'regdir'}); print "[Closed Auctions]  " if ($config{'regdir'}) and ($config{'closedir'}); print "[Search]  
"; print "[Show All Items]  "; print "[Show All New Items]  "; print "[Show All Hot Items]  "; print "[Show Closing Soon]  "; print "[Add FeedBack]  "; print "[Help on Bidding]  "; print "[Help on Posting]  "; print "[FAQ]  "; print "[Review User Agreement]  "; print "

\n"; print $config{'footer'}; # #-############################################# #-############################################# # Sub: Display List Of Categories # This creates a "nice" list of categories. sub dispcat { print "
"; print "
 

"; print "\n"; print "\n"; print "\n"; print "
\n"; ################ <---------------------COPY HERE TO END COPY TO ADD ANOTHER row of CATEGORYs ------------>####################### print "\n"; print ""; my $key; foreach $key (sort keys %Cats1) { umask(000); # UNIX file permission junk mkdir("$config{'basepath'}$key", 0777) unless (-d "$config{'basepath'}$key"); opendir DIR, "$config{'basepath'}$key" or &oops("Category directory $key could not be opened."); my $numfiles = scalar(grep -T, map "$config{'basepath'}$key/$_", readdir DIR); closedir DIR; print " "; } print "
US EAST
$category{$key}$numfiles
\n"; print ""; my $key; foreach $key (sort keys %Cats2) { umask(000); # UNIX file permission junk mkdir("$config{'basepath'}$key", 0777) unless (-d "$config{'basepath'}$key"); opendir DIR, "$config{'basepath'}$key" or &oops("Category directory $key could not be opened."); my $numfiles = scalar(grep -T, map "$config{'basepath'}$key/$_", readdir DIR); closedir DIR; print " "; } print "
US WEST
$category{$key}$numfiles
\n"; print "
\n"; print ""; my $key; foreach $key (sort keys %Cats3) { umask(000); # UNIX file permission junk mkdir("$config{'basepath'}$key", 0777) unless (-d "$config{'basepath'}$key"); opendir DIR, "$config{'basepath'}$key" or &oops("Category directory $key could not be opened."); my $numfiles = scalar(grep -T, map "$config{'basepath'}$key/$_", readdir DIR); closedir DIR; print " "; } print "
EUROPE
$category{$key}$numfiles
"; ################ <--------------------- END CUT HERE TO ADD ANOTHER row of CATEGORYs ------------>####################### print "
"; ################ <---------------------COPY HERE TO END COPY TO ADD ANOTHER row of CATEGORYs ------------>####################### print "\n"; print ""; my $key; foreach $key (sort keys %Cats4) { umask(000); # UNIX file permission junk mkdir("$config{'basepath'}$key", 0777) unless (-d "$config{'basepath'}$key"); opendir DIR, "$config{'basepath'}$key" or &oops("Category directory $key could not be opened."); my $numfiles = scalar(grep -T, map "$config{'basepath'}$key/$_", readdir DIR); closedir DIR; print " "; } print "
ASIA
$category{$key}$numfiles
\n"; print ""; my $key; foreach $key (sort keys %Cats5) { umask(000); # UNIX file permission junk mkdir("$config{'basepath'}$key", 0777) unless (-d "$config{'basepath'}$key"); opendir DIR, "$config{'basepath'}$key" or &oops("Category directory $key could not be opened."); my $numfiles = scalar(grep -T, map "$config{'basepath'}$key/$_", readdir DIR); closedir DIR; print " "; } print "
OPEN
$category{$key}$numfiles
\n"; print ""; print " "; } print "
Top High-Profile Sales
Gem\$100000
"; ################ <--------------------- END CUT HERE TO ADD ANOTHER row of CATEGORYs ------------>####################### print "
"; print ""; print ""; print ""; print "
$no_user Registered Users$no_post Items Posted$no_viewed Page Views$no_bids1 Bids Placed
\n"; print "
 
"; } #-############################################# # Sub: Display List Of Auction Items # This creates a "nice" list of items in a # category. sub displist { print "
 

"; &displistf; &chkclose; print "

$category{$form{'category'}}

\n"; print "\n"; print "
Auction
\n"; print "\n"; print "\n"; opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened."); my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", sort { int($a) <=> int($b) } (readdir THEDIR); closedir THEDIR; my $file; foreach $file (@allfiles) { $file =~ s/^$config{'basepath'}$form{'category'}\///; $file =~ s/\.dat$//; if (my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'category'},$file)) { my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); my @closetime = localtime($file); my @firstbid = &read_bid($bids[0]); my $timediff = ($file - time); $closetime[4]++; print "\n" if ($type eq 'Auction'); } } print "
ItemClosesNum BidsHigh Bid
$title" if ($type eq 'Auction'); print "   $config{'imageiconpath'}" if (($image) && ($type eq 'Auction')); print "   $config{'newiconpath'} " if (time<($config{'newdays'} * 86400 + $firstbid[3]) && ($type eq 'Auction')) ; print "   $config{'hoticonpath'} " if (($config{'hotitemnum'} <= $#bids) && ($type eq 'Auction')); print "   $config{'endiconpath'} " if ($timediff < ($config{'endhours'} * 3600) && ($type eq 'Auction')); print "$closetime[4]/$closetime[3]$#bids\$$bid
\n"; print "
 
"; } #-############################################# # Sub: Display List Of Auction Items # This creates a "nice" list of items in a # category. sub displistf { print "

\n"; print "\n"; ; opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened."); my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", sort { int($a) <=> int($b) } (readdir THEDIR); closedir THEDIR; my $file; foreach $file (@allfiles) { $file =~ s/^$config{'basepath'}$form{'category'}\///; $file =~ s/\.dat$//; if (my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'category'},$file)) { my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); my @closetime = localtime($file); my @firstbid = &read_bid($bids[0]); my $timediff = ($file - time); $closetime[4]++; print "\n" if ($feat eq 'Yes'); } } print "
$title" if ($feat eq 'Yes'); print "   $config{'imageiconpath'}" if (($image) && ($feat eq 'Yes')); print "   $config{'newiconpath'} " if (time<($config{'newdays'} * 86400 + $firstbid[3]) && ($feat eq 'Yes')) ; print "   $config{'hoticonpath'} " if (($config{'hotitemnum'} <= $#bids) && ($feat eq 'Yes')); print "   $config{'endiconpath'} " if ($timediff < ($config{'endhours'} * 3600) && ($feat eq 'Yes')); print "    " if (($type eq 'Auction') && ($feat eq 'Yes')); print "   [C] " if (($type eq 'Classified') && ($feat eq 'Yes')); print "   [W] " if (($type eq 'Wanted') && ($feat eq 'Yes')); print "$closetime[4]/$closetime[3]$#bids\$$bid

\n"; } #-############################################# # Sub: Display List Of Classifieds Items # This creates a "nice" list of items in a # category. sub dispclass { print "
 

"; &displistf; print "

$category{$form{'category'}}

\n"; print "\n"; print "
Auctions View ClassifiedsWant Ads
\n"; print "\n"; print "\n"; opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened."); my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", sort { int($a) <=> int($b) } (readdir THEDIR); closedir THEDIR; my $file; foreach $file (@allfiles) { $file =~ s/^$config{'basepath'}$form{'category'}\///; $file =~ s/\.dat$//; if (my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'category'},$file)) { my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); my @closetime = localtime($file); my @firstbid = &read_bid($bids[0]); my $timediff = ($file - time); $closetime[4]++; print "\n" if ($type eq 'Classified'); } } print "
ItemClosesNum BidsHigh Bid
$title" if ($type eq 'Classified'); print "   $config{'imageiconpath'}" if (($image) && ($type eq 'Classified')); print "   $config{'newiconpath'} " if (time<($config{'newdays'} * 86400 + $firstbid[3]) && ($type eq 'Classified')) ; print "   $config{'hoticonpath'} " if (($config{'hotitemnum'} <= $#bids) && ($type eq 'Classified')); print "   $config{'endiconpath'} " if ($timediff < ($config{'endhours'} * 3600) && ($type eq 'Classified')); print "$closetime[4]/$closetime[3]$#bids\$$bid
\n"; print "
 
"; } #-############################################# # Sub: Display List Of Want Ads # This creates a "nice" list of items in a # category. sub dispwa { print "
 

"; &displistf; print "

$category{$form{'category'}}

\n"; print "\n"; print "
AuctionsClassifiedsWant Ads
\n"; print "\n"; print "\n"; opendir THEDIR, "$config{'basepath'}$form{'category'}" or &oops("Category directory $form{'category'} could not be opened."); my @allfiles = grep -T, map "$config{'basepath'}$form{'category'}/$_", sort { int($a) <=> int($b) } (readdir THEDIR); closedir THEDIR; my $file; foreach $file (@allfiles) { $file =~ s/^$config{'basepath'}$form{'category'}\///; $file =~ s/\.dat$//; if (my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'category'},$file)) { my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); my @closetime = localtime($file); my @firstbid = &read_bid($bids[0]); my $timediff = ($file - time); $closetime[4]++; print "\n" if ($type eq 'Wanted'); } } print "
ItemClosesNum BidsHigh Bid
$title" if ($type eq 'Wanted'); print "   $config{'imageiconpath'}" if (($image) && ($type eq 'Wanted')); print "   $config{'newiconpath'} " if (time<($config{'newdays'} * 86400 + $firstbid[3]) && ($type eq 'Wanted')) ; print "   $config{'hoticonpath'} " if (($config{'hotitemnum'} <= $#bids) && ($type eq 'Wanted')); print "   $config{'endiconpath'} " if ($timediff < ($config{'endhours'} * 3600) && ($type eq 'Wanted')); print "$closetime[4]/$closetime[3]$#bids\$$bid
\n"; print "
 
"; } #-############################################# # Sub: Display Item # This displays a particular item, its # description, and its associated bids. sub dispitem { &oops("Item $form{'item'} could not be opened.") unless (my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'category'},$form{'item'})); my $nowtime = localtime(time); my $closetime = localtime($form{'item'}); my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[0]); # read first bid my $nowtime = localtime; my $key; my $file; if ($type eq 'Auction'){ print <<"EOF";
 
 Current Time:$nowtime
Search
Browse:
Home / $category{$form{'category'}} / Auctions / $title view more like this
Explore This Item
EOF print ""; print ""; print ""; print " " if $pay0 ne "" ; print " " if $pay1 ne "" ; print " " if $pay2 ne "" ; print " " if $pay3 ne "" ; print " " if $pay4 ne "" ; print " " if $pay5 ne "" ; print " " if $pay6 ne "" ; print " " if $pay7 ne "" ; print " " if $pay8 ne "" ; print <<"EOF";
  Shipping Method
  $ship
  Payment Options
  $pay0
  $pay1
  $pay2
  $pay3
  $pay4
  $pay5
  $pay6
  $pay7
  $pay8
Similar Items
Share your thoughts
  E-Mail a Friend
about this Auction
  "; print "
$title -- Item #: $form{'item'}
EOF print " Image Below" if $image ne ""; print <<"EOF";

Seller:  $alias EOF ##################################################################################################begin Feedback addon &oops('ALIAS') unless (open(REGFILE, "$config{'basepath'}$config{'feeddata'}/$alias.dat")); my (@userbids) = ; close REGFILE; my $pt=0; my $nt=0; my $nnt=0; my @thebid; my $ot; my $fc; foreach $bid (@userbids) { @thebid = split(/\[\]/,$bid); #print ""; #print ""; #print ""; if ($thebid[0] eq "1"){ $pt++; #print "" } else { } if ($thebid[1] eq "1"){ $nt++; #print "" } else { } if ($thebid[2] eq "1"){ $nnt++; #print "" } else { } #print "
Feedback by:ItemRating
$thebid[3]$thebid[5]Positive NeutralNegative
Comment
$thebid[6]

"; } $ot = $pt - $nnt; if ($ot < 0){ $fc = "#ff0000"; } else { } if ($ot == 0){ $fc = "#000000"; } else { } if ($ot > 0){ $fc = "#009933"; } else { } print <<"EOF";
Rating $ot
EOF #end Feedback addon print <<"EOF";
Starting Bid:  \$$bid
Closes :  $closetime
Or $config{'aftermin'} minutes after last bid...

Current Time:  $nowtime
Number of Bids:  $#bids
Bidding History:
  EOF my $lowest_new_bid; if ($#bids) { shift @bids; # remove the first bid (start bid) for (my $i=0; $i$alias \($bidtime\) - \$$bid
"; $lowest_new_bid = &parsebid($bid+$inc); } } else { print "No bids yet... Do I Hear \$$bid ?
"; $lowest_new_bid = (&read_bid($bids[0]))[2]; } my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); # read the last bid if ((time > int($form{'item'})) && (time > (60 * $config{'aftermin'} + $time))) { #### print "

 "; print "
"; print "
"; print "Place A Bid
"; print "
"; print "
"; print "
"; print "BIDDING IS NOW CLOSED
"; &closeit($form{'category'},$form{'item'}); } else { &count_viewed; print "
 "; print "
"; print "
"; print "Place A Bid
"; print "
"; print "
"; print "
"; print ""; print ""; print ""; print "The High Bid Is:
\$$bid
"; print "(Reserve Auction)
" if ($bid < $reserve); print "(reserve price met)
" if (($bid >= $reserve) and ($reserve > 0)); print "Minimum Bid
\$$lowest_new_bid"; print "
Registration is required!"; print "
Your Handle/Alias:
"; print "Forgot it\?
"; print " "; print "
Your Password:
"; print "Forgot it\?
"; print " "; print "
Your Bid: \$"; print "
"; print "Do not bid unless you intend to buy this item at the amount of your bid."; print "

Buy-It Price \$$buyit
" if ($buyit ne ""); } print <<"EOF";

 
Description
 
$desc EOF print "
" if ($image ne ""); print <<"EOF";
 
EOF } #####################################CLASSIFIEDS if ($type eq 'Classified'){ print <<"EOF";
 
Classified Ad
Search
Browse:
Home / $category{$form{'category'}} / Classifieds / $title view more like this
Explore This Item
EOF print ""; print ""; print ""; print " " if $pay0 ne "" ; print " " if $pay1 ne "" ; print " " if $pay2 ne "" ; print " " if $pay3 ne "" ; print " " if $pay4 ne "" ; print " " if $pay5 ne "" ; print " " if $pay6 ne "" ; print " " if $pay7 ne "" ; print " " if $pay8 ne "" ; print <<"EOF";
  Shipping Method
  $ship
  Payment Options
  $pay0
  $pay1
  $pay2
  $pay3
  $pay4
  $pay5
  $pay6
  $pay7
  $pay8
Similar Items
Share your thoughts
E-Mail a friend about
this Classified Ad
  "; print "
$title
EOF print " Image Below" if $image ne ""; print <<"EOF";

Seller:  $alias
EOF ##################################################################################################begin Feedback addon &oops('ALIAS') unless (open(REGFILE, "$config{'basepath'}$config{'feeddata'}/$alias.dat")); my (@userbids) = ; close REGFILE; my $pt=0; my $nt=0; my $nnt=0; my @thebid; my $ot; my $fc; foreach $bid (@userbids) { @thebid = split(/\[\]/,$bid); #print ""; #print ""; #print ""; if ($thebid[0] eq "1"){ $pt++; #print "" } else { } if ($thebid[1] eq "1"){ $nt++; #print "" } else { } if ($thebid[2] eq "1"){ $nnt++; #print "" } else { } #print "
Feedback by:ItemRating
$thebid[3]$thebid[5]Positive NeutralNegative
Comment
$thebid[6]

"; } $ot = $pt - $nnt; if ($ot < 0){ $fc = "#ff0000"; } else { } if ($ot == 0){ $fc = "#000000"; } else { } if ($ot > 0){ $fc = "#009933"; } else { } print <<"EOF";
Rating $ot
EOF #end Feedback addon print <<"EOF"; Sell Price:  \$$bid
Closes :  $closetime
EOF my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); # read the last bid if ((time > int($form{'item'})) && (time > (60 * $config{'aftermin'} + $time))) { #### print "

 "; print "
"; print "
"; print "Purchase
"; print "
"; print "
"; print "
"; print "ITEM IS NOW CLOSED
"; &closeit2($form{'category'},$form{'item'}); } else { &count_viewed; print "
 "; print "
"; print "
"; print "Purchase Now
"; print "
"; print "
"; print "Contact Seller:
$alias"; print "

Buy-It Price \$$bid
"; print "
"; } print <<"EOF";

 
Description
 
$desc EOF print "
" if ($image ne ""); print "
"; print " 
"; } ####################WANTED ADS if ($type eq 'Wanted'){ print <<"EOF";
 
Wanted Ad
Search
Browse:
Home / $category{$form{'category'}} / Want Ads / $title view more like this
Explore This Item
EOF print ""; print ""; print ""; print " " if $pay0 ne "" ; print " " if $pay1 ne "" ; print " " if $pay2 ne "" ; print " " if $pay3 ne "" ; print " " if $pay4 ne "" ; print " " if $pay5 ne "" ; print " " if $pay6 ne "" ; print " " if $pay7 ne "" ; print " " if $pay8 ne "" ; print <<"EOF";
Shipping Method
(requested)
  $ship
Payment Options
(requested)
  $pay0
  $pay1
  $pay2
  $pay3
  $pay4
  $pay5
  $pay6
  $pay7
  $pay8
Similar Items
Share your thoughts
e-mail a friend about this Wanted Ad
  "; print "
$title
EOF print " Image Below" if $image ne ""; print <<"EOF";

Buyer:  $alias EOF ##################################################################################################begin Feedback addon &oops('ALIAS') unless (open(REGFILE, "$config{'basepath'}$config{'feeddata'}/$alias.dat")); my (@userbids) = ; close REGFILE; my $pt=0; my $nt=0; my $nnt=0; my @thebid; my $ot; my $fc; foreach $bid (@userbids) { @thebid = split(/\[\]/,$bid); #print ""; #print ""; #print ""; if ($thebid[0] eq "1"){ $pt++; #print "" } else { } if ($thebid[1] eq "1"){ $nt++; #print "" } else { } if ($thebid[2] eq "1"){ $nnt++; #print "" } else { } #print "
Feedback by:ItemRating
$thebid[3]$thebid[5]Positive NeutralNegative
Comment
$thebid[6]

"; } $ot = $pt - $nnt; if ($ot < 0){ $fc = "#ff0000"; } else { } if ($ot == 0){ $fc = "#000000"; } else { } if ($ot > 0){ $fc = "#009933"; } else { } print <<"EOF";
Rating $ot
EOF #end Feedback addon print <<"EOF"; High Price:  \$$bid
Closes :  $closetime
EOF my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); # read the last bid if ((time > int($form{'item'})) && (time > (60 * $config{'aftermin'} + $time))) { #### print "

 "; print "
"; print "
"; print "Purchase
"; print "
"; print "
"; print "
"; print "ITEM IS NOW CLOSED
"; &closeit3($form{'category'},$form{'item'}); } else { &count_viewed; print "
 "; print "
"; print "
"; print "Sell Now
"; print "
"; print "
"; print "The Maximum the Buyer is willing to Pay
\$$bid
"; print "Contact Buyer:
$alias"; } print <<"EOF";

 
Description
 
$desc EOF print "
" if ($image ne ""); print "
"; print " 
"; } } #-############################################# # Sub: Buy It # This begins the process of allowing items to be purchased sub dispbuy { &oops("Item $form{'item'} could not be opened.") unless (my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'category'},$form{'item'})); my $nowtime = localtime(time); my $closetime = localtime($form{'item'}); my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[0]); # read first bid my $nowtime = localtime; my $key; my $file; print <<"EOF";
 Current Time:$nowtime
Buy-It Now Rules and User Agreement

 
By Using our Buy-It Now Feature You agree:
    • To Pay the Seller the full Amount of the Buy-It Now Price.
      You are positive you Want to purchase the item.
      You will respond to the Sellers Contact attempts.
  •       Item Title: $title
          Seller: $alias
          
    Registration is required!
          Forgot it\?
          Your Handle/Alias:
          Forgot it\?
          Your Password:
          Buy-It Now Price: \$$buyit
          
     
    EOF } #-############################################# # Sub: Buy It # This begins the process of allowing items to be purchased sub dispbuyc { &oops("Item $form{'item'} could not be opened.") unless (my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'category'},$form{'item'})); my $nowtime = localtime(time); my $closetime = localtime($form{'item'}); my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[0]); # read first bid my $nowtime = localtime; my $key; my $file; print <<"EOF";
     Current Time:$nowtime
    Buy-It Now Rules and User Agreement

     
    By Using our Buy-It Now Feature You agree:
    • To Pay the Seller the full Amount of the Buy-It Now Price.
      You are positive you Want to purchase the item.
      You will respond to the Sellers Contact attempts.
      You are able to enter into a Binding legal Contract.
  •       Item Title: $title
          Seller: $alias
          Registration is required!
          Forgot it\?
          Your Handle/Alias:
          Forgot it\?
          Your Password:
          Buy-It Now Price: \$$bid
          

     
    EOF } #-############################################# # Sub: Process Buy-It # This processes Buy-It from a posted form sub procbuy { my $cat; my ($password, @userbids); if ($config{'regdir'} ne "") { &oops('Your alias could not be found!') unless ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, @userbids) = &read_reg_file($form{'ALIAS'}); $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'})); &oops('Your password is incorrect.') unless ((lc $password) eq (lc $form{'PASSWORD'})); } &oops('You must enter an alias to track your item.') unless ($form{'ALIAS'}); &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/); &oops('You must enter a valid bid amount.') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/); $form{'BID'} = &parsebid($form{'BID'}); &oops('You must enter your full name.') unless ($form{'ADDRESS1'}); &oops('The item number you entered cannot be found. Maybe it has closed or it was moved since you last loaded the page.') unless my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'CATEGORY'},$form{'ITEM'}); my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); if ((time <= $form{'ITEM'}) or (time <= (60 * $config{'aftermin'} + $time))) { &oops('Your bid is too low. Sorry.') if ($form{'BID'} < ($bid+$inc) and ($#bids)) or ($form{'BID'} < $bid); &oops('We are unable to append your bid to the auction item. It appears to be a file write problem.') unless (open NEW, ">>$config{'basepath'}$form{'CATEGORY'}/$form{'ITEM'}.dat"); if ($config{'flock'}) { flock(NEW, 2); seek(NEW, 0, 2); } print NEW "\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$form{'BID'}\[\]".time."\[\]$form{'ADDRESS1'}"; close NEW; print "$form{'ALIAS'},$form{'CATEGORY'}$form{'ITEM'} your have Purchased item number $form{'ITEM'} for \$$form{'BID'} on ".scalar(localtime(time)).".
    You may want to print this notice as confirmation of your Purchase.

    Please give the seller 24 Hours to contact you.

    Go back to the Auction\n"; &closeitb($form{'CATEGORY'},$form{'ITEM'}); &count_bid; my $flag=0; my $userbid; foreach $userbid (@userbids) { $flag=1 if ("$form{'CATEGORY'}$form{'ITEM'}" eq $userbid); } if ($flag==0 && $config{'regdir'} ne "") { &oops('We could not open the registration file. This could be a server write issue.') unless (open(REGFILE, ">>$config{'basepath'}$config{'regdir'}/$form{'ALIAS'}.dat")); print REGFILE "\n$form{'CATEGORY'}$form{'ITEM'}"; close REGFILE; } &sendemail($email, $config{'admin_address'}, 'Item Sold!', "Item : $title\! Has Been Sold Using the Buy-It Button. Please Visit $config{'sitename'} again.") if ($config{'scripturl'} and $#bids); } else { print "Item number $form{'ITEM'} in category $form{'CATEGORY'} is now closed!
    Sorry...\n"; } } ###End Multi-Aliasing#### #-############################################# # Sub: Process Buy-It # This processes Buy-It from a posted form sub procbuyc { my $cat; my ($password, @userbids); if ($config{'regdir'} ne "") { &oops('Your alias could not be found!') unless ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, @userbids) = &read_reg_file($form{'ALIAS'}); $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'})); &oops('Your password is incorrect.') unless ((lc $password) eq (lc $form{'PASSWORD'})); } &oops('You must enter an alias to track your item.') unless ($form{'ALIAS'}); &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/); &oops('You must enter a valid bid amount.') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/); $form{'BID'} = &parsebid($form{'BID'}); &oops('You must enter your full name.') unless ($form{'ADDRESS1'}); &oops('The item number you entered cannot be found. Maybe it has closed or it was moved since you last loaded the page.') unless my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'CATEGORY'},$form{'ITEM'}); my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); if ((time <= $form{'ITEM'}) or (time <= (60 * $config{'aftermin'} + $time))) { &oops('Your bid is too low. Sorry.') if ($form{'BID'} < ($bid+$inc) and ($#bids)) or ($form{'BID'} < $bid); &oops('We are unable to append your bid to the auction item. It appears to be a file write problem.') unless (open NEW, ">>$config{'basepath'}$form{'CATEGORY'}/$form{'ITEM'}.dat"); if ($config{'flock'}) { flock(NEW, 2); seek(NEW, 0, 2); } print NEW "\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$form{'BID'}\[\]".time."\[\]$form{'ADDRESS1'}"; close NEW; print "$form{'ALIAS'},$form{'CATEGORY'}$form{'ITEM'} your have Purchased Classified ad item number $form{'ITEM'} for \$$form{'BID'} on ".scalar(localtime(time)).".
    You may want to print this notice as confirmation of your Purchase.

    Please give the seller 24 Hours to contact you.

    Go back to the Auction\n"; &closeitb($form{'CATEGORY'},$form{'ITEM'}); &count_bid; my $flag=0; my $userbid; foreach $userbid (@userbids) { $flag=1 if ("$form{'CATEGORY'}$form{'ITEM'}" eq $userbid); } if ($flag==0 && $config{'regdir'} ne "") { &oops('We could not open the registration file. This could be a server write issue.') unless (open(REGFILE, ">>$config{'basepath'}$config{'regdir'}/$form{'ALIAS'}.dat")); print REGFILE "\n$form{'CATEGORY'}$form{'ITEM'}"; close REGFILE; } &sendemail($email, $config{'admin_address'}, 'Classified Item Sold!', "Item : $title\! Has Been Sold Using the Buy-It Button. Please Visit $config{'sitename'} again.") if ($config{'scripturl'} and $#bids); } else { print "Item number $form{'ITEM'} in category $form{'CATEGORY'} is now closed!
    Sorry...\n"; } } #-############################################# # Sub: Add New Item # This allows a new item to be put up for sale sub new { my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids); if ($form{'REPOST'}) { $form{'REPOST'} =~ s/\W//g; if (-T "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat") { open THEFILE, "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat"; ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = ; close THEFILE; chomp($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids); $title =~ s/\"//g; # quotes cause problems for a text input field } } my $inc ='1.00'; # default increment print <<"EOF";

    Post A New Auction Item

     

    Title/Item Name:
    No HTML
    Category:Select One
    Image URL:
    Optional, should be no larger than 200x200
    Featured Item: Do not worry about this...
    Days Until Close:1-14 Days
    Shipping Method:
    Payment Method(s):
    Choose all payment methods you will accept.
    See Description Diablo II Gold
    Description:
    May include HTML - This should include the condition of the item, payment and shipping information, and any other information the buyer should know.
    Please note that by placing an item up for bid you are making a contract between you and the buyer. Once you place an item, you may not retract it and you must sell it for the highest bid. In other words, if you don't want to sell it, don't place it up for bid!
    Your Handle/Alias:** Required ** Forgot it\?
    Registration is required to post or bid!
    Your Password:** Required **Forgot it\?
    Your Starting Bid:\$** Required **
    Your Reserve Price:\$
    You are not obligated to sell below this price. Leave blank if none.
    Bid Increment:\$
    Buy-It Price:\$
    If you want to set an Immediate sale Price. Enter the amount here and Bidder will have the Option to buy this item before the Auction Closes. Leave blank if none.
    EOF print <<"EOF";
    EOF print "
     
    "; } #-############################################# # Sub: Add New Classified # This allows a new classified to be put up for sale sub newc { my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids); if ($form{'REPOSTC'}) { $form{'REPOSTC'} =~ s/\W//g; if (-T "$config{'basepath'}$config{'closedir'}/$form{'REPOSTC'}.dat") { open THEFILE, "$config{'basepath'}$config{'closedir'}/$form{'REPOSTC'}.dat"; ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = ; close THEFILE; chomp($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids); $title =~ s/\"//g; # quotes cause problems for a text input field } } my $inc ='1.00'; # default increment print <<"EOF";

    Post A New Classified Ad

     

    Title/Item Name:
    No HTML
    Category:Select One
    Image URL:
    Optional, should be no larger than 200x200
    Featured Item:
    Days Until Close:1-14 Days
    Shipping Method:
    Payment Method(s):
    Choose all payment methods you will accept.
    See Description Cash Check
    Money Order Visa Mastercard
    Amex Discover Online Payment service
    Description:
    May include HTML - This should include the condition of the item, payment and shipping information, and any other information the buyer should know.
    Use our FREE Ad Formatter Here
    Please note that by placing an item up for bid you are making a contract between you and the buyer. Once you place an item, you may not retract it and you must sell it for the highest bid. In other words, if you don't want to sell it, don't place it up for bid!
    Your Handle/Alias:** Required **
    Registration is required to post or bid!
    Your Password:** Required **
    Your Sale Price:\$** Required **
    You are not obligated to sell below this price.
    EOF print <<"EOF";
    EOF print "
     
    "; } #-############################################# # Sub: Add New Wanted Ad # This allows a new classified to be put up for sale sub newwa { my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids); if ($form{'REPOSTW'}) { $form{'REPOSTW'} =~ s/\W//g; if (-T "$config{'basepath'}$config{'closedir'}/$form{'REPOSTW'}.dat") { open THEFILE, "$config{'basepath'}$config{'closedir'}/$form{'REPOSTW'}.dat"; ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = ; close THEFILE; chomp($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids); $title =~ s/\"//g; # quotes cause problems for a text input field } } my $inc ='1.00'; # default increment print <<"EOF";

    Post A New Wanted Ad

     

    Title/Item Name:
    No HTML
    Category:Select One
    Image URL:
    Optional, should be no larger than 200x200
    Days Until Close:1-14 Days
    Featured Item:
    Shipping Method:
    Payment Method(s):
    Choose all payment methods you will accept.
    See Description Cash Check
    Money Order Visa Mastercard
    Amex Discover Online Payment service
    Description:
    May include HTML - This should include the condition of the item, payment and shipping information, and any other information the buyer should know.
    Use our FREE Ad Formatter Here
    Please note that by placing an item up for bid you are making a contract between you and the buyer. Once you place an item, you may not retract it and you must sell it for the highest bid. In other words, if you don't want to sell it, don't place it up for bid!
    Your Handle/Alias:** Required **
    Registration is required to post or bid!
    Your Password:** Required **
    Your Max Price:\$** Required **
    This is the Maximum You want to pay for this item.
    EOF print <<"EOF";
    EOF print "
     
    "; } #-############################################# # Sub: Process New Item # This processes new item to be put up for # sale from a posted form sub procnew { my ($password, @userbids); if ($config{'regdir'} ne "") { &oops('Your alias could not be found!') unless ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, @userbids) = &read_reg_file($form{'ALIAS'}); $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'})); &oops('Your password is incorrect.') unless ((lc $password) eq (lc $form{'PASSWORD'})); } &oops('You must have an item title that is up to 50 characters.') unless ($form{'TITLE'} && (length($form{'TITLE'}) < 51)); $form{'TITLE'} =~ s/\/\>\;/g; &oops('You must select a valid category.') unless (-d "$config{'basepath'}$form{'CATEGORY'}" and $category{$form{'CATEGORY'}}); $form{'IMAGE'} = "" if ($form{'IMAGE'} eq "http://"); &oops('You must enter the number of days your auction should run, from 1 to 14.') unless (($form{'DAYS'} > 0) and ($form{'DAYS'} < 15)); &oops('You must enter an item description.') unless ($form{'DESC'}); &oops('You must enter an alias to track your item.') unless ($form{'ALIAS'}); &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/); &oops('You must enter a valid starting bid.') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/); &oops('You must enter a valid bid increment.') unless (($form{'INC'} =~ /^(\d+\.?\d*|\.\d+)$/) and ($form{'INC'} >= .01)); $form{'INC'} = &parsebid($form{'INC'}); $form{'RESERVE'} = &parsebid($form{'RESERVE'}); &oops('You must enter your full name.') unless ($form{'ADDRESS1'}); my $item_number = ($form{'DAYS'} * 86400 + time); $item_number = ($form{'DAYS'} * 86400 + time) until (!(-f "$config{'basepath'}$form{'CATEGORY'}/$item_number.dat")); if ($form{'FROMPREVIEW'}) { my $key; foreach $key (keys %form) { $form{$key} =~ s/\[greaterthansign\]/\>/gs; $form{$key} =~ s/\[lessthansign\]/\$config{'basepath'}$form{'CATEGORY'}/$item_number.dat")); print NEW "$form{'TITLE'}\n$form{'RESERVE'}\n$form{'INC'}\n$form{'DESC'}\n$form{'IMAGE'}\n$form{'TYPE'}\n$form{'BUYIT'}\n$form{'SHIP'}\n$form{'PAY0'}\n$form{'PAY1'}\n$form{'PAY2'}\n$form{'PAY3'}\n$form{'PAY4'}\n$form{'PAY5'}\n$form{'PAY6'}\n$form{'PAY7'}\n$form{'PAY8'}\n$form{'FEAT'}\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]".&parsebid($form{'BID'})."\[\]".time."\[\]$form{'ADDRESS1'}"; close NEW; if ($config{'regdir'} ne "") { &oops('We could not open the registration file. This could be a server write issue.') unless (open(REGFILE, ">>$config{'basepath'}$config{'regdir'}/$form{'ALIAS'}.dat")); print REGFILE "\n$form{'CATEGORY'}$item_number"; close REGFILE; } print "$form{'TITLE'} was posted as a $form{'TYPE'} under $category{$form{'CATEGORY'}}....
    You may want to go to the item to confirm placement.\n\n"; } else { my $nowtime = localtime(time); my $closetime = localtime($item_number); print "

    $form{'TITLE'} PREVIEW $form{'TYPE'}


    Information
    \n"; print ""; print "" if ($form{'IMAGE'}); print "
    "; print "" if ($form{'BUYIT'} ne ""); print "
    $form{'TITLE'}
    Category: $category{$form{'CATEGORY'}}
    Offered By: $form{'ALIAS'}
    Current Time: $nowtime
    Closes: $closetime
    Or $config{'aftermin'} minutes after last bid...
    Number of Bids: 0
    Last Bid: \$$form{'BID'}
    Buy-It Price: \$$form{'BUYIT'}
    \n"; print "
    Description
    $form{'DESC'}"; print "
    If this looks good, hit , else hit the back button on your browser to edit the item.\n"; my $key; foreach $key (keys %form) { $form{$key} =~ s/\>/\[greaterthansign\]/gs; $form{$key} =~ s/\\n"; } print "\n"; &count_post; } } #-############################################# # Sub: Process Bid # This processes new bids from a posted form sub procbid { my ($password, @userbids); if ($config{'regdir'} ne "") { &oops('Your alias could not be found!') unless ($password, $form{'EMAIL'}, $form{'ADDRESS1'}, @userbids) = &read_reg_file($form{'ALIAS'}); $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'})); &oops('Your password is incorrect.') unless ((lc $password) eq (lc $form{'PASSWORD'})); } &oops('You must enter an alias to track your item.') unless ($form{'ALIAS'}); &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/); &oops('You must enter a valid bid amount.') unless ($form{'BID'} =~ /^(\d+\.?\d*|\.\d+)$/); $form{'BID'} = &parsebid($form{'BID'}); &oops('You must enter your full name.') unless ($form{'ADDRESS1'}); &oops('The item number you entered cannot be found. Maybe it has closed or it was moved since you last loaded the page.') unless my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($form{'CATEGORY'},$form{'ITEM'}); my ($alias, $email, $bid, $time, $add1) = &read_bid($bids[$#bids]); if ((time <= $form{'ITEM'}) or (time <= (60 * $config{'aftermin'} + $time))) { &oops('Your bid is too low. Sorry.') if ($form{'BID'} < ($bid+$inc) and ($#bids)) or ($form{'BID'} < $bid); &oops('We are unable to append your bid to the auction item. It appears to be a file write problem.') unless (open NEW, ">>$config{'basepath'}$form{'CATEGORY'}/$form{'ITEM'}.dat"); if ($config{'flock'}) { flock(NEW, 2); seek(NEW, 0, 2); } print NEW "\n$form{'ALIAS'}\[\]$form{'EMAIL'}\[\]$form{'BID'}\[\]".time."\[\]$form{'ADDRESS1'}"; close NEW; print "$form{'ALIAS'}, your bid has been placed on item number $form{'ITEM'} for \$$form{'BID'} on ".scalar(localtime(time)).".
    You may want to print this notice as confirmation of your bid.

    Go back to the item\n"; &count_bid; my $flag=0; my $userbid; foreach $userbid (@userbids) { $flag=1 if ("$form{'CATEGORY'}$form{'ITEM'}" eq $userbid); } if ($flag==0 && $config{'regdir'} ne "") { &oops('We could not open the registration file. This could be a server write issue.') unless (open(REGFILE, ">>$config{'basepath'}$config{'regdir'}/$form{'ALIAS'}.dat")); print REGFILE "\n$form{'CATEGORY'}$form{'ITEM'}"; close REGFILE; } &sendemail($email, $config{'admin_address'}, 'You\'ve been outbid!', "You have been outbid on $title\! If you want to place a higher bid, please visit\:\n\n\thttp://$config{'scripturl'}$ENV{'SCRIPT_NAME'}\?category=$form{'CATEGORY'}\&item=$form{'ITEM'}\n\nThe current high bid is \$$form{'BID'}.") if ($config{'scripturl'} and $#bids); } else { print "Item number $form{'ITEM'} in category $form{'CATEGORY'} is now closed!
    Sorry...\n"; } } #-############################################# # Sub: Change Registration # This allows a user to change information sub chreg { print <<"EOF";

    Change Contact Information

     

    This form will allow you to change your contact information.
    Your Handle/Alias:
    Required for verification
    Your Current Password:
    Required for verification
    Your New Password:
    Leave blank if unchanged
    Your New Password Again:
    Leave blank if unchanged
    Contact Information:
    Leave blank if unchanged
    Battle.net Account Name:
    EOF print "
     
    "; } #-############################################# # Sub: Process Changed Registration # This modifies an account sub proccreg { if ($config{'regdir'}) { &oops('Your must enter your alias so we can validate your account.') unless ($form{'ALIAS'}); &oops('You must enter your old password so we can validate your account.') unless ($form{'OLDPASS'}); if ($form{'ADDRESS1'}) { &oops('You must enter all of your contact information. Please enter your Battle.net account name.') unless ($form{'ADDRESS2'}); } if ($form{'NEWPASS1'}) { &oops('Your new passwords do not match.') unless ($form{'NEWPASS2'} eq $form{'NEWPASS1'}); } if (my ($password,$email,$add1,@past_bids) = &read_reg_file($form{'ALIAS'})) { $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'})); &oops('Your old password does not match up.') unless ((lc $password) eq (lc $form{'OLDPASS'})); $form{'NEWPASS1'} = $password if !($form{'NEWPASS1'}); $form{'ADDRESS1'} = $add1 if !($form{'ADDRESS1'}); &oops('We cannot open your account. This could be a server data write issue.') unless (open NEWREG, ">$config{'basepath'}$config{'regdir'}/$form{'ALIAS'}.dat"); print NEWREG "$form{'NEWPASS1'}\n$email\n$form{'ADDRESS1'}"; my $bid; foreach $bid (@past_bids) { print NEWREG "\n$bid"; } close NEWREG; print "$form{'ALIAS'}, your information has been successfully changed.\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 "User Registration is Not Implemented on This Server! The System Administrator Did Not Specify a Registration Directory...\n"; } } #-############################################# # Sub: New Registration Agreement # This is a form informing new users of your Site Rules sub reg { print <<"EOF";

    New User Agreement

     

    Terms of Registration for $config{'sitename'}
    You must Agree to all terms and conditions of this document before registering with this Infoceptor's DiabloII Auction.
    Term 1: Eligibility of membership - This auction site ( $config{'sitename'} ) is available to people of all ages to buy or trade DiabloII items with other players. No age limits, anyone of any age can register.
     
    Term 2: $config{'sitename'} is only providing auction services - We only provide services to people interested in selling and buying DiabloII items via internet auction. We do not have control over the items that are posted in the auction site, and cannot guarantee the authenticity and quality of a said product. We are not responsible for the actions the sellers takes, before, during, and after the auction, typographical errors, mis-prints, loss of merchandise/money, damage or failure of equipment, due to your visit to this auction site.
    Use of this site is at your own risk, and content is presented 'As-Is'.
     
    Term 3: Term 3a:   Bidding and Selling - As a user, you may bid and/or sell merchandise over $config{'sitename'} .
    Term 3b:    As a bidder - you know that placing a bid is a binding contract with you and the seller, and the bid cannot be retracted unless due to fault by the seller of typographical error, or other error, due to human error on the seller's part. Once you place a bid, and if you win, you will be obligated to buy the product at the said price you indicated as your bid. Placing a bid on this auction site, and winning, then not paying for the product is illegal in most states.
    Term 3c:    As a seller - the item that you place up for bids must be real. Pre-sales are not accepted. Once a bid has been placed for your item, you are being placed in a binding contract with the potential buyer of the product, if that bid shall be the highest bid. Once the auction is over, if over reserve price, you are obligated to sell to the potential buyer which is the highest bidder in your auction. If, reserve price was not met, you are not obilgated in any way to sell this item at all. As a seller, you are not in any way to bid on your own items. If reported, your auction will be deleted.
     
    Term 4: Posting Items - As a user, you are welcome to post items up for sale in the $config{'sitename'} . We do not have restrictions on what items you may sell, as long as they are Diablo Related. Items that are up to bids are subject to review by the staff of $config{'sitename'} , and my be removed without prior notice, if in violation with the User Agreement.
     
    Term 5: Charges - Posting an item up for bid, bidding on an item, and registering are free at $config{'sitename'}. Do not abuse this privilege.
     
    Term 6: Privacy - We gather your information so that other people will have it on hand when they win your auction, or you win their auction. Personal information is not sold, rented, without yuor permission. Personal information sent to a user regarding a product bought or sold on the auction is not to be used for any other purpose, except for communication concerning the auction item.
     
    Term 7: Warranty - $config{'sitename'} provide this website in an 'as-is' condition, without a warranty or condition. $config{'sitename'} is not liable for any damages resulting in an auction, or your visit to the site.
     
    EOF print "
     
    "; } #-############################################# # Sub: New Registration # This creates a form for registration sub creg { print <<"EOF";

    New User Registration

     

    This form will allow you to register to buy or sell auction items. You must enter accurate data, and your new password will be e-mailed to you. Please be patient after hitting the submit button. Registration may take a few seconds.
    Your Handle/Alias:
    Used to track your post
    Your E-Mail Address:
    Must be valid
    Contact Information:
    Will be given out only to the buyer or seller
    Battle.net Acount Name:
    EOF print "
     
    "; } #-############################################# # Sub: Process Registration # This adds new accounts to the database sub procreg { if ($config{'regdir'}) { umask(000); # UNIX file permission junk mkdir("$config{'basepath'}$config{'regdir'}", 0777) unless (-d "$config{'basepath'}$config{'regdir'}"); &oops('You must enter an alias that consists of alphanumeric characters.') if $form{'ALIAS'} =~ /\W/ or !($form{'ALIAS'}); &oops('You must enter a valid e-mail address.') unless ($form{'EMAIL'} =~ /^.+\@.+\..+$/); ###Added for Multi-Alias#### $form{'EMAIL'} = lc($form{'EMAIL'}); &multalias; ###End - Added for Multi-Alias#### &oops('You must enter your Battle.net account name so buyers or sellers may contact you.') unless ($form{'ADDRESS1'}); $form{'ALIAS'} = ucfirst(lc($form{'ALIAS'})); if (!(-f "$config{'basepath'}$config{'regdir'}/$form{'ALIAS'}.dat")) { &oops('We were unable to write to the user directory.') unless (open NEWREG, ">$config{'basepath'}$config{'regdir'}/$form{'ALIAS'}.dat"); my $newpass = &randompass; print NEWREG "$newpass\n$form{'EMAIL'}\n$form{'ADDRESS1'}"; close NEWREG; print "

    $form{'ALIAS'},
    You should receive an e-mail to $form{'EMAIL'} in a few minutes. It will contain your password needed to post or bid.
    You may change your password once you receive it.

    If you do not get an e-mail, please re-register.
    \n"; &sendemail($form{'EMAIL'}, $config{'admin_address'}, 'Auction Password', "PLEASE DO NOT REPLY TO THIS E-MAIL.\n\nThank you for registering to use the online auctions at $config{'sitename'}!\n\nTo return to our Auction site Visit this URL $config{'mailurl'}\n\nYour new password is: $newpass\nYour alias (as you entered it) is: $form{'ALIAS'}\n\nPlease visit http://www.infoceptor.net/auction/auction.cgi?action=chreg to change your password.\n\nThank you for visiting!"); &count_user; } else { print "Sorry... that alias is taken. Hit back to try again!\n"; } } else { print "User Registration is Not Implemented on This Server! The System Administrator Did Not Specify a Registration Directory...\n"; } #####################Begins Feedback addon if ($config{'feeddata'}) { umask(000); # UNIX file permission junk mkdir("$config{'basepath'}$config{'feeddata'}", 0777) unless (-d "$config{'basepath'}$config{'feeddata'}"); if (!(-f "$config{'basepath'}$config{'feeddata'}/$form{'ALIAS'}.dat")) { &oops('We were unable to write to the user directory.') unless (open NEWFEED, ">$config{'basepath'}$config{'feeddata'}/$form{'ALIAS'}.dat"); print NEWFEED ""; close NEWFEED; } else { print "User Registration is Not Implemented on This Server! The System Administrator Did Not Specify a Registration Directory...\n"; } } #####################Ends Feedback addon ###Added for Multi-Aliasing#### ######################### sub multalias { my $file; opendir THEDIR, "$config{'basepath'}/$config{'regdir'}" || die "Unable to open directory: $!"; my @allfiles = readdir THEDIR; closedir THEDIR; foreach $file (@allfiles) { if ($file =~ /\.dat/){ open REGFILE, "$config{'basepath'}/$config{'regdir'}/$file"; my($password,$email,$add1,@junk) = ; # be sure to edit this to match the rest of your script chomp($password,$email,$add1,@junk); # be sure to edit this to match the rest of your script close REGFILE; if ($form{'EMAIL'} =~ $email) { &oops3 } } } } ############################################## # Sub: Oops3! # This generates an error message for multiple accounts and dies. sub oops3 { print "This e-mail address, $form{'EMAIL'}, has already been registered. "; die "This e-mail address, $form{'EMAIL'}, has already been registered. "; } ###End Multi-Aliasing#### } #-############################################# # Sub: Admin # Allows the administrator to delete items. sub admin { print <<"EOF";

    Delete Items

    This form will allow you to delete an item. You will need the administrator password that should be configured in the script.
    Category:
    Select One
    Item Number:
    Administrator Password:
    Required for verification
    EOF } #-############################################# # Sub: Process Admin # Allows the administrator to delete items. sub procadmin { if (lc($form{'PASSWORD'}) eq lc($config{'adminpass'})) { &oops('Bad Item Category or Number!') unless &read_item_file($form{'CATEGORY'},$form{'ITEM'}); if (unlink("$config{'basepath'}$form{'CATEGORY'}/$form{'ITEM'}.dat")) { print "File Successfully Removed!\n"; } else { print "File Could Not Be Removed!\n"; } } else { print "Sorry... Incorrect administrator password for delete!\n"; } } #-############################################# # Sub: Close Auction Buy It # This sets an item's status to closed. sub closeitb { my ($cat,$item) = @_; if ($cat ne $config{'closedir'}) { my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($cat,$item); my @lastbid = &read_bid($bids[$#bids]); my @firstbid = &read_bid($bids[0]); if ($#bids) { if ($lastbid[2] >= $reserve) { &sendemail($lastbid[1], $firstbid[1], "Auction Close: $title", "Congratulations! You are the winner of auction number $item.\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[7]-$firstbid[8]-$firstbid[9]\n$firstbid[1]\n\nThanks for using $config{'sitename'}!"); &sendemail($firstbid[1], $lastbid[1], "Auction Close: $title", "Auction number $item 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[7]-$lastbid[8]-$lastbid[9]\n$lastbid[1]\n\nThanks for using $config{'sitename'}!"); } else { &sendemail($lastbid[1], $firstbid[1], "Auction Close: $title", "Congratulations! You were the high bidder on auction number $item.\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[7]-$firstbid[8]-$firstbid[9]\n$firstbid[1]\n\nThanks for using $config{'sitename'}!"); &sendemail($firstbid[1], $lastbid[1], "Auction Close: $title", "Auction number $item 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[7]-$lastbid[8]-$lastbid[9]\n$lastbid[1]\n\nThanks for using $config{'sitename'}!"); } #&sendemail($firstbid[1], $lastbid[1], "Auction Close: $title", "Auction number $item 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 $config{'sitename'}!"); } else { &sendemail($firstbid[1], $config{'admin_address'}, "Auction Close: $title", "Auction number $item is now closed.\nThere were no bids on your item. You may repost your item by using the closed auction manager at http://$config{'scripturl'}$ENV{'SCRIPT_NAME'}. Thanks for using $config{'sitename'}!"); } if ($config{'closedir'}) { umask(000); # UNIX file permission junk mkdir("$config{'basepath'}$config{'closedir'}", 0777) unless (-d "$config{'basepath'}$config{'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("$config{'basepath'}$cat/$item.dat", "$config{'basepath'}$config{'closedir'}/$cat$item.dat"); } else { print "Please notify the site admin that this item cannot be removed even though it is closed.\n" unless unlink("$config{'basepath'}$cat/$item.dat"); } } } #-############################################# # Sub: Close Auction # This sets an item's status to closed. sub closeit { my ($cat,$item) = @_; if ($cat ne $config{'closedir'}) { my ($title, $reserve, $inc, $desc, $image, $type, $buyit, $ship, $pay0, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $feat, @bids) = &read_item_file($cat,$item); my @lastbid = &read_bid($bids[$#bids]); my @firstbid = &read_bid($bids[0]); if ($#bids) { if ($lastbid[2] >= $reserve) { &sendemail($lastbid[1], $firstbid[1], "Auction Close: $title", "Congratulations! You are the winner of auction number $item.\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[7]-$firstbid[8]-$firstbid[9]\n$firstbid[1]\n\nThanks for using $config{'sitename'}!"); &sendemail($firstbid[1], $lastbid[1], "Auction Close: $title", "Auction number $item is n