global_safecontrol.aspx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:13k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="c#" Inherits="Discuz.Web.Admin.safecontrol" CodeBehind="global_safecontrol.aspx.cs" %>
  2. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  4. <html>
  5. <head>
  6. <title>安全控制</title>
  7. <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />
  8. <link href="../styles/modelpopup.css" type="text/css" rel="stylesheet" />
  9. <script type="text/javascript" src="../js/modalpopup.js"></script>
  10. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  11. <script type="text/javascript" src="../js/common.js"></script>
  12. <script type="text/javascript">
  13. function setstatus(obj) {
  14. if (obj.id == "seccodestatus_select_5") {
  15. document.getElementById("seccodestatus_select_2").checked = obj.checked;
  16. document.getElementById("seccodestatus_select_2").disabled = obj.checked;
  17. document.getElementById("seccodestatus_select_12").checked = obj.checked;
  18. document.getElementById("seccodestatus_select_12").disabled = obj.checked;
  19. }
  20. if (obj.id == "seccodestatus_select_2") {
  21. document.getElementById("seccodestatus_select_5").checked = obj.checked;
  22. document.getElementById("seccodestatus_select_5").disabled = obj.checked;
  23. document.getElementById("seccodestatus_select_12").checked = obj.checked;
  24. document.getElementById("seccodestatus_select_12").disabled = obj.checked;
  25. }
  26. if (obj.id == "seccodestatus_select_6") {
  27. document.getElementById("seccodestatus_select_3").checked = obj.checked;
  28. document.getElementById("seccodestatus_select_3").disabled = obj.checked;
  29. }
  30. if (obj.id == "seccodestatus_select_12") {
  31. document.getElementById("seccodestatus_select_2").checked = obj.checked;
  32. document.getElementById("seccodestatus_select_2").disabled = obj.checked;
  33. document.getElementById("seccodestatus_select_5").checked = obj.checked;
  34. document.getElementById("seccodestatus_select_5").disabled = obj.checked;
  35. }
  36. checkselecedpage();
  37. }
  38. </script>
  39. </head>
  40. <body>
  41. <div class="ManagerForm">
  42. <form id="Form1" method="post" runat="server">
  43. <fieldset>
  44. <legend style="background: url(../images/icons/icon22.jpg) no-repeat 6px 50%;">安全控制</legend>
  45. <table width="100%">
  46. <tr><td class="item_title" colspan="2">验证码显示方式</td></tr>
  47. <tr>
  48. <td class="vtop rowform">
  49. <cc1:DropDownList ID="VerifyImage" runat="server"></cc1:DropDownList>
  50. </td>
  51. <td class="vtop"></td>
  52. </tr>
  53. <tr><td class="item_title" colspan="2">使用验证码的页面列表</td></tr>
  54. <tr>
  55. <td class="vtop rowform">
  56. <cc1:TextBox ID="seccodestatus" runat="server" HintShowType="down" CssClass="" RequiredFieldType="暂无校验" TextMode="MultiLine" Height="90px" Rows="4" Cols="30">
  57. </cc1:TextBox>
  58. </td>
  59. <td class="vtop">
  60. <table id="seccodestatus_select">
  61. <tr>
  62. <td>
  63. <input id="seccodestatus_select_0" type="checkbox" name="seccodestatus_select:0" onclick="checkselecedpage()" value="register" />
  64. <label for="seccodestatus_select_0">新用户注册</label>
  65. </td>
  66. <td>
  67. <input id="seccodestatus_select_5" type="checkbox" name="seccodestatus_select:5" onclick="setstatus(this);" value="showforum" />
  68. <label for="seccodestatus_select_5">查看(已设置密码)版块</label>
  69. </td>
  70. <td>
  71. <input id="seccodestatus_select_1" type="checkbox" name="seccodestatus_select:1" onclick="checkselecedpage();" value="login" />
  72. <label for="seccodestatus_select_1">用户登录</label>
  73. </td>
  74. </tr>
  75. <tr>
  76. <td>
  77. <input id="seccodestatus_select_6" type="checkbox" name="seccodestatus_select:6" onclick="setstatus(this)" value="showtopic" />
  78. <label for="seccodestatus_select_6">快速回复(主题页)</label>
  79. </td>
  80. <td>
  81. <input id="seccodestatus_select_2" type="checkbox" name="seccodestatus_select:2" onclick="setstatus(this);" value="posttopic" />
  82. <label for="seccodestatus_select_2">发表主题</label>
  83. </td>
  84. <td>
  85. <input id="seccodestatus_select_7" type="checkbox" name="seccodestatus_select:7" onclick="checkselecedpage()" value="usercpprofile" />
  86. <label for="seccodestatus_select_7">修改个人密码</label>
  87. </td>
  88. </tr>
  89. <tr>
  90. <td>
  91. <input id="seccodestatus_select_3" type="checkbox" name="seccodestatus_select:3" onclick="checkselecedpage()" value="postreply" />
  92. <label for="seccodestatus_select_3">发表回复</label>
  93. </td>
  94. <td>
  95. <input id="seccodestatus_select_8" type="checkbox" name="seccodestatus_select:8" onclick="checkselecedpage()" value="editpost" />
  96. <label for="seccodestatus_select_8">修改帖子</label>
  97. </td>
  98. <td>
  99. <input id="seccodestatus_select_4" type="checkbox" name="seccodestatus_select:4" onclick="checkselecedpage()" value="usercppostpm" />
  100. <label for="seccodestatus_select_4">发送短消息</label>
  101. </td>
  102. <!--td style="padding:0px">
  103. <input id="seccodestatus_select_9" type="checkbox" name="seccodestatus_select:9" onclick="setstatus(this);" value="website" />
  104. <label for="seccodestatus_select_9">聚合首页登陆</label>
  105. </td-->
  106. </tr>
  107. <tr>
  108. <td>
  109. <input id="seccodestatus_select_9" type="checkbox" name="seccodestatus_select:9" onclick="checkselecedpage()" value="editgoods" />
  110. <label for="seccodestatus_select_9">编辑商品</label>
  111. </td>
  112. <td>
  113. <input id="seccodestatus_select_10" type="checkbox" name="seccodestatus_select:10" onclick="checkselecedpage()" value="showgoods" />
  114. <label for="seccodestatus_select_10">显示商品</label>
  115. </td>
  116. <td>
  117. <input id="seccodestatus_select_11" type="checkbox" name="seccodestatus_select:11" onclick="checkselecedpage()" value="postgoods" />
  118. <label for="seccodestatus_select_11">发送商品</label>
  119. </td>
  120. </tr>
  121. <tr>
  122. <td>
  123. <input id="seccodestatus_select_12" type="checkbox" name="seccodestatus_select:12" onclick="setstatus(this);" value="quicklyposttpoic" />
  124. <label for="seccodestatus_select_12">首页快速发帖</label>
  125. </td>
  126. <td>
  127. </td>
  128. <td>
  129. </td>
  130. </tr>
  131. </table>
  132. 请选取相应的页面复选框, 并在相应页面模板表单中加入{_vcode}校验码子模板, 就可以增加校验码判断功能.
  133. </td>
  134. </tr>
  135. <tr><td class="item_title" colspan="2">最大在线人数</td></tr>
  136. <tr>
  137. <td class="vtop rowform">
  138. <cc1:TextBox SetFocusButtonID="SaveInfo" ID="maxonlines" runat="server" RequiredFieldType="数据校验" CanBeNull="必填" Text="9000" MaxLength="5" Size="6" MinimumValue="10" MaximumValue="65535">
  139. </cc1:TextBox>
  140. </td>
  141. <td class="vtop">请设置合理的数值, 范围 10~65535, 建议设置为平均在线人数的 10 倍左右</td>
  142. </tr>
  143. <tr><td class="item_title" colspan="2">搜索时间限制</td></tr>
  144. <tr>
  145. <td class="vtop rowform">
  146.  <cc1:TextBox SetFocusButtonID="SaveInfo" ID="searchctrl" runat="server" RequiredFieldType="数据校验" CanBeNull="必填" Text="0" MaxLength="5" Size="6"></cc1:TextBox>(单位:秒)
  147. </td>
  148. <td class="vtop">两次搜索间隔小于此时间将被禁止, 0 为不限制</td>
  149. </tr>
  150. <tr><td class="item_title" colspan="2">用户登录时是否启用安全问题:</td></tr>
  151. <tr>
  152. <td class="vtop rowform">
  153. <cc1:RadioButtonList ID="secques" runat="server" RepeatLayout="flow">
  154. <asp:ListItem Value="1" Selected>是</asp:ListItem>
  155. <asp:ListItem Value="0">否</asp:ListItem>
  156. </cc1:RadioButtonList>
  157. </td>
  158. <td class="vtop">用户登录时是否启用安全问题</td>
  159. </tr>
  160. <tr><td class="item_title" colspan="2">发帖灌水预防</td></tr>
  161. <tr>
  162. <td class="vtop rowform">
  163.  <cc1:TextBox SetFocusButtonID="SaveInfo" ID="postinterval" runat="server" RequiredFieldType="数据校验" CanBeNull="必填" Text="15" MaxLength="5" Size="6"></cc1:TextBox>(单位:秒)
  164. </td>
  165. <td class="vtop">两次发帖间隔小于此时间, 或两次发送短消息间隔小于此时间的二倍将被禁止, 0 为不限制题</td>
  166. </tr>
  167. <tr><td class="item_title" colspan="2">60 秒最大搜索次数</td></tr>
  168. <tr>
  169. <td class="vtop rowform">
  170. <cc1:TextBox SetFocusButtonID="SaveInfo" ID="maxspm" runat="server" RequiredFieldType="数据校验" CanBeNull="必填" Text="0" MaxLength="3" Size="4"></cc1:TextBox>
  171. </td>
  172. <td class="vtop">论坛系统每 60 秒系统响应的最大搜索次数, 0 为不限制. 注意: 如果服务器负担较重, 建议设置为 5, 或在 5~20 范围内取值, 以避免过于频繁的搜索造成数据表被锁</td>
  173. </tr>
  174. <tr><td class="item_title" colspan="2">是否使用管理员客户端工具:</td></tr>
  175. <tr>
  176. <td class="vtop rowform">
  177. <cc1:RadioButtonList ID="admintools" runat="server" RepeatColumns="1" RepeatLayout="flow" HintPosOffSet="180">
  178. <asp:ListItem Value="0">不使用</asp:ListItem>
  179. <asp:ListItem Value="1">仅论坛创始人可用</asp:ListItem>
  180. <asp:ListItem Value="2">管理员可用</asp:ListItem>
  181. </cc1:RadioButtonList>
  182. </td>
  183. <td class="vtop">是否使用管理员客户端工具</td>
  184. </tr>
  185.     </table>
  186. <cc1:Hint ID="Hint1" runat="server" HintImageUrl="../images"></cc1:Hint>
  187. <div class="Navbutton">
  188. <cc1:Button ID="SaveInfo" runat="server" Text=" 提 交 ">
  189. </cc1:Button>
  190. </div>
  191. </fieldset>
  192. <script type="text/javascript">
  193. var seccodestatus = '<%=ViewState["Seccodestatus"].ToString().Trim()%>';
  194. loadseccodestatus();
  195. function loadseccodestatus() {
  196. if (seccodestatus.indexOf('register') >= 0) {
  197. document.getElementById("seccodestatus_select_0").checked = true;
  198. }
  199. if (seccodestatus.indexOf('login') >= 0) {
  200. document.getElementById("seccodestatus_select_1").checked = true;
  201. }
  202. if (seccodestatus.indexOf('posttopic') >= 0) {
  203. document.getElementById("seccodestatus_select_2").checked = true;
  204. }
  205. if (seccodestatus.indexOf('postreply') >= 0) {
  206. document.getElementById("seccodestatus_select_3").checked = true;
  207. }
  208. if (seccodestatus.indexOf('usercppostpm') >= 0) {
  209. document.getElementById("seccodestatus_select_4").checked = true;
  210. }
  211. if (seccodestatus.indexOf('showforum') >= 0) {
  212. document.getElementById("seccodestatus_select_5").checked = true;
  213. }
  214. if (seccodestatus.indexOf('showtopic') >= 0) {
  215. document.getElementById("seccodestatus_select_6").checked = true;
  216. }
  217. if (seccodestatus.indexOf('usercpnewpassword') >= 0) {
  218. document.getElementById("seccodestatus_select_7").checked = true;
  219. }
  220. if (seccodestatus.indexOf('editpost') >= 0) {
  221. document.getElementById("seccodestatus_select_8").checked = true;
  222. }
  223. /*if(seccodestatus.indexOf('website')>=0) 
  224. {
  225. document.getElementById("seccodestatus_select_9").checked=true;
  226. }*/
  227. if (seccodestatus.indexOf('editgoods') >= 0) {
  228. document.getElementById("seccodestatus_select_9").checked = true;
  229. }
  230. if (seccodestatus.indexOf('showgoods') >= 0) {
  231. document.getElementById("seccodestatus_select_10").checked = true;
  232. }
  233. if (seccodestatus.indexOf('postgoods') >= 0) {
  234. document.getElementById("seccodestatus_select_11").checked = true;
  235. }
  236. if (seccodestatus.indexOf('forumindex') >= 0) {
  237. document.getElementById("seccodestatus_select_12").checked = true;
  238. }
  239. }
  240. function checkselecedpage() {
  241. document.getElementById("seccodestatus").value = '';
  242. var selectstr = '';
  243. if (document.getElementById("seccodestatus_select_0").checked) {
  244. selectstr += 'register.aspxrn';
  245. }
  246. if (document.getElementById("seccodestatus_select_1").checked) {
  247. selectstr += 'login.aspxrn';
  248. }
  249. if (document.getElementById("seccodestatus_select_2").checked) {
  250. selectstr += 'posttopic.aspxrn';
  251. }
  252. if (document.getElementById("seccodestatus_select_3").checked) {
  253. selectstr += 'postreply.aspxrn';
  254. }
  255. if (document.getElementById("seccodestatus_select_4").checked) {
  256. selectstr += 'usercppostpm.aspxrnusercpshowpm.aspxrn';
  257. }
  258. if (document.getElementById("seccodestatus_select_5").checked) {
  259. selectstr += 'showforum.aspxrn';
  260. }
  261. if (document.getElementById("seccodestatus_select_6").checked) {
  262. selectstr += 'showtopic.aspxrnajax.aspxrnshowdebate.aspxrnshowtree.aspxrnshowbonus.aspxrn';
  263. }
  264. if (document.getElementById("seccodestatus_select_7").checked) {
  265. selectstr += 'usercpnewpassword.aspxrn';
  266. }
  267. if (document.getElementById("seccodestatus_select_8").checked) {
  268. selectstr += 'editpost.aspxrn';
  269. }
  270. /*if(document.getElementById("seccodestatus_select_9").checked)
  271. {
  272. selectstr+='website.aspxrn';
  273. }*/
  274. if (document.getElementById("seccodestatus_select_9").checked) {
  275. selectstr += 'editgoods.aspxrn';
  276. }
  277. if (document.getElementById("seccodestatus_select_10").checked) {
  278. selectstr += 'showgoods.aspxrn';
  279. }
  280. if (document.getElementById("seccodestatus_select_11").checked) {
  281. selectstr += 'postgoods.aspxrn';
  282. }
  283. if (document.getElementById("seccodestatus_select_12").checked) {
  284. selectstr += 'forumindex.aspxrn';
  285. }
  286. document.getElementById("seccodestatus").value = selectstr;
  287. }      
  288. </script>
  289.  </form>
  290. </div>
  291. <%=footer%>
  292. </body>
  293. </html>