| |
 |
|
<%
const pagecount=20
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim sql,myear,mmonth
myear=request("myear")
mmonth=request("mmonth")
newtime="2007-05-06"
CurrentPage=request("page")
sql="select * from news where newssort='Industry Research' order by update desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "NO Data!"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*pagecount>totalput then
if (totalPut mod pagecount)=0 then
currentpage= totalPut \ pagecount
else
currentpage= totalPut \ pagecount + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,pagecount,"industry_research.asp"
else
if (currentPage-1)*pagecount
<%do while not rs.eof%>
" class=line><%=rs("title")%> <%if rs("newstype")<>"" then%>
[<%=rs("newstype")%>]<%end if%> (<%=rs("update")%>) |
<%
i=i+1
if i>=pagecount then exit do
rs.movenext
loop
%>
<%
end sub %><%
function showpage(totalnumber,pagecount,filename)
dim n
if totalnumber mod pagecount=0 then
n= totalnumber \ pagecount
else
n= totalnumber \ pagecount+1
end if
response.write ""
end function
%> |
| |