Path: C:\
<?php
if (isset($_GET['arquivo'])) {$arqxlsx=$_GET['arquivo'];
echo "<!DOCTYPE html>
<html lang='pt-br'>
<head>
<meta http-equiv='Refresh' CONTENT='1;URL=http://192.168.0.251:5050/".$arqxlsx."'>
";}else{echo"<!DOCTYPE html>
<html lang='pt-br'>
<head>";}
date_default_timezone_set('America/Sao_Paulo');
$dateadded = date("d/m/Y -- G:i");
?>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
<title>TransWar</title>
<link rel="icon" type="image/png" href="images/favicon.ico">
<link href="css/estilo.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/redmond/jquery-ui-1.10.1.custom.css" />
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
<link href="css/theme.css" rel="stylesheet">
<link href="css/signin.css" rel="stylesheet">
<script src="js/ie-emulation-modes-warning.js"></script>
<script src='js/jquery.min.js'></script>
<script type="text/javascript">
$(document).ready(function(){
$('#busca_natu').keyup(function(){
$.ajax({
type: 'POST',
url: 'busca_natu.php',
data: {
nome: $("#busca_natu").val()
},
success: function(data) {
$('#listanatureza').html(data);
}
});
});
});
$(document).ready(function(){
$('#busca_local').keyup(function(){
$.ajax({
type: 'POST',
url: 'busca_local.php',
data: {
nome: $("#busca_local").val()
},
success: function(data) {
$('#listalocal').html(data);
}
});
});
});
$(document).ready(function(){
$('#busca_forn').keyup(function(){
$.ajax({
type: 'POST',
url: 'busca_ajax.php',
data: {
nome: $("#busca_forn").val()
},
success: function(data) {
$('#listaforne').html(data);
}
});
});
});
$(document).ready(function(){
$('#busca_dest').keyup(function(){
$.ajax({
type: 'POST',
url: 'busca_ajax.php',
data: {
nome: $("#busca_dest").val()
},
success: function(data) {
$('#listadest').html(data);
}
});
});
});
$(document).on('change', '#listadest', function () {
var value = $(this).val();
$('#listadest').val(value);
$('#dsgrupo').val('TODOS');
$('#grupo').val('999');
});
$(document).on('change', '#listaforne', function () {
var value = $(this).val();
$('#listaforne').val(value);
$('#dsgru').val('TODOS');
$('#grupofor').val('999');
});
$(document).on('change', '#grudest', function () {
var value = $(this).val();
var option = $(this).find("option:selected");
var dsgrupo = option.data('dsgrupo');
$('#listadest').val('999');
$('#grupo').val(value);
$('#dsgrupo').val(dsgrupo);
});
$(document).on('change', '#gruforne', function () {
var value = $(this).val();
var option = $(this).find("option:selected");
var dsgru = option.data('dsgru');
$('#listaforne').val('999');
$('#grupofor').val(value);
$('#dsgru').val(dsgru);
});
$(document).ready(function() {
$('input:radio[name="forne"]').on("change", function() {
if (this.checked && this.value == '1') {
$("#gru").show();
$("#empresa").hide();
} if (this.checked && this.value == '2') {
$("#empresa").show();
$("#gru").hide();
} if (this.checked && this.value == '9') {
$('#grupofor').val('999');
$('#dsgru').val('TODOS');
$('#fornecedor').val('999');
$("#gru, #empresa").hide();
}
});
});
$(document).ready(function() {
$('input:radio[name="dest"]').on("change", function() {
if (this.checked && this.value == '1') {
$("#gru2").show();
$("#empresa2").hide();
} if (this.checked && this.value == '2') {
$("#empresa2").show();
$("#gru2").hide();
} if (this.checked && this.value == '9') {
$('#grupo').val('999');
$('#dsgrupo').val('TODOS');
$('#destinatario').val('999');
$("#gru2, #empresa2").hide();
}
});
});
</script>
</head>
<?php
require_once("conexao_srvtms.php");
?>
<body role="document">
<div class="container">
<table width="100%">
<tr>
<td><img src="images/logo03.png" width="408" height="88" /></td>
<td><div class="page-header">
<h2><span class="label label-primary"> Acompanhamento de Coletas </span></h2>
</div></td>
</tr>
<tr>
<td height="30" colspan="2" background="images/top-menubg.gif" > <?php echo $dateadded; ?></td>
</tr>
</table>
<aside role="complementary" class="col-md-12">
<div class='panel panel-primary'>
<div class='panel-heading'>
<h3 class='panel-title' align='center'>Filtros para Acompanhamento de Coletas:</h3>
</div>
<table>
<form id="form" name="form" method="post" action="coleta.php" enctype="multipart/form-data">
<tr class="col-md-12">
<td class="col-md-2"><strong>Fornecedores:</strong>
<p>
<input type="radio" name="forne" value="1"/>Grupo<br>
<input type="radio" name="forne" value="2"/>Empresa<br>
<input type="radio" name="forne" value="9" checked />Todos
</p>
</td>
<td class="col-md-4">
<div id="gru" style="display:none;">
<select id="gruforne" name="grupofor" style="height: 30px;" class="form-control">
<option value="999" data-dsgru="TODOS" selected>Todos os Grupos</option>
<?php
$tsql = "SELECT id_GrupoCliente, ds_GrupoCliente FROM tbdGrupoCliente where id_GrupoCliente>3 ORDER BY id_GrupoCliente ASC";
$row2= sqlsrv_query($conn, $tsql);
while ($row = sqlsrv_fetch_array($row2, SQLSRV_FETCH_ASSOC)) { $ds_gru=$row [ "ds_GrupoCliente" ];
echo "<option value=".$row [ "id_GrupoCliente" ]." data-dsgru=".$ds_gru." >".$ds_gru."</option>";
}
?>
</select>
</div>
<div id="empresa" style="display:none;">
Nome:<input type="text" id="busca_forn" name="busca_forn" style="height: 20px;">
<select id="listaforne" name="fornecedor" style="height: 30px;" class="form-control"onclick="if( $('#listaforne').html() == '' ){ alert('Sem resultados carregados.\n Faça uma busca digitando o nome de um fornecedor.');}" ></select>
</div>
</td>
<td class="col-md-2"><strong>Destinatários:</strong>
<p>
<input type="radio" name="dest" value="1"/>Grupo<br>
<input type="radio" name="dest" value="2"/>Empresa<br>
<input type="radio" name="dest" value="9" checked />Todos
</p>
</td>
<td class="col-md-4">
<div id="gru2" style="display:none;">
<select id="grudest" name="grupo" style="height: 30px;" class="form-control">
<option value="999" data-dsgrupo="TODOS" selected>Todos os Grupos</option>
<?php
$tsql = "SELECT id_GrupoCliente, ds_GrupoCliente FROM tbdGrupoCliente where id_GrupoCliente>3 ORDER BY id_GrupoCliente ASC";
$row2= sqlsrv_query($conn, $tsql);
while ($row = sqlsrv_fetch_array($row2, SQLSRV_FETCH_ASSOC)) { $ds_grupo=$row [ "ds_GrupoCliente" ];
echo "<option value=".$row [ "id_GrupoCliente" ]." data-dsgrupo=".$ds_grupo." >".$ds_grupo."</option>";
}
?>
</select>
</div>
<div id="empresa2" style="display:none;">
Nome:<input type="text" id="busca_dest" name="busca_dest" style="height: 20px;">
<select id="listadest" name="destinatario" style="height: 30px;" class="form-control" onclick="if( $('#listadest').html() == '' ){ alert('Sem resultados carregados.\n Faça uma busca digitando o nome de um destinatário.');}" ></select>
</div>
</td>
</tr>
<tr class="col-md-12">
<td class="col-md-2"><strong>Status:</strong>
<select id="statu" name="statu" style="height: 30px;" class="form-control">
<option value="999" selected>TODOS</option>
<option value="REALIZADA">REALIZADA</option>
<option value="PENDENTE">PENDENTE</option>
<option value="EM ROTA">EM ROTA</option>
</select>
</td>
<td class="col-md-2"><strong>Performance:</strong>
<select id="perfo" name="perfo" style="height: 30px;" class="form-control">
<option value="999" selected>TODAS</option>
<option value="NO PRAZO">NO PRAZO</option>
<option value="FORA DO PRAZO">FORA DO PRAZO</option>
</select>
</td>
<td class="col-md-4"><strong>Local:</strong>
<input type="text" id="busca_local" name="busca_local" style="height: 20px; width: 150px;">
<select id="listalocal" name="local" style="height: 30px;" class="form-control"onclick="if( $('#listalocal').html() == '' ){ alert('Sem resultados carregados.\n Faça uma busca digitando o nome de um local.');}" ><option value="999" selected>TODOS</option></select>
</td>
<td class="col-md-4"><strong>Natureza:</strong>
<input type="text" id="busca_natu" name="busca_natu" style="height: 20px; width: 150px;">
<select id="listanatureza" name="natureza" style="height: 30px;" class="form-control"onclick="if( $('#listanatureza').html() == '' ){ alert('Sem resultados carregados.\n Faça uma busca digitando uma natureza de mercadoria.');}" ><option value="999" selected>TODAS</option></select>
</td>
</tr>
<tr>
<td class="col-md-12" colspan="4" align="center">
<input id='grupo' name='grupo' type='hidden' value="999"/>
<input id='dsgrupo' name='dsgrupo' type='hidden' value="TODOS" />
<input id='grupofor' name='grupofor' type='hidden' value="999"/>
<input id='dsgru' name='dsgru' type='hidden' value="TODOS" />
<button type='submit' class='btn btn-success'>OK</button>
</td>
</tr>
</form>
</table>
</div>
</aside>
</div>
</body>
<p class="copyright" align="center">© Copyright 2018 TransWar - Todos os direitos reservados. Versão 1.0</p>
<br />
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="js/jquery-ui.js" type="text/javascript"></script>
<script src="js/docs.min.js"></script>
<script src="js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>