Project

General

Profile

1
<%@ page    language="java" %>
2
<%@ page import="edu.ucsb.nceas.metacat.properties.SkinPropertyService" %>
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: daigle $'
9
	 * '$Date: 2010-01-27 09:51:32 -0800 (Wed, 27 Jan 2010) $'
10
	 * '$Revision: 5202 $'
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
<%
29
	String esaHome = SkinPropertyService.getProperty("esa","registryurl");
30
%>
31

    
32
<%@ include file="../../common/common-settings.jsp"%>
33
<%@ include file="../../common/configure-check.jsp"%>
34

    
35
<html>
36
<head>
37
<title>header.gif</title>
38
<meta http-equiv="Content-Type" content="text/html;">
39
<!--Please note that in order for the "roll overs" to exactly swap they need to be created in conjunction with the slices. Slices must be in place when exporting the individual *.gif file to be used with the swap image behavior. I found it helpful to use the exact slice that was used for creating the top "img" file. This was done by moving the slice down, changing the orginal img (such as the text color), then moving the slice back up before exporting the individual *.gif type of file to be used as a swap image file. It might be necessary after exporting the individual swap image file to return the top img file (such as changing the text color back) before exporting the final html file. Export with File name: HTML and Images, Save as type: HTML and Images, HTML: Export HTML File, Slices: Export Slices. I included areas withou slices and Put images in a subfolder titled ESAHeaderSlices. Before the final export the swap image *.gif files were placed in the ESAHeaderSlices/RollOvers directory.
40
cjbwdish -->
41
<script language="JavaScript">
42
<!--
43
function MM_findObj(n, d) { //v4.01
44
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
45
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
46
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
47
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
48
  if(!x && d.getElementById) x=d.getElementById(n); return x;
49
}
50
function MM_swapImage() { //v3.0
51
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
52
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
53
}
54
function MM_swapImgRestore() { //v3.0
55
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
56
}
57

    
58
function MM_preloadImages() { //v3.0
59
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
60
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
61
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
62
}
63

    
64
function loginStatus(){
65
 	var httpRequest=false;
66
        /*@cc_on @*/
67
        /*@if (@_jscript_version >= 5)
68
        try {
69
            httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
70
        } catch (e) {
71
            try {
72
                httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
73
            } catch (E) {
74
                httpRequest = false;
75
            }
76
        }
77
        @end @*/
78

    
79
        try{
80
        	if (!httpRequest && typeof XMLHttpRequest!='undefined') {
81
           		httpRequest = new XMLHttpRequest();
82
        	}
83

    
84
        	if(!httpRequest){
85
                	exit(0);
86
        	}
87

    
88
        	httpRequest.open("POST", "<%=SERVLET_URL%>?action=getloggedinuserinfo", true);
89
        	httpRequest.setRequestHeader("Content-Type", "text/xml");
90
        	var stringToSend = "action=getloggedinuserinfo";
91
        	httpRequest.onreadystatechange=function() {
92
                	if (httpRequest.readyState==4) {
93
                        	var response = httpRequest.responseText;
94
                        	var login_block = document.getElementById('login_block');
95
                        	var submission_block = document.getElementById('submission_block');
96
                        	var userSearch = document.getElementById('userSearch');
97
                        	var modSearch = document.getElementById('modSearch');
98
				login_block.innerHTML="";
99
				submission_block.innerHTML="";
100
                        	if(response.indexOf("public") > 0){
101
					login_block.innerHTML = "<a href='<%=CGI_URL%>/register-dataset.cgi?cfg=esa&stage=loginform' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"Login\",\"\",\"ESAHeaderSlices/RollOvers/LoginR.gif\",1);'><img name='Login' src='ESAHeaderSlices/Login.gif' width='62' height='18' border='0' title='Login' alt='Login'></a>";
102
					submission_block.innerHTML = "<a href='<%=CGI_URL%>/register-dataset.cgi?cfg=esa&stage=loginform&submission=true' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"MySubmissions\",\"\",\"ESAHeaderSlices/RollOvers/MySubmissionsR.gif\",1);'><img name='MySubmissions' src='ESAHeaderSlices/MySubmissions.gif' width='114' height='18' border='0' title='My Submissions - Before you can view your submissions you must login.' alt='My Submissions'></a>";
103
                        	} else {
104
					login_block.innerHTML = "<a href='<%=CGI_URL%>/register-dataset.cgi?cfg=esa&stage=logout' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"Logout\",\"\",\"ESAHeaderSlices/RollOvers/LogoutR.gif\",1);'><img name='Logout' src='ESAHeaderSlices/Logout.gif' width='62' height='18' border='0' title ='Logout' alt='Logout'></a>";
105
					
106
					if(response.indexOf("isModerator") > 0){
107
						submission_block.innerHTML = "<a onClick='modSearch.submit()' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"ViewSubmissions\",\"\",\"ESAHeaderSlices/RollOvers/ViewSubmissionsR.gif\",1);'><img name='ViewSubmissions' src='ESAHeaderSlices/ViewSubmissions.gif' width='114' height='18' border='0' title='View Submissions' alt='View Submissions'></a>";
108
                                        } else {
109
						submission_block.innerHTML = "<a onClick='userSearch.submit()' target='_top' onMouseOut='MM_swapImgRestore();' onMouseOver='MM_swapImage(\"MySubmissions\",\"\",\"ESAHeaderSlices/RollOvers/MySubmissionsR.gif\",1);'><img name='MySubmissions' src='ESAHeaderSlices/MySubmissions.gif' width='114' height='18' border='0' title='My Submissions - Before you can view your submissions you must login.' alt='My Submissions'></a>";
110
                                        }
111
	                	}
112
                	}
113
		}
114
        	httpRequest.send(stringToSend);
115
     	 } catch (e) {
116
        	alert("caught an exception: " + e
117
                 + " \nresponse was: \n" + httpRequest.responseText);
118
	 }     
119
}
120

    
121
//-->
122
</script>
123
</head>
124
<body bgcolor="#ffffff" onLoad="MM_preloadImages('ESAHeaderSlices/RollOvers/ESARegistryR.gif','ESAHeaderSlices/RollOvers/RegisterDataR.gif','ESAHeaderSlices/RollOvers/SearchForDataR.gif','ESAHeaderSlices/RollOvers/MySubmissionsR.gif','ESAHeaderSlices/RollOvers/LogoutR.gif');loginStatus();">
125
<table border="0" cellpadding="0" cellspacing="0" width="703">
126
<!-- fwtable fwsrc="ESAHeaderDocsb.png" fwbase="header.gif" fwstyle="Dreamweaver" fwdocid = "1407099340" fwnested="0" -->
127
  <tr>
