<%-- 
    Document   : vendeg_szobat_kivesz
    Created on : 2009.03.18., 1:57:05
    Author     : Sensei
--%>

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

<!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;
            }
            .style7 {font-size: 14pt; font-weight: bold; color: #000000; font-style: italic; }
        </style>
        <SCRIPT LANGUAGE="JavaScript">
            function etel_igenyles(){
                javascript:window.location.href='vendeg_etel_igenyles.jsp';
            }
            function takaritas_igenyles(){
                javascript:window.location.href='vendeg_takaritas_igenyles.jsp';
            }
            function program_igenyles(){
                javascript:window.location.href='vendeg_program_igenyles.jsp';
            }
            function szobat_kivesz(){
                javascript:window.location.href='vendeg_szobat_kivesz.jsp';
            }
        </SCRIPT>
        
    </head>
    <form action="VendegServlet" method="POST">
    <body  bgcolor="#FFFFCC" style="background-image: url('back.jpg'); background-position: top center; background-repeat: no-repeat" > 
        
            <h2 align="center" class="style1">Szoba lefoglalása!</h2>
            <p align="center">&nbsp;</p>
            <table width="795" height="27" border="1" align="center" bgcolor="#DDD8C1">
                <tr>
                    <td width="195" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"><div align="center" onclick ="szobat_kivesz()"><strong>Szobafoglalás</strong></div></td>
                    <td width="149" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"><div align="center" onclick ="etel_igenyles()"><strong>Heti menü</strong></div></td>
                    <td width="141" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"><div align="center" onclick ="takaritas_igenyles()"><strong>Takarítás</strong></div></td>
                    <td width="282" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"><div align="center" onclick ="program_igenyles()"><strong>Szállodai programaok</strong></div></td>
                </tr>
            </table>
            <p><p align="center"><input type="submit" value="Listaz" name="lista_szoba" /></p>
            </p>
            
            <table width="404" border="1" align="center">
                <tr class="style7">
                    <td width="96"><div align="center"><em><strong>Szobaszám</strong></em></div></td>
                    <td width="74"><div align="center"><em><strong>Férőhely</strong></em></div></td>
                    <td width="95"><div align="center"><em><strong>Ár/Éjszaka</strong></em></div></td>
                    <td width="54"><div align="center"><em><strong>Napok száma</strong></em></div></td>
                </tr>
                <%
            LinkedList<SzobaDTO> ll = (LinkedList<SzobaDTO>) request.getSession().getAttribute("szobak");
            if (ll != null) {
                for (int i = 0; i < ll.size(); ++i) {
                    System.out.println(ll.get(i).getId_szoba());
                %>
                <tr>   
                    <td><div align="center"><%out.println(ll.get(i).getId_szoba());%></div></td>
                    <td><div align="center"><%out.println(ll.get(i).getFerohely());%></div></td>
                    <td><div align="center"><%out.println(ll.get(i).getAr());%></div></td>
                    <td><div align="center">
                            <input type="text" name="napok" value="1" size="6"/>
                    </div></td>
                    <td width="51"><div align="center">
                            <input type="submit" value="Kivesz" name="kivesz<%out.println(i);%>" />
                    </div></td>
                </tr>
                <%}
            }%>
            </table>
            
        
    </body>
    </form>
</html>
