<%@ page import="org.crosswire.sword.mgr.SWMgr" %> <%@ page import="com.objectspace.jgl.HashMapIterator" %> <%@ page import="com.objectspace.jgl.Map" %> <%@ page import="java.util.TreeMap" %> <%@ page import="java.util.Iterator" %> <% String spsection = "modules"; String headingtext = ""; String modtypetext = ""; String modTypes="Bibles"; try { modTypes = request.getParameterValues("modType")[0]; } catch (Exception e) {} String tester = ""; try { tester = request.getParameterValues("tester")[0]; } catch (Exception e) {} String beta = ""; try { beta = request.getParameterValues("beta")[0]; } catch (Exception e) {} %> The SWORD Project - Copyright Website <% String expr="copyrightinfo"; %> <%@ include file="/copyright/include/sword_header.jsp" %> <% SWMgr conf = null; if (!beta.equals("")) { conf = new SWMgr("/home/ftp/pub/sword/betaraw/", true); beta = "&beta=" + beta; } else { conf = SWMgr.getInstance("/home/ftp/pub/sword/raw/"); } HashMapIterator section = (HashMapIterator)conf.config.sections.start(); if (!tester.equals("")) { tester = "&tester=" + tester; } TreeMap langsunlocked = new TreeMap(); TreeMap langslocked = new TreeMap(); for (;!section.atEnd(); section.advance()) { Map module = (Map)section.value(); String langName = (String)module.get("Lang"); String lockstatus = (String)module.get("CipherKey"); int iunderscore; if (langName == null) langName = "en"; else if (0 == langName.substring(0, 2).compareToIgnoreCase("xx")) { langName = langName.substring(3, langName.length()); } else if (-1 != (iunderscore = langName.indexOf("_"))) { // remove country code if any langName = langName.substring(0, iunderscore); } langName=langName.toLowerCase(); TreeMap modunlocked = (TreeMap)langsunlocked.get(langName); TreeMap modlocked = (TreeMap)langslocked.get(langName); String category = (String)module.get("Category"); if (category == null) category = (String)module.get("ModDrv"); if (category != null) { // continue if we don't have a module we wish to display if (modTypes.equals("Bibles")) { headingtext = "Bible Texts & Translations"; modtypetext = "Bible texts and translations"; if ((!category.equals("RawText")) && (!category.equals("zText"))) continue; } if (modTypes.equals("Commentaries")) { headingtext = "Bible Commentaries"; modtypetext = "Bible commentaries"; if ((!category.equals("RawCom")) && (!category.equals("HREFCom")) && (!category.equals("RawFiles")) && (!category.equals("zCom"))) continue; } if (modTypes.equals("Dictionaries")) { headingtext = "Lexica & Dictionaries"; modtypetext = "lexica and dictionaries"; if ((!category.equals("RawLD")) && (!category.equals("RawLD4")) && (!category.equals("zLD"))) continue; if ((category.equals("Glossaries"))) continue; } if (modTypes.equals("Books")) { headingtext = "General books"; modtypetext = "general books"; if ((!category.equals("RawGenBook"))) continue; } if (modTypes.equals("Glossaries")) { headingtext = "Glossaries"; modtypetext = "glossaries"; if ((!category.equals("Glossaries"))) continue; } if (modTypes.equals("Cults")) { headingtext = "Cult / Unorthodox / Questionable Material"; modtypetext = "cult / unorthodox / questionable material"; if ((!category.startsWith("Cults"))) continue; } if (modTypes.equals("Devotionals")) { headingtext = "Daily Devotionals"; modtypetext = "daily devotionals"; if ((!category.startsWith("Daily"))) continue; } // otherwise let's add info for this module if (lockstatus == null) { if (modunlocked == null) { modunlocked = new TreeMap(); langsunlocked.put(langName, modunlocked); } } else { if (modlocked == null) { modlocked = new TreeMap(); langslocked.put(langName, modlocked); } } if (lockstatus == null) { modunlocked.put(section.key(), section.value()); } else if (lockstatus != null) { modlocked.put(section.key(), section.value()); } } } %>

<%= headingtext %>

     Below you will find a list of all the <%= headingtext %> The SWORD Project offers sorted by their lock status. To get further copyright and contact information simply click on the corresponding link.

Locked Modules|Unlocked Modules

Lock Status: Locked

<% if ("Cults".equals(modTypes)) { out.println("
These modules are considered unorthodox by the bulk of mainstream Christianity,
or simply have not yet been reviewed by CrossWire


"); } Iterator itlock = langslocked.keySet().iterator(); while (itlock.hasNext()) { String langName = (String)itlock.next(); TreeMap modlocked = (TreeMap)langslocked.get(langName); Iterator itlockmod = modlocked.keySet().iterator(); %> Language: <%= langName %>
<% while (itlockmod.hasNext()) { String modName = (String)itlockmod.next(); Map module = (Map)modlocked.get(modName); String modDesc = (String)module.get("Description"); String info = ""; %> <% } %>
<%= info %><%= modName %> <%= modDesc %>
<% } %>

Lock Status: Unlocked

<% if ("Cults".equals(modTypes)) { out.println("
These modules are considered unorthodox by the bulk of mainstream Christianity,
or simply have not yet been reviewed by CrossWire


"); } Iterator it = langsunlocked.keySet().iterator(); while (it.hasNext()) { String langName = (String)it.next(); TreeMap modunlocked = (TreeMap)langsunlocked.get(langName); Iterator it2 = modunlocked.keySet().iterator(); %> Language: <%= langName %>
<% while (it2.hasNext()) { String modName = (String)it2.next(); Map module = (Map)modunlocked.get(modName); String modDesc = (String)module.get("Description"); String info = ""; %> <% } %>
<%= info %><%= modName %> <%= modDesc %>
<% } %>

Source code for ModDispCopyright.jsp <%@ include file="/copyright/include/sword_footer.jsp" %>