<%-- 
    Document   : szakacs_menu_torles
    Created on : 2009.03.18., 14:05:16
    Author     : Sensei
--%>

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


<!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; }
            .style8 {font-size: 9pt}
        </style>
        <SCRIPT LANGUAGE="JavaScript">
            function menu_kiirasa(){
                javascript:window.location.href='szakacs_menu_kiiras.jsp';
            }
            function menu_torlese(){
                javascript:window.location.href='szakacs_menu_torles.jsp';
            }
        </SCRIPT>
    </head>
    <form action="SzakacsServlet" method="POST">
        <body  bgcolor="#FFFFCC" style="background-image: url('back.jpg'); background-position: top center; background-repeat: no-repeat" > 
            <h2 align="center" class="style1">Szakács!</h2>
            
            <p align="left">&nbsp;</p>
            <table width="519" height="27" border="1" align="center" bgcolor="#DDD8C1">
                <tr>
                <td onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"><div align="center" onclick ="menu_kiirasa()"><strong>Napi menü kiírása</strong></div></td>
                <td onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"><div align="center" onclick ="menu_torlese()"><strong>Napi menü törlése</strong></div></td>  
            </table> 
            
            <input type="submit" value="Listaz" name="lista" />
            
            <p>&nbsp;</p>
            <table width="386" border="1" align="center">            
                <tr>
                    <td width="54" class="style7"><div align="center">Nap</div></td>
                    <td width="142" class="style7"><div align="center">Menü </div></td>
                    <td width="142" class="style7"><div align="center">Előétel </div></td>
                    <td width="142" class="style7"><div align="center">Főétel </div></td>
                    <td width="142" class="style7"><div align="center">Desszert </div></td>
                </tr>
                <%LinkedList<EtelDTO> ll = (LinkedList<EtelDTO>) request.getSession().getAttribute("menulista");
            if (ll != null) {
                for (int i = 0; i < ll.size(); ++i) {
                
                %>
                <tr>
                    <td><div align="center"><%out.println(ll.get(i).getNap());%></div></td>
                    <td><div align="center"><%out.println(ll.get(i).getMenu());%></div></td>
                    <td><div align="center"><%out.println(ll.get(i).getEloetel());%></div></td>
                    <td><div align="center"><%out.println(ll.get(i).getFoetel());%></div></td>
                    <td><div align="center"><%out.println(ll.get(i).getDesszert());%></div></td>
                    <td width="20"><div align="center">
                            <input type="checkbox" name="checkbox<%out.println(i);%>" value="ON" />
                    </div></td>
                </tr>
                <%
                }
            }
                %>
            </table>
            <p>&nbsp;</p>
            <p align="center">
                <input type="submit" value="Torol" name="torol" onmouseover="this.style.color='red'" onmouseout="this.style.color='black'"/>
            </p>
        </body>
    </form>
</html>
