<%id=request("id")
zid=request("zid")
lb= request("lb")
px= request("px")
cz=request("cz")
px=request("px")
sp=request("sp")
ms=request("ms")
zk=request("zk")
fzr=request("fzr")
if lb<>"" and id="" then
if zid <> "" then zid = zid & "-"
sql = "select * from yrwl_tb_type order by id desc"
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("px") = px
rs("lb") = lb
rs("lx") = zid & right(replace(cstr(date),"-",""),4)+replace(cstr(timer()),".","")
rs("sp") = sp
rs("zk") = zk
rs("ms") = ms
rs("fzr") = fzr
rs.update
rs.close
%>
<%
end if
if lb<>"" and id<>"" then
exec="update yrwl_tb_type set sp='" & sp & "', fzr='" & fzr & "', zk='" & zk & "',ms='" & ms & "',lb='"&lb&"',px='" & px & "' where id="&id
conn.execute exec%>
<%end if
if id <> "" then
exec = "select * from yrwl_tb_type where id="&id
set rs = server.createobject("adodb.recordset")
rs.open exec,conn,3,1
if not rs.eof then
lb = rs("lb")
lx = rs("lx")
zk = rs("zk")
px = rs("px")
fzr = rs("fzr")
ms = rs("ms")
sp = trim(rs("sp"))
if isnull(sp) then sp = ""
end if
rs.close
end if%>
<%call close_conn()%>