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: leinfelder $'
11
  *     '$Date: 2008-02-21 10:02:41 -0800 (Thu, 21 Feb 2008) $'
12
  * '$Revision: 3729 $'
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="<%=SERVER_URL_WITH_CONTEXT%>/style/skins/default/default.css" rel="stylesheet" type="text/css">
39
  <script language="javascript" 
40
    type="text/javascript" src="<%=SERVER_URL_WITH_CONTEXT%>/style/skins/default/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
    <%=(isLoggedIn)?
72
        "   document.cookie = \"JSESSIONID=" + sess_sessionId + ";"
73
        +"                  path="          + CONTEXT_NAME  +  "\";\n"
74
        :"  document.cookie = \"JSESSIONID=" + sess_sessionId + ";"
75
        +"                  path="          + CONTEXT_NAME  +  ";"
76
        +"                  expires=Thu, 01-Jan-70 00:00:01 GMT\";\n"
77
    %>
78
  </script>
79
</head>
80

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