<% 'This file is part of ProductCart, an ecommerce application developed and sold by Early Impact LLC. ProductCart, its source code, the ProductCart name and logo are property of Early Impact, LLC. Copyright 2001-2003. All rights reserved. You are not allowed to use, alter, distribute and/or resell any parts of ProductCart's source code without the written consent of Early Impact. To contact Early Impact, please visit www.earlyimpact.com. %> <% response.Buffer=true %> <% If scStoreOff="1" then response.redirect "msg.asp?message=84" End If if session("idcustomer")="" then session("idPCStore")= scID session("idCustomer")=Cint(0) session("idAffiliate")=Cint(1) session("language")=Cstr("english") session("pcCartIndex")=Cint(0) dim pcCartArray(100,35) session("pcCartSession")=pcCartArray end if if session("idPCStore")<>scID then session.Abandon() session("idPCStore")= scID session("idCustomer")=Cint(0) session("idAffiliate")=Cint(1) session("language")=Cstr("english") session("pcCartIndex")=Cint(0) redim pcCartArray(100,35) session("pcCartSession")=pcCartArray end if ' set affiliate if request.querystring("idAffiliate")<>"" and isNumeric(request.querystring("idAffiliate"))then session("idAffiliate")= request.querystring("idAffiliate") end if dim mySQL, conntemp, rstemp, pIdCategory, pCategoryDesc scCatTotal=(scCatRow*scCatRowsPerPage) iPageSize=scCatTotal If Request("page")="" Then iPageCurrent=1 Else iPageCurrent=CInt(Request("page")) End If call openDb() If Session("customerType")=1 Then pcv_strTemp="" else pcv_strTemp=" AND pccats_RetailHide<>1 " end if mySQL="SELECT idCategory,categoryDesc,[image],idParentCategory,SDesc,HideDesc FROM categories WHERE idParentCategory=1 AND idCategory<>1 AND iBTOhide=0 " & pcv_strTemp & " ORDER BY priority, categoryDesc ASC;" set rsTemp=server.CreateObject("ADODB.Recordset") rsTemp.PageSize=iPageSize rsTemp.CacheSize=iPageSize rsTemp.Open mySQL, conntemp, adOpenStatic, adLockReadOnly, adCmdText dim iPageCount iPageCount=rsTemp.PageCount If iPageCurrent > iPageCount Then iPageCurrent=iPageCount If iPageCurrent < 1 Then iPageCurrent=1 If iPageCount=0 Then ' no categories defined in the store call closeDb() response.redirect "msg.asp?message=85" Else rsTemp.AbsolutePage=iPageCurrent %>
<% 'If category images are shown use this table if sccatImages=1 then %> <% 'otherwise, use this table instead else %>
<% end if %> <% i=0 iRecordsShown=0 Do While iRecordsShown < iPageSize And NOT rsTemp.EOF pidCategory=rstemp("idCategory") pCategoryDesc=rstemp("categoryDesc") pImage=rstemp("image") CATSDesc=rstemp("SDesc") CATHideDesc=rstemp("HideDesc") If pImage="" Then pImage="no_image.gif" End if pidParentCategory=rstemp("idParentCategory") %> <% i=i + 1 If i > (scCatRow-1) then response.write "" i=0 End If iRecordsShown=iRecordsShown + 1 rsTemp.movenext loop %>
<%response.write dictLanguage.Item(Session("language")&"_viewCat_P_2")%>
<% '==================inner table====================== %> <% ' If the store is using category images if sccatImages=1 then ' If the store is displaying 1 category per row if scCatRow=1 then response.write "" else response.write "
" end if else response.write "
" end if %> <% if sccatImages=1 then ' if the store is using category images if scCatRow=1 then 'if 1 category per row, show short category description %> <%else 'otherwise don't show the category description %> <% end if else ' The store is not using category images if scCatRow=1 then 'if 1 category per row, show short category description %> <% else ' Otherwise hide the short category description %> <% end if end if %>
<%=pCategoryDesc%>

<%response.write pCategoryDesc%>
<%if CATSDesc<>"" and CATHideDesc<>1 then%><%=CATSDesc%><%else%> <%end if%>

<%=pCategoryDesc%>
<%response.write pCategoryDesc%> <%response.write pCategoryDesc%> <%if CATSDesc<>"" and CATHideDesc<>1 then%>
<%=CATSDesc%><%end if%>
<%response.write pCategoryDesc%>
<% '==================inner table END===========%> <% if sccatImages=1 then %> <% end if %>
<% End If %>

<% If iPageCount>1 then %> <% if sccatImages=1 then response.write "" else %>
<% end if %>
<% If iPageCurrent > 1 Then %>
" border="0"> <% End If For I=1 To iPageCount If I=iPageCurrent Then %> <%= I %> <% Else %> <%=I%> <% End If Next If iPageCurrent < iPageCount Then %> " border="0"> <% End If %>
<% end if %> <% call closeDb() call clearLanguage() %>