|
 |
灾后重建规划 |
 |
近期回顾 |
<%
sql="select * from photonews where vip<>'' order by id desc"
rs.open sql,Conn,3
%>
 |
热点最新更新 |
<%
pi=split(date(),"-")
if cint(pi(1))<10 and len(pi(1))<2 then pi(1)="0" & pi(1)
if cint(pi(2))<10 and len(pi(2))<2 then pi(2)="0" & pi(2)
today=pi(0)&"-"&pi(1)&"-"&pi(2)
pi=split(date()-1,"-")
if cint(pi(1))<10 and len(pi(1))<2 then pi(1)="0" & pi(1)
if cint(pi(2))<10 and len(pi(2))<2 then pi(2)="0" & pi(2)
yesterday=pi(0)&"-"&pi(1)&"-"&pi(2)
pi=split(date()-2,"-")
if cint(pi(1))<10 and len(pi(1))<2 then pi(1)="0" & pi(1)
if cint(pi(2))<10 and len(pi(2))<2 then pi(2)="0" & pi(2)
day3=pi(0)&"-"&pi(1)&"-"&pi(2)
pi=split(date()-3,"-")
if cint(pi(1))<10 and len(pi(1))<2 then pi(1)="0" & pi(1)
if cint(pi(2))<10 and len(pi(2))<2 then pi(2)="0" & pi(2)
day4=pi(0)&"-"&pi(1)&"-"&pi(2)
pi=split(date()-4,"-")
if cint(pi(1))<10 and len(pi(1))<2 then pi(1)="0" & pi(1)
if cint(pi(2))<10 and len(pi(2))<2 then pi(2)="0" & pi(2)
day5=pi(0)&"-"&pi(1)&"-"&pi(2)
sql="select * from photonews where contents is null and piclink<>'' order by id desc"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,Conn,3
sql="select * from photonews where contents is not null"
set rstemp=Server.CreateObject("ADODB.Recordset")
rstemp.open sql,Conn,3
dim yu(3),zheng(3),dyz(3),dzheng(3)
i=0
while i<3 and not rs.eof
flag="true"
for j=0 to 2
if rs("sort")=yu(j) then
flag="false"
exit for
end if
next
if flag="true" then
yu(i)=rs("sort")
if rs("piclink")<>"" then
zheng(i)=rs("piclink")
dyz(i)="showphotonews.asp?id=" & rs("id")
dzheng(i)=rs("title")
else
while not rstemp.eof
if rs("sort")=rstemp("sort") then zheng(i)=rstemp("link")
rstemp.movenext
wend
rstemp.movefirst
end if
i=i+1
end if
rs.movenext
wend
rstemp.close
'rs.movefirst
'rs.close
for i=0 to 2
%>
<%
rs.movenext
next
rs.close
sql="select * from photonews where contents is null and piclink='' order by id desc"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,Conn,3
dim newarr(7,2)
i=0
while i<7 and not rs.eof
flag="true"
for j=0 to 6
if rs("sort")=newarr(j,1) or rs("sort")=yu(0) or rs("sort")=yu(1) or rs("sort")=yu(2) then
flag="false"
exit for
end if
next
if flag="true" then
newarr(i,1)=rs("sort")
i=i+1
end if
rs.movenext
wend
rs.close
for i = 0 to 6
newarr(i,0)=0
next
'while not rstemp.eof
for i = 0 to 6
sql="select * from photonews where contents is null and sort='" & newarr(i,1) & "' and ( datetime='" & today & "' or datetime='" & yesterday & "' or datetime='" & day3 & "' or datetime='" & day4 & "' or datetime='" & day5 & "' ) order by id desc"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,Conn,3
newarr(i,0)=rs.recordcount
next
for j = 0 to 5
for i = j+1 to 6
if newarr(j,0)"" then
sql="select * from photonews where contents is null and sort='" & newarr(i,1) & "' order by id desc"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,Conn,3
%>
<%
end if
next
if trim(request("sort"))<>"" then sort=trim(request("sort"))
if trim(request("search1"))<>"" then search=trim(request("search1"))
if trim(request("search2"))<>"" then search=trim(request("search2"))
temp="&search1=" & search & "&sort=" & sort
sql="select * from photonews where "
select case sort
case "photo"
if search <> "" then
sql=sql & "sort like '" & chr(37) & search & chr(37) & "'" & " and "
end if
case "news"
response.redirect "listphoto.asp?search1=" & search
end select
sql =sql & " contents is not null order by datetime desc"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,Conn,3
sql="select * from photonews where contents is not null order by datetime desc"
set rstemp2=Server.CreateObject("ADODB.Recordset")
rstemp2.open sql,Conn,3
%>
|
|
您的位置: 首页
> 新闻 > 热点追击 |
|
|
<%
rstemp2.close
set rstemp2=nothing
if not rs.eof then
no=rs.recordcount
rs.pagesize=14
if IsNumeric(request("page")) then
pg=clng(request("page"))
else
pg=1
end if
if pg<1 then pg=1
if pg>rs.pagecount then pg=rs.pagecount
rs.absolutepage=pg
ipage=1
for i = 1 to 14
if not rs.eof then
if i mod 2 = 0 then
bgcolor="#d0d0d0"
else
bgcolor="#ededed"
end if
contents=""
if rs("contents")<>"" then contents=" " & replace(rs("contents"),chr(13)," ")
sql="select * from photonews where contents is null and sort='" & rs("sort") & "' and datetime='" & today & "'"
rstemp.open sql,Conn,3
if rstemp.recordcount>0 then
display="今日更新" & rstemp.recordcount & "条"
else
display=""
end if
rstemp.close
%>
height=65 style="BORDER-BOTTOM: #8E8E8E 1px solid; color=#B0B0B0">
|
" border="0" style="border: 1px solid #8E8E8E; padding: 1" width="156">
|
|
|
<%
else
exit for
end if
rs.movenext
next
if i<10 then
do while i<10
%>
<%
i=i+1
loop
end if
%>
|
共 <%=no%> 条,当前第 <%=pg%>/<%=rs.pagecount%> 页,每页 14 条
<%
if pg<>1 then
%>
首页 上页
<%
end if
if pg<>rs.pagecount then
%>
下页 尾页 |
<%
end if
if rs.recordcount>14 then
%>
|
<%
end if
%>
<%
else
%>
<%end if%>
|
|