Project

General

Profile

1
<%@ page    language="java" %>
2
<%
3
/**
4
 * 
5
 * '$RCSfile$'
6
 * Copyright: 2008 Regents of the University of California and the
7
 *             National Center for Ecological Analysis and Synthesis
8
 *    '$Author: leinfelder $'
9
 *      '$Date: 2008-09-26 15:10:21 -0700 (Fri, 26 Sep 2008) $'
10
 * '$Revision: 4398 $'
11
 * 
12
 * This program is free software; you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation; either version 2 of the License, or
15
 * (at your option) any later version.
16
 * 
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU General Public License for more details.
21
     
22
 * You should have received a copy of the GNU General Public License
23
 * along with this program; if not, write to the Free Software
24
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25
 */  
26
%>
27

    
28
<%@ include file="../../common/common-settings.jsp"%>
29
<%@ include file="../../common/configure-check.jsp"%>
30
<%@page import="edu.ucsb.nceas.metacat.service.SessionService"%>
31
<%@page import="java.util.Map"%>
32

    
33

    
34
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
35
<%@page import="java.util.Iterator"%>
36
<html>
37
<head>
38
<title>FIRST Data Repository</title>
39
<link rel="stylesheet" type="text/css"
40
	href="<%=STYLE_SKINS_URL%>/first/first.css"></link>
41
<script language="Javascript" type="text/JavaScript"
42
	src="<%=STYLE_COMMON_URL%>/prototype-1.5.1.1/prototype.js">
43
</script>		
44
<script language="Javascript" type="text/JavaScript"
45
	src="<%=STYLE_COMMON_URL%>/effects.js">
46
</script>
47
<script language="Javascript">
48
		
49
	function highlight() {
50
		//Effect.Pulsate('importantThings', { pulses: 1, duration: 2 });
51
		//Effect.Fade('importantThings');
52
		new Effect.Highlight('importantThings', { startcolor: '#ffff99', endcolor: '#ffffff' });
53
		//Effect.Shake('importantThings');
54
	}
55
</script>		
56
	
57
</head>
58

    
59
<body onload="highlight()">
60
<table width="100%" border="0" cellspacing="0" cellpadding="0">
61
	<tr valign="top">
62
		<td width="400">
63
			<img src="<%=STYLE_SKINS_URL%>/first/images/first2banner.jpg">	
64
		</td>
65
		<td>
66
			<table width="100%">
67
				<tr>
68
					<th colspan="3" class="title">
69
						FIRST Data Repository
70
					</th>
71
				</tr>
72
				<tr>
73
					<td>
74
						<a href="index.jsp" target="_top">
75
						Search	
76
						</a>
77
					</td>
78
					<td valign="top">
79
						<p><a href="about.jsp" target="_top">About</a></p>
80
					</td>
81
					<td>
82
						<%
83
						boolean loggedIn = SessionService.isSessionRegistered(request.getSession().getId());
84
						String[] docids = null;
85
						Map fields = null;
86
						if (loggedIn) {
87
							docids = 
88
								SessionService.getRegisteredSession(request.getSession().getId()).getDocumentCart().getDocids();
89
							fields = 
90
								SessionService.getRegisteredSession(request.getSession().getId()).getDocumentCart().getFields();
91
							%>
92
							<div id="importantThings">
93
								<a href="cart.jsp" target="_top">
94
									Cart 
95
								</a>
96
								(Items: <%=docids.length %>, Fields: <%=fields.size() %>)
97
							</div>
98
							<!-- for use when downloading merged data -->
99
							<div style="display:none;">
100
								<form id='fieldForm'>
101
									<%
102
									if (loggedIn) {
103
										Iterator fieldIter =  fields.keySet().iterator();
104
										while (fieldIter.hasNext()) {
105
											String key = (String) fieldIter.next();
106
											String value = (String) fields.get(key);
107
										%>
108
											<input type="hidden" name="<%=key %>" value="<%=value %>" />
109
										<%	
110
										}
111
									}	
112
									%>
113
								</form>
114
							</div>
115
						<%	
116
						}
117
						else {
118
						%>
119
							<a href="login.jsp" target="_top">Login</a>
120
						<%	
121
						}
122
						%>						
123
					</td>
124
				</tr>
125
				<tr>
126
					<td colspan="3">
127
						
128
					</td>
129
				</tr>
130
			</table>
131
		</td>
132
	</tr>
133
</table>		
134
</body>
135
</html>
(12-12/16)