SetSysParaAction.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:5k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../../FS_InterFace/ns_Function.asp" -->
  5. <!--#include file="../../FS_Inc/Function.asp" -->
  6. <!--#include file="lib/cls_main.asp" -->
  7. <%'Copyright (c) 2006 Foosun Inc. Code by Einstein.Liu
  8. Dim Conn,ns_sysPara_Rs,ns_siteName,ns_keyWords,ns_newsDir,ns_isDomain,ns_fileNameRule,ns_fileDirRule,ns_classSaveType,ns_fileExtName,ns_indexPage,ns_newsCheck,ns_refreshFile,ns_isOpen,ns_indexTemplet,ns_isPrintPic,ns_linkType,ns_fileChar,ns_isCheck,ns_isReviewCheck,ns_isConstrCheck,ns_addNewsType,ns_allInfotitle,ns_reycleTF,Fs_News
  9. Dim ns_InsideLink,ns_RSSTF,ns_rssNumber,ns_rssdescript,ns_RSSPIC,ns_rssContentNumber,SysParmTF
  10. MF_Default_Conn'初始化Conn
  11. MF_Session_TF
  12. if not MF_Check_Pop_TF("NS_Param") then Err_Show
  13. if not MF_Check_Pop_TF("NS049") then Err_Show
  14. Set Fs_News=New Cls_News
  15. If Not Fs_news.IsSelfRefer Then response.write "非法提交数据":Response.end
  16. if NoSqlHack(Request.QueryString("act"))="SetSysPara_Action" then
  17. ns_SiteName=Request.Form("txt_SiteName")
  18. ns_keyWords=Request.Form("txt_KeyWords")
  19. ns_newsDir=Request.Form("txt_NewsDir")
  20. ns_isDomain=Request.Form("rad_IsDomain")
  21. if trim(Request.Form("txt_FileNameRule_Element_Separator"))<>"" then
  22. if not Fs_News.chkinputchar(trim(Request.Form("txt_FileNameRule_Element_Separator"))) then
  23. Response.Redirect("lib/error.asp?ErrCodes=<li>分割符号只允许为:""0-9"",""A-Z"",""-"",""_"","",""."",""@"",""#""</li>")
  24. Response.End()
  25. end if
  26. End if
  27. ns_fileNameRule=trim(Request.Form("txt_FileNameRule_Element_Prefix"))&"$"&trim(replace(Request.Form("chk_FileNameRule_Element"),",",""))&"$"&trim(Request.Form("rad_FileNameRule_Rnd"))&"$"&trim(Request.Form("chk_FileNameRule_UseWord"))&"$"&trim(Request.Form("txt_FileNameRule_Element_Separator"))&"$"&trim(Request.Form("rad_FileNameRule_UseNewsID"))&"$"&trim(Request.Form("rad_FileNameRule_NewsID"))
  28. ns_fileDirRule=Request.Form("rad_FileDirRule")
  29. ns_classSaveType=Request.Form("rad_ClassSaveType")
  30. ns_fileExtName=Request.Form("rad_FileExtName")
  31. ns_indexPage=trim(Request.Form("txt_IndexPage_Name"))
  32. ns_newsCheck=Request.Form("rad_NewsCheck")
  33. ns_isOpen=Request.Form("rad_isOpen")
  34. ns_indexTemplet=Request.Form("txt_IndexTemplet")
  35. ns_linkType=Request.Form("rad_LinkType")
  36. ns_isCheck=Request.Form("rad_isCheck")
  37. ns_isReviewCheck=Request.Form("rad_isReviewCheck")
  38. ns_isConstrCheck=Request.Form("rad_isConstrCheck")
  39. ns_addNewsType=Request.Form("rad_AddNewsType")
  40. ns_allInfotitle=Request.Form("txt_AllInfotitle")
  41. ns_reycleTF=Request.Form("rad_ReycleTF")
  42. ns_RSSTF= Request.Form("RSSTF")
  43. ns_rssNumber= Request.Form("rssNumber")
  44. ns_rssdescript= Request.Form("rssdescript")
  45. ns_RSSPIC= Request.Form("RSSPIC")
  46. ns_rssContentNumber=Request.Form("rssContentNumber")
  47. ns_InsideLink=Request.Form("InsideLink")
  48. SysParmTF = True
  49. if ns_reycleTF="" Then ns_reycleTF=1 
  50. Set ns_sysPara_Rs=Server.CreateObject(G_FS_RS)
  51. ns_sysPara_Rs.open "Select SiteName,Keywords,NewsDir,IsDomain,FileNameRule,FileDirRule,ClassSaveType,FileExtName,IndexPage,NewsCheck,isOpen,IndexTemplet,LinkType,isCheck,isReviewCheck,isConstrCheck,AddNewsType,AllInfotitle,ReycleTF,RSSTF,rssNumber,rssdescript,RSSPIC,rssContentNumber,InsideLink From FS_ns_SysParam",Conn,1,3
  52. If ns_sysPara_Rs.Eof Then
  53. ns_sysPara_Rs.AddNew
  54. End If
  55. ns_sysPara_Rs("SiteName")=ns_SiteName
  56. ns_sysPara_Rs("Keywords")=ns_keyWords
  57. ns_sysPara_Rs("NewsDir")=ns_newsDir
  58. ns_sysPara_Rs("IsDomain")=ns_isDomain
  59. ns_sysPara_Rs("FileNameRule")=ns_fileNameRule
  60. ns_sysPara_Rs("FileDirRule")=Cint(ns_fileDirRule)
  61. ns_sysPara_Rs("ClassSaveType")=Cint(ns_classSaveType)
  62. ns_sysPara_Rs("FileExtName")=Cint(ns_fileExtName)
  63. ns_sysPara_Rs("IndexPage")=ns_indexPage
  64. 'ns_sysPara_Rs("NewsCheck")=ns_newsCheck
  65. ns_sysPara_Rs("isOpen")=Cint(ns_isOpen)
  66. ns_sysPara_Rs("IndexTemplet")=ns_indexTemplet
  67. ns_sysPara_Rs("LinkType")=Cint(ns_linkType)
  68. ns_sysPara_Rs("isCheck")=Cint(ns_isCheck)
  69. ns_sysPara_Rs("isReviewCheck")=Cint(ns_isReviewCheck)
  70. ns_sysPara_Rs("isConstrCheck")=Cint(ns_isConstrCheck)
  71. ns_sysPara_Rs("AddNewsType")=Cint(ns_addNewsType)
  72. ns_sysPara_Rs("AllInfotitle")=ns_allInfotitle
  73. ns_sysPara_Rs("ReycleTF")=Cint(ns_reycleTF)
  74. if trim(ns_InsideLink)="1" then:ns_sysPara_Rs("InsideLink")=1:else:ns_sysPara_Rs("InsideLink")=0:end if
  75. 'RSS
  76. if trim(ns_RSSTF)<>"" then:ns_sysPara_Rs("RSSTF")=1:else:ns_sysPara_Rs("RSSTF")=0:end if
  77. if isnumeric(ns_rssNumber) then
  78. ns_sysPara_Rs("rssNumber")=Cint(ns_rssNumber)
  79. else
  80. ns_sysPara_Rs("rssNumber")=50
  81. end if
  82. ns_sysPara_Rs("rssdescript")=ns_rssdescript
  83. ns_sysPara_Rs("RSSPIC")=ns_RSSPIC
  84. if isnumeric(ns_rssContentNumber) then
  85. ns_sysPara_Rs("rssContentNumber")=Cint(ns_rssContentNumber)
  86. else
  87. ns_sysPara_Rs("rssContentNumber")=400
  88. end if
  89. ns_sysPara_Rs.update
  90. ns_sysPara_Rs.close
  91. Set ns_sysPara_Rs=nothing
  92. if err.number=0 then
  93. NSConfig_Cookies
  94. Conn.close
  95. Set Conn=nothing
  96. Response.Redirect("lib/success.asp?ErrCodes=<li>操作成功</li>&ErrorURL=../SysParaSet.asp")
  97. Response.End()
  98. else
  99. Conn.close
  100. Set Conn=nothing
  101. Response.Redirect("lib/error.asp?ErrCodes=<li>请检查输入是否合法</li>")
  102. Response.End()
  103. end if
  104. end if
  105. %>
  106. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->