comparison client/digitallibrary/oldskin/dcMain.jsp @ 311:05e51532a982

big autumn cleaning :-) - finally digilib.jsp uses the new javascript code - dito digicat.jsp - all files corresponding to the old frontend moved into /oldskin - all icons moved into /img
author robcast
date Thu, 28 Oct 2004 22:25:58 +0200
parents
children 2e09486e33c4
comparison
equal deleted inserted replaced
310:661a911a95d6 311:05e51532a982
1 <%@ page language="java" %><%!
2 // authentication stuff - robert
3 // -----------------------------
4 // create DocumentBean instance for all JSP requests
5 digilib.servlet.DocumentBean docBean = new digilib.servlet.DocumentBean();
6
7 // initialize DocumentBean instance in JSP init
8 public void jspInit() {
9 try {
10 // set servlet init-parameter
11 docBean.setConfig(getServletConfig());
12 } catch (javax.servlet.ServletException e) {
13 System.out.println(e);
14 }
15 }
16 %><%
17
18 // parsing the query
19 // -----------------
20
21 digilib.servlet.DigilibRequest dcRequest = new digilib.servlet.DigilibRequest(request);
22 // check if authentication is needed and redirect if necessary
23 docBean.doAuthentication(dcRequest, response);
24 // set number of pages
25 dcRequest.setValue("pt", docBean.getNumPages(dcRequest));
26 // chop off /oldskin -- ugly ;-(
27 String baseUrl = dcRequest.getAsString("base.url");
28 int p = baseUrl.lastIndexOf("/oldskin");
29 if (p > 0) {
30 baseUrl = baseUrl.substring(0, p);
31 }
32 %>
33 <html>
34 <head>
35 <script type="text/javascript" src="../baselib.js"></script>
36 <script type="text/javascript" src="dclib.js"></script>
37 <script type="text/javascript">
38 var baseUrl = "<%= baseUrl %>";
39 newParameter('fn', '', 1);
40 newParameter('pn', 1, 1);
41 newParameter('pt', 9, 9);
42 newParameter('mx', '6x4', 1);
43 newParameter('mo', '', 1);
44 newParameter('dw', 0, 1);
45 newParameter('dh', 0, 1);
46 dc_init();
47 </script>
48
49 <style type="text/css">
50 td {
51 font-family: Helvetica, Arial, sans-serif;
52 font-size: 11px;
53 color: #FFFFFF;
54 text-align: center;
55 vertical-align: middle;
56 }
57 .number {
58 font-family: Helvetica, Arial, sans-serif;
59 font-size: 11px;
60 color: #FFFFFF;
61 padding-top: 2px;
62 }
63 .nonumber {
64 font-family: Helvetica, Arial, sans-serif;
65 font-size: 11px;
66 color: #000000;
67 padding-top: 2px;
68 }
69 </style>
70 </head>
71
72 <body bgcolor="#666666">
73
74 <div align="center">
75 <script type="text/javascript">
76 dc_render(document);
77 </script>
78 </div>
79
80 </body>
81
82 </html>