<!--#include file="inc/setup.asp" -->
<!--#include file="inc/CheckClass.inc.asp" -->
<!--#include file="conn2.asp" -->
<%
id=RtnReplaceInt(trim(request("id")),0)
word=RtnReplaceInt(trim(request("word")),15)
num=RtnReplaceInt(trim(request("num")),6)
Response.Buffer = True
on error resume next
sql1 ="select * from newsclass where id="&request("id")&" order by id desc"
Set rs1= Server.CreateObject("ADODB.Recordset")
rs1.open sql1,Conn,3,3
name=rs1("name")
rs1.Close
Set rs1=Nothing
tempcontent="<table cellspacing=0 cellpadding=0 width=100% align=center border=0>"
tempcontent=tempcontent&" <tbody>"
tempcontent=tempcontent&" <tr>"
tempcontent=tempcontent&" <td height=4></td>"
tempcontent=tempcontent&" </tr>"
Response.Buffer = True
on error resume next
sql ="select * from news where type='"& name &"' order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,Conn,3,3
if rs.EOF or rs.BOF then
tempcontent=tempcontent&" <tr><td class=td2>暂时没有任何信息!</td></tr>"
end if
for i=1 to num
if len(Trim(rs("title")))>cint(word) then
atempTitle = Left(RtnReplaceString(Trim(rs("title"))),word)&"..."
else
atempTitle =RtnReplaceString(Trim(rs("title")))
end if
tempcontent=tempcontent&" <tr>"
tempcontent=tempcontent&" <td height=20 valign=top> <img src=images/Bult_ar_org.gif align=absmiddle>"
tempcontent=tempcontent&" <a class=a href='show.asp?id="&rs("id")&"' target=_self>"&atempTitle&"</a>"
tempcontent=tempcontent&" </td>"
tempcontent=tempcontent&" </tr>"
rs.movenext
next
rs.close
set rs = nothing
if s_more <> "ok" then
tempcontent=tempcontent&" <tr>"
tempcontent=tempcontent&" <td height=20>"
tempcontent=tempcontent&" <div align=right><a class=a href=more.asp?id="& id &"><img src=images/Bt_more.gif style=border: 1px solid #FFFFFF></a>"
tempcontent=tempcontent&" </div>"
tempcontent=tempcontent&" </td>"
tempcontent=tempcontent&" </tr>"
end if
tempcontent=tempcontent&" </tbody>"
tempcontent=tempcontent&"</table>"
%>
document.write("<%=tempcontent%>");