<%@page import="fonctions.ModeratorDAO"%>
<%@page import="retro.Moderator"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!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=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>


<%
String pseudo=request.getParameter("pseudo");
String mdp=request.getParameter("mdp");
int id = 0;
String nom = "";
String prenom = "";


ModeratorDAO obj_ReadValues6 = new ModeratorDAO();
List<Moderator> list6 = obj_ReadValues6.moderatorConnexion(pseudo, mdp);
Iterator<Moderator> it_list6 = list6.iterator();

while (it_list6.hasNext()) {
	Moderator objModerator = new Moderator();
	objModerator = it_list6.next();
	
	id = objModerator.getId_moderator();
	nom = objModerator.getNom_moderator();
	prenom = objModerator.getPrenom_moderator();
	
}

HttpSession sess = request.getSession();
session.setAttribute( "idAdmin", id );
session.setAttribute( "nomAdmin", nom );
session.setAttribute( "prenomAdmin", prenom );


%>


<script type="text/javascript">

 window.location.href="http://10.70.135.145:8080/RetroV/create/add-retro.jsp?id_moderator=<%=id%>"
</script>


</body>
</html>