<% Function Counts(CounterFile) Dim objFSO, objTS Application.Lock Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objTS = objFSO.OpenTextFile(Server.MapPath(CounterFile), 1, True) If Not objTS.AtEndOfStream Then Counts = CLng(objTS.ReadLine) End If Counts = Counts + 1 objTS.Close Set objTS = objFSO.OpenTextFile(Server.MapPath(CounterFile), 2, True) objTS.WriteLine(Counts) objTS.Close Application.Unlock End Function If Session("Counter") = Empty Then Session("Counter") = Counts("jishu.txt") End If num1=Session("Counter") num1=right("00000000000"&num1,8) for i= 1 to len(num1)%><%next%>
 
<% num=conn.execute("select count(id) from member")(0) num=right("00000000000"&num,8) for i= 1 to len(num)%><%next%>
<%set rs=server.CreateObject("adodb.recordset") rs.open "select top 5 * from [news] order by clicknum desc",conn,1,1 if rs.bof and rs.eof then response.Write("") else i=1 do while not rs.eof %> <% rs.movenext i=i+1 loop end if rs.close set rs=nothing%>
"><%=rs("title")%>
By:<%=rs("author")%>
<%set rs=server.CreateObject("adodb.recordset") rs.open "select top 5 * from Comments order by id desc",conn,1,1 if rs.bof and rs.eof then response.Write("") else do while not rs.eof%> <% rs.movenext loop end if rs.close set rs=nothing %>
  "> <%if len(rs("Content"))>12 then response.Write(left(rs("Content"),10)&"...") else response.Write(rs("Content")) end if%>