Mercurial > hg > digilib-old
comparison 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 |
comparison
equal
deleted
inserted
replaced
33:054ebc851059 | 34:84a481a388bb |
---|---|
1 <%@ page language="java" import="java.util.*" %> | |
2 | |
1 <html> | 3 <html> |
4 <head> | |
2 <title>Digital Document Library</title> | 5 <title>Digital Document Library</title> |
3 <head> | 6 </head> |
7 | |
4 <jsp:useBean id="DB" scope="page" class="digilib.servlet.DocumentBean" /> | 8 <jsp:useBean id="DB" scope="page" class="digilib.servlet.DocumentBean" /> |
5 | 9 |
6 <% | 10 <% |
11 // authentication stuff - robert | |
12 // ----------------------------- | |
13 | |
7 // set servlet init-parameter | 14 // set servlet init-parameter |
8 DB.setConfig(getServletConfig()); | 15 DB.setConfig(getServletConfig()); |
9 // check if authentication is needed and redirect if necessary | 16 // check if authentication is needed and redirect if necessary |
10 DB.doAuthentication(request, response); | 17 DB.doAuthentication(request, response); |
18 | |
19 | |
20 // parsing the query | |
21 // ----------------- | |
22 | |
23 String query = ""; | |
24 | |
25 if (request.getQueryString() != null) { | |
26 StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "+"); | |
27 | |
28 int numTokens = tokenizer.countTokens(); | |
29 | |
30 if (numTokens >= 1) query += "fn=" + tokenizer.nextToken(); | |
31 if (numTokens >= 2) query += "&pn=" + tokenizer.nextToken(); | |
32 if (numTokens >= 3) query += "&ws=" + tokenizer.nextToken(); | |
33 if (numTokens >= 4) query += "&mo=" + tokenizer.nextToken(); | |
34 if (numTokens >= 5) query += "&mk=" + tokenizer.nextToken(); | |
35 if (numTokens >= 6) query += "&wx=" + tokenizer.nextToken(); | |
36 if (numTokens >= 7) query += "&wy=" + tokenizer.nextToken(); | |
37 if (numTokens >= 8) query += "&ww=" + tokenizer.nextToken(); | |
38 if (numTokens >= 9) query += "&wh=" + tokenizer.nextToken(); | |
39 | |
40 // a module update for total number of pages | |
41 query += "&pt=" + DB.getNumPages(request); | |
42 } | |
11 %> | 43 %> |
12 | 44 |
13 <script language="JavaScript"> | 45 <frameset cols="*,90" border="0"> |
14 | 46 <frame name="mainFrame" src="dlImage.jsp?<%= query %>" scrolling="auto"> |
15 // the document's query string (minus "?") | |
16 var query = location.search.substring(1); | |
17 | |
18 // feel free to uncomment - i have never seen a problem so... | |
19 // // DEBUG | |
20 // alert('DIR: <%= DB.getDocuPath(request) %> PAGES: <%= DB.getNumPages(request) %>'); | |
21 | |
22 // number of pages of the document | |
23 var numPages = <%= DB.getNumPages(request) %>; | |
24 | |
25 // browser version test to include the corresponding navigation-file | |
26 if ((navigator.appName.toLowerCase() == "netscape") && (parseFloat(navigator.appVersion) < 5.0)) { | |
27 top.document.write('<script src="navigation_n4.js"><\/script>'); | |
28 } else if (navigator.appName.toLowerCase() == "netscape") { | |
29 top.document.write('<script src="navigation_n6.js"><\/script>'); | |
30 } else if ((navigator.appName.toLowerCase() == "microsoft internet explorer") && (parseFloat(navigator.appVersion) >= 4.0)) { | |
31 top.document.write('<script src="navigation_ie.js"><\/script>'); | |
32 } else { | |
33 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.'); | |
34 top.document.write('<script src="navigation_n6.js"><\/script>'); | |
35 } | |
36 | |
37 </script> | |
38 | |
39 </head> | |
40 | |
41 <frameset cols="*,90" border="0" onLoad="whichFrame = parent.mainFrame; initPicture(query); loadPicture(2); initScripts();"> | |
42 <frame name="mainFrame" src="about:blank" scrolling="auto"> | |
43 <frameset rows="20,*" border="0"> | 47 <frameset rows="20,*" border="0"> |
44 <frame name="pageFrame" src="about:blank" scrolling="no" noresize> | 48 <frame name="pageFrame" src="about:blank" scrolling="no" noresize> |
45 <frame name="rightFrame" src="navigation.html" scrolling="no" noresize> | 49 <frame name="rightFrame" src="dlMenu.html" scrolling="no" noresize> |
46 </frameset> | 50 </frameset> |
47 </frameset> | 51 </frameset> |
48 | 52 |
49 </html> | 53 </html> |