最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 生成feed文件代码
时间:2022-07-02 22:42:13 编辑:袖梨 来源:一聚教程网
<%
function AddSiteURL(ByVal Str)
If IsNull(Str) Then
AddSiteURL = ""
Exit Function
End If
Dim re
Set re=new RegExp
With re
.IgnoreCase =True
.Global=True
.Pattern="
str = .replace(str,"
.Pattern="
str = .replace(str,"
End With
Set re=Nothing
AddSiteURL=Str
End Function
'==================================
' Feed日志订阅
' 更新时间: 2005-11-19
'==================================
'读取Blog设置信息
getInfo(1)
'写入关键字列表
Keywords(1)
'写入表情符号
Smilies(1)
Response.Charset = "UTF-8"
Response.ContentType="text/xml"
Response.Expires=60
Response.Write("")
Dim cate_ID,FeedCate,FeedTitle,memName,FeedRows
cate_ID=CheckStr(Request.QueryString("cateID"))
FeedCate=False
FeedTitle=UnCheckStr(SiteName)
IF IsInteger(cate_ID) = False Then
SQL="SELECT TOP 10 L.log_ID,L.log_Title,l.log_Author,L.log_PostTime,L.log_Content,L.log_edittype,C.cate_Name FROM blog_Content AS L,blog_Category AS C WHERE C.cate_ID=L.log_cateID AND L.log_IsShow=true AND L.log_IsDraft=false and C.cate_Secret=false ORDER BY log_PostTime DESC"
Else
SQL="SELECT TOP 10 L.log_ID,L.log_Title,l.log_Author,L.log_PostTime,L.log_Content,L.log_edittype,C.cate_Name FROM blog_Content AS L,blog_Category AS C WHERE log_cateID="&cate_ID&" AND C.cate_ID=L.log_cateID AND L.log_IsShow=true AND L.log_IsDraft=false and C.cate_Secret=false ORDER BY log_PostTime DESC"
FeedCate=True
End IF
Dim RS,DisIMG,i
Set RS=Conn.ExeCute(SQL)
if RS.EOF or RS.BOF then
ReDim FeedRows(0,0)
else
if FeedCate then FeedTitle=UnCheckStr(SiteName & " - " & RS("cate_Name"))
FeedRows=RS.getrows()
end if
RS.close
set RS=nothing
Conn.Close
Set Conn=Nothing
%>
<%=SiteURL%>
<%=SiteURL%>
<%
if ubound(FeedRows,1)=0 then
Response.Write("
else
for i=0 to ubound(FeedRows,2)
%>
<%=SiteURL&"default.asp?id="&FeedRows(0,i)%>
<%
'IF RS("log_IsShow")=False Then
' Response.Write("
'Else
IF FeedRows(5,i)=0 then
Response.Write("
else
Response.Write("
end if
'End IF
%>
<%
next
end if%>
相关文章
- ps怎么把黑白照片变成彩色?ps把儿童黑白照变彩色教程 07-13
- 关于命运的经典句子78句 07-13
- 浅析HTML5 meta viewport参数 07-13
- 尘白禁区角色语言怎么切换-角色语言切换方法 07-13
- photoshop如何快速制作照片撕裂效果? 07-13
- 如何在微信公众号做广告不让人反感? 07-13