-
Notifications
You must be signed in to change notification settings - Fork 35
/
ModeratorApproval.jsp
57 lines (47 loc) · 1.73 KB
/
ModeratorApproval.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<%@ page language="java" contentType="text/html; charset=US-ASCII"
import="com.articulate.sigma.*,java.net.URLConnection, javax.servlet.http.HttpServletRequest, java.io.*"
pageEncoding="US-ASCII"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Moderator Approval</title>
</head>
<body>
<%
/** This code is copyright Teknowledge (c) 2003, Articulate Software (c) 2003-2017,
Infosys (c) 2017-present.
This software is released under the GNU Public License
<http://www.gnu.org/copyleft/gpl.html>.
Please cite the following article in any publication with references:
Pease A., and Benzm?ller C. (2013). Sigma: An Integrated Development Environment
for Logical Theories. AI Communications 26, pp79-97. See also
http://github.com/ontologyportal
*/
String role = (String) session.getAttribute("role");
if (StringUtil.emptyString(role) || !role.equals("admin"))
response.sendRedirect("login.html");
String user = request.getParameter("user");
String id = request.getParameter("id");
PasswordService ps = new PasswordService();
User u = User.fromDB(ps.conn, user);
if (u == null || !u.attributes.get("registrId").equals(id)) {
out.println("<b>Null user or no match between stored registration id and id in email.</b>");
if (u != null)
out.println(u.attributes.get("registrId"));
out.println(id);
}
%>
<form method="post" action="ApproveUser.jsp">
<p>
<table align="left" border="0" >
<input type="hidden" name="user" value="<%=user %>">
<TR>
<TD VALIGN=CENTER>
<B><INPUT VALUE="Approve" TYPE="SUBMIT"></B>
</TD>
</TR>
</table>
</form>
</body>
</html>