📄 forums.jsp
字号:
if (!forums.hasNext()) { %> <tr bgcolor="#ffffff"> <td colspan="7" align="center"> <br> <% if (category.isAuthorized(Permissions.SYSTEM_ADMIN | ForumPermissions.FORUM_CATEGORY_ADMIN | ForumPermissions.MODERATOR)) { %> <input type="submit" value="Create New Forum" class="but" name="newforum"> <% } %> <br><br> </td> </tr> <% } // Print out all existing forums: boolean hadForums = false; int forumIndex = -1; while (forums.hasNext()) { hadForums = true; forumIndex ++; Forum forum = (Forum)forums.next(); boolean hasEditPerms = forum.isAuthorized(Permissions.SYSTEM_ADMIN | ForumPermissions.FORUM_CATEGORY_ADMIN | ForumPermissions.MODERATOR); %> <tr bgcolor="#ffffff"> <td> <font size="-1" face="arial"> <a href="editForum.jsp?forum=<%= forum.getID() %>" ><b><%= forum.getName() %></b></a> </font> <% if (forum.getDescription() != null) { %> <font size="-2" face="arial"> <br><%= forum.getDescription() %> </font> <% } %> </td> <td align="center"> <table cellpadding="0" cellspacing="0" border="0"> <tr><td> <% if (forumIndex > 0) { %> <a href="forums.jsp?forum=<%= forum.getID() %>&cat=<%= category.getID() %>&fIndex=<%= forumIndex %>&up=true" ><img src="images/arrow_up.gif" width="13" height="9" border="0" vspace="2" hspace="2"></a> <% } else { %> <img src="images/blank.gif" width="13" height="9" border="0" vspace="2" hspace="2"> <% } %> </td> <td> <% if (forums.hasNext()) { %> <a href="forums.jsp?forum=<%= forum.getID() %>&cat=<%= category.getID() %>&fIndex=<%= forumIndex %>&down=true" ><img src="images/arrow_down.gif" width="13" height="9" border="0" vspace="2" hspace="2"></a> <% } else { %> <img src="images/blank.gif" width="13" height="9" border="0" vspace="2" hspace="2"> <% } %> </td></tr> </table> </td> <td align="center"> <font size="-1" face="arial"> <% if (forum.isAuthorized(Permissions.SYSTEM_ADMIN | ForumPermissions.FORUM_CATEGORY_ADMIN | ForumPermissions.MODERATOR)) { %> <a href="forumContent.jsp?forum=<%= forum.getID() %>" ><%= forum.getThreadCount() %></a> <% } else { %> <%= forum.getThreadCount() %> <% } %> </font> </td> <td align="center"> <font size="-1" face="arial"> <%= forum.getMessageCount() %> </font> </td> <td align="center"> <% if (hasEditPerms) { %> <a href="editForum.jsp?forum=<%= forum.getID() %>" title="Click to edit all forum properties" ><img src="images/button_edit.gif" width="17" height="17" border="0"></a> <% } else { %> <% } %> </td> <td align="center"> <% if (hasEditPerms) { %> <a href="removeForum.jsp?forum=<%= forum.getID() %>" title="Click to delete this forum" ><img src="images/button_delete.gif" width="17" height="17" border="0"></a> <% } else { %> <% } %> </td> <td align="center"> <% if (hasEditPerms) { %> <font size="-1" face="arial"> <input type="checkbox" name="forum" value="<%= forum.getID() %>"> </font> <% } else { %> <% } %> </td> </tr> <% } // end while forums.hasNext() %> <% if (hadForums) { %> <tr bgcolor="#ffffff"> <td colspan="6" bgcolor="#eeeeee"> <% if (category.isAuthorized(Permissions.SYSTEM_ADMIN | ForumPermissions.FORUM_CATEGORY_ADMIN | ForumPermissions.MODERATOR)) { %> <input type="submit" value="Create New Forum" class="but" name="newforum"> <% } else { %> <% } %> </td> <td align="center"> <font size="-1" face="arial"> <input type="submit" value="Move.." class="but" name="moveForum"> </font> </td> </tr> <% } %> </table> </td></tr> </table> </td> </tr> <tr> <td colspan="2"> <table cellpadding="8" cellspacing="0" border="0"> <tr><td> <font face="arial"> <br> <b>Sub-Categories</b> </font> </td></tr> </table> </td> </tr> <tr> <td width="1%"> <img src="images/blank.gif" width="20" height="1" border="0"> </td> <td width="99%"> <table bgcolor="#bbbbbb" cellpadding="0" cellspacing="0" border="0" width="100%"> <tr><td> <table bgcolor="#bbbbbb" cellpadding="3" cellspacing="1" border="0" width="100%"> <tr bgcolor="#dddddd"> <td> <font size="-2" face="verdana" width="94%"> <b>NAME / DESCRIPTION</b> </font> </td> <td align="center" width="1%" nowrap> <font size="-2" face="verdana"> <b>ORDER</b> </font> </td> <td align="center" width="1%" nowrap> <font size="-2" face="verdana"> <b>FORUMS</b> </font> </td> <td align="center" width="1%" nowrap> <font size="-2" face="verdana"> <b>CATEGORIES</b> </font> </td> <td align="center" width="1%" nowrap> <font size="-2" face="verdana"> <b>EDIT</b> </font> </td> <td align="center" width="1%" nowrap> <font size="-2" face="verdana"> <b>DELETE</b> </font> </td> <td align="center" width="1%" nowrap> <font size="-2" face="verdana"> <b>MOVE</b> </font> </td> </tr> <% // Loop throught all the sub categories. Indicate if there are none: if (!categories.hasNext()) { %> <tr bgcolor="#ffffff"> <td colspan="7" align="center"> <br> <% if (category.isAuthorized(Permissions.SYSTEM_ADMIN | ForumPermissions.FORUM_CATEGORY_ADMIN | ForumPermissions.MODERATOR)) { %> <input type="submit" value="Create New Sub-Category" class="but" name="newcat"> <% } %> <br><br> </td> </tr> <% } // Print out all subcategories: boolean hadSubCats = false; int catIndex = -1; while (categories.hasNext()) { catIndex ++; hadSubCats = true; ForumCategory subCat = (ForumCategory)categories.next(); boolean hasEditPerms = subCat.isAuthorized(Permissions.SYSTEM_ADMIN | ForumPermissions.FORUM_CATEGORY_ADMIN | ForumPermissions.MODERATOR); %> <tr bgcolor="#ffffff"> <td> <font size="-1" face="arial"> <a href="forums.jsp?cat=<%= subCat.getID() %>" ><b><%= subCat.getName() %></b></a> </font> <% if (subCat.getDescription() != null) { %> <font size="-2" face="arial"> <br><%= subCat.getDescription() %> </font> <% } %> </td> <td align="center"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td> <% if (catIndex > 0) { %> <a href="forums.jsp?subcat=<%= subCat.getID() %>&cat=<%= category.getID() %>&cIndex=<%= catIndex %>&up=true" ><img src="images/arrow_up.gif" width="13" height="9" border="0" vspace="2" hspace="2"></a> <% } else { %> <img src="images/blank.gif" width="13" height="9" border="0" vspace="2" hspace="2"> <% } %> </td> <td> <% if (categories.hasNext()) { %> <a href="forums.jsp?subcat=<%= subCat.getID() %>&cat=<%= category.getID() %>&cIndex=<%= catIndex %>&down=true" ><img src="images/arrow_down.gif" width="13" height="9" border="0" vspace="2" hspace="2"></a> <% } else { %> <img src="images/blank.gif" width="13" height="9" border="0" vspace="2" hspace="2"> <% } %> </td> </tr> </table> </td> <td align="center"> <font size="-1" face="arial"> <%= subCat.getForumCount() %> </font> </td> <td align="center"> <font size="-1" face="arial"> <%= subCat.getCategoryCount() %> </font> </td> <td align="center"> <% if (hasEditPerms) { %> <a href="editCat.jsp?cat=<%= subCat.getID() %>" title="Click to edit all category properties" ><img src="images/button_edit.gif" width="17" height="17" border="0"></a> <% } else { %> <% } %> </td> <td align="center"> <% if (hasEditPerms) { %> <a href="deleteCategory.jsp?cat=<%= subCat.getID() %>" title="Click to delete this category" ><img src="images/button_delete.gif" width="17" height="17" border="0"></a> <% } else { %> <% } %> </td> <td align="center"> <% if (hasEditPerms) { %> <font size="-1" face="arial"> <input type="submit" value="Move" class="but" name="moveCat" onclick="this.form.srcCat.value='<%= subCat.getID() %>';"> <% } else { %> <% } %> </font> </td> </tr> <% } // end while categories.next() %> <% if (hadSubCats) { %> <tr bgcolor="#ffffff"> <td colspan="7" bgcolor="#eeeeee"> <% if (category.isAuthorized(Permissions.SYSTEM_ADMIN | ForumPermissions.FORUM_CATEGORY_ADMIN | ForumPermissions.MODERATOR)) { %> <input type="submit" value="Create New Sub-Category" class="but" name="newcat"> <% } else { %> <% } %> </td> </tr> <% } %> </table> </td></tr> </table> </td> </tr> </form> </table> <br> </td></tr></table></td></tr></table><%@ include file="footer.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -