复制代码代码如下:
<! - #includefile = "conn.asp" - >
<styletype = "text/css">
ボディ、td、th {
色:#000000;
フォントサイズ:14px;
バックグラウンドカラー:#d6dff7;
}
</style>
<%
薄暗い
setrs = server.createObject( "adodb.recordset")
ifrequest( "type")= "date" then
yearstr = request( "selyear")
monstr = request( "selmonth")
daystr = request( "selday")
ifdaysstr <> "" then
theymd = yeartr& " - "&monst& " - "&daystr
sql = "SelectidFromWheredatetimelike '"&theymd& "%' orderbydatetimedesc" "
それ以外
theymd = yeartr& " - "&monst& " - "
sql = "SelectidFromWheredatetimelike '"&theymd& "%' orderbydatetimedesc" "
endif
ElseifRequest( "type")= "new" then
topnew = request( "newcount")
iftopnew <> "" then
topnew = cint(topnew)
sql = "selecttop"&topnew& "idfromnewsorderbydatetimedesc"
endif
ElseifRequest( "type")= "nosh" then
sql = "selectidfromnewswhhereshengcheng = 0"
ElseifRequest( "type")= "all" then
sql = "selectidfromnewsorderbyiddesc"
endif
ifsql <> "" then
Response.writesql
Response.Write "<center> <b> <fontcolor =" "#ff0000" ">正在生成文章内容页的html页、请等待...... </font> </b> <spasid = showimport> </span> </center> <ie:downloadid =" "odownload" "style =" "行動:url(#default#download)"/> "
ifrequest( "p")<> "" then
p = cint(request( "p"))
それ以外
p = 1
endif
maxperpage = 100
rs.opensql、conn、1,1
ifnotrs.eofthen
rs.pagesize = maxperpage '得到每页数
mpage = rs.pagecount '得到总页数
allshu = rs.RecordCount '得到总数
rs.move(p-1)*maxperpage
dowhileenotrs.eof
i = i+1
callmakehtml()
ifi> = maxperpagethenexitdo
rs.movenext
ループ
endif
rs.close
sshu = maxperpage*p-maxperpage+1 '当前已经生成的数量
tshu = sshu+i-1 '已生成生成的
ifallshu <sshuthen
setrs =何もない
conn.close
setConn =何もない
Response.redirect "makehtmlall.asp?type = ok"& "&shu ="&request( "shu")& "&d ="&d& "&p ="&p+1
Response.End
それ以外
%>
<Metahttp-equiv = "reffery" content = "0; url = makehtmlall.asp?type = <%= request(" type ")%>&newCount = <%= request(" newCount ")%>&seyear = <%= request( "selyear")%>&selmonth = <%= request( "selmonth")%>&selday = <%= request( "selday")%>&shu = <%= tshu%>&d = <%>&p = <%= p+1%> ">