<% CountNum=30 class_Id=zhcx.checknumeric(request("class_id")) filepath=zhcx.conn("SELECT TOP 1 filepath FROM Class_Type where id = "&class_Id)(0) 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 int(Page_total)>0 then for i=1 to Page_total if i=1 then pathhtml=left(getClassInfo(class_Id,"filepath"),2)&"/ywdt/Index.html" else pathhtml=left(filepath,2)&"/ywdt/Index_"&(i-1)&".html" End if pathhtml=replace(pathhtml,"ls/","lsc/") Call Cre_New_Html(syspath&pathhtml,Http_Url&"action/do/cq/dt/?pageno="&i&"&Class_Id="&Class_Id&"&r="&Rnd) response.write "页面:"&syspath&pathhtml&"生成
" response.flush() next else pathhtml=left(getClassInfo(class_Id,"filepath"),2)&"/ywdt/Index.html" pathhtml=replace(pathhtml,"ls/","lsc/") Call Cre_New_Html(syspath&pathhtml,Http_Url&"action/do/cq/dt/?pageno="&i&"&Class_Id="&Class_Id&"&r="&Rnd) End if '生成首页 response.write " 首页生成完成<返回>" %>