<% SQL = "SELECT p.product_id, p.category, p.name, p.requires, p.price, p.software_head, p.software_body, p.compat_daz, p.compat_mac, p.description, p.filename, p.filesize, p.flashbanner_path, COALESCE(c.quantity,0) cart_count FROM product p LEFT OUTER JOIN cart c ON p.product_id=c.product_id and c.username='" & SqlEsc(Session("username")) & "' WHERE p.product_id='" & SqlEsc(Request.Querystring("product_id")) & "'" Set RS = Conn.Execute(SQL) If RS.EOF Then Response.redirect("/") else Call LogIt("show_product_detail.asp", Request.Querystring("product_id"), "", "", "", "", "", "") Dim product_id, empty_cell product_id = rs("product_id") empty_cell = "" %>
<% =RS("name") %>
Banner"> "> " quality=high bgcolor=#FFFFFF WIDTH="520" HEIGHT="200" NAME="<% =RS("name") %> Banner" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">

Requires: <% =RS("requires") %> Price: $<% =FormatNumber(RS("price"),2) %>
<% =RS("software_head") %>: <% =RS("software_body") %>
D|S Compatible: <% =RS("compat_daz") %> MAC Compatible: <% =RS("compat_mac") %>
File Size: <% =RS("filesize") %> <% If rs("price") > 0 Then %> <% If RS("cart_count") = 0 Then %> ">add to cart <% Else %> already in cart <% End If %> <% Else %> ">Add to cart <% End If %>
Product description:
<% =Replace(rs("description"),Chr(13),"
") %>
<% ' ********************************************************** ' ** Related products ' ********************************************************** SQL = "SELECT DISTINCT p2.product_id, p.related_thumbnail_path, p.name, p.short_description FROM product_relation p1, product_relation p2, product p WHERE p1.category=p2.category AND p2.product_id <> p1.product_id AND p2.product_id = p.product_id AND p1.product_id = '" & product_id & "' AND p.status = 'STORE' ORDER BY p.sortorder desc" Set RS = Conn.Execute(SQL) If NOT RS.EOF Then %>
Related products: <% Do while not RS.EOF Response.write("") Response.write( "" & vbcrlf) RS.moveNext If Not RS.EOF Then Response.write( "" & vbcrlf) RS.moveNext Else Response.write(empty_cell) End If If Not RS.EOF Then Response.write( "" & vbcrlf) RS.moveNext Else Response.write(empty_cell) End If If Not RS.EOF Then Response.write( "" & vbcrlf) RS.moveNext Else Response.write(empty_cell) End If Response.write("") Loop Response.write("
") End If %>

Readme

<% ' ********************************************************** ' ** Promo pictures ' ********************************************************** SQL = "SELECT thumb_path, pic_path from product_promo_picture WHERE product_id='" & SqlEsc(Request.Querystring("product_id")) & "' order by picture_number;" Set RS = Conn.Execute(SQL) If NOT RS.EOF Then %>
" ID="mainpic" alt="" height="450" width="520" border="0">

<% Do while not RS.EOF Response.write("") Response.write( "" & vbcrlf) RS.moveNext If Not RS.EOF Then Response.write( "" & vbcrlf) RS.moveNext Else Response.write(empty_cell) End If If Not RS.EOF Then Response.write( "" & vbcrlf) RS.moveNext Else Response.write(empty_cell) End If If Not RS.EOF Then Response.write( "" & vbcrlf) RS.moveNext Else Response.write(empty_cell) End If Response.write("") Loop %>


<% End If %>
<% End If %>