日期:2014-05-16 浏览次数:20951 次
if set rs=conn.execute("select * from light where id="&request2.form("id")&" and ppic is not null") then
response.write "<script language='javascript'>"
response.write "alert('已有数据,请先删除');"
response.write "window.location.href='modify.asp?id="&request.form("id")&"';"
response.write "</script>"
else
if request2.form("id")<>"" then
set rs=server.CreateObject("adodb.recordset")
rsstr="select ppic from light where id="&request2.form("id")
rs.open rsstr,conn,1,1
if rs.recordcount=0 then
set rss=server.CreateObject("adodb.recordset")
rss.open "select * from light",conn,1,3
rss.addnew
rss("ppic")=request2.form("ppic")
rss("pictime")=date()
rss.update
rss.close
set rss=nothing
else
response.write "<script language='javascript'>"
response.write "alert('不能上传');"
response.write "window.location.href='modify.asp?id="&request2.form("id")&"';"
response.write "</script>"
end if
rs.close
set rs=nothing
end if