<% CountNum=20 class_Id=zhcx.checknumeric(request("class_id")) Sql="Select Id From Z_News where Class_ID="&Class_Id Set rs=zhcx.conn(sql) if not rs.eof then record_total=rs.recordCount if( (Record_total Mod CountNum) =0) Then Page_total=int(Record_total/CountNum) else Page_total=int(Record_total/CountNum)+1 End if else Page_total=0 End if rs.close set rs=nothing Randomize if Clng(Page_total)>0 then for i=1 to Page_total if i=1 then pathhtml=getClassPath(class_Id)&"/Index.html" else pathhtml=getClassPath(class_Id)&"/Index_"&(i-1)&".html" End if Call Cre_New_Html(syspath&pathhtml,Http_Url&"action/do/news/?pageno="&i&"&Class_Id="&Class_Id&"&r="&Rnd ) response.write "页面:"&pathhtml&"生成
" response.flush() next else pathhtml=getClassPath(class_Id)&"/Index.html" Call Cre_New_Html(syspath&pathhtml,Http_Url&"action/do/news/?pageno="&i&"&Class_Id="&Class_Id&"&r="&Rnd) End if '生成首页 response.write " 首页生成完成<返回>" %>