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("title")="" then
  21. call showerr("系统提示:标题不能为空!")
  22. end if
  23. set rs=server.createobject("adodb.recordset")
  24. rs.open "select * from Info2",conn,1,3
  25. rs.addnew
  26. rs("title")=UPLOAD.FORM("title")
  27. rs("wz")=UPLOAD.FORM("wz")
  28. rs("content")=UPLOAD.FORM("content")
  29. rs("pic")=UPLOAD.FORM("pic")
  30. rs("postdate")=DATE()
  31. rs.Update
  32. call showmsg("系统提示:信息添加成功!","list.asp")
  33. End Function
  34. '-----------------------------
  35. Function Edit
  36. if UPLOAD.FORM("title")="" then
  37. call showerr("系统提示:标题不能为空!")
  38. end if
  39. if UPLOAD.FORM("content")="" then
  40. call showerr("系统提示:内容不能为空!")
  41. end if
  42. set rs=server.createobject("adodb.recordset")
  43. rs.open "select * from Info2 where id="&UPLOAD.FORM("id"),conn,1,3
  44. rs("title")=UPLOAD.FORM("title")
  45. rs("wz")=UPLOAD.FORM("wz")
  46. rs("content")=UPLOAD.FORM("content")
  47. rs("pic")=UPLOAD.FORM("pic")
  48. rs("postdate")=DATE()
  49. rs.Update
  50. call showmsg("系统提示:信息修改成功!","list.asp")
  51. End Function
  52. function GetExtendName(FileName)
  53. dim ExtName
  54. ExtName = LCase(FileName)
  55. ExtName = right(ExtName,3)
  56. ExtName = right(ExtName,3-Instr(ExtName,"."))
  57. GetExtendName = ExtName
  58. end function
  59. '-----------------------------
  60. call COCLS
  61. %>