<% dim onPage onPage = "shop" %>   Welcome to Valhalla's Game Center
<%'======Separator==========%> <%'======Content Section==========%>
HOME
<%'======Left Section=============%> " & GetTab(iLevel) & "" & vbcr If trim(parentID) <> 0 then If Trim(parentID) = Trim(rsC("dept_id").Value) Then Call SubDeptTree(Trim(rsC("dept_id").Value), iLevel + 1) Else If trim(parentID) = trim(iParent) then Call SubDeptTree(Trim(rsC("dept_id").Value), iLevel + 1) Elseif trim(deptID) <> "" then strsql = "Select cdp.parent_id from catalog_dept cdp where cdp.dept_id = " & trim(parentID) set rsG = conn.execute(strsql) if not rsg.eof then if trim(rsg("parent_id").value) = Trim(rsC("dept_id").Value) then Call SubDeptTree(Trim(rsC("dept_id").Value), iLevel + 1) end if end if End If End If End If rsC.MoveNext Loop Set rsC = Nothing End Sub Sub SubDeptTree(iParent,iLevel) strSQL = "SELECT cd.dept_id, cd.dept_name FROM catalog_dept cd WHERE cd.parent_id = " & iParent & " AND cd.active_flag = 1 ORDER BY cd.dept_name" Set rsS = conn.execute(strsql) Do Until rsS.EOF If Trim(DeptID) = Trim(rsS("dept_id")) Then sSelected = GetTab(iLevel-1) & "" & vbcr Else sSelected = GetTab(iLevel) End If Response.Write "" & sSelected & "" & vbcr If Trim(DeptID) = Trim(rss("dept_id").Value) Then Call SubDeptTree(Trim(rss("dept_id").Value), iLevel + 1) ElseIf Trim(ParentID) = Trim(rss("dept_id").Value) Then Call SubDeptTree(Trim(ParentID), iLevel + 1) End If rsS.MoveNext Loop set rsS = Nothing End Sub Function GetTab(iNum) Dim i, s For i = 0 To iNum if i = iNum then s = s & "" & vbcr else s = s & "" & vbcr end if Next GetTab = s End Function %>

<% Dim parentID Dim deptID Dim sCatPath Dim aIds Dim rsCatPath parentID = Trim(Request("pid")) deptID = Trim(Request("did")) If parentID = "" Then parentID = 0 End If If Not IsNumeric(parentID) Then parentID = 0 End If Sub DeptTree(iParent, iLevel) Dim sSelected Dim rsC Dim rsS Dim rsG strSQL = "SELECT d.dept_id, d.dept_name, d.parent_id FROM catalog_dept d WHERE d.parent_id = " & iParent & " AND d.active_flag = 1" Set rsC = conn.execute(strsql) Do Until rsC.EOF Response.Write "
" & _ "" & replace(rsC("dept_Name").Value,"''","'") & "
·
" & _ "" & replace(rsS("dept_Name").Value,"''","'") & "
· 
<%call DeptTree(0,0)%>
· PreOrder


my account | shopping bag | order status | help    


<% if request("did") = "" then strsql = "SELECT dept_name as 'deptname' from catalog_dept where dept_id = " & request("pid") else strsql = "SELECT (select d.dept_name from catalog_dept d where dept_id = " & request("pid") & ") + ': ' + dept_name as 'deptname' from catalog_dept where dept_id = " & request("did") end if set rsDeptPath = conn.execute(strsql) %>

  <%=rsDeptPath("deptname")%>

<%set rsDeptPath = nothing strsql = "SELECT cp.pf_id, cp.prod_name, cp.sku, cp.prod_desc, cp.on_hand_qty, cp.list_price, cp.new_flag, cp.active_flag " &_ "FROM catalog_product cp " &_ "WHERE cp.pf_id = " & request("pfid") set rsNew = conn.execute(strsql) %> <%if not rsNew.EOF then do until rsNew.EOF Response.Write " " & vbcr Response.Write " " & vbcr Response.Write " " & vbcr Response.Write "" & vbcr rsNew.movenext loop rsNew.close end if%>
" & vbcr Response.Write "

" & replace(rsNew("prod_name"),"''","'") & "
" & vbcr Response.Write " SKU: " & rsNew("sku") & "
" & vbcr Response.Write " Price: $" & cCur(rsNew("list_price"))/100 & "
" & vbcr if trim(rsNew("active_flag")) = "False" then if trim(rsNew("new_flag")) <> "False" then Response.Write "
Not yet Released
[Preorder Now!]" end if else if cint(rsNew("on_hand_qty")) = 0 then Response.Write "
Out of Stock" else Response.Write "
In Stock" end if end if Response.Write "

" & vbcr Response.Write "

" & replace(rsNew("prod_desc"),"''","'") & "

" Response.Write "
" & vbcr Response.Write " " & vbcr Response.Write "
<%'Footer Section %>
  ©2010  Valhalla's Game Center LLC. All rights reserved.  
<% set rsNew = nothing set conn = nothing Response.end %>