<%@ 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 %> <% sql="select [id],ppid,[name] from [category] where id="&request.QueryString("CatID")&" order by [time] desc" set rsa=server.createobject("adodb.recordset") rsa.open(sql),cn,1,1 if not rsa.eof then CategoryTitle=rsa("name") select case rsa("ppid") case 1 sql_id=" cid='"&rsa("id")&" '" case 2 sql_id=" pid='"&rsa("id")&" '" case 3 sql_id=" ppid='"&rsa("id")&" '" end select end if rsa.close set rsa=nothing sql="select top 50 * from [article] where view_yes=1 and "&sql_id&" 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 &" "&CategoryTitle& "" & vbcrlf XMLContent=XMLContent&"" & web_url & "" & vbcrlf XMLContent=XMLContent&"zh-cn" & vbcrlf XMLContent=XMLContent&"RSS Feed By www.725725.net" & 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 end select XMLContent=XMLContent&"" & vbcrlf XMLContent=XMLContent&"<![CDATA[" & rs("title") & "]]>" & vbcrlf XMLContent=XMLContent&""&web_url&Article_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 %> <% response.write XMLContent %>