my $nowtime = localtime int($config{'time'});
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;
my @cellcolor=($config{'odd_row_color'},$config{'even_row_color'});
my $color = 0;
my $pagebreak = int $form{pb} || 30;
my ($icount, $pcount) = (0,0);
print "
\n";
print " All Items - $category{$form{'category'}} |
\n";
print "
\n";
pagebreak($pcount,$pagebreak); # This is where I have the top pagebreak navigation bar
print "
\n"
print "\n";
print "Status | All Items - $category{$form{'category'}} | Price | Bids | High Bidder | Closes $config{'timezone'} | Options |
\n";
foreach $file (@allfiles) {
$icount++;
if($icount > $pagebreak){$icount=1; $pcount++}
next if $pcount != $form{page};
$file =~ s/^$config{'basepath'}$form{'category'}\///;
$file =~ s/\.dat$//;
my ($title, $reserve, $inc, $desc, $image1, $image2, $image3, $image4, $thumb1, $thumb2, $thumb3, $thumb4, $dutch, $qty, $bold, $highlight, $feat, $catfeat, $grabber, $relist, $buyit, $gallery, $counter, $ship1, $ship2, $ship3, $ship4, $ship5, $shipcost, $location, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $pay9, $paypal, $idata1, $idata2, $idata3, $idata4, $idata5, $idata6, $idata7, $idata8, $idata9, @bids) = &read_item_file($form{'category'},$file);
chomp($title, $reserve, $inc, $desc, $image1, $image2, $image3, $image4, $thumb1, $thumb2, $thumb3, $thumb4, $dutch, $qty, $bold, $highlight, $feat, $catfeat, $grabber, $relist, $buyit, $gallery, $counter, $ship1, $ship2, $ship3, $ship4, $ship5, $shipcost, $location, $pay1, $pay2, $pay3, $pay4, $pay5, $pay6, $pay7, $pay8, $pay9, $paypal, $idata1, $idata2, $idata3, $idata4, $idata5, $idata6, $idata7, $idata8, $idata9, @bids);
my @firstbid = split(/\[\]/,$bids[0]);
my @lastbid = split(/\[\]/,$bids[$#bids]);
my $usersfeed = &feeder($firstbid[0],2);
my $usersfeed2 = &feeder2($firstbid[0],2);
my $bidderfeed = &feeder($lastbid[0],2);
if ($title ne '') {
my ($alias, $email, $bid, $time, $add1, $add2, $add3, $oqty, $qtysold) = &read_bid($bids[$#bids]);
my ($selleralias, $selleremail, $sellerbid, $sellertime, $selleradd1, $selleradd2, $selleradd3) = &read_bid($bids[0]);
my $timeleft = &timeleft($file);
my $imagedisp = "";
my $rowcolor;
if ($highlight eq "Yes") {
$rowcolor = $config{'yellowrow'};
}
else {
$rowcolor = $cellcolor[$color];
}
if ($alias eq $selleralias){
$bidderfeed = "No bids yet...";
my $lastbid = $sellerbid;
}
else {
$bidderfeed = "$bidderfeed";
}
if ($bold eq $config{'bolditemnum'}) {
print "";
print " " if ($thumb1);
print "$title";
print " " if (($buyit > 0) && ($#bids < 1));
print " | $config{'currency'}$bid | $#bids | $bidderfeed | $timeleft |
| |
\n";
$color = int(!($color));
}
else {
print "";
print " " if ($thumb1);
print " | $title";
print " " if (($buyit > 0) && ($#bids < 1));
print " | $config{'currency'}$bid | $#bids | $bidderfeed | $timeleft |
|
\n";
$color = int(!($color));
}
}
}
print "
\n";
print "
\n";
pagebreak($pcount,$pagebreak); # This is the bottom pagebreak navigation bar
print "
\n";