<%@ include file="init.jsp" %> <% String addModule = (String)request.getParameter("add"); if (addModule != null) { SWModule mod = mgr.getModuleByName(addModule); if (mod != null) { if (mod.getCategory().equals(SwordOrb.BIBLES)) { prefBibles.remove(mod.getName()); prefBibles.add(0, mod.getName()); } if (mod.getCategory().equals(SwordOrb.COMMENTARIES)) { prefCommentaries.remove(mod.getName()); prefCommentaries.add(0, mod.getName()); } } } String delModule = (String)request.getParameter("del"); if (delModule != null) { SWModule mod = mgr.getModuleByName(delModule); if (mod != null) { if (mod.getCategory().equals(SwordOrb.BIBLES)) { prefBibles.remove(mod.getName()); } if (mod.getCategory().equals(SwordOrb.COMMENTARIES)) { prefCommentaries.remove(mod.getName()); } } } session.setAttribute("PrefBibles", prefBibles); session.setAttribute("PrefCommentaries", prefCommentaries); saveModPrefsCookie(response, "PrefBibles", prefBibles); saveModPrefsCookie(response, "PrefCommentaries", prefCommentaries); %>

Translations:

Preferred Translations

<% if (prefBibles.size() > 0) { out.println(""); } %>

All Translations

Commentaries:

Preferred Commentaries

<% if (prefCommentaries.size() > 0) { out.println(""); } %>

All Commentaries

Preferred Translations

Click to remove. Reselect on the side to move to the top.

<% if (prefBibles.size() > 0) { out.println("
    "); } for (int i = 0; i < prefBibles.size(); i++) { SWModule mod = mgr.getModuleByName((String)prefBibles.get(i)); %>
  • <%= mod.getDescription() %>
  • <% } if (prefBibles.size() > 0) { out.println("
"); } %>

Preferred Commentaries

Click to remove. Reselect on the side to move to the top.

<% if (prefCommentaries.size() > 0) { out.println("
    "); } for (int i = 0; i < prefCommentaries.size(); i++) { SWModule mod = mgr.getModuleByName((String)prefCommentaries.get(i)); %>
  • <%= mod.getDescription() %>
  • <% } if (prefCommentaries.size() > 0) { out.println("
"); } %>

Preferred Style

Tabs

Misc Options

<%! private void saveModPrefsCookie(HttpServletResponse response, String name, Vector modPrefs) { StringBuffer fullText = new StringBuffer("GodLuvsU"); for (int i = 0; i < modPrefs.size(); i++) { fullText.append("+"); fullText.append((String)modPrefs.get(i)); } /* // serialize out to cookie ByteArrayOutputStream bytes = new ByteArrayOutputStream(); Base64.OutputStream bos = new Base64.OutputStream(bytes); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(prefBibles); oos.writeObject(prefCommentaries); Cookie c = new Cookie("prefMods", new String(bytes.toByteArray())); */ Cookie c = new Cookie(name, fullText.toString()); c.setMaxAge(java.lang.Integer.MAX_VALUE); c.setPath("/"); //out.println("Cookie being set is ("+c.getName()+"):" + c.getValue()); response.addCookie(c); } %>