<%if err.number<>0 then err.Clear if session("admin")="" then conn.close set conn = nothing response.Write "" end if sorts=request("sorts") set rs2=server.CreateObject("adodb.recordset") sql="select newsid from news where sorts="&sorts&" order by adddate desc" rs2.open sql,conn,1,1 if not rs2.eof then for ixi=1 to rs2.recordcount if not rs2.bof and not rs2.eof then call HtmlNews("/templets/news.html",rs2(0)) set temp_fso=Server.CreateObject("Scripting.FileSystemObject") Set temp_file=temp_fso.OpenTextfile(server.MapPath("/news/gaga.txt")&"",2,true) 'true为不存在自行建立 temp_file.writeline(formatnumber((ixi/rs2.recordcount)*100,2)&"%,"&ixi&","&rs2.recordcount) Set temp_file=nothing rs2.movenext else exit for end if next end if rs2.close set rs2=nothing ' response.Write "