List_Save.asp
上传用户:xxtaishan
上传日期:2022-01-02
资源大小:4063k
文件大小:2k
源码类别:

IP电话/视频会议

开发平台:

ASP/ASPX

  1. <!--#include file="../../inc/conn.asp"-->
  2. <!--#include file="../../inc/func.asp" -->
  3. <%
  4. '-----------------------------
  5. If request.form("operation")="add" Then
  6. call Add
  7. elseif request.form("operation")="edit" Then
  8. call Edit
  9. elseif request("operation")="del" then
  10. call Del
  11. else
  12. call showerr("操作无效!")
  13. end if
  14. '-----------------------------
  15. Dim rs
  16. Dim sql
  17. '-----------------------------
  18. sub Add
  19. set rs=server.createobject("adodb.recordset")
  20. rs.open "select * from job",conn,1,3
  21. rs.addnew
  22. rs("job")=request.form("job")
  23. rs("num")=request.form("num")
  24. rs("recall")=htmlencode(request.form("recall"))
  25. rs("payment")=htmlencode(request.form("payment"))
  26. rs("reg")=htmlencode(request.form("reg"))
  27. rs("regtime")=request.form("regtime")
  28. rs.Update
  29. call showmsg("信息添加成功!","list.asp")
  30. end sub
  31. '-----------------------------
  32. sub Edit
  33. set rs=server.createobject("adodb.recordset")
  34. rs.open "select * from job where id="&request.form("id"),conn,1,3
  35. rs("job")=request.form("job")
  36. rs("num")=request.form("num")
  37. rs("recall")=htmlencode(request.form("recall"))
  38. rs("payment")=htmlencode(request.form("payment"))
  39. rs("reg")=htmlencode(request.form("reg"))
  40. rs("regtime")=request.form("regtime")
  41. rs.Update
  42. call showmsg("信息修改成功!","list.asp")
  43. end sub
  44. '-----------------------------
  45. sub Del
  46. Dim query
  47. query=Request.Form("checkbox")
  48. If query<>"" Then
  49. If instr(query,",")>0 Then
  50. Dim chx
  51. Dim i
  52. chx=Split(query,",")
  53. For i=0 to ubound(chx)
  54. call DelInfo(chx(i))
  55. Next
  56. Else
  57. call DelInfo(query)
  58. End If
  59. Else
  60. call showerr("请选择删除记录!")
  61. End IF
  62. end sub
  63. '-------------------------------
  64. Function DelInfo(x)
  65. conn.execute("delete from job where id="&x)
  66. call showmsg("记录删除成功!","list.asp")
  67. End Function
  68. '-------------------------------
  69. %>
  70. <%
  71. call COCLS
  72. %>