1391 |
15 Sep 11 |
nicklas |
1 |
<%-- |
1391 |
15 Sep 11 |
nicklas |
Copyright (C) 2011 Nicklas Nordborg |
1391 |
15 Sep 11 |
nicklas |
3 |
|
1391 |
15 Sep 11 |
nicklas |
4 |
This file is part of the Example Code Package for BASE. |
1391 |
15 Sep 11 |
nicklas |
5 |
Available at http://baseplugins.thep.lu.se/ |
1391 |
15 Sep 11 |
nicklas |
6 |
BASE main site: http://base.thep.lu.se/ |
1391 |
15 Sep 11 |
nicklas |
7 |
|
1391 |
15 Sep 11 |
nicklas |
8 |
This is free software; you can redistribute it and/or |
1391 |
15 Sep 11 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
1391 |
15 Sep 11 |
nicklas |
10 |
as published by the Free Software Foundation; either version 3 |
1391 |
15 Sep 11 |
nicklas |
11 |
of the License, or (at your option) any later version. |
1391 |
15 Sep 11 |
nicklas |
12 |
|
1391 |
15 Sep 11 |
nicklas |
13 |
The software is distributed in the hope that it will be useful, |
1391 |
15 Sep 11 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1391 |
15 Sep 11 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1391 |
15 Sep 11 |
nicklas |
16 |
GNU General Public License for more details. |
1391 |
15 Sep 11 |
nicklas |
17 |
|
1391 |
15 Sep 11 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
1391 |
15 Sep 11 |
nicklas |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
1391 |
15 Sep 11 |
nicklas |
20 |
--%> |
1027 |
07 Apr 09 |
nicklas |
21 |
<%@ page |
1027 |
07 Apr 09 |
nicklas |
22 |
pageEncoding="UTF-8" |
1027 |
07 Apr 09 |
nicklas |
23 |
session="false" |
636 |
19 Mar 08 |
nicklas |
24 |
import="net.sf.basedb.core.SessionControl" |
636 |
19 Mar 08 |
nicklas |
25 |
import="net.sf.basedb.core.DbControl" |
636 |
19 Mar 08 |
nicklas |
26 |
import="net.sf.basedb.core.User" |
636 |
19 Mar 08 |
nicklas |
27 |
import="net.sf.basedb.clients.web.Base" |
636 |
19 Mar 08 |
nicklas |
28 |
import="net.sf.basedb.clients.web.util.HTML" |
636 |
19 Mar 08 |
nicklas |
29 |
%> |
636 |
19 Mar 08 |
nicklas |
30 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
636 |
19 Mar 08 |
nicklas |
31 |
<% |
656 |
14 Apr 08 |
nicklas |
32 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
636 |
19 Mar 08 |
nicklas |
33 |
final String ID = sc.getId(); |
636 |
19 Mar 08 |
nicklas |
34 |
final DbControl dc = sc.newDbControl(); |
636 |
19 Mar 08 |
nicklas |
35 |
|
636 |
19 Mar 08 |
nicklas |
36 |
try |
636 |
19 Mar 08 |
nicklas |
37 |
{ |
636 |
19 Mar 08 |
nicklas |
38 |
User current = User.getById(dc, sc.getLoggedInUserId()); |
636 |
19 Mar 08 |
nicklas |
39 |
%> |
2205 |
29 Jan 14 |
nicklas |
40 |
<base:page type="popup" title="Hello JSP world" id="hello-world"> |
2205 |
29 Jan 14 |
nicklas |
41 |
<base:head scripts="~scripts/common.js" /> |
636 |
19 Mar 08 |
nicklas |
42 |
<base:body> |
1537 |
16 Feb 12 |
nicklas |
43 |
<h1>Hello <%=HTML.encodeTags(current.getName())%></h1> |
1537 |
16 Feb 12 |
nicklas |
44 |
<div class="content bottomborder"> |
1537 |
16 Feb 12 |
nicklas |
45 |
<table class="fullform"> |
636 |
19 Mar 08 |
nicklas |
46 |
<tr> |
1537 |
16 Feb 12 |
nicklas |
47 |
<th>Session ID</th> |
636 |
19 Mar 08 |
nicklas |
48 |
<td><%=ID%></td> |
636 |
19 Mar 08 |
nicklas |
49 |
</tr> |
636 |
19 Mar 08 |
nicklas |
50 |
<tr> |
1537 |
16 Feb 12 |
nicklas |
51 |
<th>Login</th> |
636 |
19 Mar 08 |
nicklas |
52 |
<td><%=HTML.encodeTags(current.getLogin())%></td> |
636 |
19 Mar 08 |
nicklas |
53 |
</tr> |
1537 |
16 Feb 12 |
nicklas |
54 |
<tr class="dynamic"> |
1537 |
16 Feb 12 |
nicklas |
55 |
<th>Email</th> |
636 |
19 Mar 08 |
nicklas |
56 |
<td><%=HTML.niceFormat(current.getEmail())%></td> |
636 |
19 Mar 08 |
nicklas |
57 |
</tr> |
636 |
19 Mar 08 |
nicklas |
58 |
</table> |
636 |
19 Mar 08 |
nicklas |
59 |
</div> |
1537 |
16 Feb 12 |
nicklas |
60 |
|
1537 |
16 Feb 12 |
nicklas |
61 |
<base:buttongroup subclass="dialogbuttons"> |
2205 |
29 Jan 14 |
nicklas |
62 |
<base:button id="close" title="Close" /> |
1537 |
16 Feb 12 |
nicklas |
63 |
</base:buttongroup> |
1537 |
16 Feb 12 |
nicklas |
64 |
|
636 |
19 Mar 08 |
nicklas |
65 |
</base:body> |
636 |
19 Mar 08 |
nicklas |
66 |
</base:page> |
636 |
19 Mar 08 |
nicklas |
67 |
<% |
636 |
19 Mar 08 |
nicklas |
68 |
} |
636 |
19 Mar 08 |
nicklas |
69 |
finally |
636 |
19 Mar 08 |
nicklas |
70 |
{ |
636 |
19 Mar 08 |
nicklas |
71 |
if (dc != null) dc.close(); |
636 |
19 Mar 08 |
nicklas |
72 |
} |
636 |
19 Mar 08 |
nicklas |
73 |
%> |