| 哲学家 |
分值 |
点评数 |
浏览数 |
发布日期 |
<%
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
%>
| ">
<%
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"))%> |
<%else%>
| " >
<%
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"))%> |
<%
end if
rs.MoveNext
serial=serial+1
if rs.EOF then exit for end if
next
end if
%>
|
|
|
|