<%Option Explicit%> <% Function ViewProduct(sProdID) Dim oCon, oRS, oRS2 Dim sRes, sLink, bHasImage Set oCon = GetConnection() Set oRS = Query(oCon, "SELECT id, name, description, price FROM tblProducts WHERE id = '" & sProdID & "'") If Not oRS.EOF Then Set oRS2 = Query(oCon, "SELECT DATALENGTH(pic) AS test FROM tblProducts WHERE id = '" & sProdID & "'") bHasImage = Not IsNull(oRS2("test")) Call oRS2.Close sRes = "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "" & _ "
" & oRS("name") & "
" Else sRes = sRes & " width=10> " End If sRes = sRes & "" & oRS("description") & "
 
$" & Int(oRS("price") / 100) & "." & Right(oRS("price"), 2) & "
" & vbNewLine End If Call oRS.Close Call oCon.Close Set oRS = Nothing Set oCon = Nothing ViewProduct = sRes End Function Function ViewAllGroups() Dim sRes, oCon, oRS Set oCon = GetConnection() Set oRS = Query(oCon, "SELECT * FROM tblProductGroups WHERE NOT parent_id = '' AND NOT name = 'Membership' ORDER BY name") While Not oRS.EOF If Not IsEmpty(sRes) Then sRes = sRes & " | " sRes = sRes & "" & oRS("name") & "" Call oRS.MoveNext Wend Call oRS.Close Call oCon.Close ViewAllGroups = sRes End Function %>




<%=ViewProduct(Replace(Request.QueryString("id"), "'", "''"))%>
<%=ViewAllGroups()%>