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. <!--#include file="../../inc/upload_5xsoft.inc" -->
  4. <%
  5. '-----------------------------
  6. Dim rs
  7. Dim sql
  8. '-----------------------------
  9. DIM UPLOAD
  10. SET UPLOAD=NEW UPLOAD_5XSOFT
  11. If UPLOAD.FORM("operation")="add" Then
  12. call Add
  13. elseif UPLOAD.FORM("operation")="edit" Then
  14. call Edit
  15. ELSE
  16. call showerr("系统提示:操作无效!")
  17. end if
  18. '-----------------------------
  19. Function Add
  20. if UPLOAD.FORM("pw")="" or UPLOAD.FORM("title")="" or UPLOAD.FORM("title2")="" or UPLOAD.FORM("title3")="" or UPLOAD.FORM("title4")="" or UPLOAD.FORM("title5")="" or UPLOAD.FORM("title6")="" or UPLOAD.FORM("title7")=""   then
  21. call showerr("系统提示:不能为空!")
  22. end if
  23. set rs=server.createobject("adodb.recordset")
  24. rs.open "select * from info3 where title='"&UPLOAD.FORM("title")&"'",conn,1,3
  25. if rs.bof and rs.eof then
  26. rs.addnew
  27. rs("title")=UPLOAD.FORM("title")
  28. rs("pw")=UPLOAD.FORM("pw")
  29. rs("title2")=UPLOAD.FORM("title2")
  30. rs("title3")=UPLOAD.FORM("title3")
  31. rs("title4")=UPLOAD.FORM("title4")
  32. rs("title5")=UPLOAD.FORM("title5")
  33. rs("title6")=UPLOAD.FORM("title6")
  34. rs("title7")=UPLOAD.FORM("title7")
  35. rs("postdate")=DATE()
  36. rs.Update
  37. else
  38. showerr("数据库中已经有相同用户名的!")
  39. end if
  40. call showmsg("系统提示:信息添加成功!","list.asp")
  41. End Function
  42. '-----------------------------
  43. Function Edit
  44. if UPLOAD.FORM("title")="" or UPLOAD.FORM("title2")="" or UPLOAD.FORM("title3")="" or UPLOAD.FORM("title4")="" or UPLOAD.FORM("title5")="" or UPLOAD.FORM("title6")="" or UPLOAD.FORM("title7")=""   then
  45. call showerr("系统提示:不能为空!")
  46. end if
  47. set rs=server.createobject("adodb.recordset")
  48. rs.open "select * from info3 where id="&UPLOAD.FORM("id"),conn,1,3
  49. rs("title")=UPLOAD.FORM("title")
  50. rs("pw")=UPLOAD.FORM("pw")
  51. rs("title2")=UPLOAD.FORM("title2")
  52. rs("title3")=UPLOAD.FORM("title3")
  53. rs("title4")=UPLOAD.FORM("title4")
  54. rs("title5")=UPLOAD.FORM("title5")
  55. rs("title6")=UPLOAD.FORM("title6")
  56. rs("title7")=UPLOAD.FORM("title7")
  57. rs("postdate")=DATE()
  58. rs.Update
  59. call showmsg("系统提示:信息修改成功!","list.asp")
  60. End Function
  61. function GetExtendName(FileName)
  62. dim ExtName
  63. ExtName = LCase(FileName)
  64. ExtName = right(ExtName,3)
  65. ExtName = right(ExtName,3-Instr(ExtName,"."))
  66. GetExtendName = ExtName
  67. end function
  68. '-----------------------------
  69. call COCLS
  70. %>