<%@page import="br.com.centralit.citcorpore.util.CitCorporeConstantes"%>
<%@page import="br.com.centralit.citcorpore.util.WebUtil"%>
<%@page import="br.com.centralit.citcorpore.bean.UsuarioDTO"%>
<%@page import="br.com.citframework.dto.Usuario"%>

<%@include file="/novoLayout/common/include/iframe.jsp" %>

<!doctype html public "">
<html <%=(iframe != null) ? "data-iframe=\"" + iframe + "\"" : "" %>>
	<head>
		<%@include file="/novoLayout/common/include/libCabecalho.jsp" %>
		<%@include file="/novoLayout/common/include/titulo.jsp" %>
		<link type="text/css" rel="stylesheet" href="../../novoLayout/common/include/css/template.css"/>
		<link type="text/css" rel="stylesheet" href="css/logController.css"/>
	</head>
	<cit:janelaAguarde id="JANELA_AGUARDE_MENU"  title="" style="display:none;top:325px;width:300px;left:500px;height:50px;position:absolute;"></cit:janelaAguarde>
	<body>
		<div class="container-fluid fixed">
			<div class="navbar main hidden-print">
				<%@include file="/novoLayout/common/include/cabecalho.jsp" %>
				<%@include file="/novoLayout/common/include/menuPadrao.jsp" %>
			</div>
	
			<div id="wrapper">
				<div id="content">
					<div class="separator top"></div>
					<div class="row-fluid">
						<div class="innerLR">
							<div class="widget">
								<div class="widget-head">
									<h4 class="heading"><fmt:message key="logs.logs" /></h4>
								</div>
								<div class="widget-body collapse in">		
									<form name='form' action='${ctx}/pages/logController/logController'>
										<input type="hidden" id='idUsuario' name='idUsuario' />
										<input type='hidden' name='paginaAtual' id='paginaAtual' value="1"/>
										<input type='hidden' name='paginacao' id='paginacao' value="0"/>
										<input type='hidden' name='quantidadeLogs' id='quantidadeLogs' value="0"/>
										
										<div class='row-fluid'>
											<div class='span12'>
												<div id="no-config" class="alert">
													<button type="button" class="close" data-dismiss="alert">×</button>
													<span><fmt:message key="logs.alerta" /></span>	 
												</div>
											</div>
										</div>
										
										<div class='row-fluid'>
											<div class='span3'>
												<label class="campoObrigatorio"><fmt:message key="citcorpore.comum.periodo" /></label>
												<div class='row-fluid'>
													<div class='span6'>
														<input type="text" class="span12 Format[Date] Valid[Date] datepicker" maxlength="10" id="dataInicio" name="dataInicio">
													</div>
													<div class='span6'>
														<input type="text" class="span12 Format[Date] Valid[Date] datepicker" maxlength="10" id="dataFim" name="dataFim">
													</div>
												</div>
											</div>
											<div class='span3'>
												<label><fmt:message key="logs.nomeTabela" /></label>
												<select class='span12' name="nomeTabela"></select>
											</div>
											<div class='span3'>
												<label><fmt:message key="logs.nomeUsuario" /></label>
												<input class='span12' type="text" name="nomeUsuario" id="nomeUsuario" onfocus="abrePopupUsuario();" />
											</div>
											<div class='span3'>
												<label><fmt:message key="logs.qtdLogsPagina" /></label>
												<select name='quantidadeLogsPorPagina' id='quantidadeLogsPorPagina' class="span12 Description[evm.pesquisaocorrenciaeventos.qtdItensPorPagina]">
													<option value="30">30</option>
													<option value="50" selected="selected">50</option>
													<option value="70">70</option>
													<option value="100">100</option>
												</select>
											</div>
										</div>
										
										<div class='row-fluid'>
											<div class='span12'>
												<button type='button' name='btnPesquisar' class="lFloat btn btn-icon btn-primary" onclick='filtrar();'>
													<i></i><fmt:message key="citcorpore.comum.pesquisar" />
												</button>
												<button type="button" name='btnRelatorio' class="lFloat btn btn-icon btn-primary" onclick='imprimirRelatorio();'>
													<i></i><fmt:message key="citcorpore.comum.gerarRelatorio" />
												</button>
												<button type='button' name='btnLimpar' class="lFloat btn btn-icon btn-primary" onclick='limpar();'>
													<i></i><fmt:message	key="citcorpore.comum.limpar" />
												</button>
											</div>
									   </div>
									</form>
									<div class='row-fluid' style="padding-top: 10px;">
										<div class='span12'id="page" style="overflow:auto; height:500px;"></div>

									</div>

								</div>
							</div>
						</div>
					</div>
					<div id="controlePaginacao">
						<div id="pag" style="text-align: center; display: block; width: 100%; margin-bottom: 5px;">
							<input id="btfirst" class="ui-widget ui-state-default botao corner-all" type="button" onclick="pesquisar(0)" value='<fmt:message key="citcorpore.comum.primeiro" />' title='<fmt:message key="citcorpore.comum.primeiro" />' style=" cursor: pointer" name="btfirst">
							<input id="btprevius" class="ui-widget ui-state-default botao corner-all" type="button" onclick="pesquisar(-1)" value='<fmt:message key="citcorpore.comum.anterior" />' title='<fmt:message key="citcorpore.comum.anterior" />' style=" cursor: pointer" name="btprevius">
							<label><fmt:message key="citcorpore.comum.mostrandoPagina" /></label> <label id='labelPaginaAtual' style='width: 1%!important;'></label> 
							<input id="btnext" class="ui-widget ui-state-default botao corner-all" type="button" onclick="pesquisar(1)" value='<fmt:message key="citcorpore.comum.proximo" />' title='<fmt:message key="citcorpore.comum.proximo" />' style=" cursor: pointer" name="btnext">
						</div>
					</div>
				</div>

				<!--  Fim conteudo-->
				<%@include file="/novoLayout/common/include/rodape.jsp" %>
			</div>
		</div>
		<div id="POPUP_SOLICITANTE" title="<fmt:message key="citcorpore.comum.pesquisa"/>">
			<div class="box grid_16 tabs" style="width: 570px;">
				<div class="toggle_container">
					<div id="tabs-2" class="block">
						<div class="section">
							<form name='formPesquisaUsuario'>
								<cit:findField formName='formPesquisaUsuario'
									lockupName='LOOKUP_USUARIO' id='LOOKUP_SOLICITANTE' top='0'
									left='0' len='550' heigth='400' javascriptCode='true'
									htmlCode='true' />
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<script type="text/javascript" src="js/logController.js"></script>
	</body>
</html>