<% /* * Login2.jsp 13/04/02 * * Copyright 2002 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="org.apache.ecs.*" %> <%@ page import="org.apache.ecs.html.*" %> <%@ page import="java.util.*" %> <%@ page import="java.net.*" %> <%@ page import="net.ruthart.rdbms.*" %> <%! String [] names; %> <% String rUrl = request.getRequestURL() + "?"; System.out.println(request.getRequestURL()); int MAX_ROWS = 25, dataSeek=0; StringBuffer html = new StringBuffer(); Hashtable params = new Hashtable(); String key, keyData = "", ft = "", submit = ""; Enumeration enu = request.getParameterNames(); while (enu.hasMoreElements()) { key = (String) enu.nextElement(); String value[] = (String[]) request.getParameterValues(key); if (key.equals("ft")) { ft = value[0]; } else if (key.equals("SUBMIT")) { submit = value[0]; } else if (key.equals("dataseek")) { dataSeek = Integer.parseInt(value[0]); } else if (key.equals("qryLimit")) { MAX_ROWS = Integer.parseInt(value[0]); params.put(key, value); } else { params.put(key.toLowerCase(), value); } } StringBuffer newQueryString = new StringBuffer(); newQueryString.append(rUrl + "ft=" + ft + "&" + "MAX_ROWS=" + MAX_ROWS + "&"); Iterator it = params.keySet().iterator(); while ( it.hasNext()) { String key1 = it.next(); String[] val = params.get(key1); for (int i=0; i" + DbUtils.getMessage("noResultsFound"); } else currentResults = "Results " + from + " - " + to + " of " + numRows; from = dataSeek - MAX_ROWS+1 ; if (dataSeek > 0) prevResults = "Previous (" + from + " - " + dataSeek + " of " + numRows + ")"; if (numRows > to){ from = to +1; to = (to + MAX_ROWS) trows = HtmlUtils.array2trows(rows, repInfo, "DispRec.jsp?ft=ntce+"); Div tbl = new Div().addElement(tb1); tbl.setClass("list"); if (numRows > 0) { for (int i=0; i< trows.size(); i++) { TR thisrow = trows.elementAt(i); if (i % 2 == 1) thisrow.setClass("row1"); else thisrow.setClass("row2"); tb1.addElement(thisrow); } } html.append(tbl); %> Search Results

<%out.println(currentResults); %>

<%out.print(tb1.toString()); %>
<%if (!(prevResults == null)) out.println(prevDiv.toString());%> <%if (!(nextResults == null)) out.println(nextDiv.toString());%>