%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
'---> Get Blog Categories for the Client
Set catEntries = CreateObject("Microsoft.XMLHTTP")
catEntries.open "POST", "http://www.mywebdept.com/myblog/WS_MyBlog_CategoryEntries.asp?ClientID=LNO&ID=43", False
catEntries.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
catEntries.send
ResponseXML = catEntries.responseText
Set catEntries = Nothing
'Response.Write(ResponseXML)
'--- Check for failures
If Instr(ResponseXML, "Success") <> 0 then
'---> Now load the XML response into the DOM
Set EntryListXML = Server.CreateObject("Microsoft.XMLDOM")
EntryListXML.async = "false"
EntryListXML.loadXML(ResponseXML)
'---> Now find out how many Categories you have
Set EntryCount = EntryListXML.getElementsByTagName("entry")
'--- numAssets is going to be you variable for the number of assets in the XML
numEntries = (EntryCount.length)
Set EntryCount = nothing
end if
%>
<%
' Session info for entry ID
If Request("EntryID") <> "" then
Session("currentEntry") = Request("EntryID")
end if
If Session("currentEntry") = "" then Session("currentEntry") = EntryListXML.getElementsByTagName("entries/entry/@ID").item(0).text
%>
<%
'---> Get Blog Categories for the Client
Set entryDetails = CreateObject("Microsoft.XMLHTTP")
entryDetails.open "POST", "http://www.mywebdept.com/myblog/WS_MyBlog_EntryDetails.asp?ID=" & Session("currentEntry") & "&ClientID=LNO", False
entryDetails.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
entryDetails.send
EntryResponseXML = entryDetails.responseText
'Response.Write(EntryResponseXML)
Set entryDetails = Nothing
'--- Check for failures
If Instr(EntryResponseXML, "Success") <> 0 then
'---> Now load the XML response into the DOM
Set EntryXML = Server.CreateObject("Microsoft.XMLDOM")
EntryXML.async = "false"
EntryXML.loadXML(EntryResponseXML)
'---> Now find out how many Categories you have
Set CommentCount = EntryXML.getElementsByTagName("commentInfo")
'--- numAssets is going to be you variable for the number of assets in the XML
numComments = (CommentCount.length)
Set CommentCount = nothing
end if
CategoryName = EntryXML.getElementsByTagName("entryInfo/fld_CategoryName").item(0).text
EntryTitle = EntryXML.getElementsByTagName("entryInfo/fld_EntryTitle").item(0).text
EntryDate = EntryXML.getElementsByTagName("entryInfo/fld_EntryDate").item(0).text
EntryAuthor = EntryXML.getElementsByTagName("entryInfo/fld_EntryAuthor").item(0).text
Entry = EntryXML.getElementsByTagName("entryInfo/fld_Entry").item(0).text
AllowComments = EntryXML.getElementsByTagName("entryInfo/fld_AllowComments").item(0).text
%>
LINC New Orleans
Our Blog
<%=EntryTitle%>
<%=EntryDate%> - <%=EntryAuthor%> <%=Entry%>
<% If AllowComments = "Yes" then %>
Comments
<%
For i = 0 to numComments-1
fld_CommentDate = EntryXML.getElementsByTagName("comments/commentInfo[" & i & "]/fld_CommentDate").item(0).text
fld_CommentAuthor = EntryXML.getElementsByTagName("comments/commentInfo[" & i & "]/fld_CommentAuthor").item(0).text
fld_Comments = EntryXML.getElementsByTagName("comments/commentInfo[" & i & "]/fld_Comments").item(0).text
CommentID = EntryXML.getElementsByTagName("comments/commentInfo[" & i & "]/ID").item(0).text
%>