<%-- 
    Document   : registration
    Created on : 2010.02.23., 12:08:01
    Author     : Ani
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="hibernate.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%
    Userdata loggedUser = (Userdata) session.getAttribute("loggedUser");
    String contextPath = request.getContextPath();
%>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Regisztráció</title>
        <link rel="stylesheet" href="./design/dummy.css" type="text/css" />

    </head>
    <body>
        <%
        if (loggedUser==null){%>
            <div class="welcome">
                Regisztráció
            </div>
            <%String message = (String) session.getAttribute("message");
            if (message!=null){
                %>
                <div class="text">
                    <%=message%>
                </div>
                <%
                }
            %>

        <div class="text">
        <table>
            <form name="registration" action="<%=contextPath+"/Registration"%>" method="POST">
                <tr>
                    <td>Felhasználó név:</td>
                    <td><input name="username" type="text" size="25" maxlength="50"/></td>
                    <td>Minimum 5 karakter</td>
                </tr>
                 <tr>
                    <td>E-mail cím:</td>
                    <td><input name="email" type="text" size="25" maxlength="100"/></td>
                </tr>
                <tr>
                    <td>Jelszó:</td>
                    <td><input name="password" type="password" size="25" maxlength="50"/></td>
                    <td>Minimum 6 karakter</td>
                </tr>
                <tr>
                    <td>Jelszó mégegyszer:</td>
                    <td><input name="passwordAgain" type="password" size="25" maxlength="50"/></td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input name="ok" type="submit" value="Regisztrálok"/>
                    </td>
                </tr>
            </form>
        </table>
        </div>
        <div class="text">
            <a href="index.jsp">Vissza a kezdőoldalra!</a>
        </div>
        <%
            session.removeAttribute("message");
        }
        else{%>
            <div class="text regOrLogin">
                Nincs jogosultságod az oldal megtekintésére!
            </div>
        <%}
        %>
    </body>
</html>
