%@ LANGUAGE="VBSCRIPT" %>
<% PageStrings = "" %>
<%
'===============================================
' CactuShop ASP Shopping Cart
' ©1999-2004 Cactusoft Ltd. www.cactusoft.com
'===============================================
' All rights reserved.
' Use of this code is covered by the terms and
' conditions in the license agreement. No
' unauthorized duplication or distribution is
' permitted. Cactusoft's copyright notices must
' remain in the ASP sections of the code.
'===============================================
%>
<% =GetString("Config_headtitle") %>
<%
'Load examples.xml into objMainXML
set objMainXML=Server.CreateObject("MSXML2.DOMDocument")
objMainXML.async=False
objMainXML.setProperty "ServerHTTPRequest", true
objMainXML.load("http://www.cactushop.com/xmlnews/cactushopnews.asp?l=" & LICENSENUMBER)
if objMainXML.parseError.errorcode<>0 then
response.Write "Error Occurred : " & objMainXML.parseError & " - " & objMainXML.parseError.Reason
else
Dim objNodeList
Set objNodeList = objMainXML.selectNodes("//CactuShopNews/News")
numNewsItems = objNodeList.Length
%>
| Live CactuShop News |
<%
For i = 0 to numNewsItems - 1
'Put all the values into variables
numNewsID = CInt(objNodeList.Item(i).selectSingleNode("NewsItem/ID").Text)
strNewsType = objNodeList.Item(i).selectSingleNode("NewsItem/Type").Text
strNewsTitle = objNodeList.Item(i).selectSingleNode("NewsItem/Title").Text
strNewsText = objNodeList.Item(i).selectSingleNode("NewsItem/Text").Text
strNewsURL = objNodeList.Item(i).selectSingleNode("NewsItem/URL").Text
datNewsDate = CDate(objNodeList.Item(i).selectSingleNode("NewsItem/Date").Text)
select case strNewsType
Case "c": strImage = "
": strTitleColor = "red"
case "i": strImage = "": strTitleColor = "black"
end select
numBackgroundCounter = numBackgroundCounter + 1
If numBackgroundCounter mod 2 = 0 then strBgColour="#EEEEEE" else strBgColour="#DDDDDD"
%>
| <%= strNewsTitle %> |
<% if strImage <> "" then response.Write strImage %><%= Replace(strNewsText,"xxxBREAKxxx"," ") %> |
<% if strNewsURL <> "" then %>
Click here for more information
|
<% end if %>
| |
<%
Next
%>
| Close |
<%
end if
%>