%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
dim pid, sid, cid, gid, pageheader, display, strSQL, letter
pid = request("pid")
sid = request("sid")
cid = request("cid")
gid = request("gid")
letter = request("letter")
if pid <> "" then
dim rsItem
display = "item"
'display item
'Create recordset to display item
strSQL = "SELECT * FROM qry_items WHERE PID = '" & pid & "'"
set rsItem = server.CreateObject("ADODB.Recordset")
rsItem.Open strSQL, conn, adOpenKeyset, adLockOptimistic
if rsItem.EOF then
display = "Invalid Entry"
end if
pageheader = rsItem("CNAME")
sid = rsItem("SID")
cid = rsItem("CNAME")
gid = rsItem("GID")
elseif sid <> "" AND cid <> "" AND gid <> "" then
display = "scg"
'check for apostrophe and change if necessary
IF InStr(gid, "'") > 0 then
gid = Replace(gid, "'", "''")
End if
'disply section AND category AND group menus
strSQL = "SELECT * FROM qry_items WHERE GID = '" & gid & "'"
set rsItem = server.CreateObject("ADODB.Recordset")
rsItem.Open strSQL, conn, adOpenKeyset, adLockOptimistic
if rsItem.EOF then
display = "Invalid Entry"
else
rsItem.MoveFirst
end if
elseif sid <> "" AND cid <> "" then
display = "sc"
'display section AND category menus
strSQL = "SELECT * FROM qry_groups WHERE CID = '" & cid & "'"
set rsItem = server.CreateObject("ADODB.Recordset")
rsItem.Open strSQL, conn, adOpenKeyset, adLockOptimistic
If letter <> "" then
if rsItem.EOF then
display = "Invalid Entry"
else
if letter = "9" then
letter = "#"
rsItem.Filter = "GID LIKE 0* OR GID LIKE 1* OR GID LIKE 2* OR GID LIKE 3* OR GID LIKE 4* OR GID LIKE 5* OR GID LIKE 6* OR GID LIKE 7* OR GID LIKE 8* OR GID LIKE 9*"
else
rsItem.Filter = "GID LIKE '"& letter & "*'"
end if
if rsItem.EOF then
letter = "No items found that match that letter."
end if
end if
else
letter = "Please select a letter from the above menu."
end if
elseif sid <> "" then
display = "s"
'display section menu
strSQL = "SELECT * FROM qry_categories WHERE SID = '" & sid & "'"
set rsItem = server.CreateObject("ADODB.Recordset")
rsItem.Open strSQL, conn, adOpenKeyset, adLockOptimistic
if rsItem.EOF then
display = "Invalid Entry"
end if
else
display = "menu"
'display menus
end if
%>
MusicMerchandise.com by Stick9 - music stickers, music patches, music magnets and other music merchandise
|
<%if display = "item" then %>
<%
rsItem.close
set rsItem = nothing
elseif display = "scg" then %>
|
<%=sid%> / <%=rsItem("CNAME")%> / <%=gid%> |
<%=rsItem("GID")%> |
<% while not rsItem.EOF %>
">" border="0">
|
|
Item #: <%=rsItem("PID")%> Item Name: <%=rsItem("NAME")%> Description: <%=rsItem("DESCRIPTION")%> Price: $<%=formatnumber(rsItem("PRICE"),2)%> <% if rsItem("SPECIAL_ORDER") = True then %> **Special
Order** May take additional
2 weeks for delivery. <% end if %> |
|
|
<% rsItem.movenext
wend %>
|
CONTACT - - - - FAQ - - - - LINKS |
|
|
|
<%
rsItem.close
set rsItem = nothing
elseif display = "sc" then %>
<%
rsItem.close
set rsItem = nothing
elseif display = "s" then %>
|
<%=sid%> |
<%=sid%> |
<% if not rsItem.EOF then %>
<% end if %>
|
|
CONTACT - - - - FAQ - - - - LINKS |
|
|
|
<%
rsItem.close
set rsItem = nothing
elseif display = "Invalid Entry" then%>
<%end if%>
|
<% conn.close
set conn = nothing %>