Nmodsave.asp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!--#include file="../bdcommx/connxyz.asp"-->
  2. <%Function chgenter(str)
  3. t1=""
  4. for i=1 to len(str)
  5. h=mid(str,i,1)
  6. if asc(h)=10 then h="<br>"
  7. if asc(h)=13 then h=""
  8. t1=t1+h
  9. next
  10. str=t1
  11. chgenter=str
  12. End Function%>
  13. <%call log_chk()
  14. dim thex,title,npdcla,picpath,tlink,note,tj,d_content,Bname,Sname,odr
  15. thex=request("thex")
  16. Bname=request("Bname")
  17. Sname=request("Sname")
  18. title=trim(request("title"))
  19. npdcla=request("npdcla")
  20. picpath=request("picpath")
  21. tlink=request("tlink")
  22. note=request("note")
  23. tj=request("tj")
  24. dt=request("select_date")
  25. dianji=request("dianji")
  26. odr=request("odr")
  27. d_content=request("d_content")
  28. if title="" or npdcla="" then
  29. call backurl("标题或者类别不能为空!")
  30. else
  31. Set rs=Server.Createobject("Adodb.Recordset")
  32. sql="select * from bdnews where nws_id="&thex&""
  33. rs.open sql,conn,1,3
  34. rs("nws_title")=title
  35. myA=split(npdcla,"|")
  36. rs("nb_id")=myA(0)
  37. rs("ns_id")=myA(1)
  38. rs("nws_zd")=zd
  39. if tj<>"" then
  40. rs("nws_tj")=1
  41. else
  42. rs("nws_tj")=0
  43. end if
  44. if odr<>"" then
  45. rs("nws_order")=odr
  46. end if
  47. rs("Fileurl")=picpath
  48. rs("nws_link")=tlink
  49. rs("nws_note")=chgenter(note)
  50. rs("nws_cont")=d_content
  51. rs("nws_Author")=session("adminxxx")
  52. rs("nws_time")=dt
  53. rs("nws_click")=dianji
  54. rs.update
  55. rs.close
  56. set rs=nothing
  57. call GoUrl("Nmod.asp?thex="&thex&"&Bname="&Bname&"&Sname="&Sname&"","修改成功")
  58. end if%>