' The following is a batch build program If Request ("type") = "Update" then%> <% Set Ru=server.createobject ("Adodb.recordset") Sql= "SELECT * from news where ID >=" &request ("b_id") & "and ID <=" &request ("e_id") & "ORDER by ID de Sc Ru.open sql,conn,1 Do, not ru.bof, and not ru.eof%> <% Okfile=fsow (".. /dnshow.html ") File1=server.mappath (".. /html ") Dim newsfile If VarType (Ru ("file_name")) = 1 Then Newsfile = year (today) &month (now) &day (now) &hour (now) &minute (now) &second (now) & "&ru (" id ") &". html " Else Newsfile = Ru ("file_name") End If file2=file1& "" &newsfile id = ru ("id") If VarType (Ru ("infotime")) = 1 Then Infotime = Date () Else Infotime = Ru ("Infotime") End If Okfile = replace (okfile, "id", ID) Okfile = replace (okfile, "title", Ru ("title")) Okfile = replace (okfile, "content", Ru ("content")) Okfile = replace (Okfile, "Infotime", Infotime) Set fso = Server.CreateObject ("Scripting.FileSystemObject") Set fout = Fso.createtextfile (file2,true) Fout.writeline Okfile Fout.close Sql= Update news set file_name = ' &newsfile& ', infotime = ' &infotime& ' WHERE id = ' &ru (' id ') Conn.execute (SQL) %> <%=file2%> Build Success ....<br> <% Ru.movenext Loop %><%end if%> |