?%@ CODEPAGE=65001 %>
<%
''旉转换函数
Function return_RFC822_Date(byVal myDate, byVal TimeZone)
Dim myDay, myDays, myMonth, myYear
Dim myHours, myMinutes, mySeconds
myDate = CDate(myDate)
myDay = EnWeekDayName(myDate)
myDays = Right("00" & Day(myDate),2)
myMonth = EnMonthName(myDate)
myYear = Year(myDate)
myHours = Right("00" & Hour(myDate),2)
myMinutes = Right("00" & Minute(myDate),2)
mySeconds = Right("00" & Second(myDate),2)
return_RFC822_Date = myDay&", "& _
myDays&" "& _
myMonth&" "& _
myYear&" "& _
myHours&":"& _
myMinutes&":"& _
mySeconds&" "& _
" " & TimeZone
End Function
''星期转换函数
Function EnWeekDayName(InputDate)
Dim Result
Select Case WeekDay(InputDate,1)
Case 1:Result="Sun"
Case 2:Result="Mon"
Case 3:Result="Tue"
Case 4:Result="Wed"
Case 5:Result="Thu"
Case 6:Result="Fri"
Case 7:Result="Sat"
End Select
EnWeekDayName = Result
End Function
''月䆾转换函数
Function EnMonthName(InputDate)
Dim Result
Select Case Month(InputDate)
Case 1:Result="Jan"
Case 2:Result="Feb"
Case 3:Result="Mar"
Case 4:Result="Apr"
Case 5:Result="May"
Case 6:Result="Jun"
Case 7:Result="Jul"
Case 8:Result="Aug"
Case 9:Result="Sep"
Case 10:Result="Oct"
Case 11:Result="Nov"
Case 12:Result="Dec"
End Select
EnMonthName = Result
End Function
%>
<%
''获取当前域名,其中rss.aspZ的文件名
sql="select top 50 * from [article] where view_yes=1 order by [time] desc"
''Ҏ自己实际修改
set rs=server.createobject("adodb.recordset")
rs.open sql,cn,1,1
response.contenttype="text/xml"
XMLContent=XMLContent&"" & vbcrlf
XMLContent=XMLContent&"" & vbcrlf
XMLContent=XMLContent&"" & vbcrlf
XMLContent=XMLContent&"" & vbcrlf
XMLContent=XMLContent&""& web_name & " 的最新动?/title>" & vbcrlf
XMLContent=XMLContent&"" & web_url & "" & vbcrlf
XMLContent=XMLContent&"zh-cn" & vbcrlf
XMLContent=XMLContent&"RSS Feed By www.huigusoft.com" & vbcrlf
while not rs.eof
set rsc=server.createobject("adodb.recordset")
sqlc="select [name] from [category] where id="&rs("cid")
rsc.open sqlc,cn,1,1
if not rsc.eof then
CategoryName=rsc("name")
end if
rsc.close
set rsc=nothing
select case rs("ArticleType")
case 1
Content_FolderName=Article_FolderName
case 2
Content_FolderName=Product_FolderName
Case 3
Content_FolderName=Case_FolderName
end select
XMLContent=XMLContent&"" & vbcrlf
XMLContent=XMLContent&"" & vbcrlf
XMLContent=XMLContent&""&web_url&"/"&Content_FolderName&"/"& rs("file_path") &"" & vbcrlf
XMLContent=XMLContent&"" & vbcrlf
XMLContent=XMLContent&"" & return_RFC822_Date(rs("time"),"08:00") & "" & vbcrlf
XMLContent=XMLContent&""&web_name&"" & vbcrlf
XMLContent=XMLContent&""&CategoryName&"" & vbcrlf
XMLContent=XMLContent&"" & vbcrlf
rs.movenext
wend
XMLContent=XMLContent&"" & vbcrlf
XMLContent=XMLContent&"" & vbcrlf
rs.close
set rs=nothing
''关闭数据?
cn.close
set cn=nothing
%>
<% 'd模板
'******************************************
'功能Q生成UTF-8文g
'参数QFile_name 文g?
'参数QFile_path 生成文g所在相对目?
'参数Qcontent 写入内容
'******************************************
sub Generation_File(File_name,File_path,content)
mappath = "/"&File_path&"/"&File_name
Set objStream = Server.CreateObject("ADODB.Stream")
With objStream
.Open
.Charset = "utf-8"
.Position = objStream.Size
.WriteText=XMLContent
.SaveToFile server.mappath(mappath),2
.Close
End With
Set objStream = Nothing
end sub
call Generation_File("Feed.xml","rss",XMLContent) '在xml目录下生成编码ؓutf-8的Feex.xml文g
response.write XMLContent
%>
91九色por内射熟女_超碰97_久久国产_日本人妻少妇中文字幕乱码_国产爆乳美女精品视频网站