<%@ 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 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 sections[] = new String[] { "attic", "avattic", "av", "beta", "experimental", "exp", "wycliffe" }; String spsection = ""; for (String s : sections) { String sparam = request.getParameter(s); if (sparam != null && !sparam.equals("")) { spsection = s; break; } } if ("exp".equals(spsection)) spsection = "experimental"; // handle old "exp" param for backward compat %> The SWORD Project <% if (!"".equals(spsection)) { %> <% } %> <%@ include file="/include/sword_header.jsp" %> <% SWMgr conf = new SWMgr("/home/ftp/pub/sword/"+spsection+"raw/", true); HashMapIterator section = (HashMapIterator)conf.config.sections.start(); if (!tester.equals("")) { tester = "&tester=" + tester; } TreeMap langs = new TreeMap(); for (;!section.atEnd(); section.advance()) { Map module = (Map)section.value(); String langName = (String)module.get("Lang"); 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 lang = (TreeMap)langs.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; } if (modTypes.equals("Maps")) { headingtext = "Maps"; modtypetext = "maps"; if ((!category.startsWith("Maps"))) continue; } if (modTypes.equals("Images")) { headingtext = "Images"; modtypetext = "images"; if ((!category.startsWith("Images"))) continue; } // otherwise let's add info for this module if (lang == null) { lang = new TreeMap(); langs.put(langName, lang); } lang.put(section.key(), section.value()); } } %>

<%= headingtext %>

The following are <%= modtypetext %> that can be used in any SWORD-based Bible program. To download, simply click on the link. For more information about a module, click the Info link beside it.

Please note: Nearly all SWORD programs include an Install Manager, which simplifies downloading and installation of modules. It is strongly recommended that you use an Install Manager if one is available to you. If one is not available for the application you are using, you may download from the list below and extract the ZIP to your SWORD module directory.

SWORD Module Add-ins Installation Instructions

<% 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 = langs.keySet().iterator(); while (it.hasNext()) { String langName = (String)it.next(); TreeMap lang = (TreeMap)langs.get(langName); Iterator it2 = lang.keySet().iterator(); %>

Language: <%= langName %>
<%-- --%> <% while (it2.hasNext()) { String modName = (String)it2.next(); Map module = (Map)lang.get(modName); String category = (String)module.get("Category"); String modDesc = (String)module.get("Description"); boolean locked = ((String)module.get("CipherKey") != null); if (!tester.equals("")) { locked = false; } //Allow locked downloads locked = false; String rawdl = locked ? "

[locked]

" : "

[download]

"; String windl = locked ? "

[locked]

" : "

[download]

"; String macdl = locked ? "

[locked]

" : "

[download]

"; String info = "

[info]

"; %> <%-- --%> <% } %>
Info Name Description Raw ZIPWindows MacOSX
<%= info %> <%= modName %> <%= modDesc %> <%= rawdl %><%= windl %> <%= macdl %>

<% } %> Source code for ModDisp.jsp <%@ include file="/include/sword_footer.jsp" %>