Revision 3989
Added by berkley over 16 years ago
index.jsp | ||
---|---|---|
2 | 2 |
<head> |
3 | 3 |
<link rel="stylesheet" type="text/css" href="style/skins/sms/sms.css"/> |
4 | 4 |
<script src="style/skins/sms/jquery-1.2.6.min.js"></script> |
5 |
<script src="style/skins/sms/util.js"></script> |
|
5 | 6 |
<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 |
+ user + " Logged In <a onclick=\"logout()\" style=\"font-size:70%\">[logout]</a></h2>"); |
|
22 |
} |
|
23 |
else |
|
24 |
{ //login not successful |
|
25 |
alert('Sorry, your login failed. Please try again. If you need a username, please go to http://knb.ecoinformatics.org.'); |
|
26 |
} |
|
27 |
|
|
28 |
}, "XML"); |
|
29 |
} |
|
30 | 7 |
|
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 | 8 |
</script> |
48 | 9 |
|
49 | 10 |
<title>Semantic Mediation System</title> |
50 | 11 |
</head> |
51 |
<body> |
|
12 |
<body onload="checkLogin()">
|
|
52 | 13 |
|
53 | 14 |
<div style="width: 700px; margin: 0px auto; border:0px; padding:0px;"> |
54 | 15 |
<img style="position:relative; top: 15px;" src="style/skins/sms/sms-page-top.png"/> |
... | ... | |
78 | 39 |
</form> |
79 | 40 |
</div> |
80 | 41 |
</div> |
42 |
|
|
43 |
<!--<div id="maindiv" style="width:625px; margin:0px auto;"> |
|
44 |
<div id="leftspan" style="display:inline; background:grey; border:1px solid"> |
|
45 |
<p>span1</p> |
|
46 |
</div> |
|
47 |
<div id="rightspan" style="display:inline; background:grey; border:1px solid"> |
|
48 |
<p>span2</p> |
|
49 |
</div> |
|
50 |
</div>--> |
|
51 |
|
|
52 |
<div id="maindiv" style="display:none; width:625px; margin:0px auto;"> |
|
53 |
<table style="width:625px"> |
|
54 |
<tr> |
|
55 |
<td> |
|
56 |
<div id="leftspan" style="background:grey; border:1px solid"> |
|
57 |
<p>span1</p> |
|
58 |
</div> |
|
59 |
</td> |
|
60 |
|
|
61 |
<td> |
|
62 |
<div id="rightspan" style="background:grey; border:1px solid"> |
|
63 |
<p>span2</p> |
|
64 |
</div> |
|
65 |
</td> |
|
66 |
</tr> |
|
67 |
</table> |
|
68 |
</div> |
|
69 |
|
|
81 | 70 |
</div> |
82 | 71 |
</div> |
83 |
<img src="style/skins/sms/sms-page-bottom.png" style="position:relative; bottom: 15px;"/>
|
|
72 |
<img id="bottomimg" src="style/skins/sms/sms-page-bottom.png" style="position:relative; bottom: 0px;"/>
|
|
84 | 73 |
</div> |
85 | 74 |
</body> |
86 | 75 |
</html> |
Also available in: Unified diff
adding content to the skin and fixing some login errors