'///////站外调用代码:
'///////id=新闻类别的id号,num=调用的条数,如果要调用所有的,可留空!
%>
dim count,whereto1,whereto2
num=request("num") '调用的新闻条数
typeid=cint(request("id")) '新闻类别ID
if numempty and isNumeric(num) then
whereto1="top "&num&" "
end if
if typeidempty and isNumeric(typeid) then
whereto2="where type="&cint(typeid)&" "
end if
sql="select "&whereto1&"* from [news] "&whereto2&"order by id desc"
rs.open sql,conn,1,1
i=0
Do While Not RS.EOF
if i mod 2 = 0 then
titleclass="showlist1"
else
titleclass="showlist2"
end if
Response.Write "document.write(' "&rs("title")&"("&rs("time")&")');"
i=i+1
rs.movenext
loop
rs.close
set rs=nothing
%>