日期:2014-05-16 浏览次数:20952 次
dim str
str=trim(request.form("lamptype"))
set rs=server.CreateObject("adodb.recordset")
if request("id")="" then
rs.open "select * from light ",conn,1,3
rs.addnew
else
rs.open "select * from light where id="&request("id"),conn,1,3
if Session("adminid")=rs("issuer") then
rs("usefor")=trim(request.Form("usefor"))
rs("pictime")=date()
rs("lamptype")=split(str,",")(0)
rs("lpnumber")=split(str,",")(1)
rs.update
rs.close
end if
response.write "<script language='javascript'>"
response.write "alert('修改成功.');"
response.write "window.location.href='view.asp?id="&request.form("id")&"';"
response.write "</script>"
else
response.write "<script language='javascript'>"
response.write "alert('对不起,您无权修改!');"
response.write "window.location.href='javascript:history.go(-1)';"
response.write "</script>"
end if
end if