%
id=CheckStr(Trim(request("id")))
If ID="" then
Response.write""
end if
set rsclass=server.createobject("adodb.recordset")
sql="select * from Yao_Class where id="&id
rsclass.open sql,conn,1,1
if rsclass.eof and rsclass.bof then
Call Alert("不正确的ID","index.html")
else
if rsclass("Link")=1 then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", laoy(rsclass("Url"))
End if
%>
<%If Mydb("Select Count([ID]) From [Yao_Class] Where TopID="&ID&"",1)(0)>0 then%>
<%
Sqlpp ="select * from Yao_Class Where TopID="&ID&" order by num"
Set Rspp=server.CreateObject("adodb.recordset")
rspp.open sqlpp,conn,1,1
NoI=0
Do while not Rspp.Eof
NoI=NoI+1
%>
<%
Rspp.Movenext
Loop
rspp.close
set rspp=nothing
%>
<%else%>
<%=rsclass("ClassName")%>
<%
Set mypage=new xdownpage
mypage.getconn=conn
mypage.getsql="select ID,Title,DateAndTime,Hits,IsTop,Images,TitleFontColor,Artdescription from Yao_Article Where ClassID="&rsclass("ID")&" and yn=0 order by IsTop desc,DateAndTime desc"
mypage.pagesize=""&artlistnum&""
set rs=mypage.getrs()
for i=1 to mypage.pagesize
if not rs.eof then
%>
<%=Copy%>
<%
rsclass.close
set rsclass=nothing
end if%>
<%if request.QueryString("action")="search" then
dim keyword
keyword = Server.UrlEncode(trim(request.Form("keyword")))
response.Redirect("Search.asp?KeyWord="&keyword)
end if%>