Project

General

Profile

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

    
31
<%@ include file="settings.jsp"%>
32
<%@ include file="session_vars.jsp"%>
33
<!-- *********************** START LOGIN TABLE ************************* -->
34
<html>
35
<head>
36
  <title</title>
37
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
38
  <link href="<%=relativeRoot%>/default.css" rel="stylesheet" type="text/css">
39
  <script language="javascript" 
40
    type="text/javascript" src="<%=relativeRoot%>/default.js">
41
  </script>
42
  <script language="javascript" type="text/javascript">
43
    var popupMsg = "If you need to create a new account, \n"
44
                   +"click the \"create new account\" link";
45
    function trim(stringToTrim) {
46
      return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,'');
47
    }
48
    function allowSubmit(formObj) {
49
      if (trim(formObj.elements["loginAction"].value)!="Login") return true;
50
      //trim username & passwd:
51
      var username = trim(formObj.elements["username"].value);
52
      var organization = trim(formObj.elements["organization"].value);
53
      var password = trim(formObj.elements["password"].value);
54
      if (username=="") {
55
        alert("You must type a username. \n"+popupMsg);
56
                formObj.elements["username"].focus();
57
        return false;
58
      } 
59
      if (organization=="") {
60
        alert("You must select an organization.\n"+popupMsg); 
61
                formObj.elements["organization"].focus();
62
        return false;
63
      } 
64
      if (password=="") {
65
        alert("You must type a password. \n"+popupMsg);
66
              formObj.elements["password"].focus();
67
        return false;
68
      }
69
      return true;
70
    } 
71
  </script>
72
</head>
73

    
74
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
75
  <table width="750px" align="center" border="0" cellspacing="0" cellpadding="0">
76
    <tr> 
77
      <td width="10">
78
        <img src="./images/panelhead_bg_lcorner.gif" width="10" height="21">
79
      </td>
80
      <td class="sectionheader">login &amp; registration</td>
81
      <td width="10">
82
        <img src="./images/panelhead_bg_rcorner.gif" width="10" height="21">
83
      </td>
84
    </tr>
85
    <tr>
86
      <td colspan="3">
87
        <table width="100%" class="subpanel" border="0" cellpadding="0"
88
          cellspacing="0">
89
          <tr>
90
            <td width="10">
91
              <img src="./images/transparent1x1.gif" width="10" height="10">
92
            </td>
93
            <td class="text_example">
94
              <a name="loginanchor"></a>
95
                <p>
96
                  Logging into your account enables you to search any 
97
                  additional, non-public data for which you may have access 
98
                  priviliges:
99
                </p>
100
                <%= loginStatus %>
101
            </td>
102
            <td width="10">
103
              <img src="./images/transparent1x1.gif" width="10" height="10">
104
            </td>
105
          </tr>
106
          <tr> 
107
            <td width="10">
108
              <img src="./images/transparent1x1.gif" width="10" height="10">
109
            </td>
110
            <td> 
111
              <form name="loginform" method="post" action="index.jsp" 
112
                target="_top" onSubmit="return allowSubmit(this);">
113
                <input type="hidden" name="action"  value="login">
114
                <input type="hidden" name="ldapusername"  value="">
115
                <input type="hidden" name="qformat" value="default">
116
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
117
                <tr valign="middle"> 
118
                  <td align="left" valign="middle" class="text_plain_smaller">
119
                    username:
120
                  </td>
121
                  <td width="173" align="left" 
122
                    style="padding-top: 2px; padding-bottom: 2px;">
123
                    <input name="username" type="text" style="width: 140px;" 
124
                      value="<%=typedUserName%>" <%=loginEnabledDisabled%>>
125
                  </td>
126
                  <td width="10px">
127
                    <img src="./images/transparent1x1.gif" width="10">
128
                  </td>
129
                  <td align="center" class="text_plain">
130
                    <a href="http://ldap.ecoinformatics.org/cgi-bin/ldapweb.cgi">
131
                    create a new account</a>
132
                  </td>
133
                </tr>
134
                <tr valign="middle">
135
                  <td height="28" align="left" 
136
                    valign="middle" class="text_plain_smaller">
137
                    organization:
138
                  </td>
139
                  <td align="left" 
140
                    style="padding-top: 2px; padding-bottom: 2px;">
141
                    <select name="organization" style="width:140px;" 
142
                      <%=loginEnabledDisabled%> >
143
                      <option value="" <%=((posted_organization.length()<1)?                 "selected":"")%>>&#8212; choose one &#8212;</option>
144
                      <option value="NCEAS" <%=((posted_organization.equalsIgnoreCase("NCEAS"))?        "selected":"")%>>NCEAS</option>
145
                      <option value="LTER"         <%=((posted_organization.equalsIgnoreCase("LTER"))?         "selected":"")%>>LTER</option>
146
                      <option value="NRS"          <%=((posted_organization.equalsIgnoreCase("NRS"))?          "selected":"")%>>NRS</option>
147
                      <option value="PISCO"        <%=((posted_organization.equalsIgnoreCase("PISCO"))?        "selected":"")%>>PISCO</option>
148
                      <option value="OBFS"         <%=((posted_organization.equalsIgnoreCase("OBFS"))?         "selected":"")%>>OBFS</option>
149
                      <option value="unaffiliated" <%=((posted_organization.equalsIgnoreCase("unaffiliated"))? "selected":"")%>>unaffiliated</option>
150
                    </select>
151
                  </td>
152
                  <td width="10px">
153
                    <img src="./images/transparent1x1.gif" width="10" >
154
                  </td>
155
                  <td align="center" class="text_plain">
156
                    <a href="http://ldap.ecoinformatics.org/cgi-bin/ldapweb.cgi?stage=resetpass">forgot your password?</a>
157
                  </td>
158
                </tr>
159
                <tr valign="middle"> 
160
                  <td width="85" align="left" valign="middle" 
161
                    class="text_plain_smaller">
162
                    password:
163
                  </td>
164
                  <td> 
165
                    <input name="password" type="password" maxlength="50" 
166
                      style="width:140px;" value="<%=posted_password%>" 
167
                    <%=loginEnabledDisabled%>>
168
                  </td>
169
                  <td width="10px">
170
                    <img src="./images/transparent1x1.gif" width="10">
171
                  </td>
172
                  <td align="center" class="text_plain">
173
                    <a href="http://ldap.ecoinformatics.org/cgi-bin/ldapweb.cgi?stage=changepass">change your password</a> 
174
                  </td>
175
                </tr>
176
                <tr>
177
                  <td align="center" colspan="2" class="<%= ((isLoggedIn)? "buttonBG_logout": "buttonBG_login") %>">
178
                    <input type="submit" name="loginAction" 
179
                      value="<%=loginButtonLabel%>" class="button_login" />
180
                  </td>
181
                  </td>
182
                  <td width="10">
183
                    <img src="./images/transparent1x1.gif" width="10">
184
                  </td>
185
                  <td>
186
                    <img src="./images/transparent1x1.gif" width="10">
187
                  </td>
188
                </tr>
189
                <tr>
190
                  <td colspan="4">
191
                    </br>
192
                  </td>
193
                </tr>
194
              </table>
195
              </form>
196
            </td>
197
          </tr>
198
        </table>
199
      </td>
200
    </tr>
201
  </table>
202
</body>    
(5-5/9)