128
   <td><img src="ESAHeaderSlices/spacer.gif" width="19" height="1" border="0" alt=""></td>
129
   <td><img src="ESAHeaderSlices/spacer.gif" width="143" height="1" border="0" alt=""></td>
130
   <td><img src="ESAHeaderSlices/spacer.gif" width="7" height="1" border="0" alt=""></td>
131
   <td><img src="ESAHeaderSlices/spacer.gif" width="99" height="1" border="0" alt=""></td>
132
   <td><img src="ESAHeaderSlices/spacer.gif" width="15" height="1" border="0" alt=""></td>
133
   <td><img src="ESAHeaderSlices/spacer.gif" width="82" height="1" border="0" alt=""></td>
134
   <td><img src="ESAHeaderSlices/spacer.gif" width="105" height="1" border="0" alt=""></td>
135
   <td><img src="ESAHeaderSlices/spacer.gif" width="43" height="1" border="0" alt=""></td>
136
   <td><img src="ESAHeaderSlices/spacer.gif" width="16" height="1" border="0" alt=""></td>
137
   <td><img src="ESAHeaderSlices/spacer.gif" width="55" height="1" border="0" alt=""></td>
138
   <td><img src="ESAHeaderSlices/spacer.gif" width="62" height="1" border="0" alt=""></td>
139
   <td><img src="ESAHeaderSlices/spacer.gif" width="57" height="1" border="0" alt=""></td>
140
   <td><img src="ESAHeaderSlices/spacer.gif" width="1" height="1" border="0" alt=""></td>
141
  </tr>
142

    
143
  <tr>
144
   <td colspan="12"><img name="header_r1_c1" src="ESAHeaderSlices/header_r1_c1.gif" width="703" height="32" border="0" alt=""></td>
145
   <td><img src="ESAHeaderSlices/spacer.gif" width="1" height="32" border="0" alt=""></td>
146
  </tr>
147
  <tr>
148
   <td rowspan="4"><img name="header_r2_c1" src="ESAHeaderSlices/header_r2_c1.gif" width="19" height="118" border="0" alt=""></td>
149
   <td><a href="http://www.esa.org/" target="_top"><img name="ESAHomeLogo" src="ESAHeaderSlices/ESAHomeLogo.gif" width="143" height="54" border="0" title="Ecological Society of America" alt="ESA Home"></a></td>
150
   <td rowspan="2" colspan="10"><img name="header_r2_c3" src="ESAHeaderSlices/header_r2_c3.gif" width="541" height="71" border="0" alt=""></td>
151
   <td><img src="ESAHeaderSlices/spacer.gif" width="1" height="54" border="0" alt=""></td>
152
  </tr>
153
  <tr>
154
   <td rowspan="3"><img name="header_r3_c2" src="ESAHeaderSlices/header_r3_c2.gif" width="143" height="64" border="0" alt=""></td>
155
   <td><img src="ESAHeaderSlices/spacer.gif" width="1" height="17" border="0" alt=""></td>
156
  </tr>
157
  <tr>
158
   <td rowspan="2"><img name="header_r4_c3" src="ESAHeaderSlices/header_r4_c3.gif" width="7" height="47" border="0" alt=""></td>
159
   <td><a href="<%=esaHome%>" target="_top" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('ESARegistry','','ESAHeaderSlices/RollOvers/ESARegistryR.gif',1);"><img name="ESARegistry" src="ESAHeaderSlices/ESARegistry.gif" width="99" height="18" border="0" title="ESA Registry" alt="ESA Registry"></a></td>
