Mercurial > hg > digilib-old
diff client/digitallibrary/digilib.jsp @ 34:84a481a388bb
first update of new client-version
author | luginbue |
---|---|
date | Thu, 21 Feb 2002 02:27:06 +0100 |
parents | 39ee473b4711 |
children | e918bd61084d |
line wrap: on
line diff
--- a/client/digitallibrary/digilib.jsp Thu Feb 21 02:27:06 2002 +0100 +++ b/client/digitallibrary/digilib.jsp Thu Feb 21 02:27:06 2002 +0100 @@ -1,49 +1,53 @@ -<html> -<title>Digital Document Library</title> -<head> -<jsp:useBean id="DB" scope="page" class="digilib.servlet.DocumentBean" /> - -<% -// set servlet init-parameter -DB.setConfig(getServletConfig()); -// check if authentication is needed and redirect if necessary -DB.doAuthentication(request, response); -%> - -<script language="JavaScript"> - -// the document's query string (minus "?") -var query = location.search.substring(1); - -// feel free to uncomment - i have never seen a problem so... -// // DEBUG -// alert('DIR: <%= DB.getDocuPath(request) %> PAGES: <%= DB.getNumPages(request) %>'); - -// number of pages of the document -var numPages = <%= DB.getNumPages(request) %>; - -// browser version test to include the corresponding navigation-file -if ((navigator.appName.toLowerCase() == "netscape") && (parseFloat(navigator.appVersion) < 5.0)) { - top.document.write('<script src="navigation_n4.js"><\/script>'); -} else if (navigator.appName.toLowerCase() == "netscape") { - top.document.write('<script src="navigation_n6.js"><\/script>'); -} else if ((navigator.appName.toLowerCase() == "microsoft internet explorer") && (parseFloat(navigator.appVersion) >= 4.0)) { - top.document.write('<script src="navigation_ie.js"><\/script>'); -} else { - alert('Your browser is not directly supported by this client right now.\n\nLoading now the optimised version for Netscape 6, that sticks the most to the w3c specifications.'); - top.document.write('<script src="navigation_n6.js"><\/script>'); -} - -</script> - -</head> - -<frameset cols="*,90" border="0" onLoad="whichFrame = parent.mainFrame; initPicture(query); loadPicture(2); initScripts();"> - <frame name="mainFrame" src="about:blank" scrolling="auto"> - <frameset rows="20,*" border="0"> - <frame name="pageFrame" src="about:blank" scrolling="no" noresize> - <frame name="rightFrame" src="navigation.html" scrolling="no" noresize> - </frameset> -</frameset> - -</html> +<%@ page language="java" import="java.util.*" %> + +<html> +<head> +<title>Digital Document Library</title> +</head> + +<jsp:useBean id="DB" scope="page" class="digilib.servlet.DocumentBean" /> + +<% +// authentication stuff - robert +// ----------------------------- + +// set servlet init-parameter +DB.setConfig(getServletConfig()); +// check if authentication is needed and redirect if necessary +DB.doAuthentication(request, response); + + +// parsing the query +// ----------------- + +String query = ""; + +if (request.getQueryString() != null) { + StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "+"); + + int numTokens = tokenizer.countTokens(); + + if (numTokens >= 1) query += "fn=" + tokenizer.nextToken(); + if (numTokens >= 2) query += "&pn=" + tokenizer.nextToken(); + if (numTokens >= 3) query += "&ws=" + tokenizer.nextToken(); + if (numTokens >= 4) query += "&mo=" + tokenizer.nextToken(); + if (numTokens >= 5) query += "&mk=" + tokenizer.nextToken(); + if (numTokens >= 6) query += "&wx=" + tokenizer.nextToken(); + if (numTokens >= 7) query += "&wy=" + tokenizer.nextToken(); + if (numTokens >= 8) query += "&ww=" + tokenizer.nextToken(); + if (numTokens >= 9) query += "&wh=" + tokenizer.nextToken(); + + // a module update for total number of pages + query += "&pt=" + DB.getNumPages(request); +} +%> + +<frameset cols="*,90" border="0"> + <frame name="mainFrame" src="dlImage.jsp?<%= query %>" scrolling="auto"> + <frameset rows="20,*" border="0"> + <frame name="pageFrame" src="about:blank" scrolling="no" noresize> + <frame name="rightFrame" src="dlMenu.html" scrolling="no" noresize> + </frameset> +</frameset> + +</html>