1 |
3975
|
berkley
|
<html>
|
2 |
|
|
<head>
|
3 |
|
|
<link rel="stylesheet" type="text/css" href="style/skins/sms/sms.css"/>
|
4 |
3982
|
berkley
|
<script src="style/skins/sms/jquery-1.2.6.min.js"></script>
|
5 |
|
|
<script type="text/javascript">
|
6 |
|
|
function login()
|
7 |
|
|
{
|
8 |
|
|
var user = document.getElementById("un").value;
|
9 |
|
|
var org = document.getElementById("org").value;
|
10 |
|
|
var pass = document.getElementById("pw").value;
|
11 |
|
|
var ldapUsername = 'uid=' + user + ',o=' + org + ',dc=ecoinformatics,dc=org';
|
12 |
|
|
|
13 |
|
|
$.get("metacat", {username: ldapUsername, password: pass, action:"login", qformat:"xml"},
|
14 |
|
|
function(data) {
|
15 |
|
|
//alert('user ' + ldapUsername + ' logged in. data:' + data);
|
16 |
|
|
if(data.indexOf('<sessionId>') != -1)
|
17 |
|
|
{ //login successful
|
18 |
|
|
//alert('user logged in');
|
19 |
|
|
slideUp("#loginformdiv");
|
20 |
|
|
$('#loginheader').replaceWith("<h2 style=\"text-align:center\" id=\"loginheader\">"
|
21 |
3983
|
berkley
|
+ user + " Logged In <a onclick=\"logout()\" style=\"font-size:70%\">[logout]</a></h2>");
|
22 |
3982
|
berkley
|
}
|
23 |
|
|
else
|
24 |
|
|
{ //login not successful
|
25 |
3983
|
berkley
|
alert('Sorry, your login failed. Please try again. If you need a username, please go to http://knb.ecoinformatics.org.');
|
26 |
3982
|
berkley
|
}
|
27 |
|
|
|
28 |
|
|
}, "XML");
|
29 |
|
|
}
|
30 |
|
|
|
31 |
|
|
function logout()
|
32 |
|
|
{
|
33 |
|
|
$.get("metacat", {action:"logout", qformat:"xml"});
|
34 |
|
|
$('#loginheader').replaceWith("<h2 style=\"text-align:center\" id=\"loginheader\">Please Login</h2>");
|
35 |
|
|
slideDown('#loginformdiv')
|
36 |
|
|
}
|
37 |
|
|
|
38 |
|
|
function slideUp(id)
|
39 |
|
|
{
|
40 |
|
|
$(id).slideUp("slow");
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
function slideDown(id)
|
44 |
|
|
{
|
45 |
|
|
$(id).slideDown("slow");
|
46 |
|
|
}
|
47 |
|
|
</script>
|
48 |
|
|
|
49 |
3975
|
berkley
|
<title>Semantic Mediation System</title>
|
50 |
|
|
</head>
|
51 |
|
|
<body>
|
52 |
|
|
|
53 |
|
|
<div style="width: 700px; margin: 0px auto; border:0px; padding:0px;">
|
54 |
|
|
<img style="position:relative; top: 15px;" src="style/skins/sms/sms-page-top.png"/>
|
55 |
|
|
<div id="page">
|
56 |
3982
|
berkley
|
<div style="width:650px; border:5px; margin:0px auto;">
|
57 |
|
|
<h1 style="text-align:center">SEEK Semantic Mediation Tools</h1>
|
58 |
|
|
</div>
|
59 |
|
|
<div style="width: 650px; border: 5px; margin: 0px auto; background: grey">
|
60 |
|
|
<div id="loginheaderdiv">
|
61 |
|
|
<h2 style="text-align:center" id="loginheader">Please Login</h2>
|
62 |
|
|
</div>
|
63 |
|
|
<div id="loginformdiv">
|
64 |
|
|
<form action="metacat" name="loginform" method="POST">
|
65 |
|
|
<div style="width:300px; margin:0px auto; height: 150px;">
|
66 |
|
|
<table>
|
67 |
|
|
<tr>
|
68 |
|
|
<td>Username:</td><td><input id="un" type="text" name="username"/></td>
|
69 |
|
|
</tr>
|
70 |
|
|
<tr>
|
71 |
|
|
<td>Organization:</td><td><input id="org" type="text" name="organization"/></td>
|
72 |
|
|
</tr>
|
73 |
|
|
<tr>
|
74 |
|
|
<td>Password:</td><td><input id="pw" type="password" name="password"/></td>
|
75 |
|
|
</tr>
|
76 |
|
|
</table>
|
77 |
|
|
<a onclick="login()">[Login]</a>
|
78 |
|
|
</form>
|
79 |
|
|
</div>
|
80 |
|
|
</div>
|
81 |
|
|
</div>
|
82 |
3975
|
berkley
|
</div>
|
83 |
3982
|
berkley
|
<img src="style/skins/sms/sms-page-bottom.png" style="position:relative; bottom: 15px;"/>
|
84 |
3975
|
berkley
|
</div>
|
85 |
|
|
</body>
|
86 |
|
|
</html>
|