View Single Post
  #3 (permalink)  
Old December 6th, 2009, 09:02 AM
adamhw adamhw is offline
Authorized User
Points: 405, Level: 7
Points: 405, Level: 7 Points: 405, Level: 7 Points: 405, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 85
Thanks: 16
Thanked 0 Times in 0 Posts
Default code for the page

Hi Imar

thanks for the speedy reply - I've pasted my code below that I want to appear as xml...

<%

strSQL = "SELECT id, name, email, blogimage, " & _
"threadid, thread, dateadded, detail " & _
"FROM tbl_comments " & _
"WHERE Approved = 1 ORDER BY dateadded DESC"

'response.Write(strSQL)


set rsFeedback = con.execute(strSQL)


if rsFeedback.EOF then

else

do while not rsFeedback.EOF



intid = rsFeedback("id")
strname = rsFeedback("name")
stremail = rsFeedback("email")
strblogimage = rsFeedback("blogimage")
intthreadid = rsFeedback("threadid")
intthread = rsFeedback("thread")
strdateadded = rsFeedback("dateadded")
strfeedback = rsFeedback("detail")
strfeedbacksml = rsFeedback("detail")
'strfeedbacksml = LEFT(CAST(rsFeedback("detail") as varchar(100)), 100)





if IsNull (intthreadid) or (intthreadid) = empty then


if isNull (strblogimage) or (strblogimage) = empty then

else

%>

<a href="<%=Application("Root_Path")%>images/blog/lrg_<%=strblogimage%>" rel="lightbox" title="<%=formatdatetime(strdateadded,2)%>"> <img src="<%=Application("Root_Path")%>images/blog/sml_<%=strblogimage%>" border="0" alt="Click to Enlarge" align="right" hspace="3" vspace="3"></a>
<%

end if

%>

<span class="spanb"><%=(replace(strFeedback, vbcrlf, "<br>"))%> <span class="spanb"><span class="bold">Posted by <span class="capitalize"><%=server.HTMLEncode(strname)%> </span></span>, [<%=formatdatetime(strdateadded, 2)%>]


<%


strSQL = "SELECT COUNT( * ) AS 'replies' FROM tbl_comments tbl_comments INNER JOIN tbl_comments tbl_comments2 ON " & _
"tbl_comments.threadid = tbl_comments2.id WHERE tbl_comments.approved = 1 AND tbl_comments.threadid = '" & intid & "'"

'response.Write(strSQL)


set rsThread = con.execute(strSQL)

intreplies = rsThread("replies")


%>

- <%=intreplies%> replies to this post - <a href="comment_ind.asp?thread=<%=intid%>">follow</a>

<%


set rsThread = nothing



rsFeedback.movenext()

loop

end if



set rsFeedback = nothing

%>


thanks

Adam
Reply With Quote