<%@ page import="com.fenalco.utilities.lists.SuperOfferListViewShopKeeper"%>
<%@ page import="com.fenalco.entities.User"%>
<%@ page import="com.fenalco.entities.DataAccess"%>
<%@ page import="com.fenalco.utilities.MessageBuilder"%>
<%@ page import="com.fenalco.entities.StoreList"%>
<%@ page import="java.util.Enumeration"%>
<%@ page import="java.util.Hashtable"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel='stylesheet' style='text/css' href='../css/tablas.css'>
<title>Super ofertas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#ffffff" background="../images/shopkeeper/general/fondo.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- 
-->
<%
	String helpId = "37";
%>
<table border="0" cellpadding="0" cellspacing="0" width="780">
    <%@ include file="encabezado.jsp" %>
</table>
<table width="760" border="0" cellspacing="0" cellpadding="0">
    
    <tr>
        <td width="155" valign="top">
			<%@ include file="menuminorista.jsp" %>
	</td>
        <td width='603' valign="top" align='left'>
            <%
                String tittle = "Super Ofertas";
            %>
            <%@ include file="/titulo.jsp" %>

			<table width="100%">
				<tr><td align="center">
				
                                    <%String message = ( String )request.getAttribute("message");
                                        if( message != null )
                                        {
                                            %>
                                            <%=message%>
                                            <%
                                        }      
                                    %>
                                    </td></tr>
                                    <tr><td>
                                     <!-- aqui va el listado -->
                                     <table align='center' width='100%'>
                                    <%SuperOfferListViewShopKeeper view = (SuperOfferListViewShopKeeper)request.getAttribute("view");
                                       int cont = 0; %>
                                    
                                        <tr class='tableheader'><!-- aqui va el listado -->
                                            <td><b>Nombre</b></td>
                                            <td><b>Descripción</b></td>
                                            <td><b>Proveedor</b></td>
                                            <td><b>Fecha de finalizaci&oacute;n</b></td>
                                            <td><b>Ver detalle</b></td>
                                            
                                        </tr>
                                        <% 
                    
                                            Object data = new Object();
                                            if(view != null)
                                            {
                                                while(view.move()){
                                                    cont++;
                                                    int i = 0;
                                                    String id = "";
                                         %>
                                        <tr>
                                                    <% while((data=view.nextElement()) != null){
                                                        i++;
                                                        if(i == 1){
                                                            id = data.toString();
                                                        }
                                                        else{
                                                    %>                                                           
                                                         <td><%= data.toString() %></td>
                                                    <%  }
                                                       }
                                                    %>
                                                        <!-- Columnas para las opciones -->
                                                        <td align="center"><a href="#"><img  name="view" src="/images/buttons/shopkeeper/detalle.gif" border="0" onclick="window.open('/minorista/versuperoferta?id=<%=id%>','','WIDTH=450,HEIGHT=250');"></a></td>
                                        </tr>
                                            <% } 
                                            }
                                            if(cont == 0){%>
                                                <tr> 
                                                    <td colspan='5'>
                                                        <b>EN ESTE MOMENTO NO HAY SUPEROFERTAS DISPONIBLES<br>
                                                       DE SUS PROVEEDORES </b>
                                                    </td>
                                                </tr>
                                            <%}%>
                                    </table>
                               
                                    </td></tr>
				
                                     <!-- -->   
                                    </td></tr>
				
			</table>
	</td>
    </tr>
	
</table>
<table width="760">
	<tr>
		<td><%@ include file="/piepagina.jsp" %></td>
	</tr>
</table>

</body>
</html>