<%@page import="java.util.*,javax.sql.*,java.sql.*,javax.naming.*,test.m05bAnalizaTexto" %>
<%@include file="/mantenimientosJSP/includes/m05b.inc"%>
	
<%	// _______________________________XLNETs______________________________________
	// Evaluar variable de session que indica si esta conectado a XLNets
	if ((session.getAttribute("objetoSeguridad")) == null)  { 
		// Verificar que no ha transcurrido el tiempo de sesion (web.xml) %>
			<%@ include file="/m05bControlAcceso.inc"%>   
	<% } %>
	<%@ include file="/m05bIdioma.inc"%>
		
<HTML>
<head>
			<title>Comparador de string</title>
			<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
			<link rel="stylesheet" href="<%=m05bConstantesPaginas.PATH_ESTILOS%>/m05bestilos.css" type="text/css">
			<script language="javascript1.2" src="<%=m05bConstantesPaginas.PATH_SCRIPTS%>/m05bBusqDescrip.js"></script>
<script>
	function buscar(){
		document.formulario.tipo.value="buscar";
		document.formulario.action="/m05bParqueMovilWar/test/m05bPruebaCompilaStrings.jsp";
		document.formulario.submit();
	}
</script>
</head>
<BODY>
<div class="popup" id="capaDesc" >sssss</div>
 <SCRIPT language=JavaScript>
	var urlIdioma;		//URL recarga en funcion del idioma
	var rutaCabecera;	//Camino de migas
	rutaCabecera="";
	detActual="\ Tests Comparador String";
			
 </SCRIPT>
 <%@ include file="/mantenimientosJSP/includes/m05Cabecera_c.jsp"%>
 	 
<p>
	<table  width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
		<tr><td colspan=3></td></tr>
		<tr valign="top">
			<td width="2%">
				<DIV ID="thessm" style="visibility:hidden;Position : Absolute ;Left : 0 ;Top : 80 ;Z-Index : 20;">
		      		<DIV ID="thessm2" style="Position : Absolute ;Left : (-150) ;Top : 0 ;Z-Index : 20;">
		                <%@ include file="/m05bMenuInicial.inc"%>
		       		</DIV>
				</DIV>
			</td>
			<td>&nbsp</td>
			<td width="98%">
				<form name="formulario"/>
				<%
					 if(request.getParameter("tipo")!=null&&request.getParameter("tipo").equals("buscar")){
				%>
				
				<center>
				<table width="200" border="1">
				<%
				String tabla = request.getParameter("tabla")==null?"":request.getParameter("tabla");
				String campo = request.getParameter("campo")==null?"":request.getParameter("campo");
				String where = request.getParameter("where")==null?"":request.getParameter("where");
				
				String cadena = request.getParameter("cadena")==null?"":request.getParameter("cadena");
				m05bAnalizaTexto instancia = new m05bAnalizaTexto();
				ArrayList lista = (ArrayList)instancia.buscar(tabla,campo,where,cadena);
				for (int i=0;i<lista.size();i++){
				%>
				<tr>
				<td width="100%">
					<%=(String)lista.get(i)%>
				</td>
				</tr>
				<%
				}
				%>
				</table>
				</center>
				<%
					}
				%>
				<br/>
				<label class="pieBusqueda">
				<center>Tabla&nbsp;&nbsp;<input type="text" name="tabla" size="30" value="<%=(request.getParameter("tabla")==null)?"":request.getParameter("tabla")%>" onblur="javascript:ocultaCapa();" onkeypress="javascript:controlaCapa(event,this);">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				Campo&nbsp;&nbsp;<input type="text" name="campo" size="20" value="<%=(request.getParameter("campo")==null)?"":request.getParameter("campo")%>" onblur="javascript:ocultaCapa();" onkeypress="javascript:controlaCapa(event,this);"></br></center>
				<center>Where&nbsp;&nbsp;<input type="text" name="where" size="90" value="<%=(request.getParameter("where")==null)?"":request.getParameter("where")%>" onblur="javascript:ocultaCapa();" onkeypress="javascript:controlaCapa(event,this);"></br></center>
				<center>Cadena&nbsp;&nbsp;<input type="text" name="cadena" size="90" value="<%=(request.getParameter("cadena")==null)?"":request.getParameter("cadena")%>" onblur="javascript:ocultaCapa();" onkeypress="javascript:controlaCapa(event,this);"></br></center>
				<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
				<!--<TABLE id="table1">
				    <tr>
				      <td id="td1" align="left" width="40%"> <INPUT id="elemento" class="inputFieldOblig" TYPE="TEXT" NAME="Descripcion" VALUE="" size="48" maxlength="100" onblur="javascript:ocultaCapa();" onkeypress="javascript:controlaCapa(event,this,'td1','table1');"/> </td>
				      <td id="td2" align="left" width="40%"> <INPUT class="inputFieldOblig" TYPE="TEXT" NAME="Edescripcion" VALUE="" size="48" maxlength="100" onblur="javascript:ocultaCapa();" onkeypress="javascript:controlaCapa(event,this,'td2','table1');"/> </td>
				   	</tr>					   
				</TABLE>-->
				</label>
				<center>
					<input type="hidden" name="tipo" value=""/>
					<input type="button" value="Buscar" name="Buscar" onclick="javascript:buscar();"/>
				</center>
				</form>
			</td>
		</tr>
		<tr>
				<td colspan="3"><%@ include file="/mantenimientosJSP/includes/m05Pie_c.jsp"%>	</td>
		</tr>
	</table>
<SCRIPT language='javascript'>
    setTimeout('initSlide();', 1);
</SCRIPT>
</BODY>
</HTML>
