#======================================================# # EveryAuction Addon # Display Replacement With Page Breaks v1.0 #======================================================# # PiTA - Park In The Alley Software (Auction-Script.com) #======================================================# # Author: Splatt 02/13/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 #======================================================# #------------------------------------------------------# # Variables that need to be in your auction.cgi config section #------------------------------------------------------# #------------------------------------------------------# # Page break section # Set everything to 0 except the $entryno, set that to # the number of lines to break the page at #------------------------------------------------------# $temp = 0; $stop = 0; $more = 0; $thingy = 0; $entryno = 15; #------------------------------------------------------# #------------------------------------------------------# # Alternating Colors for the rows # $odd_row_color = '#EEEEEE'; # $even_row_color = '#FFFFFF'; #------------------------------------------------------# #------------------------------------------------------# # View hot items # $hotitemnum = number of bids to trigger hot item # $hoticonpath = URL to an icon for displaying # $hotitemnum = 10; # $hoticonpath = ""; #------------------------------------------------------# #------------------------------------------------------# # View new items # $newdays = number of days item is considered new # $newiconpath = URL to an icon for displaying # $newdays = 1; # $newiconpath = ""; #------------------------------------------------------# #------------------------------------------------------# # View ending soon items # $endhours = number of hours left in auction to be considered closing soon # $endiconpath = URL to an icon for displaying # $endhours = 3; # $endiconpath=""; #------------------------------------------------------# #------------------------------------------------------# # End of configuration section variables #------------------------------------------------------# #------------------------------------------------------# # Sub: Display List Of Items #------------------------------------------------------# sub displist { #------------------------------------------------------# #------------------------------------------------------# # I use the Header as a sub, this is here for reference #------------------------------------------------------# # &ShowHeader("Item Listing"); #------------------------------------------------------# $nowtime = localtime(time); print "

Current Server Time: $nowtime

\n"; print "\n"; print "
Items Listed Under Category: $category{$ARGV[0]}
\n"; print "\n"; print "\n"; opendir THEDIR, "$basepath$ARGV[0]" || die "Unable to open directory: $!"; @allfiles = readdir THEDIR; closedir THEDIR; $i=0; #------------------------------------------------------# # Page break section #------------------------------------------------------# if ($ARGV[6] eq "") { $min = 0; $max = $entryno + 2; } if ($ARGV[6] ne "") { $min = (($ARGV[6]-1)*$entryno) + 3; $max = ($ARGV[6] * $entryno) + 2; } #------------------------------------------------------# foreach $file (sort { int($a) <=> int($b) } @allfiles) { if ($i % 2 == 1) { $colortablebody=$odd_row_color; } else { $colortablebody=$even_row_color; } $i++; #------------------------------------------------------# # Page break section #------------------------------------------------------# if ($stop == 1) { $more = 1; break; } if ($temp >= ($min -1) && $temp <= ($max -1)){ #------------------------------------------------------# if (-T "$basepath$ARGV[0]/$file") { open THEFILE, "$basepath$ARGV[0]/$file"; ($title, $reserve, $inc, $desc, $image, @bids) = ; close THEFILE; chomp($title, $reserve, $inc, $desc, $image, @bids); @lastbid = split(/\[\]/,$bids[$#bids]); $file =~ s/\.dat//; @closetime = localtime($file); $closetime[4]++; @firstbid=split(/\[\]/,$bids[0]); $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); print "\n"; } else { print "$closetime[1] \n"; } #------------------------------------------------------# # Page break section #------------------------------------------------------# $thingy = 1; #------------------------------------------------------# } #------------------------------------------------------# # Page break section #------------------------------------------------------# } $somcount = $temp + 1; $temp = $somcount; if ($temp >= $max) { $stop = 1; } #------------------------------------------------------# } print "
ItemClosesBidsHigh Bid
$hoticon$newicon $title$camera$endicon$closetime[4]/$closetime[3] $closetime[2]\:"; if ($closetime[1] < 10) { print "0$closetime[1] $#bids$currencysign$lastbid[2]
$#bids$currencysign$lastbid[2]
\n"; #------------------------------------------------------# # Page break section #------------------------------------------------------# if ($thingy == 0) { print "
No items in category.

"; print "
[Previous | Last Page | Next]
"; } else { print "
\n"; if ($ARGV[6] eq "" || $ARGV[6] == 1) { print "
[Previous | Page 1 | "; } if ($ARGV[6] ne "" && $ARGV[6] != 1) { print "
["; $tmp = $ARGV[6] - 1; print "Previous |"; print " Page $ARGV[6] | "; } if ($more == 0) { print "Next]"; } if ($ARGV[6] eq "" && $more == 1) { print "Next]"; } if ($ARGV[6] ne "" && $more == 1) { $tmp = $ARGV[6] + 1; print "Next]"; } } #------------------------------------------------------# #------------------------------------------------------# # I also use the Footer as a sub, here for reference # &ShowFooter; #------------------------------------------------------# } #------------------------------------------------------#