国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

jb51生成所有頁面的效果+分頁生成 原創

2024-05-04 11:03:04
字體:
來源:轉載
供稿:網友
復制代碼 代碼如下:
<!--#include file="conn.asp"-->
<style type="text/css">
body,td,th{
color:#000000;
font-size:14px;
background-color:#D6DFF7;
}
</style>
<%
dim rs
set rs=server.CreateObject("adodb.recordset")
if request("type")="date" then
yearstr=request("selyear")
monstr=request("selmonth")
daystr=request("selday")
  if daystr<>"" then
  theymd=yearstr&"-"&monstr&"-"&daystr
  sql="select id from news where datetime like '"&theymd&"%' order by datetime desc"
  else
  theymd=yearstr&"-"&monstr&"-"
  sql="select id from news where datetime like '"&theymd&"%' order by datetime desc"
  end if
elseif request("type")="new" then
topnew=request("newcount")
  if  topnew<>"" then
  topnew=cint(topnew)
  sql="select top "&topnew&" id from news order by datetime desc"
  end if
elseif request("type")="nosh" then
  sql="select id from news where shengcheng=0"
elseif request("type")="all" then
  sql="select id from news order by id desc"
end if   
  if sql<>"" then
  response.write sql
response.write"<center><b><font color=""#FF0000"">正在生成文章內容頁的Html頁,請等待......</font></b><span id=showImport></span></center><IE:Download ID=""oDownload"" STYLE=""behavior:url(#default#download)"" />"
if request("p")<>"" then
     p=cint(request("p"))
    else
     p=1
   end if
MaxPerPage=100
rs.open sql,conn,1,1
if not rs.eof then
rs.pagesize=MaxPerPage '得到每頁數
mpage=rs.pagecount     '得到總頁數
allshu=rs.recordcount  '得到總數
rs.move  (p-1)*MaxPerPage
do while not rs.eof
i=i+1
call MakeHtml()
if i>=MaxPerPage then exit do
rs.movenext
loop
end if
rs.close
Sshu=MaxPerPage*p-MaxPerPage+1 '當前已經生成的數量
Tshu=Sshu+i-1 '已生成生成的
if allshu<Sshu then
 set rs=nothing
 conn.close
 set conn=nothing
 response.redirect "makehtmlall.asp?type=ok"&"&shu="&request("shu")&"&D="&d&"&p="&p+1
 response.end
else
%>
<meta http-equiv="refresh" content="0;url=makehtmlall.asp?type=<%=request("type")%>&newcount=<%=request("newcount")%>&selyear=<%=request("selyear")%>&selmonth=<%=request("selmonth")%>&selday=<%=request("selday")%>&shu=<%=Tshu%>&D=<%=D%>&p=<%=p+1%>">
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 鄂托克旗| 富平县| 义马市| 平武县| 莱阳市| 临夏市| 金川县| 湖口县| 铜梁县| 神池县| 寻乌县| 垫江县| 曲松县| 石嘴山市| 抚松县| 桐乡市| 孟州市| 和政县| 定安县| 苍山县| 原阳县| 塔河县| 正宁县| 苍山县| 定襄县| 甘洛县| 曲松县| 平顺县| 龙海市| 留坝县| 东乌珠穆沁旗| 自治县| 峨眉山市| 尼勒克县| 新疆| 松滋市| 嘉峪关市| 常山县| 景洪市| 庄河市| 阳新县|