#======================================================# # EveryAuction Addon # Stats Add-on v1.0 #======================================================# # PiTA - Park In The Alley Software (Auction-Script.com) #======================================================# # Author: Splatt 02/20/99 # justguns.com auction-script.com compalley.com #------------------------------------------------------# # Unauthorized redistribution is prohibited!!! # The latest version of my addons can be found at: # www.auction-script.com/addons #======================================================# #------------------------------------------------------# # Add these two variables near your other variables in # your auction.cgi, edit to reflect correct path #------------------------------------------------------# # Keeps a count of total bids and sales # ***(You MUST create these files AND CHMOD them 777)*** #------------------------------------------------------# $bidcount = '/cgi-bin/auction/bidcount.txt'; $soldcount = '/cgi-bin/auction/soldcont.txt'; #------------------------------------------------------# # Add this section to your auction.cgi script in the # footer section. #------------------------------------------------------# open(IN,"<$bidcount")||die "Cannot open file:$bidcount for input.\n"; $bcount=; close(IN); $totalbids = 0; foreach $key (sort keys %category) { opendir THEDIR, "$basepath$key" || die "Unable to open directory:$!"; @allfiles = grep -T, map "$basepath$key/$_", readdir THEDIR; closedir THEDIR; $numfiles = @allfiles; umask(000); mkdir("$basepath$key", 0777) unless (-M "$basepath$key"); $totalbids = $totalbids + $numfiles; } opendir THEDIR, "$basepath$regdir" || die "Unable to open directory:$!"; @allfiles = grep -T, map "$basepath$regdir/$_", readdir THEDIR; closedir THEDIR; $numfiles = @allfiles; umask(000); mkdir("$basepath$regdir", 0777) unless (-M "$basepath$regdir"); $totalusers = $numfiles; open(IN,"<$soldcount")||die "Cannot open file:$soldcount for input.\n"; $scount=; close(IN); print "

A total of $totalbids items are currently up for auction! A total of $bcount bids have been placed since inception!
"; print "
A total of $scount items have been sold to date! A total of $totalusers users are currently registered!
"; #------------------------------------------------------# #------------------------------------------------------# # Add this whenever a bid is placed, my script is SO # modified there's no way I can tell you exactly where # to put it. # Probably the best place would be the top of the procbid sub #------------------------------------------------------# open(IN,"<$bidcount") || die "Cannot open file: $bidcount for input.\n"; $bcount=; $bcount++; close(IN); open(OUT,">$bidcount") || die "Cannot open file: $bidcount for output.\n"; print OUT $bcount; close(OUT); #------------------------------------------------------# #------------------------------------------------------# # Add this whenever an item is sold, again my script is SO # modified there's no way I can tell you exactly where # to put it. #------------------------------------------------------# # Mine is in the autoclose addon sub, just below this: # if (($lastbid[2] >= $opening) && ($firstbid[0] ne $lastbid[0])) { # &sendemail($lastbid[1], "Auction Winner: $title", 'nobody', ETC,ETC,ETC.... # $reservemsg = " "; # &sendemail($firstbid[1], "Auction Close: $title", 'nobody', ETC,ETC,ETC.... #------------------------------------------------------# open(IN,"<$soldcount") || die "Cannot open file: $soldcount for input.\n"; $scount=; $scount++; close(IN); open(OUT,">$soldcount") || die "Cannot open file: $soldcount for output.\n"; print OUT $scount; close(OUT); #------------------------------------------------------#