javastr=""
javastr=javastr+"
"
<%
Function LeftT(str,n)
If len(str)<=n/2 Then
LeftT=str
Else
Dim TStr
Dim l,t,c
Dim i
l=len(str)
t=l
TStr=""
t=0
for i=1 to l
c=asc(mid(str,i,1))
If c<0 then c=c+65536
If c>255 then
t=t+2
Else
t=t+1
End If
If t>n Then exit for
TStr=TStr&(mid(str,i,1))
next
LeftT = TStr+"..."
End If
End Function
%>
<%sqlconfig="select * from config"
set rsconfig=server.createobject("adodb.recordset")
rsconfig.open sqlconfig,conn,1,1
%>
<%
num=request("num")
sql="select top "+cstr(num)+" * from article inner join type on article.typeid=type.typeid where check=1 order by newsid desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if not rs.eof then
javastr=""
while not rs.EOF
%>
javastr=javastr+"| "
javastr=javastr+"· | "
javastr=javastr+"
|
"
<%rs.movenext
wend
rs.close
set rs=nothing
rsconfig.close
set rsconfig=nothing
conn.close
set conn=nothing%>
javastr=javastr+"
"
document.write (javastr)
<%else%>
document.write ("对不起,暂时没有任何文章内容。")
<%end if
%>