<?xml version="1.0" encoding="gb2312"?>
<!-- RSS generated by cd169.net on 4/16/2004 ; 感谢LeXRus提供 RSS 2.0 文档; 此文件可自由使用，但请保留此行信息 --> 
<!-- Source download URL: http://www.yan163.com/blog/rss2.asp       -->
<rss version="2.0">
<%
dim url,connstr,conn,show_username
dim rs,SQL
const issqldate=false
if not issqldate then
	Dim Db
	'access数据库连接参数：第一次使用请修改本处数据库地址并相应修改data目录中数据库名称，如将oblog2.mdb修改为oblog2.asp
	Db = "/data_jk/blog.asa"
	ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)
else
	'sql数据库连接参数：数据库名、用户密码、用户名、连接名（本地用local，外地用IP）
	Dim SqlDatabaseName,SqlPassword,SqlUsername,SqlLocalName
	SqlDatabaseName = "oblog"
	SqlPassword = "oblog"
	SqlUsername = "oblog"
	SqlLocalName = "(local)"
	ConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
end if
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnStr
set rs=conn.execute("select siteurl,sitetitle,copyrighturl,webmastername,webmasteremail from bloginfo")
url=trim(rs(0))
%>
<channel>
<title><%=rs(1)%></title>
<link><%=rs(0)%></link>
<description><%=rs(1)%></description>
<copyright><%=rs(2)%></copyright>
<generator>Oblog 2.52</generator>
<webMaster><%=rs(4)%></webMaster>
<%
show_username=ReplaceBadChar(request.QueryString("name"))
'set rs = Server.CreateObject("ADODB.Recordset")
if issqldate then
	if show_username<>"" then
		SQL="select top 10 * from blog where username='"&show_username&"' and ishide<>'true' and passcheck<>'false' and isnull(ispassword,'true')='true' and (isnull(blog_password,'true')='true' or blog_password='') order by id desc"
	else
		SQL = "Select top 10 * from blog where ishide<>'true' and passcheck<>'false' and (isnull(blog_password,'true')='true' or blog_password='') and isnull(ispassword,'true')='true' order by id desc"
	end if
else
	if show_username<>"" then
		SQL="select top 10 * from blog where username='"&show_username&"' and ishide<>'true' and passcheck<>'false' and isnull(ispassword)=true and (isnull(blog_password)=true or blog_password='') order by id desc"
	else
		SQL = "Select top 10 * from blog where ishide<>'true' and passcheck<>'false' and isnull(ispassword)=true and (isnull(blog_password)=true or blog_password='') order by id desc"
	end if
end if
set rs=conn.execute(SQL)
if rs.Eof or rs.Bof then
  response.write "<item></item>"
end if
while not rs.Eof 
    response.Write "<item>" & vbcrlf
	Response.write "<title><![CDATA["&rs("topic")&"]]></title>" & vbcrlf
	response.write "<link>"&url&"more.asp?name="&rs("username")&"&amp;id="&rs("id")&"</link>" & vbcrlf
	response.write "<author>"&rs("username")&"</author>" & vbcrlf
	response.write "<pubDate>"&rs("addtime")&"</pubDate>" & vbcrlf
 	response.write "<description><![CDATA["&rs("logtext")&"]]></description>" & vbcrlf
	response.write "</item>"
	rs.MoveNext          
wend                  
set rs=nothing
conn.Close
set conn = nothing
function ReplaceBadChar(strChar)
	if strChar="" then
		ReplaceBadChar=""
	else
		ReplaceBadChar=replace(replace(replace(replace(replace(replace(replace(strChar,"'",""),"*",""),"?",""),"(",""),")",""),"<",""),".","")
	end if
end function
%>
</channel>
</rss>
