<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> [an error occurred while processing this directive] <% 'This is the creation of the shopping cart 'We begin with some constants CONST CART_COLUMNS = 4 'This is the number of column in our cart array CONST CART_ROWS = 3 'This is the default number of rows in our cart array CONST ITEMID = 1 'This is the first column in the cart array CONST ITEMNAME = 2 'This is the second column in the cart array CONST ITEMPRICE = 3 'This is the third column in the cart array CONST ITEMQUANTITY = 4 'This is the last column in the cart array Dim cartMaxUsed 'Create the shopp-ing cart Dim cartArray() 'The array is empty and has no size ReDim cartArray(CART_COLUMNS, CART_ROWS) 'Only the second demension can change after creation, this order lets us expand the rows later rowsUsed = 0 'The number of rows currently used Session("cartArray") = cartArray Session("cartRows") = CART_ROWS Session("rowsUsed") = rowsUsed 'stores the cart to the sesion so it isn't lost when the user changes pages %> <% Dim idSession idSession = session.SessionID Dim firstName Dim lastName 'firstName = "Kent" 'lastName = "Rice" 'This sets a cookie to the client response.Cookies("acmeClient") = firstName & " " & lastName response.Cookies("acmeClient").expires = date + 366.25 'This gets a cookie and uses it Dim cookieValue cookieValue = request.Cookies("acmeClient") if cookieValue <> " " then Dim greeting greeting = " back " &cookieValue end if %> Acme - Session Id: <%= idSession%>
<% Dim rsCatList Dim rsCatList_cmd Dim rsCatList_numRows Set rsCatList_cmd = Server.CreateObject ("ADODB.Command") rsCatList_cmd.ActiveConnection = MM_conacme_STRING rsCatList_cmd.CommandText = "SELECT * FROM acmedemo.categories ORDER BY category ASC" rsCatList_cmd.Prepared = true Set rsCatList = rsCatList_cmd.Execute rsCatList_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rsCatList_numRows = rsCatList_numRows + Repeat1__numRows %> Dynamite
<% rsCatList.Close() Set rsCatList = Nothing %>

ACME Inc.Home Page

Welcome<%= greeting %> to the ACME web site.

Strategy of the month!

 

Recipe of the month!

 

All images used are believed to be covered by 'Fair Use'. If you believe this to be false please contact the owner and they will be removed. This site was created by Kent Rice for Wed Development 235, all materials on it are copyrightyed ©. It was last updated March 24, 2008 11:16 AM