<% 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 %> Untitled Document <% n=1 if n<> "" then sql="select * from article inner join type on article.typeid=type.typeid where picchk=1 order by date desc" set rs=conn.execute(sql)%> <% do while not rs.eof %>

/<%=rs("typedir")%>/<%=rs("N_Fname")%>") target="_blank" > height="140" border="0">

/<%=rs("typedir")%>/<%=rs("N_Fname")%>") target="_blank" ><%=rs("title")%>
<%n=n-1 if n<1 then exit do rs.movenext loop rs.close set rs=nothing rsconfig.close set rsconfig=nothing conn.close set conn=nothing%> <%end if%>