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

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <!--#include file="../../FS_Inc/Function.asp"-->
  4. <!--#include file="../../FS_InterFace/MF_Function.asp" -->
  5. <!--#include file="../../FS_InterFace/NS_Function.asp" -->
  6. <!--#include file="lib/Cls_RefreshJs.asp"-->
  7. <% 'Copyright (c) 2006 Foosun Inc. Code by awen
  8. Dim Conn,FS_NS_JS_Obj,FS_NS_JS_Sql,sErrStr
  9. MF_Default_Conn
  10. 'session判断
  11. MF_Session_TF 
  12. if not MF_Check_Pop_TF("NS041") then Err_Show
  13. Dim FileID,RsSysModObj,FunClassID,Types,ScrLink,ScrNewsType ,sRootDir,str_CurrPath,db_NewsDir,str_SavePath
  14. if G_VIRTUAL_ROOT_DIR<>"" then sRootDir="/"+G_VIRTUAL_ROOT_DIR else sRootDir=""
  15. '判断用户是否为超级管理员,限定访问路径
  16. if Session("Admin_Is_Super") = 1 then
  17. str_CurrPath = sRootDir &"/"&G_UP_FILES_DIR
  18. Else
  19. str_CurrPath = Replace(sRootDir &"/"&G_UP_FILES_DIR&"/adminfiles/"&Session("Admin_Name"),"//","/")
  20. End if
  21. Set RsSysModObj = Conn.Execute("select top 1 NewsDir from FS_NS_SysParam")
  22. if not RsSysModObj.eof then 
  23. db_NewsDir = RsSysModObj(0)
  24. end if
  25. RsSysModObj.close
  26. if isnull(db_NewsDir) or db_NewsDir="" then 
  27. response.Redirect("lib/error.asp?ErrCodes=<li>抱歉新闻系统参数的 文章系统前台目录 配置为空。无法继续。</li>&ErrorUrl=../Js_Sys_Add.asp")
  28. response.End()
  29. end if
  30. str_SavePath = sRootDir &"/"& db_NewsDir 
  31. If Request.QueryString("FileID")="" or isnull(Request.QueryString("FileID")) then
  32. response.Redirect("lib/error.asp?ErrCodes=<li>参数传递错误</li>")
  33. Response.End
  34. Else
  35. FileID = Request.QueryString("FileID")
  36. Types = "System" ''系统JS
  37. Set RsSysModObj = Conn.Execute("Select * from FS_NS_Sysjs where ID="&FileID&"")
  38. If RsSysModObj.eof then
  39. response.Redirect("lib/error.asp?ErrCodes=<li>未查询到相关记录</li>")
  40. Response.End
  41. End IF
  42. FunClassID = RsSysModObj("ClassID")
  43. ScrLink = RsSysModObj("MoreContent")
  44. ScrNewsType = RsSysModObj("NewsType")
  45. End IF
  46. Function ClassList()
  47. Dim Rs,SelectStr
  48. Set Rs = Conn.Execute("select ClassID,ClassCName from FS_NS_NewsClass where ParentID = '0' and DelFlag=0 order by AddTime desc")
  49. do while Not Rs.Eof
  50. If Cstr(FunClassID) = Cstr(Rs("ClassID")) then
  51. SelectStr = " selected"
  52. Else
  53. SelectStr = ""
  54. End If
  55. ClassList = ClassList & "<option value="""&Rs("ClassID")&""""& SelectStr & ">" & Rs("ClassCName") & chr(10) & chr(13)
  56. ClassList = ClassList & ChildClassList(Rs("ClassID"),"")
  57. Rs.MoveNext
  58. loop
  59. Rs.Close
  60. Set Rs = Nothing
  61. End Function
  62. Function ChildClassList(ClassID,Temp)
  63. Dim TempRs,TempStr,SelectStrs
  64. Set TempRs = Conn.Execute("Select ClassID,ClassCName,ChildNum from FS_NS_NewsClass where ParentID = '" & ClassID & "' and DelFlag=0 order by AddTime desc ")
  65. TempStr = Temp & " - "
  66. do while Not TempRs.Eof
  67. If Cstr(FunClassID) = Cstr(TempRs("ClassID")) then
  68. SelectStrs = " selected"
  69. Else
  70. SelectStrs = ""
  71. End If
  72. if TempRs("ChildNum") = 0 then
  73. ChildClassList = ChildClassList & "<option value="""&TempRs("ClassID")&"""" & SelectStrs & ">" & TempStr & TempRs("ClassCName") & "</option>"& chr(10) & chr(13)
  74. else
  75. ChildClassList = ChildClassList & "<option value="""&TempRs("ClassID")&"""" & SelectStrs & ">" & TempStr & TempRs("ClassCName") & "</option>"& chr(10) & chr(13)
  76. end if
  77. ChildClassList = ChildClassList & ChildClassList(TempRs("ClassID"),TempStr)
  78. TempRs.MoveNext
  79. loop
  80. TempRs.Close
  81. Set TempRs = Nothing
  82. End Function
  83. %>
  84. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  85. <html>
  86. <head>
  87. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  88. <title>系统JS管理___Powered by foosun Inc.</title>
  89. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  90. <script language="JavaScript" src="js/Public.js"></script>
  91. </HEAD>
  92. <BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 scroll=yes  oncontextmenu="return true;">
  93. <form action="?action=add&FileID=<%=FileID%>" method="post" name="ClassJSForm">
  94. <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  95.   <tr  class="hback"> 
  96.     <td class="xingmu" >系统JS管理</td>
  97.   </tr>
  98.   <tr  class="hback">
  99.     <td class="hback" ><a href="Js_Sys_manage.asp?Act=View" >管理首页</a>&nbsp;|&nbsp;
  100.       <a href="Js_Sys_Add.asp">新增</a> &nbsp;|&nbsp;
  101.       <a href="Js_Sys_manage.asp?Act=Search">查询</a>
  102. </td>
  103.   </tr>
  104. </table>
  105.   <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  106.     <tr class="hback">  
  107.       <td width="15%" height="26">&nbsp;&nbsp;&nbsp;&nbsp;中文名称</td>
  108.       <td width="35%"> 
  109.         <input name="FileCName" type="text" id="FileCName" style="width:90%" value="<%=RsSysModObj("FileCName")%>"></td>
  110.       <td width="15%">&nbsp;&nbsp;&nbsp;&nbsp;文件名称</td>
  111.       <td width="35%"> 
  112.         <input name="FileName" type="text" id="FileName" readonly="" style="width:90%" value="<%=RsSysModObj("FileName")%>"></td>
  113.     </tr>
  114.     <tr class="hback">  
  115.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;栏目ID号</td>
  116.       <td> 
  117. <input type="text" style="width:90%" name="ClassID" value="0" disabled>
  118.  </td>
  119.       <td>&nbsp;&nbsp;&nbsp;&nbsp;新闻类型</td>
  120.       <td> 
  121.         <select name="NewsType" style="width:90%" onChange="ChooseNewsType(this.options[this.selectedIndex].value);">
  122.           <option value="RecNews" <%if RsSysModObj("NewsType") = "RecNews" then Response.Write("selected")%>>推荐新闻</option>
  123.           <option value="MarqueeNews" <%if RsSysModObj("NewsType") = "MarqueeNews" then Response.Write("selected")%>>滚动新闻</option>
  124.           <option value="SBSNews" <%if RsSysModObj("NewsType") = "SBSNews" then Response.Write("selected")%>>并排新闻</option>
  125.           <option value="PicNews" <%if RsSysModObj("NewsType") = "PicNews" then Response.Write("selected")%>>图片新闻</option>
  126.           <option value="NewNews" <%if RsSysModObj("NewsType") = "NewNews" then Response.Write("selected")%>>最新新闻</option>
  127.           <option value="HotNews" <%if RsSysModObj("NewsType") = "HotNews" then Response.Write("selected")%>>热点新闻</option>
  128.           <option value="WordNews" <%if RsSysModObj("NewsType") = "WordNews" then Response.Write("selected")%>>文字新闻</option>
  129.           <option value="TitleNews" <%if RsSysModObj("NewsType") = "TitleNews" then Response.Write("selected")%>>标题新闻</option>
  130.           <option value="ProclaimNews" <%if RsSysModObj("NewsType") = "ProclaimNews" then Response.Write("selected")%>>公告新闻</option>
  131.         </select></td>
  132.     </tr>
  133. <tr class="hback">  
  134.       <td height="26">&nbsp;&nbsp;点击数大于</td>
  135.       <td> 
  136.         <input type="text" style="width:90% " name="setHitsValue" maxlength="4" value="<%=RsSysModObj("MarSpeed")%>"  onChange="if(/D/.test(this.value)){alert('只能输入数字');this.value='';}">
  137.       </td>
  138.       <td colspan="2">用于热点新闻,当点击数大于多少才算热门。</td>
  139.     </tr>
  140.     <tr class="hback">  
  141.       <td height="26">&nbsp;&nbsp;&nbsp;更多链接</td>
  142.       <td> 
  143.         <select name="MoreContent" id="MoreContent" style="width:90% " <%If Types = "System" then Response.Write("disabled")%> onChange="ChooseLink(this.options[this.selectedIndex].value);">
  144.           <option value="1" <%If RsSysModObj("MoreContent")=1 then Response.Write("selected")%>>是</option>
  145.           <option value="0" <%If RsSysModObj("MoreContent")=0 then Response.Write("selected")%>>否</option>
  146.         </select></td>
  147.       <td>&nbsp;&nbsp;&nbsp;&nbsp;链接字样</td>
  148.       <td> 
  149.         <input name="LinkWord" type="text" id="LinkWord" style="width:90%" value="<%=RsSysModObj("LinkWord")%>" <%If Types = "System" then Response.Write("disabled")%>></td>
  150.     </tr>
  151.     <tr class="hback">  
  152.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;新闻数量</td>
  153.       <td> 
  154.         <input name="NewsNum" type="text" id="NewsNum" style="width:90%" value="<%=RsSysModObj("NewsNum")%>"></td>
  155.       <td>&nbsp;&nbsp;&nbsp;&nbsp;每行数量</td>
  156.       <td> 
  157.         <input name="RowNum" type="text" id="RowNum" style="width:90%" value="<%=RsSysModObj("RowNum")%>"></td>
  158.     </tr>
  159.     <tr class="hback">  
  160.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;链接样式</td>
  161.       <td> 
  162.         <input name="LinkCSS" type="text" id="LinkCSS" style="width:90%" value="<%=RsSysModObj("LinkCSS")%>" <%If Types = "System" then Response.Write("disabled")%>></td>
  163.       <td>&nbsp;&nbsp;&nbsp;&nbsp;标题字数</td>
  164.       <td> 
  165.         <input name="TitleNum" type="text" id="TitleNum" style="width:90%" value="<%=RsSysModObj("TitleNum")%>"></td>
  166.     </tr>
  167.     <tr class="hback">  
  168.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;图片宽度</td>
  169.       <td> 
  170.         <input name="PicWidth" type="text" id="PicWidth" style="width:90%" value="<%=RsSysModObj("PicWidth")%>"></td>
  171.       <td>&nbsp;&nbsp;&nbsp;&nbsp;标题样式</td>
  172.       <td> 
  173.         <input name="TitleCSS" type="text" id="TitleCSS" style="width:90%" value="<%=RsSysModObj("TitleCSS")%>"></td>
  174.     </tr>
  175.     <tr class="hback">  
  176.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;图片高度</td>
  177.       <td> 
  178.         <input name="PicHeight" type="text" id="PicHeight" style="width:90%" value="<%=RsSysModObj("PicHeight")%>"></td>
  179.       <td>&nbsp;&nbsp;&nbsp;&nbsp;新闻行距</td>
  180.       <td> 
  181.         <input name="RowSpace" type="text" id="RowSpace" style="width:90%" value="<%=RsSysModObj("RowSpace")%>"></td>
  182.     </tr>
  183.     <tr class="hback">  
  184.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;滚动速度</td>
  185.       <td> 
  186.         <input name="MarSpeed" type="text" id="MarSpeed" style="width:90%" value="<%=RsSysModObj("MarSpeed")%>"></td>
  187.       <td>&nbsp;&nbsp;&nbsp;&nbsp;滚动方向</td>
  188.       <td> 
  189.         <select name="MarDirection" id="MarDirection" style="width:90% ">
  190.           <option value="up" <%If RsSysModObj("MarDirection")="up" then Response.Write("selected")%>>向上</option>
  191.           <option value="down" <%If RsSysModObj("MarDirection")="down" then Response.Write("selected")%>>向下</option>
  192.           <option value="left" <%If RsSysModObj("MarDirection")="left" then Response.Write("selected")%>>向左</option>
  193.           <option value="right" <%If RsSysModObj("MarDirection")="right" then Response.Write("selected")%>>向右</option>
  194.         </select></td>
  195.     </tr>
  196.     <tr class="hback">  
  197.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;公告宽度</td>
  198.       <td> 
  199.         <input name="MarWidth" type="text" id="MarWidth" style="width:90%" value="<%=RsSysModObj("MarWidth")%>"></td>
  200.       <td>&nbsp;&nbsp;&nbsp;&nbsp;公告高度</td>
  201.       <td> 
  202.         <input name="MarHeight" type="text" id="MarHeight" style="width:90%" value="<%=RsSysModObj("MarHeight")%>"></td>
  203.     </tr>
  204.     <tr class="hback">  
  205.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;显示标题</td>
  206.       <td> 
  207.         <select name="ShowTitle" id="ShowTitle" style="width:90%">
  208.           <option value="1" <%If RsSysModObj("ShowTitle")=1 then Response.Write("selected")%>>是</option>
  209.           <option value="0" <%If RsSysModObj("ShowTitle")=0 then Response.Write("selected")%>>否</option>
  210.         </select></td>
  211.       <td>&nbsp;&nbsp;&nbsp;&nbsp;新开窗口</td>
  212.       <td> 
  213.         <select name="OpenMode" id="OpenMode" style="width:90%">
  214.           <option value="1" <%If RsSysModObj("OpenMode")=1 then Response.Write("selected")%>>是</option>
  215.           <option value="0" <%If RsSysModObj("OpenMode")=0 then Response.Write("selected")%>>否</option>
  216.         </select></td>
  217.     </tr>
  218.     <tr class="hback">  
  219.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;导航图片</td>
  220.       <td> 
  221.         <input name="NaviPic" type="text" id="NaviPic" style="width:60%" value="<%=RsSysModObj("NaviPic")%>">
  222.         <input type="button" name="bnt_ChoosePic_naviPic"  value="选择图片" onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<%=str_CurrPath %>',500,300,window,document.ClassJSForm.NaviPic);"></td>
  223.       <td>&nbsp;&nbsp;&nbsp;&nbsp;行间图片</td>
  224.       <td> 
  225.         <input name="RowBetween" type="text" id="RowBetween" style="width:52%" value="<%=RsSysModObj("RowBetween")%>">
  226.         <input type="button" name="bnt_ChoosePic_rowBettween"  value="选择图片" onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectPic.asp?CurrPath=<%=str_CurrPath %>',500,300,window,document.ClassJSForm.RowBetween);"></td>
  227.     </tr>
  228.     <tr class="hback">  
  229.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;调用日期</td>
  230.       <td> 
  231.         <select name="DateType" id="DateType" style="width:90%">
  232.           <option value="0">调用日期类型</option>
  233.           <option value="1" <%if RsSysModObj("DateType") = "1" then Response.Write("selected") end if%>><%=Year(Now)&"-"&Month(Now)&"-"&Day(Now)%></option>
  234.           <option value="2" <%if RsSysModObj("DateType") = "2" then Response.Write("selected") end if%>><%=Year(Now)&"."&Month(Now)&"."&Day(Now)%></option>
  235.           <option value="3" <%if RsSysModObj("DateType") = "3" then Response.Write("selected") end if%>><%=Year(Now)&"/"&Month(Now)&"/"&Day(Now)%></option>
  236.           <option value="4" <%if RsSysModObj("DateType") = "4" then Response.Write("selected") end if%>><%=Month(Now)&"/"&Day(Now)&"/"&Year(Now)%></option>
  237.           <option value="5" <%if RsSysModObj("DateType") = "5" then Response.Write("selected") end if%>><%=Day(Now)&"/"&Month(Now)&"/"&Year(Now)%></option>
  238.           <option value="6" <%if RsSysModObj("DateType") = "6" then Response.Write("selected") end if%>><%=Month(Now)&"-"&Day(Now)&"-"&Year(Now)%></option>
  239.           <option value="7" <%if RsSysModObj("DateType") = "7" then Response.Write("selected") end if%>><%=Month(Now)&"."&Day(Now)&"."&Year(Now)%></option>
  240.           <option value="8" <%if RsSysModObj("DateType") = "8" then Response.Write("selected") end if%>><%=Month(Now)&"-"&Day(Now)%></option>
  241.           <option value="9" <%if RsSysModObj("DateType") = "9" then Response.Write("selected") end if%>><%=Month(Now)&"/"&Day(Now)%></option>
  242.           <option value="10" <%if RsSysModObj("DateType") = "10" then Response.Write("selected") end if%>><%=Month(Now)&"."&Day(Now)%></option>
  243.           <option value="11" <%if RsSysModObj("DateType") = "11" then Response.Write("selected") end if%>><%=Month(Now)&"月"&Day(Now)&"日"%></option>
  244.           <option value="12" <%if RsSysModObj("DateType") = "12" then Response.Write("selected") end if%>><%=day(Now)&"日"&Hour(Now)&"时"%></option>
  245.           <option value="13" <%if RsSysModObj("DateType") = "13" then Response.Write("selected") end if%>><%=day(Now)&"日"&Hour(Now)&"点"%></option>
  246.           <option value="14" <%if RsSysModObj("DateType") = "14" then Response.Write("selected") end if%>><%=Hour(Now)&"时"&Minute(Now)&"分"%></option>
  247.           <option value="15" <%if RsSysModObj("DateType") = "15" then Response.Write("selected") end if%>><%=Hour(Now)&":"&Minute(Now)%></option>
  248.           <option value="16" <%if RsSysModObj("DateType") = "16" then Response.Write("selected") end if%>><%=Year(Now)&"年"&Month(Now)&"月"&Day(Now)&"日"%></option>
  249.         </select></td>
  250.       <td>&nbsp;&nbsp;&nbsp;&nbsp;保存路径</td>
  251.       <td> 
  252.         <input name="SaveFilePath" type="text" id="SaveFilePath" style="width:52%" value="<%=RsSysModObj("FileSavePath")%>">
  253.         <INPUT type="button"  name="Submit4" value="选择路径" onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectPathFrame.asp?CurrPath=<%= str_SavePath %>',300,250,window,document.ClassJSForm.SaveFilePath);document.ClassJSForm.SaveFilePath.focus();"></td>
  254.     </tr>
  255.     <tr class="hback">  
  256.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;日期样式</td>
  257.       <td> 
  258.         <input name="DateCSS" type="text" id="DateCSS" style="width:90%" value="<%=RsSysModObj("DateCSS")%>"></td>
  259.       <td>&nbsp;&nbsp;&nbsp;&nbsp;显示栏目</td>
  260.       <td> 
  261.         <select name="ClassName" id="ClassName" style="width:90%">
  262.           <option value="1" <%If RsSysModObj("ClassName")=1 then Response.Write("selected")%>>显示</option>
  263.           <option value="0" <%If RsSysModObj("ClassName")=0 then Response.Write("selected")%>>不显示</option>
  264.         </select></td>
  265.     </tr>
  266.     <tr class="hback">  
  267.       <td height="26">&nbsp;&nbsp;&nbsp;&nbsp;调用子类</td>
  268.       <td> 
  269.         <select name="SonClass" id="SonClass" style="width:90%" <%If Types = "System" then Response.Write("disabled")%>>
  270.           <option value="1" <%If RsSysModObj("SonClass")=1 then Response.Write("selected")%>>是</option>
  271.           <option value="0" <%If RsSysModObj("SonClass")=0 then Response.Write("selected")%>>否</option>
  272.         </select></td>
  273.       <td>&nbsp;&nbsp;&nbsp;&nbsp;日期右对齐</td>
  274.       <td> 
  275.         <select name="RightDate" id="RightDate" style="width:90%">
  276.           <option value="1" <%If RsSysModObj("RightDate")=1 then Response.Write("selected")%>>是</option>
  277.           <option value="0" <%If RsSysModObj("RightDate")=0 then Response.Write("selected")%>>否</option>
  278.         </select></td>
  279.     </tr>
  280.     <tr class="hback">  
  281. <td colspan="10" align="center">
  282. <input type="submit" name="submit" value=" 保存 ">&nbsp;&nbsp;
  283. <input type="reset" name="reset" value=" 重置 ">
  284. </td>
  285. </tr>
  286. </table> 
  287. </form><p>
  288. </body>
  289. </html>
  290. <%
  291. RsSysModObj.close
  292. set RsSysModObj=nothing
  293. If Request.QueryString("action") = "add" then
  294. Dim ResultStr,TempFsoObj,FileNameStr
  295. FileNameStr = NoSqlHack(Trim(request.Form("FileName")))
  296. If Request.Form("FileCName")="" then
  297. sErrStr = sErrStr & "<li>文件中文名称不能为空</li>" '文件名称不能为空或是有非法字符
  298. End If
  299. If FileNameStr="" then
  300. sErrStr = sErrStr & "<li>文件名称不能为空</li>" '文件名称不能为空或是有非法字符
  301. End If
  302. If Request.Form("SaveFilePath")="" then
  303. sErrStr = sErrStr & "<li>未指定文件保存路径</li>" '文件名称不能为空或是有非法字符
  304. End If
  305. If isnumeric(Request.Form("NewsNum"))=false then
  306. sErrStr = sErrStr & "<li>调用新闻数量必须为数字型</li>" '调用新闻数量必须为数字型
  307. End If
  308. If isnumeric(Request.Form("TitleNum"))=false then
  309. sErrStr = sErrStr & "<li>标题字数必须为数字型</li>"
  310. End If
  311. If isnumeric(Request.Form("RowNum"))=false then
  312. sErrStr = sErrStr & "<li>新闻每行排列数量必须为数字型</li>"
  313. End If
  314. If isnumeric(Request.Form("RowSpace"))=false then
  315. sErrStr = sErrStr & "<li>新闻行距必须为数字型</li>"
  316. End IF
  317. If Types="Class" and Request.Form("ClassID")="" then
  318. sErrStr = sErrStr & "<li>栏目ID参数传递错误</li>"  '栏目ID参数传递错误
  319. End If
  320. If Request.Form("NewsType")="PicNews" or Request.Form("NewsType")="FilterNews" then
  321. If isnumeric(Request.Form("PicWidth"))=false or isnumeric(Request.Form("PicHeight"))=false then
  322. sErrStr = sErrStr & "<li>图片规格必须为数字型</li>"
  323. End If
  324. End If
  325. If Request.Form("MoreContent")=1 then
  326. If Request.Form("LinkWord")="" then
  327. sErrStr = sErrStr & "<li>请输入链接字样</li>"
  328. End If
  329. End If
  330. If Request.Form("NewsType")="MarqueeNews" or Request.Form("NewsType")="ProclaimNews" then
  331. If isnumeric(Request.Form("MarSpeed"))=false then
  332. sErrStr = sErrStr & "<li>新闻滚动速度必须为数字型</li>"
  333. End If
  334. End If
  335. if sErrStr<>"" then 
  336. response.Redirect("lib/error.asp?ErrCodes="&server.URLEncode(sErrStr))
  337. response.End()
  338. end if
  339. Dim ClassJsAddObj,RsClassSql
  340. Set ClassJsAddObj = Server.CreateObject(G_FS_RS)
  341. RsClassSql = "Select * from FS_NS_Sysjs where ID="&FileID&""
  342. ClassJsAddObj.Open RsClassSql,Conn,3,3
  343. ClassJsAddObj("FileCName") = Request.Form("FileCName")
  344. ClassJsAddObj("ClassID") = "0"
  345. ClassJsAddObj("NewsType") = Request.Form("NewsType")
  346. ClassJsAddObj("NewsNum") = Cint(Request.Form("NewsNum"))
  347. ClassJsAddObj("TitleNum") = Cint(Request.Form("TitleNum"))
  348. ClassJsAddObj("TitleCSS") = Cstr(Request.Form("TitleCSS"))
  349. ClassJsAddObj("RowNum") = Cint(Request.Form("RowNum"))
  350. ClassJsAddObj("NaviPic") = Request.Form("NaviPic")
  351. ClassJsAddObj("RowBetween") = Request.Form("RowBetween")
  352. ClassJsAddObj("FileSavePath") = Cstr(Request.Form("SaveFilePath"))
  353. ClassJsAddObj("RowSpace") = Cint(Request.Form("RowSpace"))
  354. ClassJsAddObj("DateType") = Cint(Request.Form("DateType"))
  355. ClassJsAddObj("DateCSS") = Cstr(Request.Form("DateCSS"))
  356. If Request.Form("ClassName")<>0 then
  357. ClassJsAddObj("ClassName") = 1
  358. Else
  359. ClassJsAddObj("ClassName") = 0
  360. End If
  361. If Request.Form("SonClass")<>0 then
  362. ClassJsAddObj("SonClass") = 1
  363. Else
  364. ClassJsAddObj("SonClass") = 0
  365. End If
  366. If Request.Form("RightDate")<>0 then
  367. ClassJsAddObj("RightDate") = 1
  368. Else
  369. ClassJsAddObj("RightDate") = 0
  370. End If
  371. If Request.Form("MoreContent")<>"" and isnull(Request.Form("MoreContent"))=false then
  372. ClassJsAddObj("MoreContent") = Request.Form("MoreContent")
  373. End if
  374. If Request.Form("MoreContent")<>0 then
  375. ClassJsAddObj("LinkWord") = Request.Form("LinkWord")
  376. ClassJsAddObj("LinkCSS") = Request.Form("LinkCSS")
  377. End If
  378. If Request.Form("PicWidth")<>"" and isnull(Request.Form("PicWidth"))=false then
  379. ClassJsAddObj("PicWidth") = Cint(Request.Form("PicWidth"))
  380. End If
  381. If Request.Form("PicHeight")<>"" and isnull(Request.Form("PicHeight"))=false then
  382. ClassJsAddObj("PicHeight") = Cint(Request.Form("PicHeight"))
  383. End If
  384. If Request.Form("MarSpeed")<>"" and isnull(Request.Form("MarSpeed"))=false then
  385. ClassJsAddObj("MarSpeed") = Cint(Request.Form("MarSpeed"))
  386. End If
  387. If Request.Form("MarDirection")<>"" and isnull(Request.Form("MarDirection"))=false then
  388. ClassJsAddObj("MarDirection") = Cstr(Request.Form("MarDirection"))
  389. End If
  390. If Request.Form("ShowTitle")<>"" and isnull(Request.Form("ShowTitle"))=false then
  391. ClassJsAddObj("ShowTitle") = Request.Form("ShowTitle")
  392. End If
  393. If Request.Form("OpenMode")<>1 then
  394. ClassJsAddObj("OpenMode") = 0
  395. Else
  396. ClassJsAddObj("OpenMode") = 1
  397. End If
  398. If Request.Form("MarWidth")<>"" and isnull(Request.Form("MarWidth"))=false then
  399. ClassJsAddObj("MarWidth") = Request.Form("MarWidth")
  400. End If
  401. If Request.Form("MarHeight")<>"" and isnull(Request.Form("MarHeight"))=false then
  402. ClassJsAddObj("MarHeight") = Request.Form("MarHeight")
  403. End If
  404. if request.Form("NewsType")="HotNews" then 
  405. if isnumeric(request.Form("setHitsValue")) then 
  406. ClassJsAddObj("MarSpeed") = NoSqlHack(request.Form("setHitsValue"))
  407. else
  408. ClassJsAddObj("MarSpeed") = 1
  409. end if
  410. end if
  411. ClassJsAddObj.Update
  412. ClassJsAddObj.Close
  413. Set ClassJsAddObj = Nothing
  414. ResultStr = CreateSysJS(FileNameStr)
  415. if ResultStr = true then
  416. response.Redirect("lib/Success.asp?ErrorUrl="&server.URLEncode( "../Js_Sys_manage.asp?Act=View" )&"&ErrCodes=<li>恭喜,修改成功。</li>")
  417. else
  418. response.Redirect("lib/error.asp?ErrCodes=<li>"&ResultStr&"</li>&ErrorUrl=../Js_Sys_manage.asp")
  419. end if
  420. Response.End
  421. End If
  422. Conn.Close
  423. Set Conn = Nothing
  424. %>
  425. <script>
  426. var TempLink='<% = ScrLink %>';
  427. var TempNewsType='<% = ScrNewsType %>';
  428. function ChooseLink(Link)
  429. {
  430. if (Link==1)
  431. {
  432.  document.ClassJSForm.LinkWord.disabled=false;
  433.  document.ClassJSForm.LinkCSS.disabled=false;
  434.  }
  435. else
  436. {
  437.  document.ClassJSForm.LinkWord.disabled=true;
  438.  document.ClassJSForm.LinkCSS.disabled=true;
  439.  }
  440.  }
  441. function ChooseNewsType(NewsType)
  442. {
  443.  if ((NewsType=='MarqueeNews')||(NewsType=='ProclaimNews'))
  444.   {
  445.  document.ClassJSForm.MarSpeed.disabled=false;
  446.  document.ClassJSForm.MarDirection.disabled=false;
  447.  document.ClassJSForm.MarWidth.disabled=false;
  448.  document.ClassJSForm.MarHeight.disabled=false;
  449.    }
  450.   else
  451.   {
  452.  document.ClassJSForm.MarSpeed.disabled=true;
  453.  document.ClassJSForm.MarDirection.disabled=true;
  454.  document.ClassJSForm.MarWidth.disabled=true;
  455.  document.ClassJSForm.MarHeight.disabled=true;
  456.    }
  457.   if ((NewsType=='PicNews')||(NewsType=='FilterNews'))
  458.   {
  459.  document.ClassJSForm.PicWidth.disabled=false;
  460.  document.ClassJSForm.PicHeight.disabled=false;
  461.  document.ClassJSForm.ShowTitle.disabled=false;
  462.    }
  463.   else
  464.   {
  465.  document.ClassJSForm.PicWidth.disabled=true;
  466.  document.ClassJSForm.PicHeight.disabled=true;
  467.  document.ClassJSForm.ShowTitle.disabled=true;
  468.    }
  469.  }
  470.  ChooseLink(TempLink);
  471.  ChooseNewsType(TempNewsType);
  472. </script>
  473. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->