Глава 28. Пакет LiveWire Pro 699

<HTML><HEAD>

<TITLE>Selling Copies</TITLE>

<META NAME= "GENERATOR"content= "Mozilla/2.OlGold (Win32)"></HEAD><BODY><SERVER>

curso =database.cursor("SELECT title, isbn, retailPrice, publishers.name, quantityOnHand FROM books, publishers WHERE isbn="+ request.isbn + "AND publishers.ID= books.publisherID");

if (cursor.next()){ '

if cursor.quantityOnHand >request.quantity)(

write ("<FORM ACTION=sold.htiti METHOD=GET>");

write ("<P>Confirm sale of <STRONG>"+ request.copies + </STRONG>of<BR>"+ cursor.title + "<BR>ISBN "+ cursor.isbn + "<BR>Retail Price "+ cursor.retailPrice + "<BR>Publisher "+ cursor.name</P>");

write ("INPUT TYPE=submit NAME=submit VALUE=Yes>");

write ("INPUT TYPE=button NAME=home VALUE=No onClick='redirect("home.htm");'>");

write ("INPUT TYPE=hidden NAME=isbn VALUE="+ request.isbn ">");

write ("INPUT TYPE=hidden NAME=quantity VALUE="+ request.quantity + ">");

write ("</FORM>");

}else

write ("<P>There are only "+ cursor.quantityOnHand + "copies on hand.</P>");

write ("<P>ISBN "+ request.isbn + "not on file.</P>");

</BODY></HTML>