160
   <td colspan="2"><a href="<%=CGI_URL%>/register-dataset.cgi?cfg=esa" target="_top" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('RegisterData','','ESAHeaderSlices/RollOvers/RegisterDataR.gif',1);"><img name="RegisterData" src="ESAHeaderSlices/RegisterData.gif" width="97" height="18" border="0" title="Register Data" alt="Register Data"></a></td>
161
   <td><a href="<%=esaHome%>#search" target="_top" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('SearchForData','','ESAHeaderSlices/RollOvers/SearchForDataR.gif',1);"><img name="SearchForData" src="ESAHeaderSlices/SearchForData.gif" width="105" height="18" border="0" title="Search for Data" alt="Search for Data"></a></td>
162
   <td colspan="3"><div style="cursor:pointer;cursor: hand;" id="submission_block"><a href="#" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('MySubmissions','','ESAHeaderSlices/RollOvers/MySubmissionsR.gif',1);"><img name="MySubmissions" src="ESAHeaderSlices/MySubmissions.gif" width="114" height="18" border="0" title="My Submissions - Before you can view your submissions you must login." alt="My Submissions"></a></div></td>
163
   <td><div id="login_block"><a href="<%=CGI_URL%>/register-dataset.cgi?cfg=esa&stage=loginform" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('Login','','ESAHeaderSlices/RollOvers/LoginR.gif',1);"><img name="Login" src="ESAHeaderSlices/Login.gif" width="62" height="18" border="0" title="Login" alt="Login"></a></div></td>
164
   <td rowspan="2"><img name="header_r4_c12" src="ESAHeaderSlices/header_r4_c12.gif" width="57" height="47" border="0" alt=""></td>
165
   <td><img src="ESAHeaderSlices/spacer.gif" width="1" height="18" border="0" alt=""></td>
166
  </tr>
167
  <tr>
168
   <td colspan="8"><img name="header_r5_c4" src="ESAHeaderSlices/header_r5_c4.gif" width="477" height="29" border="0" alt=""></td>
169
   <td><img src="ESAHeaderSlices/spacer.gif" width="1" height="29" border="0" alt=""></td>
170
  </tr>
171
</table>
172
<form id="modSearch" name="modSearch" action="<%=SERVLET_URL%>" method="post" target="_top">
173
       <input type="hidden" name="action" value="squery"/>
174
       <input type="hidden" name="qformat" value="esa"/>
175
       <input type="hidden" name="enableediting" value="true"/>
176
       <input type="hidden" name="query" value="<pathquery><querytitle>Moderator-Search</querytitle><returndoctype>eml://ecoinformatics.org/eml-2.1.0</returndoctype><returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype><returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype><returndoctype>-//NCEAS//resource//EN</returndoctype><returndoctype>-//NCEAS//eml-dataset//EN</returndoctype><returnfield>originator/individualName/surName</returnfield><returnfield>originator/individualName/givenName</returnfield><returnfield>creator/individualName/surName</returnfield><returnfield>creator/individualName/givenName</returnfield><returnfield>originator/organizationName</returnfield><returnfield>creator/organizationName</returnfield><returnfield>dataset/title</returnfield><returnfield>keyword</returnfield><querygroup operator='INTERSECT'><queryterm searchmode='not-contains' casesensitive='false'><value>public</value><pathexpr>access/allow/principal</pathexpr></queryterm><queryterm searchmode='not-contains' casesensitive='false'><value>Revision Requested</value><pathexpr>additionalMetadata/moderatorComment</pathexpr></queryterm></querygroup></pathquery>"/>
177
</form>
178
<form id="userSearch" name="userSearch" action="<%=SERVLET_URL%>" method="post" target="_top">
179
       <input type="hidden" name="action" value="squery"/>
180
       <input type="hidden" name="qformat" value="esa"/>
181
       <input type="hidden" name="enableediting" value="true"/>
182
       <input type="hidden" name="query" value="<pathquery><querytitle>Moderator-Search</querytitle><returndoctype>eml://ecoinformatics.org/eml-2.1.0</returndoctype><returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype><returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN</returndoctype><returndoctype>-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN</returndoctype><returndoctype>-//NCEAS//resource//EN</returndoctype><returndoctype>-//NCEAS//eml-dataset//EN</returndoctype><returnfield>originator/individualName/surName</returnfield><returnfield>originator/individualName/givenName</returnfield><returnfield>creator/individualName/surName</returnfield><returnfield>creator/individualName/givenName</returnfield><returnfield>originator/organizationName</returnfield><returnfield>creator/organizationName</returnfield><returnfield>dataset/title</returnfield><returnfield>keyword</returnfield><querygroup operator='INTERSECT'><queryterm searchmode='not-contains' casesensitive='false'><value>public</value><pathexpr>access/allow/principal</pathexpr></queryterm></querygroup></pathquery>"/>
183
</form>
184
</body>
185
</html>
(13-13/18)