📄 filters.jsp
字号:
{"Forums", "forums.jsp"},
{"Edit Forum", "editForum.jsp?forum="+forumID},
{"Message Filters", "filters.jsp?forum="+forumID}
};
}
%>
<%@ include file="include/title.jsp" %>
<font size="-1">
<% if (isGlobal) { %>
Filters dynamically reformat the contents of messages. Use the forms below to install and customize filters.
<% } else { %>
Filters dynamically reformat the contents of messages. Use the forms below to install and customize filters.
<% } %>
</font>
<p>
<script language="JavaScript" type="text/javascript">
var filterInfo = new Array(
<% for (int i=0; i<filters.length; i++) {
BeanDescriptor descriptor = (Introspector.getBeanInfo(filters[i].getClass())).getBeanDescriptor();
%>
new Array(
"<%= descriptor.getBeanClass().getName() %>",
"<%= descriptor.getValue("version") %>",
"<%= descriptor.getValue("author") %>",
"<%= descriptor.getShortDescription() %>"
)
<% if ((filters.length-i) > 1) { %>
,
<% }
}
%>
);
function properties(theForm) {
var className = theForm.filters.options[theForm.filters.selectedIndex].value;
var selected = 0;
for (selected=0; selected<filterInfo.length; selected++) {
if (filterInfo[selected][0] == className) {
var version = filterInfo[selected][1];
var author = filterInfo[selected][2];
var description = filterInfo[selected][3];
theForm.version.value = ((version=="null")?"":version);
theForm.author.value = ((author=="null")?"":author);
theForm.description.value = ((description=="null")?"":description);
break;
}
}
}
</script>
<% if (filterCount > 0) { %>
<font size="-1"><b>Current Filters</b></font>
<ul>
<table bgcolor="<%= tableBorderColor %>" cellpadding="0" cellspacing="0" border="0">
<tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr bgcolor="#eeeeee">
<td align="center"><font size="-2" face="verdana"><b>ORDER</b></font></td>
<td align="center"><font size="-2" face="verdana"><b>NAME</b></font></td>
<td align="center"><font size="-2" face="verdana"><b>VERSION</b></font></td>
<td align="center"><font size="-2" face="verdana"><b>DESCRIPTION</b></font></td>
<td align="center"><font size="-2" face="verdana"><b>EDIT</b></font></td>
<td align="center"><font size="-2" face="verdana"><b>DELETE</b></font></td>
</tr>
<% for (int i=0; i<filterCount; i++) {
ForumMessageFilter 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());
%>
<tr bgcolor="#ffffff">
<td><font size="-1"><%= (i+1) %></font></td>
<td><font size="-1"><%= descriptor.getDisplayName() %></font></td>
<td align="center"><font size="-1"><%= descriptor.getValue("version") %></font></td>
<td><font size="-1"><%= descriptor.getShortDescription() %></font></td>
<td align="center">
<% if (descriptors.length > 0) { %>
<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>
<% } else { %>
<% } %>
</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">
<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> </td>
<td colspan="5">
<table cellpadding="2" cellspacing="0" border="0" width="100%">
<% int color = 0;
for (int j=0; j<descriptors.length; j++) {
%>
<tr bgcolor=<%= (color++%2==0)?"#f4f5f7":"#ffffff" %>>
<td width="60%">
<font size="-1"><%= descriptors[j].getDisplayName() %></font>
<br>
<font size="-2"><%= descriptors[j].getShortDescription() %></font>
</td>
<td width="20%"> </td>
<td width="20%" nowrap>
<font size="-1">
<%= getHTML(filter, descriptors[j]) %>
</font>
</td>
</tr>
<% } %>
<tr>
<td colspan="4" align="right">
<input type="submit" value="Save Properties">
</td>
</tr>
</table>
</td>
</tr>
</form>
<% } %>
<% }
%>
</table>
</td></tr>
</table>
<% } %>
</ul>
</form>
<p>
<form action="filters.jsp">
<input type="hidden" name="forum" value="<%= forumID %>">
<input type="hidden" name="install" value="true">
<font size="-1"><b>Install Filter</b></font>
<ul>
<table bgcolor="<%= tableBorderColor %>" cellpadding="0" cellspacing="0" border="0">
<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">
<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() %>
<% }
}
%>
</select>
</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" align="center">
<input type="submit" value="Install...">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</table>
</ul>
</form>
<p>
<%--
<font size="-1"><b>Add Filter</b></font>
<ul>
</ul>
</form>
--%>
<p>
<%--
<font size="-1"><b>Remove Filter</b></font>
<ul>
</ul>
</form>
--%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -