<%-- 
    Document   : recepcios_vendeg_torlese
    Created on : 2009.03.19., 13:47:49
    Author     : Sensei
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import="java.util.LinkedList" %>
<%@ page import="com.HotelServices.model.dto.impl.RecepciosDAOImpl" %>
<%@ page import="com.HotelServices.model.dto.impl.VendegSzoba" %> 

<!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=utf-8">
        <title>JSP Page</title>
        <style type="text/css">
            
            .style1 {
                font-family: Georgia, "Times New Roman", Times, serif;
                font-weight: bold;
                font-size: 30pt;
                color: #ECE9D8;
                font-style: italic;
            }
            .style4 {
                font-size: 14pt;
                font-weight: bold;
                color: #666666;
                font-style: italic;
            }
            .style5 {font-size: 18pt; font-weight: bold; color: #666666; font-style: italic; }
            .style7 {font-size: 14pt; font-weight: bold; color: #000000; font-style: italic; }
        </style>
        <SCRIPT LANGUAGE="JavaScript">
            function uj_vendeg(){
                javascript:window.location.href='recepcios_uj_vendeg.jsp';
            }
            function torles_vendeg(){
                javascript:window.location.href='recepcios_vendeg_torlese.jsp';
            }
            function takaritas(){
                javascript:window.location.href='recepcios_takaritas.jsp';
            }
        </SCRIPT>
    </head>
    <form action="RecepciosServlet" method="POST">
        <body  bgcolor="#FFFFCC" style="background-image: url('back.jpg'); background-position: top center; background-repeat: no-repeat" > 
            <h2 align="center" class="style1">Recepciós</h2>
            
            <p align="left">&nbsp;</p>
            <table width="820" height="27" border="1" align="center" bgcolor="#DDD8C1">
                <tr>
                <td onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"><div align="center" onclick ="uj_vendeg()"><strong>Új vendég</strong></div></td>
                <td onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"><div align="center" onclick ="torles_vendeg()"><strong>Vendég törlése</strong></div></td>
                <td onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"><div align="center" onclick ="takaritas()"><strong>Takarítás</strong></div></td>
            </table>
            <blockquote>
                <p class="style5">A vendégek listája: </p>
            </blockquote>
            <input type="submit" value="Listaz" name="lista" />
            
            <table border="1" align="center">
                <tr>
                    <td width="123" class="style7"><div align="center">Felhasználónév</div></td>
                    <td width="187" class="style7"><div align="center">Név</div></td>
                    <td width="87" class="style7"><div align="center">Szobaszám</div></td>
                    <td width="20"><div align="center">
                            <input type="checkbox" name="checkbox" value="ON" />
                    </div></td>
                </tr>
                <%
            LinkedList<VendegSzoba> ll = (LinkedList<VendegSzoba>) request.getSession().getAttribute("vendegek_szobak");
            if (ll != null) {
                for (int i = 0; i < ll.size(); ++i) {
                    System.out.println(ll.get(i).getFelhsznaloNev());
                %>
                <tr>
                    <td><div align="center"><%out.println(ll.get(i).getFelhsznaloNev());%></div></td>
                    <td><div align="center"><%out.println(ll.get(i).getNev());%></div></td>
                    <td><div align="center"><%out.println(ll.get(i).getSzoba());%></div></td>
                    <td><div align="center"><input type="checkbox" name="checkbox" value="ON" /></div></td>
                </tr>
                <%
                }
            }
            %>
            </table>
            <p>&nbsp;</p>
            <div align="center">
                <input type="submit" value="Torol" name="torol" />
            </div>
        </body>
    </form>
</html>
