Project

General

Profile

1 5071 daigle
<?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 6767 leinfelder
 <xsl:param name="redirect">true</xsl:param>
40 5071 daigle
 <xsl:template match="/">
41
  	<xsl:choose>
42
  	<xsl:when test="count(login) &gt; 0">
43 6767 leinfelder
  		<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 5071 daigle
				</form>
84 6767 leinfelder
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 5071 daigle
	</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
		</h3>
106
		<form name="loginForm" id="loginForm" onsubmit="submitLoginFormIntoDiv('{$servletURL}', this, 'loginSection')">
107
			<input name="qformat" type="hidden" value="sanparks" />
108
			<input name="action" type="hidden" value="login"/>
109
			<table>
110
				<tr valign="top">
111
					<td><span class="required">User name</span></td>
112
					<td><input name="shortusername" type="text" value="" style="width: 140" /></td>
113
					<td><input name="username" type="hidden" value="" /></td>
114
115
				</tr>
116
				<tr>
117
					<td><span class="required">Organization</span></td>
118
					<td><select name="organization" style="width: 140">
119
						<option value="SANParks" selected="">SANParks</option>
120
						<option value="SAEON">SAEON</option>
121
						<option value="NCEAS">NCEAS</option>
122
						<option value="unaffiliated">unaffiliated</option>
123
						</select></td>
124
				</tr>
125
				<tr>
126
					<td><span class="required">Password</span></td>
127
					<td><input name="password" value="" type="password"
128
						style="width: 140" maxlength="50" /></td>
129
				</tr>
130
				<tr>
131
					<td colspan="2" align="center">
132
						<input name="action" value="login" type="submit" class="button_login" />
133
					</td>
134
				</tr>
135
			</table>
136
		</form>
137
138
		<!-- File Upload Form -->
139
		<br/>
140
		<h3>Data Package Upload</h3>
141
		<p class="regtext">You must be logged into your user account before uploading a data set.</p>
142
143
	</xsl:otherwise>
144
145
	</xsl:choose>
146
  </xsl:template>
147
</xsl:stylesheet>