|
废话不多少,用于和我一样的懒虫.
<!--#include file=conn.asp-->
<%=trim(request("sql"))%>
<%=replace(trim(request("sqlwhere")),"'","")%>
<% if Request.Form("w").Count > 0 then%>
<%
ck=replace(trim(request("ck")),"'","")
sql=trim(request("sql"))
if ck<>"" then
sqlwhere=trim(request("sqlwhere"))
set rs = Server.CreateObject("ADODB.Recordset")
mapsql = "SELECT * FROM lanmu "&sqlwhere&""
%>
<%=mapsql%>
<%
rs.Open mapsql,conn,1,3
if ck="n" then
rs.AddNew
for i=1 to Request.Form("w").Count
rs(rs.fields(i).name)=Request.Form("w")(i)
next
rs.Update
else
for i = 1 to Request.Form("w").Count
rs(rs.fields(i).name)=Request.Form("w")(i)
next
rs.Update
end if
end if
if sql<>"" then
conn.execute=sql
end if
end if
Response.write "<script>history.go(-1)</script>"
%> |
|