⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filters.jsp

📁 jive3论坛开源 最新 有版主功能 jive3论坛开源 最新 有版主功能 jive3论坛开源 最新 有版主功能
💻 JSP
📖 第 1 页 / 共 3 页
字号:
    for (int i=0; i<filterCount; i++) {        try {            Filter filter = filterManager.getFilter(i);            // Descriptor for this filter            BeanDescriptor descriptor = (Introspector.getBeanInfo(filter.getClass())).getBeanDescriptor();            // Properties for this filter            PropertyDescriptor[] descriptors = BeanUtils.getPropertyDescriptors(filter.getClass());            // Version of this filter            // Description of this filter            String description = StringUtils.escapeHTMLTags(descriptor.getShortDescription());            // Filter types:            long filterTypes = filterManager.getFilterTypes(i);            boolean appliesToSubj = (filterTypes & ForumFilterType.FORUM_MESSAGE_SUBJECT)                                            == ForumFilterType.FORUM_MESSAGE_SUBJECT;            boolean appliesToBody = (filterTypes & ForumFilterType.FORUM_MESSAGE_BODY)                                            == ForumFilterType.FORUM_MESSAGE_BODY;            boolean appliesToProp = (filterTypes & ForumFilterType.FORUM_MESSAGE_PROPERTY)                                            == ForumFilterType.FORUM_MESSAGE_PROPERTY;%>    <tr bgcolor="#ffffff">        <td><font size="-1"><%= (i+1) %></font></td>        <td nowrap><font size="-1"><%= descriptor.getDisplayName() %></font></td>        <td><font size="-1"><%= (description!=null)?description:"&nbsp;" %></font></td>        <%  if (filterCount > 1) { %>        <td>            <%  if ((i+1)<filterCount) { %>                <a href="filters.jsp?forum=<%= forumID %>&changePos=true&down=true&filterIndex=<%= i %>"                ><img src="images/arrow_down.gif" width="13" height="9" alt="Move this filter down." border="0"></a>            <%  } else { %>                <img src="images/blank.gif" width="13" height="9" border="0">            <%  } %>            <%  if (i != 0) { %>                <a href="filters.jsp?forum=<%= forumID %>&changePos=true&up=true&filterIndex=<%= i %>"                ><img src="images/arrow_up.gif" width="13" height="9" alt="Move this filter up." border="0"></a>            <%  } else { %>                <img src="images/blank.gif" width="13" height="9" border="0">            <%  } %>        </td>        <%  } %>        <td align="center">            <a href="filters.jsp?edit=true&forum=<%= forumID %>&pos=<%= i %>"            ><img src="images/button_edit.gif" width="17" height="17" alt="Edit the properties of this filter" border="0"            ></a>        </td>        <td align="center">            <a href="filters.jsp?remove=true&forum=<%= forumID %>&pos=<%= i %>"            ><img src="images/button_delete.gif" width="17" height="17" alt="Delete this filter" border="0"            ></a>        </td>    </tr><%  if (position == i && edit) { %>    <form action="filters.jsp" method="post">    <input type="hidden" name="forum" value="<%= forumID %>">    <input type="hidden" name="saveProperties" value="true">    <input type="hidden" name="filterIndex" value="<%= i %>">    <tr bgcolor="#ffffff">        <td>&nbsp;</td>        <td colspan="<%= (filterCount > 1)?"5":"4" %>">            <table cellpadding="2" cellspacing="0" border="0" width="100%">            <%  int color = 1; %>            <tr bgcolor=<%= (color++%2==0)?"#f4f5f7":"#ffffff" %>>                <td width="60%">                    Apply Filtering To:                </td>                <td width="20%">&nbsp;</td>                <td width="20%" nowrap>                    <table cellpadding="2" cellspacing="0" border="0">                    <tr>                        <td>                            <input type="checkbox" name="applyToSubj" value="<%= ForumFilterType.FORUM_MESSAGE_SUBJECT %>" id="atsubj"                             <%= ((appliesToSubj)?" checked":"") %>>                        </td>                        <td nowrap>                            <label for="atsubj">Message Subject</label>                        </td>                    </tr>                    <tr>                        <td>                            <input type="checkbox" name="applyToBody" value="<%= ForumFilterType.FORUM_MESSAGE_BODY %>" id="atbody"                             <%= ((appliesToBody)?" checked":"") %>>                        </td>                        <td nowrap>                            <label for="atbody">Message Body</label>                        </td>                    </tr>                    <tr>                        <td>                            <input type="checkbox" name="applyToProp" value="<%= ForumFilterType.FORUM_MESSAGE_PROPERTY %>" id="atprop"                             <%= ((appliesToProp)?" checked":"") %>>                        </td>                        <td nowrap>                            <label for="atprop">Message Property Values</label>                        </td>                    </tr>                    </table>                </td>            </tr>            <%  for (int j=0; j<descriptors.length; j++) {                    color ++;                    boolean isString = "java.lang.String".equals(descriptors[j].getPropertyType().getName());                    if (isString) {            %>                    <tr bgcolor=<%= (color%2==0)?"#f4f5f7":"#ffffff" %>>                        <td colspan="3">                            <font size="-1"><%= descriptors[j].getDisplayName() %></font>                            <br>                            <font size="-2"><%= descriptors[j].getShortDescription() %></font>                        </td>                    </tr>                    <tr bgcolor=<%= (color%2==0)?"#f4f5f7":"#ffffff" %>>                        <td colspan="3">                            <%= getHTML(filter, descriptors[j]) %>                        </td>                    </tr>                <%  } else { %>                    <tr bgcolor=<%= (color%2==0)?"#f4f5f7":"#ffffff" %>>                        <td width="70%">                            <font size="-1"><%= descriptors[j].getDisplayName() %></font>                            <br>                            <font size="-2"><%= descriptors[j].getShortDescription() %></font>                        </td>                        <td width="10%">&nbsp;</td>                        <td width="20%" nowrap>                            <%= getHTML(filter, descriptors[j]) %>                        </td>                    </tr>            <%      }                }            %>            <tr>                <td colspan="4" align="right">                    <font size="-1">                    <input type="submit" value="Save Properties">                    </font>                </td>            </tr>            </table>        </td>    </tr>    </form><%          } %><%      } catch (Exception e) {}    }%>    </table>    </td></tr>    </table>    <br><%  } %></ul></form><p><form action="filters.jsp" method="post"><input type="hidden" name="forum" value="<%= forumID %>"><input type="hidden" name="install" value="true"><span class="jive-install-filter"><table cellpadding="0" cellspacing="0" border="0"><tr><td>    <font size="-1"><b>Install Filter</b></font>    </td>    <td>    <a href="#" onclick="helpwin('filters','install_filter');return false;"     title="Click for help"     ><img src="images/help-16x16.gif" width="16" height="16" border="0" hspace="8"></a>    </td></tr></table><br><ul>    <table bgcolor="<%= tblBorderColor %>" cellpadding="0" cellspacing="0" border="0" width="1%">    <tr><td>        <table cellpadding="4" cellspacing="1" border="0" width="100%">        <tr bgcolor="#eeeeee">            <td align="center">                <font size="-2" face="verdana"><b>AVAILABLE FILTERS</b></font>            </td>        </tr>        <tr bgcolor="#ffffff">            <td>                <table cellpadding="1" cellspacing="0" border="0">                <tr>                    <td width="48%" valign="top">                        <font size="-1">                        <select size="8" name="filters" onchange="properties(this.form);">                        <%  for (int i=0; i<filters.length; i++) {                                if (!isInstalledFilter(filterManager, filters[i])) {                                    BeanDescriptor descriptor                                            = (Introspector.getBeanInfo(filters[i].getClass())).getBeanDescriptor();                        %>                                    <option value="<%= descriptor.getBeanClass().getName() %>"                                     ><%= descriptor.getDisplayName() %>                        <%      } // end if                            } // end for                        %>                        </select>                        </font>                    </td>                    <td width="2%"><img src="images/blank.gif" width="5" height="1" border="0"></td>                    <td width="48%" valign="top">                        <table cellpadding="2" cellspacing="0" border="0" width="100%">                        <tr>                            <td><font size="-2">VERSION</font></td>                            <td><input type="text" size="20" name="version" style="width:100%"></td>                        </tr>                        <tr>                            <td><font size="-2">AUTHOR</font></td>                            <td><input type="text" size="20" name="author" style="width:100%"></td>                        </tr>                        <tr>                            <td valign="top"><font size="-2">DESCRIPTION</font></td>                            <td><textarea name="description" cols="20" rows="5" wrap="virtual"></textarea></td>                        </tr>                        </table>                    </td>                </tr>                <tr>                    <td colspan="3">                        <table cellpadding="2" cellspacing="0" border="0" width="100%">                        <tr valign="top">                            <td width="1%" nowrap>                                Apply Filter To:                            </td>                            <td width="99%">                                <input type="checkbox" name="applyToSubj" value="<%= ForumFilterType.FORUM_MESSAGE_SUBJECT %>" id="ms" checked>                                <label for="ms">Message Subjects</label>                                <br>                                <input type="checkbox" name="applyToBody" value="<%= ForumFilterType.FORUM_MESSAGE_BODY %>" id="mb" checked>                                <label for="mb">Message Body</label>                                <br>                                <input type="checkbox" name="applyToProp" value="<%= ForumFilterType.FORUM_MESSAGE_PROPERTY %>" id="mp">                                <label for="mp">Message Properties</label>                            </td>                        </tr>                        </table>                    </td>                </tr>                <tr>                    <td colspan="3" align="center">                        <font size="-1">                        <input type="submit" value="Install">                        </font>                    </td>                </tr>                </table>            </td>        </tr>        </table>    </td></tr>    </table></ul></span></form><form action="filters.jsp"><input type="hidden" name="addFilter" value="true"><input type="hidden" name="forum" value="<%= forumID %>"><table cellpadding="0" cellspacing="0" border="0"><tr><td>    <font size="-1"><b>Add Filter Class</b></font>    </td>    <td>    <a href="#" onclick="helpwin('filters','add_filter_class');return false;"     title="Click for help"     ><img src="images/help-16x16.gif" width="16" height="16" border="0" hspace="8"></a>    </td></tr></table><br><ul>    <table cellpadding="2" cellspacing="0" border="0">    <tr>        <td><font size="-1">Class Name:</font></td>        <td><input type="text" name="newClassname" value="" size="30" maxlength="100"></td>        <td><font size="-1"><input type="submit" value="Add Filter"></font></td>    </tr>    </table></ul></form></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -