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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="c#" Inherits="Discuz.Web.Admin.wordgrid" Codebehind="global_wordgrid.aspx.cs" %>
  2. <%@ Register TagPrefix="cc2" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  4. <%@ Register TagPrefix="uc1" TagName="PageInfo" Src="../UserControls/PageInfo.ascx" %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html>
  7. <head>
  8. <title>过滤词列表</title>
  9. <link href="../styles/datagrid.css" type="text/css" rel="stylesheet" />
  10. <script type="text/javascript" src="../js/common.js"></script>
  11. <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />
  12. <link href="../styles/modelpopup.css" type="text/css" rel="stylesheet" />
  13. <script type="text/javascript" src="../js/modalpopup.js"></script>
  14. <script type="text/javascript">
  15. function Check(form)
  16. {
  17. CheckAll(form);
  18. checkedEnabledButton(form,'id','DelRec')
  19. }
  20. </script>
  21. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  22. </head>
  23. <body>
  24. <form id="Form1" method="post" runat="server">
  25. <uc1:PageInfo id="info2" runat="server" Icon="warning" Text="替换前的内容可以使用限定符 {x} 以限定相邻两字符间可忽略的文字,x 是忽略字符的个数。如 'a{1}s{2}s '(不含引号) 可以过滤 'ass' 也可过滤 'axsxs' 和 'axsxxs' 等等。<BR />查询的内容和替换的内容的最大长度为254个字符"></uc1:PageInfo>
  26. <uc1:PageInfo id="PageInfo1" runat="server" Icon="warning" Text="如需禁止发布包含某个词语的文字,而不是替换过滤,请将其对应的替换内容设置为{BANNED}即可;如需当用户发布包含某个词语的文字时,自动标记为需要人工审核,而不直接显示或替换过滤,请将其对应的替换内容设置为{MOD}即可。<font color=red>设置 '{BANNED}' 或 '{MOD}' 请务必使用大写字母!</font>"></uc1:PageInfo>
  27. <uc1:PageInfo id="info1" runat="server" Icon="information" Text="查询的内容和替换的内容为必填项, 为不影响程序效率, 请不要设置过多不需要的过滤内容"></uc1:PageInfo>
  28. 批量添加:<br />
  29. 每行一组过滤词语,不良词语和替换词语之间使用“=”进行分割;<br />
  30. 如果只是想将某个词语直接替换成 **,则只输入词语即可;<br />
  31. <br /><a href="###" id="hitmessage" onclick="document.getElementById('messageinfo').style.display='';document.getElementById('hitmessage').style.display='none';">显示全部提示...</a>
  32. <div id="messageinfo" style="display:none">
  33. 例如:<br />toobad<br />nobad<br />badword=good<br />sexword={BANNED}
  34. </div>
  35. <br />
  36.   <cc1:TextBox id="badwords" runat="server" HintShowType="down" CssClass="" RequiredFieldType="暂无校验" TextMode="MultiLine" Height="90px" Rows="4" Cols="50"  HintTitle="提示" HintInfo="禁止发布的词语" HintPosOffSet="160"></cc1:TextBox>
  37.   <br /><br />
  38.   <cc1:RadioButtonList id="radfilter" runat="server"  RepeatColumns="1" RepeatLayout="flow">
  39. <asp:ListItem Value="0">清空当前词表后导入新词语,此操作不可恢复,建议首先 <a href="global_ajaxcall.aspx?opname=downloadword"><b>导出词表</b></a> 做好备份</asp:ListItem>
  40. <asp:ListItem Value="1">使用新的设置覆盖已经存在的词语</asp:ListItem>
  41. <asp:ListItem Value="2" Selected="true">不导入已经存在的词语</asp:ListItem>
  42.  </cc1:RadioButtonList> 
  43.  <br />
  44. <cc1:Button ID="addbadwords" runat="server" Text="提 交" ></cc1:Button><br /><br />
  45. <cc1:DataGrid ID="DataGrid1" runat="server" IsFixConlumnControls="true" OnPageIndexChanged="DataGrid_PageIndexChanged" OnSortCommand="Sort_Grid">
  46. <Columns>
  47. <asp:TemplateColumn HeaderText="<input title='选中/取消' onclick='Check(this.form)' type='checkbox' name='chkall' id='chkall' />">
  48. <HeaderStyle Width="20px" />
  49. <ItemTemplate>
  50. <input id="id" onclick="checkedEnabledButton(this.form,'id','DelRec')" type="checkbox" value="<%# DataBinder.Eval(Container, "DataItem.id").ToString() %>" name="id" />
  51. <%# DataGrid1.LoadSelectedCheckBox(DataBinder.Eval(Container, "DataItem.id").ToString())%>
  52. </ItemTemplate>
  53. </asp:TemplateColumn>
  54. <asp:BoundColumn DataField="id" SortExpression="id" HeaderText="id [递增]" Visible="false" />
  55. <asp:BoundColumn DataField="admin" SortExpression="admin" HeaderText="提交人" readonly="true" />
  56. <asp:BoundColumn DataField="find" SortExpression="find" HeaderText="查询的内容" />
  57. <asp:BoundColumn DataField="replacement" SortExpression="replacement" HeaderText="替换的内容" />
  58. </Columns>
  59. </cc1:DataGrid>
  60. <p style="text-align:right;">
  61. <cc1:Button ID="SaveWord" runat="server" Text="保存过滤词修改"></cc1:Button>&nbsp;&nbsp;
  62. <button type="button" class="ManagerButton" id="Button2" onclick="BOX_show('neworedit');"><img src="../images/add.gif"/> 新建过滤词 </button>&nbsp;&nbsp;
  63. <cc1:Button ID="DelRec" runat="server" Text=" 删 除 " ButtonImgUrl="../images/del.gif" Enabled="false" OnClientClick="if(!confirm('你确认要删除所选的词语过滤吗?')) return false;"></cc1:Button>
  64. </p>
  65.  <div id="BOX_overlay" style="background: #000; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>
  66. <div id="neworedit" style="display: none; background :#fff; padding:10px; border:1px solid #999; width:350px;">
  67. <div class="ManagerForm">
  68. <fieldset>
  69. <legend style="background: url(../images/icons/icon48.jpg) no-repeat 6px 50%;">添加过滤词</legend>
  70. <table width="100%">
  71. <tr><td class="item_title" colspan="2">过滤内容</td></tr>
  72. <tr>
  73. <td class="vtop rowform">
  74.  <cc2:TextBox ID="find" runat="server" RequiredFieldType="暂无校验" IsReplaceInvertedComma="true" MaxLength="254" Size="30"></cc2:TextBox>
  75. </td>
  76. <td class="vtop"></td>
  77. </tr>
  78. <tr><td class="item_title" colspan="2">替换为</td></tr>
  79. <tr>
  80. <td class="vtop rowform">
  81.  <cc2:TextBox ID="replacement" runat="server" RequiredFieldType="暂无校验" MaxLength="254" Size="30"></cc2:TextBox>
  82. </td>
  83. <td class="vtop"></td>
  84. </tr>
  85. </table>
  86. <div class="Navbutton">
  87. <cc1:Button ID="AddNewRec" runat="server" Text=" 提 交 "></cc1:Button>&nbsp;&nbsp;
  88. <button type="button" class="ManagerButton" id="Button1" onclick="BOX_remove('neworedit');"><img src="../images/state1.gif"/> 取 消 </button>
  89. </div>
  90. </fieldset>
  91. </div>
  92. </div>
  93. <cc1:Hint id="Hint1" runat="server" HintImageUrl="../images"></cc1:Hint>
  94. </form>
  95. <div id="setting" />
  96. <%=footer%>
  97. </body>
  98. </html>