%
'## --------------------------------------------------------------------------------------------------
'## Get the Product Sub Categories
'## --------------------------------------------------------------------------------------------------
strXMLSend = "" & _
"" & _
" " & _
" "& SafeKey &"" & _
" " & _
" " & _
" all " & _
" " & _
" " & _
" " & _
""
Set xmldoc = Server.CreateObject("Msxml2.DOMDocument.4.0") '## Create XML Object
Loaded = xmldoc.loadXML(GetXMLHttp(strPostXML, strXMLSend)) '## Load requested Data
'Response.Write("")
'Response.Write("")
'Response.End
If Loaded Then '## Check for xml is loaded in DOM
'## --------------------------------------------------------------------------------------------------
'## Check if an error returned
If xmlDoc.documentElement.selectNodes("//SafeShopError").length > 0 Then
If InStr(xmlDoc.documentElement.selectSingleNode("SafeShopError").Text, "}") <> "" Then
If InStr(LCase(xmlDoc.documentElement.selectSingleNode("SafeShopError").Text), "maintenance mode") Then
Response.Redirect("https://secure.safeshop.co.za/Maintenance.asp")
Response.End
End If
Response.Redirect("https://secure.safeshop.co.za/Error.asp?Error="& xmlDoc.documentElement.selectSingleNode("SafeShopError").Text)
Response.End
End If
End If
'## --------------------------------------------------------------------------------------------------
'## Get the Category name
If xmlDoc.documentElement.selectNodes("//CategoryName").length > 0 Then
If InStr(1, xmlDoc.documentElement.selectSingleNode("//CategoryName").Text) <> "" Then
CategoryName = xmlDoc.documentElement.selectSingleNode("//CategoryName").Text
End If
End If
'Response.Write "CategoryName: " & CategoryName
'Response.End
Set root = xmlDoc.documentElement
If root.childNodes.length = 0 Or xmlDoc.documentElement.selectNodes("//CategoryID").length = 0 Then
'Response.Write "No Product(s) Found"
Else
If root.childNodes.length-1 > 0 Then
Response.Write("
")
For iCnt = 0 To (root.childNodes.length-1)
If Request("CatID") <> "" Then
If Trim(root.childNodes.Item(iCnt).childNodes.Item(3).Text) = Request("CatID") Then
If Trim(root.childNodes.Item(iCnt).childNodes.Item(0).Text) = Request("SubCatID") Then
%>
&SubCatID=<%=Trim(root.childNodes.Item(iCnt).childNodes.Item(0).Text)%>&page=" style="text-decoration: none;"><%=root.childNodes.Item(iCnt).childNodes.Item(1).Text%>
<%
Else
%>
&SubCatID=<%=Trim(root.childNodes.Item(iCnt).childNodes.Item(0).Text)%>&page=" style="text-decoration: none;"><%=root.childNodes.Item(iCnt).childNodes.Item(1).Text%>
<%
End If
If (iCnt-1) < (root.childNodes.length-1) Then
Response.Write("|")
End If
End If
End If
Next
Response.Write ""
End If
End If
Else
End If
Set root = Nothing
Set xmldoc = Nothing
%>