Js_Free_Action.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,FreeJs_Rs,jsid,act,Fs_News
  9. Dim EName,CName,Js_Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode
  10. MF_Default_Conn
  11. MF_Session_TF 
  12. 'Call MF_Check_Pop_TF("NS_Class_000001") 
  13. '得到会员组列表 
  14. if not MF_Check_Pop_TF("NS_Freejs") then Err_Show
  15. Set FreeJs_Rs=Server.CreateObject(G_FS_RS)
  16. Set FS_News=New Cls_News
  17. EName=Request.Form("txt_ename")
  18. CName=Request.Form("txt_cname")
  19. Js_Type=Request.Form("rad_type")
  20. act=NoSqlHack(request.QueryString("act"))
  21. If Not Fs_news.IsSelfRefer Then response.write "非法提交数据":Response.end
  22. if Js_Type="" then Js_Type=0
  23. if Cint(Js_Type)=0  then'判断是否是文字类型
  24. Manner=Request.Form("sel_manner")'文字 
  25. else
  26. Manner=Request.Form("sel_manner_pic")'图片 
  27. End if
  28. PicWidth=Request.Form("txt_picWidth")
  29. PicHeight=Request.Form("txt_picHeight")
  30. NewsNum=Request.Form("txt_newsNum")
  31. NewsTitleNum=Request.Form("txt_newsTitleNum")
  32. TitleCSS=Request.Form("txt_titleCSS")
  33. ContentCSS=Request.Form("txt_contentCSS")
  34. BackCSS=Request.Form("txt_backCSS")
  35. RowNum=Request.Form("txt_rowNum")
  36. PicPath=Request.Form("txt_picPath")
  37. AddTime=dateValue(Now)
  38. ShowTimeTF=Request.Form("sel_showTimeTF")
  39. ContentNum=Request.Form("txt_contentNum")
  40. if ContentNum="" then
  41. ContentNum=0
  42. End if
  43. NaviPic=Request.Form("txt_naviPic")
  44. DateType=Request.Form("sel_dateType")
  45. DateCSS=Request.Form("sel_dateCSS")
  46. Info=Request.Form("txt_info")
  47. MoreContent=Request.Form("txt_moreContent")
  48. LinkWord=Request.Form("txt_linkWord")
  49. LinkCSS=Request.Form("txt_linkCSS")
  50. Info=Request.Form("txt_info")
  51. rowSpace=Request.Form("txt_rowSpace")
  52. RowBettween=Request.Form("txt_rowBettween")
  53. OpenMode=Request.Form("sel_OpenMode")
  54. '添加js
  55. if act="add" then
  56. if not MF_Check_Pop_TF("NS037") then Err_Show
  57. FreeJs_Rs.open "select * from FS_NS_FreeJS where 1=2",Conn,1,3
  58. FreeJs_Rs.addnew
  59. FreeJs_Rs("EName")=EName
  60. FreeJs_Rs("CName")=CName
  61. FreeJs_Rs("Type")=Js_Type
  62. FreeJs_Rs("Manner")=Manner
  63. if Js_Type="1" then
  64. FreeJs_Rs("PicWidth")=PicWidth
  65. FreeJs_Rs("PicHeight")=PicHeight
  66. FreeJs_Rs("PicPath")=PicPath
  67. End if
  68. FreeJs_Rs("NewsNum")=NewsNum
  69. FreeJs_Rs("AddTime")=AddTime
  70. FreeJs_Rs("ShowTimeTF")=ShowTimeTF
  71. if ShowTimeTF="1" then
  72. FreeJs_Rs("DateType")=DateType
  73. FreeJs_Rs("DateCSS")=DateCSS
  74. End if
  75. FreeJs_Rs("ContentCSS")=ContentCSS
  76. FreeJs_Rs("TitleCSS")=TitleCSS
  77. FreeJs_Rs("NewsTitleNum")=NewsTitleNum
  78. FreeJs_Rs("rowSpace")=rowSpace
  79. FreeJs_Rs("BackCSS")=BackCSS
  80. FreeJs_Rs("RowNum")=RowNum
  81. FreeJs_Rs("ContentNum")=ContentNum
  82. FreeJs_Rs("NaviPic")=NaviPic
  83. FreeJs_Rs("Info")=Info
  84. FreeJs_Rs("MoreContent")=MoreContent
  85. FreeJs_Rs("LinkWord")=LinkWord
  86. FreeJs_Rs("LinkCSS")=LinkCSS
  87. FreeJs_Rs("Info")=Info
  88. FreeJs_Rs("RowBettween")=RowBettween
  89. FreeJs_Rs("OpenMode")=OpenMode
  90. FreeJs_Rs.update
  91. FreeJs_Rs.close
  92. '修改js
  93. Elseif act="edit" Then
  94. if not MF_Check_Pop_TF("NS038") then Err_Show
  95. jsid=Request.Form("hid_jsid")
  96. if not isnumeric(jsid) Then
  97. Response.Redirect("lib/error.asp?ErrCodes=<li>发生异常,请返回</li>")
  98. Response.End()
  99. End if
  100. FreeJs_Rs.open "select ID,EName,CName,Type,Manner,PicWidth,PicHeight,NewsNum,NewsTitleNum,TitleCSS,ContentCSS,BackCSS,RowNum,PicPath,AddTime,ShowTimeTF,ContentNum,NaviPic,DateType,DateCSS,Info,MoreContent,LinkWord,LinkCSS,RowSpace,RowBettween,OpenMode from FS_NS_FreeJS where id="&jsid,Conn,1,3
  101. FreeJs_Rs("EName")=EName
  102. FreeJs_Rs("CName")=CName
  103. FreeJs_Rs("Type")=Js_Type
  104. FreeJs_Rs("Manner")=Manner
  105. if Js_Type="1" then
  106. FreeJs_Rs("PicWidth")=PicWidth
  107. FreeJs_Rs("PicHeight")=PicHeight
  108. FreeJs_Rs("PicPath")=PicPath
  109. End if
  110. FreeJs_Rs("NewsNum")=NewsNum
  111. FreeJs_Rs("AddTime")=AddTime
  112. FreeJs_Rs("ShowTimeTF")=ShowTimeTF
  113. if ShowTimeTF="1" then
  114. FreeJs_Rs("DateType")=DateType
  115. FreeJs_Rs("DateCSS")=DateCSS
  116. End if
  117. FreeJs_Rs("ContentCSS")=ContentCSS
  118. FreeJs_Rs("TitleCSS")=TitleCSS
  119. FreeJs_Rs("NewsTitleNum")=NewsTitleNum
  120. FreeJs_Rs("rowSpace")=rowSpace
  121. FreeJs_Rs("BackCSS")=BackCSS
  122. FreeJs_Rs("RowNum")=RowNum
  123. FreeJs_Rs("ContentNum")=ContentNum
  124. FreeJs_Rs("NaviPic")=NaviPic
  125. FreeJs_Rs("Info")=Info
  126. FreeJs_Rs("MoreContent")=MoreContent
  127. FreeJs_Rs("LinkWord")=LinkWord
  128. FreeJs_Rs("LinkCSS")=LinkCSS
  129. FreeJs_Rs("Info")=Info
  130. FreeJs_Rs("RowBettween")=RowBettween
  131. FreeJs_Rs("OpenMode")=OpenMode
  132. FreeJs_Rs.update
  133. FreeJs_Rs.close
  134. '删除js
  135. ElseIf act="delete" Then
  136. if not MF_Check_Pop_TF("NS039") then Err_Show
  137. Dim d_js_ids
  138. d_js_ids=Request.Form("chk_FreeJs")
  139. d_js_ids=DelHeadAndEndDot(d_js_ids)
  140. Conn.execute("Delete From FS_NS_FreeJsFile where JSName in (select EName From FS_NS_FreeJS where id in ("&d_js_ids&"))")
  141. Conn.execute("Delete From FS_NS_FreeJS where id in ("&d_js_ids&")")
  142. Call MF_Insert_oper_Log("自由JS","批量删除了自由JS,删除ID:"& Replace(d_js_ids," ","") &"",now,session("admin_name"),"NS")
  143. End if
  144. if err.number=0 then
  145. Response.Redirect("lib/success.asp?ErrCodes=<li>操作成功</li>&ErrorURL=../Js_Free_Manage.asp")
  146. Response.End()
  147. else
  148. Response.Redirect("lib/error.asp?ErrCodes=<li>发生异常,请返回</li>")
  149. Response.End()
  150. end if
  151. %>
  152. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->