Project

General

Profile

1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Jivka Bojilova
5
  *    Copyright: 2000 Regents of the University of California and the
6
  *               National Center for Ecological Analysis and Synthesis
7
  *  For Details: http://www.nceas.ucsb.edu/
8
  *
9
  *   '$Author: leinfelder $'
10
  *     '$Date: 2008-06-17 13:16:32 -0700 (Tue, 17 Jun 2008) $'
11
  * '$Revision: 4006 $'
12
  * 
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
  *
27
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
  * convert an XML file with information about login action
29
  * into an HTML format suitable for rendering with modern web browsers.
30
-->
31

    
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
33

    
34
 <xsl:output method="html"/>
35
 <xsl:param name="contextURL"/>
36
 <xsl:param name="servletURL"/>
37
 <xsl:param name="cgi-prefix"/>
38
 <xsl:param name="qformat">sanparks</xsl:param>
39
 <xsl:param name="redirect">true</xsl:param>
40
 <xsl:template match="/">
41
  	<xsl:choose>
42
  	<xsl:when test="count(login) &gt; 0">
43
  		<xsl:choose>
44
  			<xsl:when test="$redirect = 'true'">
45
  				<script language="JavaScript">
46
					<![CDATA[
47
			            function redirect() {
48
			                location.href = "]]><xsl:value-of select="$cgi-prefix" /><![CDATA[/register-dataset.cgi?cfg=sanparks";
49
			            }
50
			            redirect();]]>
51
		         </script>
52
  			</xsl:when>
53
  			<xsl:otherwise>
54
  			
55
				<h3>Welcome, <xsl:value-of select="login/name"/>  </h3>
56
				<form name="logoutForm" onsubmit="submitLogoutFormIntoDiv('{$servletURL}', this, 'loginSection')">
57
					<input name="qformat" value="sanparks" type="hidden" />
58
					<input name="action" type="hidden" value="logout"/>
59
					<table>
60
						<tr valign="top">
61
							<td><p class="regtext">You are currently logged in.</p></td>
62
							<td align="right">
63
								<input name="action" type="submit" value="Logout" class="button_login" />
64
							</td>
65
						</tr>
66
						<tr valign="top">
67
							<td colspan="2"><p class="regtext">(<xsl:value-of select="login/message"/>)</p></td>
68
						</tr>	
69
						<tr>	
70
							<td colspan="2" class="regtext" align="center" valign="top">				
71
								<!-- reset pass --> 
72
								<a href="{$cgi-prefix}/ldapweb.cgi?cfg=sanparks&amp;stage=resetpass" target="_parent">
73
									reset your password
74
								</a>
75
								|
76
								<!-- change pass --> 
77
								<a href="{$cgi-prefix}/ldapweb.cgi?cfg=sanparks&amp;stage=changepass" target="_parent">
78
									change your password
79
								</a>
80
							</td>
81
						</tr>
82
					</table>
83
				</form>
84
				
85
				<!-- File Upload Form --> 
86
				<br/>		
87
				<h3>Data Package Upload</h3>
88
				
89
				<table width="100%">
90
					<tr valign="top">
91
						<td align="right">
92
							<form method="post" action="{$contextURL}/style/skins/sanparks/upload.jsp">
93
								<input type="submit" value="Go >" class="button_login" />
94
							</form>
95
						</td>
96
					</tr>
97
				</table>
98
			</xsl:otherwise>
99
		</xsl:choose>		
100
	</xsl:when>
101
  	<xsl:otherwise>
102
		<h3>Login
103
		<a href="{$contextURL}/cgi-bin/ldapweb.cgi?cfg=sanparks" target="_new">
104
			<span class="regtext"> (request an account...)</span>
105
		</a>
106
		</h3>
107
		<form name="loginForm" id="loginForm" onsubmit="submitLoginFormIntoDivAndReload('{$servletURL}', this, 'loginSection')">
108
			<input name="qformat" type="hidden" value="sanparks" />
109
			<input name="action" type="hidden" value="login"/>
110
			<table>
111
				<tr valign="top">
112
					<td><span class="required">User name</span></td>
113
					<td><input name="shortusername" type="text" value="" style="width: 140" /></td>
114
					<td><input name="username" type="hidden" value="" /></td>
115
					
116
				</tr>
117
				<tr>
118
					<td><span class="required">Organization</span></td>
119
					<td><select name="organization" style="width: 140">
120
						<option value="SANParks" selected="">SANParks</option>
121
						<option value="SAEON">SAEON</option>
122
						<option value="NCEAS">NCEAS</option>
123
						<option value="unaffiliated">unaffiliated</option>
124
						</select></td>
125
				</tr>
126
				<tr>
127
					<td><span class="required">Password</span></td>
128
					<td><input name="password" value="" type="password"
129
						style="width: 140" maxlength="50" /></td>
130
				</tr>
131
				<tr>
132
					<td colspan="2" align="center">
133
						<input name="action" value="login" type="submit" class="button_login" />
134
					</td>
135
				</tr>
136
			</table>
137
		</form>
138
		
139
		<!-- File Upload Form --> 
140
		<br/>		
141
		<h3>Data Package Upload</h3>
142
		<p class="regtext">You must be logged into your user account before uploading a data set.</p>
143
		
144
	</xsl:otherwise>
145

    
146
	</xsl:choose>
147
  </xsl:template>
148
</xsl:stylesheet>
149

    
(23-23/36)