<%@ page import="com.fenalco.utilities.lists.ListView"%>
<%@ page import="com.fenalco.entities.User"%>
<%@ page import="com.fenalco.entities.DataAccess"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel='stylesheet' style='text/css' href='../css/tablas.css'>
<title>Inicio Administrador</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#ffffff" background="../images/sysmanager/general/fondo.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- 
-->
<table border="0" cellpadding="0" cellspacing="0" width="780">
        <%
            String helpId = "1";
        %>
        <%@ include file="encabezado.jsp" %>
</table>
<table width="760">
    <tr>
        <td width="152" valign='top'>
			<%@ include file="menuadministrador.jsp" %>
	</td>
        <td valign='top'>
            <%
                String tittle = "Inicio - Empresas Nuevas";
            %>
            <%@ include file="/titulo.jsp" %>

			<table width="603">
                                <% ListView aux = (ListView)request.getAttribute("view"); 
                                    if(false){
                                %>
                                        <tr><td><br><br><br></td></tr>
                                        <tr><td align="center">No hay empresas nuevas</td></tr>
                                <%  }else{ %>
				<tr><td align="center"><%= request.getAttribute("message")%></td></tr>
				<tr>
                                    <form name="" method="post" action="/administrador/administrarnuevasempresas">
                                        <table align="center" cellspacing='2'>
                                            <tr><td colspan="6" align="center"></td></tr>
                                            <tr class='tableheader'>
                                                    <!-- Encabezado del listado -->
                                                    <td align="center">Nombre</td>
                                                    <td align="center">Tel&eacute;fono</td>
                                                    <td align="center">Fecha de Registro</td>
                                                    <td align="center">Ver</td>
                                                    <td align="center">Activar</td>
                                                    <td align="center">Eliminar</td>
                                            </tr>
                            <% 
                                            ListView view = (ListView)request.getAttribute("view");
                                            String data;
                                            int count = 0;
                                            while(view.move())
                                            {
                                                count++;
                                                    int i=0;
                                                    String id="";
                                    %>
                                                    <tr>
                                                    <% while((data=(String)view.nextElement()) != null){
                                                            if(i>0){
                                                                if(i>0){
                                                    %>
                                                                    <td><%= data %></td>
                                                    <%
                                                                }else{
                                                    %>
                                                                    <td align="center"><%= data %></td>
                                                    <%
                                                                }
                                                            }else{ 
                                                                id=data;
                                                            }
                                                            i++;
                                                       }
                                                    %>
                                                            <!-- Columnas para las opciones -->
                                                        <td align="center"><a href="#"><img  name="view" src="/images/buttons/sysmanager/detalle.gif"  border="0" onClick="window.open('/administrador/verempresa?key=<%= id %>','','HEIGHT=400,WIDTH=515')"></a></td>
                                                        <td align="center"><a href="/administrador/administrarnuevasempresas?key=<%=id%>&operationType=changeStatus"><img  src="/images/buttons/sysmanager/activar.gif"  border="0"  onClick=""></a></td>
							<td align="center"><input name="item" type="radio" value="<%= id %>"></td> 
                                                            
                                                    </tr>
                                            <% 
                                                }
                                                if( count == 0 )
                                                {
                                                    %>
                                                        <tr>
                                                            <td align="center" colspan='6'>
                                                                <strong>No hay empresas nuevas en el sistema</strong>
                                                            </td>
                                                        </tr>
                                                    <%
                                                }
                                                else
                                                {
                                            %>
                                            <tr>
                                                <td colspan='5'></td>
                                                <td align="center"><input name="delete" type="submit" value="Eliminar" onClick="operationType.value='delete';return window.confirm('Está a punto de eliminar registros del sistema, desea continuar?');"><td>
                                            </tr>
                                            <%
                                                }
                                            %>
                                    </table>
                                    <input name="operationType" type="hidden" value="">
                                    </form>
				</tr>
				<%}%>
			</table>
	</td>
    </tr>
	
</table>
<table width="760">
	<tr>
		<td><%@ include file="/piepagina.jsp" %></td>
	</tr>
</table>

</body>
</html>