<%@ page import="com.insightguru.giraffe.server.domain.FaqCategory" %> <%@ page import="com.insightguru.giraffe.server.domain.FaqQna" %> <%@ page import="java.util.List" %> <%@ page import="com.insightguru.giraffe.server.filter.SecurityCheckFilter" %> <%@ page import="com.insightguru.giraffe.server.domain.User" %> <%@ page import="com.insightguru.giraffe.server.dao.UserDAO" %> <%@ page import="com.insightguru.giraffe.common.constant.UserProfileBitFlags" %> <%@ page import="org.owasp.esapi.Encoder" %> <%@ page import="org.owasp.esapi.ESAPI" %> <% if(SecurityCheckFilter.getLoggedInUserId() == null || !UserProfileBitFlags.isAdmin(UserDAO.getExistingUser(SecurityCheckFilter.getLoggedInUserId()))) { %>

Admin Access Only

<% } else { %>

Frequently Asked Questions Editor

<% daoEditor.processCategoryRequest(); out.println(daoEditor.categoryBodyText()); %>

Categories

add category
<% Encoder e = ESAPI.encoder(); dao.LoadCategories(); for (FaqCategory cat : dao.getCats()) { out.println("
"); out.println(""); List qs = cat.getQnas(); out.println(" "); out.println(""); out.println(""); } %>
name question count actions
" + cat.getId() + ": " + e.encodeForHTML(cat.getName()) + " "); if (qs == null) { out.println(" null "); } else { out.println(cat.getQnas().size()); } out.println(" "); out.println(" delete "); out.println("| rename "); out.println("| reorder "); out.println("
<% } %>