<%-- 
    Document   : changepassword
    Created on : 2010.04.13., 11:35:26
    Author     : Ani
--%>
<% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server %>

<%@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">
         <%
            if (loggedUser!=null){%>
                <link rel="stylesheet" href="./design/mancala.css" type="text/css" />
            <%
            }
         %>
    </head>
    <body>
        <%
            if (loggedUser!=null){%>
                <div class="text header">
                    Üdvözlet <%=loggedUser.getUsername()%>!
                    <br><a href="<%=(contextPath +"/Logout")%>">Kijelentkezés</a>
                </div>
                <div class="text menusor">
                    <a href="index.jsp" title="Főoldal" target="_self">Főoldal</a>
                    <a href="rules.jsp" title="Szabályok" target="_self">Szabályok</a>
                    <a href="game.jsp" title="Játék" target="_self">Játék</a>
                    <a href="mydatas.jsp" title="Adataim" target="_self">Adataim</a>
                    <a href="statistic.jsp" title="Statisztika" target="_self">Statisztika</a>
                 </div>

                 <div class="text">
                     <%
                        if (session.getAttribute("message")!=null){%>
                        <p><%=(String) session.getAttribute("message")%></p>
                        <%
                        session.removeAttribute("message");
                        }
                     %>
                    Jelszó megváltoztatása
                    <form action="<%=(contextPath +"/ChangePassword")%>" method="POST">
                        <table>
                            <tr>
                                <td>
                                    Régi jelszó:
                                </td>
                                <td>
                                    <input type="password" name="oldPw" size="30" maxlength="50"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Új jelszó:
                                </td>
                                <td>
                                    <input type="password" name="newPw" size="30" maxlength="50"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Új jelszó ismét:
                                </td>
                                <td>
                                    <input type="password" name="newPwAgain" size="30" maxlength="50"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <input type="submit" name="ok"/>
                                </td>
                            </tr>
                        </table>
                    </form>
                 </div>

                 <div class="text footer">
                     Dusza Anikó 2010
                 </div>
            <%
            }else{%>
                 <h1>Nincs jogosultságod az oldal megtekintésére!</h1>
            <%}
         %>
    </body>
</html>

