% /* * ListResults.jsp 13/04/04 * * Copyright 2002,2003,2004 by George Ruthart, * 1955 Roy Ivor Crescent, Mississauga, Ontario, Canada L5L 3N7 * All rights reserved. * * This source code is the confidential and proprietary information * of George Ruthart ("Confidential Information"). You shall * not disclose this Confidential Information to any third parties * and shall not modify this code without the written permission * from George Ruthart as well as shall use the software only in * accordanc with the terms of the license agreement that * you entered into with George Ruthart. */ %> <%@ page import="java.util.*" %> <%@ page import="net.ruthart.rdbms.*" %> <%@ page import="org.apache.ecs.html.*" %> <% int MAX_ROWS = 120, dataSeek=0; String rep = "keyLists"; StringBuffer html = new StringBuffer(); Hashtable navHash = new Hashtable(); if (request.getParameter("rep") != null) rep = request.getParameter("rep"); if (request.getParameter("ctry") != null) { String[] par = {request.getParameter("ctry")}; navHash.put("lists.descr_lk", par); } LoginInfo li = new LoginInfo(getServletContext()); AuthInfo ai = li.getAuthInfo(request); Db2array d2a = new Db2array(); d2a.setDataSeek(dataSeek); d2a.setMaxRows(MAX_ROWS); d2a.setRepInfo("lists", rep, navHash, ai); RepInfo repInfo = d2a.getRepInfo(); String[][] rows = d2a.getResultArray(true); Form form = new Form("/subs", "POST"); form.setName("form0"); Table tb1 = HtmlUtils.array2table(rows, repInfo, ""); html.append(new H2(DbUtils.getMessage("listResults"))); Db2mod d2m = new Db2mod(); Vector jsVect = new Vector(); StringBuffer sb = new StringBuffer(); Vector fields = d2m.getFields("sl", null, jsVect, ai); for (Enumeration s = jsVect.elements(); s.hasMoreElements();) sb.append(((Script)s.nextElement()).toString()).append("\n"); Table tb2 = new Table(0); for (Enumeration f=fields.elements(); f.hasMoreElements();) { TR tr = (TR)f.nextElement(); tb2.addElement(tr).addElement("\n"); } tb1.addElement(new TR(new TD(tb2).setColSpan(5))); tb1.addElement(HtmlUtils.getSubmit("Subscribe", "Subscribe to Mailing Lists", 5, true)); form.addElement(tb1); html.append(form.toString()); %>