您的位置:首页- 人物观察
<% Function Format_Time(s_Time) Dim y, m, d, h, mi, s Format_Time = "" If IsDate(s_Time) = False Then Exit Function y = cstr(year(s_Time)) m = cstr(month(s_Time)) If len(m) = 1 Then m = "0" & m d = cstr(day(s_Time)) If len(d) = 1 Then d = "0" & d If len(s) = 1 Then s = "0" & s Format_Time = y & "-" & m & "-" & d End Function function patha(str) dim path path=str if not isnull(path) then if len(path)>0 then path=right(path,len(path)-1) end if end if if path<>"" then patha=path end if end function dim rs order=request("order") if order="评论" then str="anscount" elseif order="姓氏" then str="newstitle" else str="renqi" end if set rs=server.CreateObject("adodb.recordset") sql="select * from news where clsid=4 order by "&str&" desc" rs.open sql,conn,1,1 ' set rs=conn.execute("select * from news where clsid=4 and audit=1 order by newsid desc") ' response.Write(rs.recordcount) ' response.End() if not rs.eof then rs.pagesize=30 '总记录数 TotalRecord=rs.RecordCount '总页数 TotalPage=rs.PageCount '翻页时的URL及参数 Ahref=""&Request.ServerVariables("PATH_INFO")&"" ' if page = -1 then page=0 end if if page<1 then page=1 end if if page>rs.pagecount then page=rs.pagecount end if rs.absolutepage=page serial=rs.PageSize*(Page-1)+1 for i=1 to rs.PageSize ' path=rs("icon") ' if not isnull(path) then ' if len(path)>0 then ' path=right(path,len(path)-1) ' end if ' end if ' path1=rs("img") ' if not isnull(path1) then ' if len(path1)>0 then ' path1=right(path1,len(path1)-1) ' end if ' end if if i mod 2=0 then %> <%else%> <% end if rs.MoveNext serial=serial+1 if rs.EOF then exit for end if next end if %>
哲学家 分值 点评数 浏览数 发布日期
 "> <% if len(rs("newstitle"))<20 then response.Write(rs("newstitle")) else response.Write(left(rs("newstitle"),18)&"……") end if %> <%=rs("renqi")%> <%=rs("anscount")%> <%=rs("rdcount")%> <%=Format_Time(rs("crtdt"))%>
" >   <% if len(rs("newstitle"))<20 then response.Write(rs("newstitle")) else response.Write(left(rs("newstitle"),18)&"……") end if %> <%=rs("renqi")%> <%=rs("anscount")%> <%=rs("rdcount")%> <%=Format_Time(rs("crtdt"))%>
<% call pagehref(Ahref,page,TotalPage,TotalRecord) %>
<% rs.close set rs=nothing %>
<% dim riqi,riqi1 riqi=Format_Time(date()) riqi1=Format_Time(date()-1) i=0 set rs=conn.execute("select * from news where clsid=4 and tuijian=1 order by jingjia,jifen,tuijian desc") do while not rs.eof and i<3*(page-1) rs.movenext i=i+1 loop do while not rs.eof and i<5 %> <% rs.movenext i=i+1 loop rs.close() %>
"> <%if len(rs("jianjie"))<200 then response.Write(rs("jianjie")&"...") else response.Write(left(rs("jianjie"),200)&"...") end if %>