bindTag.asp 740 B

12345678910111213141516171819202122232425262728293031
  1. <!--#include file="Conn.asp"--><%Checklogin()%>
  2. <%
  3. cid=Request.QueryString("cid")
  4. eid=Request.QueryString("eid")
  5. If Not isNumeric(cid) or Not isNumeric(eid) Then
  6. conn.close
  7. Set conn=Nothing
  8. response.write "<script>alert('参数错误');</script>"
  9. response.end
  10. End If
  11. tagvalue=Request.QueryString("tagvalue")
  12. tagvalue=unescape(tagvalue)
  13. Set Rs=Server.CreateObject("ADODB.RecordSet")
  14. Rs.open "Select * from tagTable where customerId="&cid&" and employeeId ="&eid&" and tagName='"&tagvalue&"'",conn,1,3
  15. If not Rs.bof and not Rs.eof Then
  16. Rs.Delete
  17. Else
  18. Rs.addNew
  19. Rs("tagName")=tagvalue
  20. Rs("employeeId")=eid
  21. Rs("customerId")=cid
  22. End if
  23. Rs.update
  24. Rs.close
  25. Set Rs=Nothing
  26. conn.close
  27. Set conn=Nothing
  28. %>