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

数据库编程

开发平台:

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/HS_Function.asp" -->
  5. <!--#include file="../../FS_Inc/Function.asp" -->
  6. <%'Copyright (c) 2006 Foosun Inc. Code by awen
  7. Response.Buffer = True
  8. Response.Expires = -1
  9. Response.ExpiresAbsolute = Now() - 1
  10. Response.Expires = 0
  11. Response.CacheControl = "no-cache"
  12. Dim Conn,DS_Rs,DS_Sql
  13. Dim AutoDelete,Months
  14. MF_Default_Conn 
  15. MF_Session_TF
  16. dim sRootDir,str_CurrPath
  17. if G_VIRTUAL_ROOT_DIR<>"" then sRootDir="/"+G_VIRTUAL_ROOT_DIR else sRootDir=""
  18. str_CurrPath = sRootDir &"/"&G_TEMPLETS_DIR
  19. Sub Save()
  20. Dim sysid,Str_Tmp,Arr_Tmp,IndexPage
  21. sysid = NoSqlHack(request.Form("sysid"))
  22. Str_Tmp = "Lock,IPType,IPList,OverDueMode,DownDir,IndexTemplet,LinkType,IsDomain,FileNameRule,FileDirRule,ClassSaveType,IndexPage,NewsCheck,FileExtName"
  23. Arr_Tmp = split(Str_Tmp,",")
  24. IndexPage = Trim(request.Form("IndexPage_Name"))&"."&Trim(request.Form("IndexPage_ExtName"))
  25. if trim(Request.Form("FileNameRule_Element_Separator"))<>"" then
  26. if not chkinputchar(trim(Request.Form("FileNameRule_Element_Separator"))) then
  27. Response.Redirect("../error.asp?ErrCodes=<li>分割符号只允许为:""0-9"",""A-Z"",""-"",""_"","",""."",""@"",""#""</li>")
  28. Response.End()
  29. end if
  30. End if
  31. fileNameRule=trim(Request.Form("FileNameRule_Element_Prefix"))&"$"&trim(replace(Request.Form("FileNameRule_Element"),",",""))&"$"&trim(Request.Form("FileNameRule_Rnd"))&"$"&trim(Request.Form("FileNameRule_UseWord"))&"$"&trim(Request.Form("FileNameRule_Element_Separator"))&"$"&trim(Request.Form("FileNameRule_UseDownID"))&"$"&trim(Request.Form("FileNameRule_DownID"))
  32. DS_Sql = "select top 1 "&Str_Tmp&",IndexPage,FileNameRule  from FS_DS_SysPara"
  33. 'response.Write(DS_Sql)
  34. Set DS_Rs = CreateObject(G_FS_RS)
  35. DS_Rs.Open DS_Sql,Conn,3,3
  36. if DS_Rs.eof then DS_Rs.AddNew
  37. for each Str_Tmp in Arr_Tmp
  38. 'response.Write(Str_Tmp&":"&NoSqlHack(request.Form(Str_Tmp))&"<br>")
  39. DS_Rs("IndexPage") = IndexPage
  40. DS_Rs("FileNameRule")  = fileNameRule
  41. DS_Rs(Str_Tmp) = NoSqlHack(request.Form(Str_Tmp))
  42. next
  43. 'response.End()
  44. DS_Rs.update
  45. DS_Rs.close
  46. response.Redirect("../Success.asp?ErrorUrl="&server.URLEncode( "Down/FS_DS_SysPara.asp" )&"&ErrCodes=<li>恭喜,修改成功。</li>")
  47. End Sub
  48. %>
  49. <html xmlns="http://www.w3.org/1999/xhtml">
  50. <HEAD>
  51. <TITLE>FoosunCMS</TITLE>
  52. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
  53. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  54. <script language="JavaScript" src="../../FS_Inc/PublicJS.js"></script>
  55. <script language="JavaScript" src="../../FS_Inc/checkJs.js"></script>
  56. <head>
  57. <body>
  58. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  59.      <tr  class="hback"> 
  60.             <td colspan="10" align="left" class="xingmu" >系统参数设置</td>
  61. </tr>
  62.   <tr  class="hback"> 
  63.     <td colspan="10" height="25">
  64.  <a href="FS_DS_SysPara.asp">管理首页</a>
  65. </td>
  66.   </tr>
  67. </table>
  68. <%
  69. '******************************************************************
  70. if request.QueryString("Act")="Save" then 
  71. Call Save
  72. else
  73. Call Add_Edit_Search
  74. end if
  75. '******************************************************************
  76. Dim Bol_IsEdit
  77. Dim Lock,IPType,IPList,OverDueMode,IsDomain,FileNameRule,FileDirRule,ClassSaveType,FileExtName
  78. Dim DownDir,IndexTemplet,LinkType,IndexPage,NewsCheck ,FileNameRuleArray,IndexPageArray
  79. Sub Add_Edit_Search()
  80. Bol_IsEdit = false
  81. DS_Sql = "select top 1 Lock,IPType,IPList,OverDueMode,DownDir,IndexTemplet,LinkType,IsDomain,FileNameRule,FileDirRule,ClassSaveType,FileExtName,IndexPage,NewsCheck from FS_DS_SysPara"
  82. Set DS_Rs = CreateObject(G_FS_RS)
  83. DS_Rs.Open DS_Sql,Conn,1,1
  84. if not DS_Rs.eof then 
  85. Bol_IsEdit = True
  86. Lock = DS_Rs("Lock")
  87. IPType = DS_Rs("IPType")
  88. IPList = DS_Rs("IPList")
  89. OverDueMode = DS_Rs("OverDueMode")
  90. IsDomain = DS_Rs("IsDomain")
  91. FileNameRule = DS_Rs("FileNameRule")
  92. FileDirRule = DS_Rs("FileDirRule")
  93. ClassSaveType = DS_Rs("ClassSaveType")
  94. FileExtName = DS_Rs("FileExtName")
  95. IndexPage = DS_Rs("IndexPage")
  96. NewsCheck = DS_Rs("NewsCheck")
  97. DownDir = DS_Rs("DownDir")
  98. IndexTemplet = DS_Rs("IndexTemplet")
  99. LinkType = DS_Rs("LinkType")
  100. else
  101. Lock = 1
  102. IPType = 1
  103. IPList = ""
  104. OverDueMode = 1
  105. IsDomain = ""
  106. FileNameRule = "FS$YMDHIS$2$1$-$1"
  107. FileDirRule = 0
  108. ClassSaveType = 0
  109. FileExtName = 0
  110. IndexPage = "index,html"
  111. NewsCheck = 1
  112. DownDir = "Down"
  113. IndexTemplet = ""
  114. LinkType = 0
  115. end if
  116. FileNameRuleArray=split(FileNameRule,"$")
  117. IndexPage = replace(IndexPage,",",".")
  118. IndexPageArray=split(IndexPage,".")
  119. %>
  120. <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
  121.   <form name="Form" id="Form" method="post" action="?Act=Save">
  122.     <tr  class="hback"> 
  123.       <td colspan="3" align="left" class="xingmu" >系统参数设置信息</td>
  124. </tr>
  125.     <tr  class="hback"> 
  126.       <td width="110" align="right">是否加防盗链</td>
  127.       <td>
  128.     <input <% if Lock=1 then Response.Write("Checked") %>  name="Lock" type="checkbox" id="Lock" value="1"> 
  129. <input name="IPList" type="hidden" id="IPList">
  130.   </td>
  131.     </tr>
  132.     <tr  class="hback"> 
  133.       <td align="right">类型</td>
  134.       <td>
  135.    <select name="IPType">
  136.    <%=PrintOption(IPType,"1:阻止列表,2:允许列表")%>
  137. </select>
  138.   </td>
  139.     </tr>
  140.     <tr  class="hback"> 
  141.       <td align="right">IP地址列表</td>
  142.       <td> <select name="IPSelectList" size="10" multiple id="IPSelectList" style="width:60%;">
  143.           <%
  144.   Dim TempArray,i
  145.   if Not IsNull(IPList) and IPList<>"" then
  146.   TempArray = Split(IPList,"$")
  147.   for i=LBound(TempArray) to UBound(TempArray)
  148.   %>
  149.           <option value="<% = TempArray(i) %>">
  150.           <% = TempArray(i) %>
  151.           </option>
  152.           <%
  153.   Next
  154.   end if
  155.   %>
  156.         </select>
  157. </td>
  158.     </tr>
  159.     <tr  class="hback"> 
  160.       <td align="right">起始IP</td>
  161.       <td>
  162. <input name="BeginIP" type="text" id="BeginIP">
  163.             --- 
  164.             <input name="EndIP" type="text" id="EndIP">
  165. <input type="button" onClick="AddIPList();" name="Submit3" value=" 添 加 "> 
  166.             <input type="button" onClick="DelIPList();" name="Submit4" value=" 删 除 ">
  167.   </td>
  168.     </tr>
  169.     <tr  class="hback"> 
  170.       <td align="right">过期下载处理方式</td>
  171.       <td>
  172.    <select name="OverDueMode">
  173.    <%=PrintOption(OverDueMode,"1:删除,2:提示已过期")%>
  174. </select>
  175.   </td>
  176.     </tr>
  177. <!--新加的--->
  178. <tr class="hback"> 
  179.       <td align="right"> 系统前台目录:</td>
  180.       <td><input name="DownDir" type="text" id="DownDir" value="<%=DownDir%>" size="50" maxlength="20"> 
  181.         <font color="red">*</font><span id="span_DownDir_Alert"></span></td>
  182.     </tr>
  183.     <tr class="hback"> 
  184.       <td align="right">启用二级域名:</td>
  185.       <td>
  186. <input name="IsDomain" type="text" id="IsDomain" value="<%=isDomain%>" size="50">
  187.         <br>
  188.         格式:Down.foosun.cn,不带&quot;http://&quot;或者虚拟目录,后面不带&quot;/&quot;.如果不开启二级域名,空保持为空</td>
  189.     </tr>
  190.     <tr class="hback"> 
  191.       <td align="right">首页模板地址:</td>
  192.       <td><input name="IndexTemplet" type="text" id="IndexTemplet" size="50" value="<%=indexTemplet%>"> 
  193.         <input name="bnt_NewsTemplet" type="button" id="bnt_NewsTemplet" value="选择模板"  onClick="OpenWindowAndSetValue('../CommPages/SelectManageDir/SelectTemplet.asp?CurrPath=<%=str_CurrPath %>',400,300,window,document.Form.IndexTemplet);document.Form.IndexTemplet.focus();"> 
  194.         <span class="style2">*</span><span id="span_IndexTemplet_Alert"></span></td>
  195.     </tr>
  196.     <tr class="hback"> 
  197.       <td align="right">连接路径:</td>
  198.       <td> <input type="radio" name="LinkType" value="1" <%if linkType=1 then Response.Write("checked")%>>
  199.         绝对路径 
  200.         <input name="LinkType" type="radio" value="0" <%if linkType=0 then Response.Write("checked")%>>
  201.         相对路径 </td>
  202.     </tr>
  203.     <tr class="hback"> 
  204.       <td align="right">文件名前缀:</td>
  205.       <td> <input name="FileNameRule_Element_Prefix" type="text" id="FileNameRule_Element_Prefix" value="<%=FileNameRuleArray(0)%>" size="50" maxlength="10"></td>
  206.     </tr>
  207. <tr class="hback"> 
  208.       <td align="right">文件名参数:</td>
  209.       <td> <input name="FileNameRule_Element" type="checkbox" id="FileNameRule_Element" value="Y" <%if instr(FileNameRuleArray(1),"Y")>0 then Response.Write("checked")%>>
  210.         年 
  211.         <input name="FileNameRule_Element" type="checkbox" id="FileNameRule_Element" value="M" <%if instr(FileNameRuleArray(1),"M")>0 then Response.Write("checked")%>>
  212.         月 
  213.         <input name="FileNameRule_Element" type="checkbox" id="FileNameRule_Element" value="D" <%if instr(FileNameRuleArray(1),"D")>0 then Response.Write("checked")%>>
  214.         日 
  215.         <input name="FileNameRule_Element" type="checkbox" id="FileNameRule_Element" value="H" <%if instr(FileNameRuleArray(1),"H")>0 then Response.Write("checked")%>>
  216.         时 
  217.         <input name="FileNameRule_Element" type="checkbox" id="FileNameRule_Element" value="I" <%if instr(FileNameRuleArray(1),"I")>0 then Response.Write("checked")%>>
  218.         分 
  219.         <input name="FileNameRule_Element" type="checkbox" id="FileNameRule_Element" value="S" <%if instr(FileNameRuleArray(1),"S")>0 then Response.Write("checked")%>>
  220.         秒 <br> <input type="radio" name="FileNameRule_Rnd" id="FileNameRule_Rnd" value="2" <%if FileNameRuleArray(2)="2" then Response.Write("checked")%>>
  221.         2位随机数 
  222.         <input type="radio" name="FileNameRule_Rnd" id="FileNameRule_Rnd" value="3" <%if FileNameRuleArray(2)="3" then Response.Write("checked")%>>
  223.         3位随机数 
  224.         <input type="radio" name="FileNameRule_Rnd" id="FileNameRule_Rnd" value="4" <%if FileNameRuleArray(2)="4" then Response.Write("checked")%>>
  225.         4位随机数 
  226.         <input type="radio" name="FileNameRule_Rnd" id="FileNameRule_Rnd" value="5" <%if FileNameRuleArray(2)="5" then Response.Write("checked")%>>
  227.         5位随机数 
  228.         <input name="FileNameRule_UseWord" type="checkbox" id="FileNameRule_UseWord" value="1" <%if ubound(FileNameRuleArray)>=3 then if FileNameRuleArray(3)="1" then Response.Write("checked")%>>
  229.         是否组合字母 </td>
  230.     </tr>
  231.     <tr class="hback"> 
  232.       <td align="right">分割符号:</td>
  233.       <td> <input name="FileNameRule_Element_Separator" type="text" id="FileNameRule_Element_Separator" size="50" value="<%=FileNameRuleArray(4)%>"></td>
  234.     </tr>
  235.     <tr class="hback"> 
  236.       <td align="right">是否使用ID:</td>
  237.       <td> <input type="radio" name="FileNameRule_UseDownID" value="1" <%if ubound(FileNameRuleArray)>=5 then if FileNameRuleArray(5)="1" then Response.Write("checked")%> onClick="clearAll('FileNameRule_Rnd','FileNameRule_UseWord')">
  238.         是 
  239.         <input type="radio" name="FileNameRule_UseDownID" value="0" <%if Ubound(FileNameRuleArray)>=5 then if FileNameRuleArray(5)="0" then Response.Write("checked")%> onClick="checkIt('FileNameRule_Rnd','FileNameRule_UseWord')">
  240.         否 </td>
  241.     </tr>
  242.     <tr class="hback" style="display:none"> 
  243.       <td align="right">是否使用DownID</td>
  244.       <td> <input type="radio" name="FileNameRule_DownID" value="1" <%if ubound(FileNameRuleArray)>=6 then if FileNameRuleArray(6)="1" then Response.Write("checked")%> onClick="clearAll('FileNameRule_Rnd','FileNameRule_UseWord')">
  245.         是 
  246.         <input type="radio" name="FileNameRule_DownID" value="0" <%if Ubound(FileNameRuleArray)>=6 then if FileNameRuleArray(6)="0" then Response.Write("checked")%> onClick="checkIt('FileNameRule_Rnd','FileNameRule_UseWord')">
  247.         否 </td>
  248.     </tr>    <tr class="hback"> 
  249.       <td align="right">目录生成规则:</td>
  250.       <td> <input name="FileDirRule" type="radio" value="0" onClick="show_FileDirRule_Detail(this.value);" <%if fileDirRule=0 then Response.Write("checked")%>>
  251.         规则1 
  252.         <input type="radio" name="FileDirRule" value="1" onClick="show_FileDirRule_Detail(this.value)" <%if fileDirRule=1 then Response.Write("checked")%>>
  253.         规则2 
  254.         <input type="radio" name="FileDirRule" value="2" onClick="show_FileDirRule_Detail(this.value)" <%if fileDirRule=2 then Response.Write("checked")%>>
  255.         规则3 
  256.         <input type="radio" name="FileDirRule" value="3" onClick="show_FileDirRule_Detail(this.value)" <%if fileDirRule=3 then Response.Write("checked")%>>
  257.         规则4 
  258.         <input type="radio" name="FileDirRule" value="4" onClick="show_FileDirRule_Detail(this.value)" <%if fileDirRule=4 then Response.Write("checked")%>>
  259.         规则5 
  260.         <input type="radio" name="FileDirRule" value="5" onClick="show_FileDirRule_Detail(this.value)" <%if fileDirRule=5 then Response.Write("checked")%>>
  261.         规则6 
  262.         <input type="radio" name="FileDirRule" value="6" onClick="show_FileDirRule_Detail(this.value)" <%if fileDirRule=6 then Response.Write("checked")%>>
  263.         规则7 &nbsp;&nbsp;<span id="span_FileDirRule" style="color:blue"></span>
  264.       </td>
  265.     </tr>
  266.     <tr class="hback"> 
  267.       <td align="right">首页生成规则:</td>
  268.       <td> <input name="ClassSaveType" type="radio" value="0" onClick="show_ClassSaveType_Detail(this.value)" <%if classSaveType=0 then Response.Write("checked")%>>
  269.         规则1 
  270.         <input type="radio" name="ClassSaveType" value="1" onClick="show_ClassSaveType_Detail(this.value)" <%if classSaveType=1 then Response.Write("checked")%>>
  271.         规则2 
  272.         <input type="radio" name="ClassSaveType" value="2" onClick="show_ClassSaveType_Detail(this.value)" <%if classSaveType=2 then Response.Write("checked")%>>
  273.         规则3 &nbsp;&nbsp;<span id="span_ClassSaveType" style="color:blue"></span>
  274.       </td>
  275.     </tr>
  276.     <tr class="hback"> 
  277.       <td align="right">文件扩展名:</td>
  278.       <td> <input type="radio" name="FileExtName" value="0" <%if fileExtName=0 then Response.Write("checked")%>>
  279.         Html 
  280.         <input name="FileExtName" type="radio" value="1" <%if fileExtName=1 then Response.Write("checked")%>>
  281.         HTM 
  282.         <input type="radio" name="FileExtName" value="2" <%if fileExtName=2 then Response.Write("checked")%>>
  283.         Shtml 
  284.         <input type="radio" name="FileExtName" value="3" <%if fileExtName=3 then Response.Write("checked")%>>
  285.         shtm 
  286.         <input type="radio" name="FileExtName" value="4" <%if fileExtName=4 then Response.Write("checked")%>>
  287.         asp</td>
  288.     </tr>
  289.     <tr class="hback"> 
  290.       <td align="right">首页文件名:</td>
  291.       <td><input name="IndexPage_Name" type="text" id="IndexPage_Name" size="50" maxlength="10" value="<%=IndexPageArray(0)%>"
  292.    onFocus="Do.these('IndexPage_Name',function(){return isEmpty('IndexPage_Name','span_IndexPage_Name_Alert')});" onKeyUp="Do.these('IndexPage_Name',function(){return isEmpty('IndexPage_Name','span_IndexPage_Name_Alert')});">
  293.         <span id="span_IndexPage_Name_Alert"></span>* </td>
  294.     </tr>
  295.     <tr class="hback"> 
  296.       <td align="right">首页扩展名:</td>
  297.       <td> <select name="IndexPage_ExtName" id="IndexPage_ExtName">
  298.           <option value="html" <%if IndexPageArray(1)="html" then Response.Write("selected")%>>html</option>
  299.           <option value="htm" <%if IndexPageArray(1)="htm" then Response.Write("selected")%>>htm</option>
  300.           <option value="shtml" <%if IndexPageArray(1)="shtml" then Response.Write("selected")%>>shtml</option>
  301.           <option value="shtm" <%if IndexPageArray(1)="shtm" then Response.Write("selected")%>>shtm</option>
  302.           <option value="asp" <%if IndexPageArray(1)="asp" then Response.Write("selected")%>>asp</option>
  303.         </select> </td>
  304.     </tr>
  305.     <tr class="hback"> 
  306.       <td align="right">发布是否需审核:</td>
  307.       <td> <input name="NewsCheck" type="radio" value="1" <%if NewsCheck=1 then Response.Write("checked")%>>
  308.         是 
  309.         <input type="radio" name="NewsCheck" value="0" <%if NewsCheck=0 then Response.Write("checked")%>>
  310.         否 </td>
  311.     </tr>
  312.  
  313.  
  314.    <tr  class="hback"> 
  315.       <td colspan="4">
  316.   <table border="0" width="100%" cellpadding="0" cellspacing="0">
  317.           <tr> 
  318.             <td align="center"> <input type="submit" value=" 保存 "  onClick="SetIPList();" /> 
  319.               &nbsp; <input type="reset" value=" 重置 " />
  320.             </td>
  321.           </tr>
  322.         </table>
  323.       </td>
  324.     </tr>
  325.   </form>
  326. </table>
  327. <%
  328. End Sub
  329. set DS_Rs = Nothing
  330. Conn.close
  331. %>
  332. <script language="JavaScript">
  333. function AddIPList()
  334. {
  335. var BeginIPStr=document.Form.BeginIP.value,EndIPStr=document.Form.EndIP.value;
  336. if (CheckIP(BeginIPStr))
  337. {
  338. if (CheckIP(EndIPStr))
  339. {
  340. if (CheckBeginAndEndIP(BeginIPStr,EndIPStr))
  341. {
  342. var TempStr=BeginIPStr+'-'+EndIPStr;
  343. AddList(document.Form.IPSelectList,TempStr,TempStr);
  344. document.Form.BeginIP.value='';
  345. document.Form.EndIP.value='';
  346. }
  347. }
  348. else
  349. {
  350. alert('结束IP地址不对');
  351. document.Form.EndIP.focus();
  352. document.Form.EndIP.select();
  353. }
  354. }
  355. else
  356. {
  357. alert('开始IP地址不对');
  358. document.Form.BeginIP.focus();
  359. document.Form.BeginIP.select();
  360. }
  361. }
  362. function DelIPList()
  363. {
  364. DelList(document.Form.IPSelectList);
  365. }
  366. function SetIPList()
  367. {
  368. var flag1=isEmpty("IndexPage_Name","span_IndexPage_Name_Alert");
  369. var flag2=isEmpty("DownDir","span_DownDir_Alert");
  370. var flag4=isEmpty("IndexTemplet","span_IndexTemplet_Alert");
  371. if(flag1&&flag2&&flag4)
  372. {
  373. var TempStr='',Obj=document.Form.IPSelectList;
  374. for(var i=0;i<Obj.length;i++)
  375. {
  376. if (TempStr=='') TempStr=Obj.options(i).value;
  377. else TempStr=TempStr+'$'+Obj.options(i).value;
  378. }
  379. document.Form.IPList.value=TempStr;
  380. document.Form.submit();
  381. }
  382. }
  383. function CheckBeginAndEndIP(BeginIPStr,EndIPStr)
  384. {
  385. return true;
  386. }
  387. function CheckIP(IPAddress)
  388. {
  389. var re = IPAddress.split(".");
  390. var check = function(v){try{return (v<=255 && v>=0)}catch(x){return false}};
  391. var ip = (re.length==4)?(check(re[0]) && check(re[1]) && check(re[2]) && check(re[3])):false;
  392. return ip;
  393. }
  394. function AddList(SelectObj,Lable,LableContent)
  395. {
  396. var i=0,AddOption;
  397. if (!SearchOptionExists(SelectObj,Lable))
  398. {
  399. AddOption = document.createElement("OPTION");
  400. AddOption.text=Lable;
  401. AddOption.value=LableContent;
  402. SelectObj.add(AddOption);
  403. //SelectObj.options(SelectObj.length-1).selected=true;
  404. }
  405. }
  406. function SearchOptionExists(Obj,SearchText)
  407. {
  408. var i;
  409. for(i=0;i<Obj.length;i++)
  410. {
  411. if (Obj.options(i).text==SearchText)
  412. {
  413. Obj.options(i).selected=true;
  414. return true;
  415. }
  416. }
  417. return false;
  418. }
  419. function DelList(SelectObj)
  420. {
  421. var OptionLength=SelectObj.length;
  422. for(var i=0;i<OptionLength;i++)
  423. {
  424. if (SelectObj.options(SelectObj.length-1).selected==true) SelectObj.options.remove(SelectObj.length-1);
  425. //OptionLength=SelectObj.length;
  426. }
  427. }
  428. show_FileDirRule_Detail(<%=FileDirRule%>);
  429. //显示相应目录生成规则的格式
  430. function show_FileDirRule_Detail(param)
  431. {
  432. if(isNaN(param))
  433. {
  434. return;
  435. }
  436. switch(parseInt(param))
  437. {
  438. case 0:document.getElementById("span_FileDirRule").innerHTML="格式:[ 行业英文/2006-6-9 ]";break
  439. case 1:document.getElementById("span_FileDirRule").innerHTML="格式:[ 行业英文/2006/6/9/ ]";break
  440. case 2:document.getElementById("span_FileDirRule").innerHTML="格式:[ 行业英文/2006/6-9/ ]";break
  441. case 3:document.getElementById("span_FileDirRule").innerHTML="格式:[ 行业英文/2006-6/9/ ]";break
  442. case 4:document.getElementById("span_FileDirRule").innerHTML="格式:[ 行业英文/文件名 ]";break
  443. case 5:document.getElementById("span_FileDirRule").innerHTML="格式:[ 行业英文/2006/6/ ]";break
  444. case 6:document.getElementById("span_FileDirRule").innerHTML="格式:[ 行业英文/200669/ ]";break
  445. }
  446. }
  447. show_ClassSaveType_Detail(<%=ClassSaveType%>);
  448. function show_ClassSaveType_Detail(param)
  449. {
  450. if(isNaN(param))
  451. return;
  452. switch(parseInt(param))
  453. {
  454. case 0:document.getElementById("span_ClassSaveType").innerHTML="格式:[ 栏目英文/index.html ]";break
  455. case 1:document.getElementById("span_ClassSaveType").innerHTML="格式:[ 栏目英文/栏目英文.html ]";break
  456. case 2:document.getElementById("span_ClassSaveType").innerHTML="格式:[ 为栏目英文.html ]";break
  457. }
  458. }
  459. function clearAll(radio,check)
  460. {
  461. var RadioArray=document.all(radio);
  462. for(var i=0;i<RadioArray.length;i++)
  463. {
  464. RadioArray[i].checked=false;
  465. }
  466. document.all(check).checked=false;
  467. }
  468. checkIt('FileNameRule_Rnd','FileNameRule_UseWord')
  469. function checkIt(radio,check)
  470. {
  471. var RadioArray=document.all(radio);
  472. var checkedTF=false;
  473. for(var i=0;i<RadioArray.length;i++)
  474. {
  475. if("<%=FileNameRuleArray(2)%>"==(2+i).toString())
  476. RadioArray[i].checked=true;
  477. if("<%=FileNameRuleArray(3)%>"=="1")
  478. document.all(check).checked=true;
  479. for(var i=0;i<RadioArray.length;i++)
  480. {
  481. if(RadioArray[i].checked)
  482. {
  483. checkedTF=true;
  484. }
  485. }
  486. if(!checkedTF)RadioArray[2].checked=true;
  487. }
  488. </script>
  489. <!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->