| Server IP : 20.75.53.88 / Your IP : 216.73.217.138 [ Web Server : Apache System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29+esm15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Domains : 3 Domains MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/merenda/vicosa19/modulos/produto/ |
Upload File : |
<?php
/**
* Criado por PhpStorm.
* Projeto: merenda.
* Arquivo: produto_taco.php.
* Usuário: RalpAlves
* Data: 14/09/2015
* Hora: 16:03
*/
ini_set('display_errors', 'off');
if (isset($_POST['txt_pesq'])) {
$ntb = $_POST['txt_pesq'];
}
mysql_select_db($banco, $conexao);
$rsResult = mysql_query("SELECT * from produtosaux order by prx_produto");
$rsResult_totalRows = mysql_num_rows($rsResult);
?>
<head>
<link href="Styles/Site.css" rel="stylesheet" type="text/css"/>
<link href="Styles/fresh-bootstrap-table.css" rel="stylesheet" type="text/css"/>
<link href="Styles/bootstrap.css" rel="stylesheet" type="text/css"/>
<link href="Styles/jquery.dataTables.min.css" rel="stylesheet" type="text/css"/>
<link href="Styles/buttons.dataTables.min.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
function inserir_registro(e) {
if (!confirm('Deseja inserir este produto ao cadastro principal?')) {
if (window.event)
window.event.returnValue = false; else
e.preventDefault();
}
}
</script>
<script>
$(document).ready(function () {
$('table.tabe1').DataTable({
//"pagingType": "full_numbers",
// "lengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "Todos"]],
stateSave: true,
autoFill: true,
"bPaginate": false,
scrollY: '45vh',
dom: 'Bfrtip',
buttons: [
{
extend: 'copyHtml5',
text: '<i class="fa fa-files-o botao_dt hidden-xs"></i>',
titleAttr: 'Copiar para a área de transferência'
},
{
extend: 'excelHtml5',
text: '<i class="fa fa-file-excel-o botao_dt"></i>',
titleAttr: 'Exportar para Excel'
},
{
extend: 'csvHtml5',
text: '<i class="fa fa-file-text-o botao_dt hidden-xs"></i>',
titleAttr: 'Exportar para CSV'
},
{
extend: 'pdfHtml5',
text: '<i class="fa fa-file-pdf-o botao_dt"></i>',
titleAttr: 'Exportar para PDF'
},
{
extend: 'print',
text: '<i class="fa fa-print botao_dt hidden-xs"></i>',
titleAttr: 'Imprimir'
}
],
"oLanguage": {
"sProcessing": "Processando. Aguarde...",
"sLengthMenu": "Mostrar _MENU_",
"sZeroRecords": "NENHUM REGISTRO ENCONTRADO!",
"sInfo": "_TOTAL_ registros",
"sInfoEmpty": "0 registros",
"pagingType": "scrolling",
"sInfoFiltered": "(de _MAX_)",
"sInfoPostFix": "",
"sSearch": "<em class='fa fa-search' title='pesquisar'></em>",
// "sUrl": "",
"oPaginate": {
"sFirst": "<i class='fa fa-angle-double-left' title='primeiro registro' style='font-size: 8px; margin-right: 0;!important;'></i>",
"sPrevious": "<i class='fa fa-arrow-left' title='registro anterior' style='font-size: 8px;'></i>",
"sNext": "<i class='fa fa-arrow-right' title='próximo registro' style='font-size: 8px;'></i>",
"sLast": "<i class='fa fa-angle-double-right' title='último registro' style='font-size: 8px;'></i>"
}
}
});
table.buttons().container()
.appendTo($('.col-sm-12:eq(0)', table.table().container()));
});
</script>
<script type="text/javascript">
$(document).ready(function () {
$('table.tabela').DataTable({
"pagingType": "full_numbers",
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "Todos"]],
stateSave: true,
//dom: 'Bfrtip',
buttons: [
{
extend: 'copyHtml5',
text: '<i class="fa fa-files-o"></i>',
titleAttr: 'Copiar para a área de transferência'
},
{
extend: 'excelHtml5',
text: '<i class="fa fa-file-excel-o"></i>',
titleAttr: 'Exportar para Excel'
},
{
extend: 'csvHtml5',
text: '<i class="fa fa-file-text-o"></i>',
titleAttr: 'Exportar para CSV'
},
{
extend: 'pdfHtml5',
text: '<i class="fa fa-file-pdf-o"></i>',
titleAttr: 'Exportar para PDF'
},
{
extend: 'print',
text: '<i class="fa fa-print"></i>',
titleAttr: 'Imprimir'
}
],
"oLanguage": {
"sProcessing": "Processando. Aguarde...",
"sLengthMenu": "Mostrar _MENU_",
"sZeroRecords": "NENHUM REGISTRO ENCONTRADO!",
"sInfo": "_TOTAL_ registros",
"sInfoEmpty": "0 até 0 de 0 registros",
"sInfoFiltered": "(de _MAX_)",
"sInfoPostFix": "",
"sSearch": "<em class='fa fa-search' title='pesquisar'></em>",
"sUrl": "",
"oPaginate": {
"sFirst": "<em class='fa fa-angle-double-left' title='primeiro registro' style='font-size: 10px;'></em>",
"sPrevious": "<em class='fa fa-arrow-left' title='registro anterior' style='font-size: 10px;'></em>",
"sNext": "<em class='fa fa-arrow-right' title='próximo registro' style='font-size: 10px;'></em>",
"sLast": "<em class='fa fa-angle-double-right' title='último registro' style='font-size: 10px;'></em>"
}
}
});
// table.buttons().container()
// .appendTo($('.col-sm-3:eq(0)', table.table().container()));
});
</script>
</head>
<!--GRID DA DADOS-->
<body style="padding-top: 40px;"/>
<div id='id_grid' class='container-fluid'>
<p style='font-size: 20px;'>Produtos - Tabela TACO | Listagem
</p>
<div class='panel panel-body panel-primary filterable'>
<form id='frm_pesq' method='post'>
<table class='tabe1 table table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr>
<th width="30%">Descrição</th>
<th>Energia</th>
<th>Carb.</th>
<th>Prot.</th>
<th>Lip.</th>
<th>Fib.</th>
<!-- <th>Vit.A</th>-->
<th>Vit.C</th>
<th>Cálcio</th>
<th>Ferro</th>
<th>Mag.</th>
<th>Zinco</th>
<th>Sódio</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
while ($row_rsResult = mysql_fetch_array($rsResult)) {
echo "<tr>";
echo "<td>" . utf8_encode($row_rsResult['prx_produto']) . "</td>";
echo "<td>" . number_format($row_rsResult['prx_energia'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_carboidrato'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_proteinas'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_lipidios'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_fibras'], 2, ',', '.') . "</td>";
// echo "<td>" . number_format($row_rsResult['prx_vitamina_a'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_vitamina_c'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_calcio'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_ferro'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_magnesio'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_zinco'], 2, ',', '.') . "</td>";
echo "<td>" . number_format($row_rsResult['prx_sodio'], 2, ',', '.') . "</td>";
$cod_produto = $row_rsResult['prx_id'];
echo "<td><a href='?page=produto/produto_ins&cod_produto=$cod_produto&var_acao=ins_taco'>
<img src='img/novo.png' width='16' onclick='inserir_registro(event);'
title='adicionar ao cadastro principal'/></a></td>";
echo "</tr>";
}
?>
</tbody>
</table>
</form>
</div>
</div>
</html>