%@ 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" %>
<%@ page import="java.util.Enumeration" %>
<%@ page import="gnu.regexp.RE" %>
<%@ page import="java.io.File" %>
<%
String spsection = "modules";
try {
String modName = "NKJV";
try {modName = request.getParameterValues("modName")[0];} catch (Exception e) {}
String beta = "";
try {beta = request.getParameterValues("beta")[0];} catch (Exception e) {}
if (!beta.equals("")) {
spsection = "betamodules";
}
String exp = "";
try {exp = request.getParameterValues("exp")[0];} catch (Exception e) {}
if (!exp.equals("")) {
spsection = "expmodules";
}
boolean tester = false;
try {tester = (request.getParameterValues("tester")[0] != null);} catch (Exception e) {}
SWMgr conf = null;
String swordhome = "";
if (!"".equals(beta)) {
swordhome = "/home/betamods/raw/";
beta = "&beta=" + beta;
}
else if (!"".equals(exp)) {
swordhome = "/home/ftp/pub/sword/experimentalraw/";
exp = "&exp=" + exp;
}
else swordhome = "/home/pubmods/raw/";
conf = SWMgr.getInstance(swordhome);
Map module = (Map)conf.config.sections.get(modName);
String modNotes = "";
String langName = (String)module.get("Lang");
String description = (String)module.get("Description");
String about = (String)module.get("About");
String promo = (String)module.get("ShortPromo");
boolean locked = ((String)module.get("CipherKey") != null);
if (tester)
locked = false;
if (promo != null)
about += "
" + promo;
//locked downloads are possible now
locked = false;
String rawdl = locked ? "[locked]" : "[download]";
String windl = locked ? "[locked]" : "[download]";
String macdl = locked ? "[locked]" : "[download]";
String version = (String)module.get("Version");
if (version == null)
version = "1.0";
String date = (String)module.get("SwordVersionDate");
if (date != null)
version = version + " (" + date + ")";
String minimumversion = (String)module.get("MinimumVersion");
if (minimumversion == null)
minimumversion = "1.5.1a";
String category = (String)module.get("Category");
if (category != null && category.startsWith("Cult")) {
modNotes = category;
category = null;
}
if (category == null)
category = (String)module.get("ModDrv");;
if (category != null) {
// continue if we don't have a module we wish to display
if ((category.equals("RawText"))
|| (category.equals("zText")))
category = "Bible";
else if ((category.equals("RawCom"))
|| (category.equals("HREFCom"))
|| (category.equals("RawFiles"))
|| (category.equals("zCom")))
category = "Commentary";
else if ((category.equals("RawLD"))
|| (category.equals("RawLD4")))
category = "Dictionary";
}
for (Enumeration en = module.values("GlobalOptionFilter"); en.hasMoreElements();) {
String val = (String)en.nextElement();
if (val.endsWith("Strongs")) {
if (!modNotes.equals(""))
modNotes += "
";
modNotes += "Includes Strong's Numbers";
}
if (val.endsWith("Morph")) {
if (!modNotes.equals(""))
modNotes += "
";
modNotes += "Includes Morphology Codes";
}
if (val.endsWith("Footnotes")) {
if (!modNotes.equals(""))
modNotes += "
";
modNotes += "Includes Footnotes";
}
if (val.endsWith("SectionHeadings")) {
if (!modNotes.equals(""))
modNotes += "
";
modNotes += "Includes Section Headings";
}
}
if (!modNotes.equals("")) modNotes = "
| Module Name | <%= modName %> |
| Book Name | <%= description %> |
| Module Type | <%= category %> |
| Language | <%= langName %> |
| Module Version | <%= version %> |
| Minimum SWORD Version | <%= minimumversion %> |
| Download Size | <%= sizeDownload %> |
| Install Size | <%= sizeInstall %> |
| About | <%= about %> |
| Download | <%= rawdl %> |
| Download: Windows | <%= windl %> |
| Download: MacOSX | <%= macdl %> |