#!/usr/bin/perl -wT
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use lib '.';
use Shopcart;
use strict;

print header;
print start_html("Kite Catalog");

print h2("Kite Catalog");

my $sth = $dbh->prepare(qq(select stocknum,name,price from items where status != "OUT" order by stocknum)) or &dbdie; 

$sth->execute or &dbdie;

while (my($stocknum,$name,$price) = $sth->fetchrow_array) {
   print qq(<b>$name</b> - \$$price<br>\n);
   print qq(<a href="addcart.cgi?$stocknum">Add to Cart</a><br><br>\n);
}

print end_html;