PERL:



              

PERL: - . 668


return unless $active

print h1( Order Confirmation ),

print p( You ordered the following ),

print order_text(),

print p( Is this right? Select Card to pay for the items

or Shirt or Sweater to continue shopping ), print p(to_page( Card ),

to_page( Shirt ),

to_page( Sweater )),

# sub credit_card {

my $active = shift,

my @widgets = qw(Name Addressi Address2 City Zip State Phone Card Expiry)

unless ($active) {

print map < hidden($_) } @widgets, return,


print pre(p( Name

p( Address

P(

P( City

P( Zip

p( State

p( Phone

p( Credit Card #

P( Expiry


, textfield( Name )),

textfield( Addressi )),

textfield( Address2 ))

textfield( City )),

textfield( Zip )),

textfield( State )),

textfield( Phone ))

textfield( Card )),

textfield( Expiry ))),



print p( Click on Order to return shopping ),


to order the items Click on Cancel



print p(to_page( Order ), to_page( Cancel )),



702 19 CGI 19.9 ()

# , sub order {

my $active = shift;

unless (Sactive) { return;

print h1("Ordered!");

print p('You have ordered the following toppings ');

print order_text(),

print p(defaults("Begin Again"));

# HTML- (" . ") sub order_text { my $html = '';

if (param("shirt_count")) {

$html .= p("You have ordered ', param("shirt_count"), " shirts of size ", param("shirt_size"), " and color ", param("shirt_color"), ".");

}

if (param("sweater_counf )) {

$html = p('You have ordered ', param('sweater_count'), ' sweaters of size ", param("sweater_size'), and color ', param("sweater_color'), '.");

}

$html = p('Nothing! ') unless $html;

$html = p("For a total cost of ', calculate_price());