[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] help



Hi:

I have some problem with a sub-routine.  I am getting error
message and I am unable to fix it.  Can someone please help.

Thanks

Amitava

######################################################
# Name "main::category" used only once: possible typo.
File 'Untitled #2'; Line 10
######################################################


sub dispitem {
 my ($title, $reserve, $inc, $desc, $image, @bids) =
&read_item_file($form{'category'},$form{'item'});
 &oops("Item $form{'item'} could not be opened.  If this
item is closed, you can view statistics and bid history
using our <A HREF=$ENV{'SCRIPT_NAME'}\?action=closed>closed
item viewer</A>.") if $title eq '';

  my $nowtime = localtime(time);
  my $closetime = localtime($form{'item'});
 print "<H2>$title</H2><HR><FONT
SIZE=+1><B>Information</B></FONT><HR>\n";
 print "<TABLE WIDTH=100\%><TR>";
 print "<TD BGCOLOR=$config{'colortablebody'}><IMG
SRC=$image></TD>" if ($image);
 print "<TD><TABLE BORDER=1><TR><TD
BGCOLOR=$config{'colortablehead'}><B>$title</B></TD></TR><TR><TD
BGCOLOR=$config{'colortablebody'}><B>Category:</B> <A
HREF=$ENV{'SCRIPT_NAME'}\?category=$form{'category'}>$category{$form{'category'}}</A></TD></TR><TR><TD
BGCOLOR=$config{'colortablebody'}>";

my ($alias, $email, $bid, $time, $add1, $add2, $add3) =
&read_bid($bids[0]); # read first bid
 print "<B>Offered By:</B> <A
HREF=mailto:$email>$alias</A></TR></TD><TR><TD
BGCOLOR=$config{'colortablebody'}><B>Current Time:</B>
$nowtime</TD></TR><TR><TD
BGCOLOR=$config{'colortablebody'}><B>Closes:</B>
$closetime<BR><FONT SIZE=-2>Or $config{'aftermin'} minutes
after last bid...</FONT></TD></TR><TR><TD
BGCOLOR=$config{'colortablebody'}><B>Number of Bids:</B>
$#bids</TD></TR><TR><TD BGCOLOR=$config{'colortablebody'}>";

 {
my ($alias, $email, $bid, $time, $add1, $add2, $add3) =
&read_bid($bids[$#bids]); # read last bid
 print "<B>Last Bid:</B> \$$bid ";
 print "<FONT SIZE=-1>(reserve price not yet met)</FONT>" if
($bid < $reserve);
 print "<FONT SIZE=-1>(reserve price met)</FONT>" if (($bid
>= $reserve) and ($reserve > 0));
 print "</TD></TR></TABLE></TD></TR></TABLE>\n";
 print "<HR><FONT
SIZE=+1><B>Description</B></FONT><HR>$desc</FONT></FONT></B></I></U></H1></H2></H3></H4></H5>";

 print "<HR><FONT SIZE=+1><B>Bid History</B></FONT><HR>\n";
 my $lowest_new_bid;
 if ($#bids) {
  for (my $i=1; $i<scalar(@bids); $i++) {
   my ($alias, $email, $bid, $time, $add1, $add2, $add3) =
&read_bid($bids[$i]);
   my $bidtime = localtime($time);
   print "<FONT SIZE=-1>$alias \($bidtime\) -
\$$bid</FONT><BR>";
  }
  $lowest_new_bid = &parsebid($bid+$inc);
 }
 else {
  print "<FONT SIZE=-1>No bids yet...</FONT><BR>";
  $lowest_new_bid = (&read_bid($bids[0]))[2];
 }
 # either the item is closed or we will display a bid form
 {my ($alias, $email, $bid, $time, $add1, $add2, $add3) =
&read_bid($bids[$#bids]); # read the last bid
 if ((time > int($form{'item'})) && (time > (60 *
$config{'aftermin'} + $time))) {
  print "<FONT SIZE=-1 COLOR=#FF0000><B>BIDDING IS NOW
CLOSED</B></FONT><BR>";
  &closeit($form{'category'},$form{'item'});
 }
 else {
  print <<"EOF";
<FORM ACTION=$ENV{'SCRIPT_NAME'} METHOD=POST>
<HR><FONT SIZE=+1><B>Place A Bid</B></FONT><HR>
<INPUT TYPE=HIDDEN NAME=action VALUE=procbid>
<INPUT TYPE=HIDDEN NAME=ITEM VALUE="$form{'item'}">
<INPUT TYPE=HIDDEN NAME=CATEGORY VALUE="$form{'category'}">
<B>The High Bid Is:</B> \$$bid<BR>
<B>The Lowest You May Bid Is:</B> \$$lowest_new_bid
<P>Please note that by placing a bid you are making a
contract between you and the seller.
Once you place a bid, you may not retract it.  In some
states, it is illegal to win
an auction and not purchase the item.  In other words, if
you don't want to pay for it,
don't bid!
EOF

  if ($config{'regdir'}) {
   print <<"EOF";
<P><B><A
HREF=$ENV{'SCRIPT_NAME'}?action=reg>Registration</A> is
required to post or bid!</B>
<P><B>Your Handle/Alias:</B> <INPUT NAME=ALIAS TYPE=TEXT
SIZE=30 MAXLENGTH=30> (used to track your bid)
<BR><B>Your Password:</B> <INPUT NAME=PASSWORD TYPE=PASSWORD
SIZE=30> (must be valid)
<BR><B>Your Bid:</B> \$<INPUT NAME=BID TYPE=TEXT SIZE=7
VALUE="$lowest_new_bid"><P>
EOF
  }
  else {
   print <<"EOF";
<P><B>Your Handle/Alias:</B> <INPUT NAME=ALIAS TYPE=TEXT
SIZE=30 MAXLENGTH=30> (used to track your bid)
<BR><B>Your E-Mail Address:</B> <INPUT NAME=EMAIL TYPE=TEXT
SIZE=30> (must be valid)
<BR><B>Your Bid:</B> \$<INPUT NAME=BID TYPE=TEXT SIZE=7
VALUE="$lowest_new_bid">
<P><B>Contact Information:</B> (will be given out only to
the seller)<BR>
<TT>Full Name: </TT><BR><INPUT NAME=ADDRESS1 TYPE=TEXT
SIZE=30><BR>
<TT>Street Address: </TT><BR><INPUT NAME=ADDRESS2 TYPE=TEXT
SIZE=30><BR>
<TT>City, State, ZIP: </TT><BR><INPUT NAME=ADDRESS3
TYPE=TEXT SIZE=30><P>
EOF
  }
 }
 print <<"EOF";
<INPUT TYPE=SUBMIT VALUE="Place Bid">
EOF
   }
  }
}




# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org