<% Option Explicit %> <%response.Buffer=true%> <% Dim section : section = "items" Dim subsection : subsection = "" Dim objDAL : Set objDAL = new dataAccessObject Dim intErrNum Dim strErrDesc Dim intCatId : intCatId = Request("catId") Dim strTableCell : strTableCell = "leftCell" Dim strSegment Dim rsItemsInCategory Dim intSubcatInCat Dim rsSubcatInCat Dim rsCatName Dim antName %> Rumi Galleries
<% 'On Error Resume Next Set rsCatName = objDAL.GetCategoryName(intCatId) intErrNum = Err.Number strErrDesc = Err.Description 'On Error Goto 0 If intErrNum <> 0 Then objFunctions.HandleErrorEx intErrNum, strErrDesc, "DataAccessLayer.GetCategoryName", true End If strSegment = rsCatName("Segment") If NOT (rsCatName.BOF AND rsCatName.EOF) Then %> <% rsCatName.Close Set rsCatName = Nothing Call objDAL.CloseDBConnection () 'On Error Resume Next Set rsSubcatInCat = objDAL.GetSubcategoriesWithItems(intCatId) intErrNum = Err.Number strErrDesc = Err.Description 'On Error Goto 0 If intErrNum <> 0 Then objFunctions.HandleErrorEx intErrNum, strErrDesc, "DataAccessLayer.GetSubcategoriesWithItems", true End If 'category has subcategories If NOT (rsSubcatInCat.BOF AND rsSubcatInCat.EOF) Then %> <% Do Until rsSubcatInCat.EOF %> <% intSubcatInCat = rsSubcatInCat("CatId") 'On Error Resume Next Set rsItemsInCategory = objDAL.GetItemInfoByCategory(intSubcatInCat) intErrNum = Err.Number strErrDesc = Err.Description 'On Error Goto 0 If intErrNum <> 0 Then objFunctions.HandleErrorEx intErrNum, strErrDesc, "DataAccessLayer.GetItemInfoByCategory", true End If Do Until rsItemsInCategory.EOF %> <% rsItemsInCategory.MoveNext Loop %> <% rsSubcatInCat.MoveNext Loop rsItemsInCategory.Close Set rsItemsInCategory = Nothing rsSubcatInCat.Close Set rsSubcatInCat = Nothing Call objDAL.CloseDBConnection () %> <% 'category does not have subcategories Else 'On Error Resume Next Set rsItemsInCategory = objDAL.GetItemInfoByCategory(intCatId) intErrNum = Err.Number strErrDesc = Err.Description 'On Error Goto 0 If intErrNum <> 0 Then objFunctions.HandleErrorEx intErrNum, strErrDesc, "DataAccessLayer.GetItemInfoByCategory", true End If %> <% If (rsItemsInCategory.BOF AND rsItemsInCategory.EOF) Then 'Do Until rsItemsInCategory.EOF %> <% Else Do Until rsItemsInCategory.EOF %> <% rsItemsInCategory.MoveNext Loop End If rsItemsInCategory.Close Set rsItemsInCategory = Nothing Call objDAL.CloseDBConnection () %> <% End If Else Response.Redirect "error.asp?Msg=" & Server.UrlEncode(" get cat Error") End If %>
<% If strSegment = "Antiques" Then %><% Elseif strSegment = "Fineart" Then %><% End If %>
<%= rsCatName("CatName") %>
<% Dim arrResultSet, iTotalRecords, iCounter, iNumRows, iModNumRows, iNumCol1, iNumCol2, iNumCol3 If Not rsSubcatInCat.EOF Then ' Gets all the records arrResultSet = rsSubcatInCat.GetRows() End If ' Retrieve the total # of rows iTotalRecords = ubound(arrResultSet,2) + 1 iModNumRows = iTotalRecords mod 3 If iModNumRows > 1 Then iNumRows = int(iTotalRecords / 3) + 1 Else iNumRows = int(iTotalRecords / 3) End If iNumCol1 = iNumRows - 1 iNumCol2 = iNumRows*2 - 1 iNumCol3 = ubound(arrResultSet,2) 'response.write "iTotalRecords: " & iTotalRecords & "
" 'response.write "iNumRows: " & iNumRows & "
" 'response.write "iModNumRows: " & iModNumRows & "
" 'response.write "iNumCol1: " & iNumCol1 & "
" 'response.write "iNumCol2: " & iNumCol2 & "
" 'response.write "iNumCol3: " & iNumCol3 & "

" %>
<% ' Loop through the array holding the result set and display the data For iCounter= 0 to iNumCol1 %> <% Next %>
<%=arrResultSet(1,iCounter)%>
<% ' Loop through the array holding the result set and display the data For iCounter = iCounter to iNumCol2 %> <% Next %>
<%=arrResultSet(1,iCounter)%>
<% ' Loop through the array holding the result set and display the data For iCounter = iCounter to iNumCol3 %> <% Next rsSubcatInCat.MoveFirst%>
<%=arrResultSet(1,iCounter)%>
 
">
<% If strSegment = "Antiques" Then %><%= rsSubcatInCat("CatName") %><% Elseif strSegment = "Fineart" Then %><%= rsSubcatInCat("ArtistFname") %> <%= rsSubcatInCat("ArtistLname") %> <%= rsSubcatInCat("BirthDesignation") %><% End If %>
 
">
&catId=<%= intCatId %>&subcatId=<%= intSubcatInCat %>">" width="280" hspace="0" vspace="0" border="0">
<% antName = Replace(rsItemsInCategory("ItemName"), chr(10), "
") If InStr(antName, ";") <> 0 Then antName = Replace(antName, ";", "") End If 'If InStr(antName, ",") <> 0 Then 'antName = Replace(antName, ",", "") 'End If If (Left(StrReverse(antName), 1) = ",") Then antName = Left(antName,Len(antName)-1) End If %>

<%= antName %>

<% If rsItemsInCategory("Sold") = 1 Then %>

SOLD

<% End If %>

# <%= rsItemsInCategory("StockNo") %>

&catId=<%= intCatId %>&subcatId=<%= intSubcatInCat %>" class="globalLink">More Details
Contact Us
Back to <% If strSegment = "Antiques" Then %>Antiques<% Elseif strSegment = "Fineart" Then %>Fine Art<% End If %>

Back to top 
 
 

No items currently available. Please check back later or contact us for inquiries.

">
&catId=<%= intCatId %>">" width="280" hspace="0" vspace="0" border="0">
<% antName = Replace(rsItemsInCategory("ItemName"), chr(10), "
") If InStr(antName, ";") <> 0 Then antName = Replace(antName, ";", "") End If If InStr(antName, ",") <> 0 Then antName = Replace(antName, ",", "") End If %>

<%= antName %>

<%'= rsItemsInCategory("Description") %> <%'= rsItemsInCategory("Dimensions") %> <% If rsItemsInCategory("Sold") = 1 Then %>

SOLD

<% End If %>

# <%= rsItemsInCategory("StockNo") %>

&catId=<%= intCatId %>&subcatId=<%= intSubcatInCat %>" class="globalLink">More Details
Contact Us
Back to <% If strSegment = "Antiques" Then %>Antiques<% Elseif strSegment = "Fineart" Then %>Fine Art<% End If %>

Back to top