| Server IP : 20.75.53.88 / Your IP : 216.73.217.72 [ 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/mnova21/modulos/escola_almox/ |
Upload File : |
<?php
/**
* Created by PhpStorm.
* User: RalpAlves
* Date: 23/11/2015
* Time: 16:24
*/
session_start();
$usu_nome = $_SESSION['txt_usuario'];
$id_usu_ent = $_SESSION['idusu'];
$escola = $_SESSION['escola'];
ini_set('display_errors', 'off');
if ($escola=='1') {
$rsResult = mysql_query("SELECT * FROM v_lista_mensagem where esc_id in(select id_entidade from usuarios_ent where usu_id = '$id_usu_ent') and msg_esc_id='0'");
} else {
$rsResult = mysql_query("SELECT * FROM v_lista_mensagem where msg_esc_id='1'");
}
?>
<head>
<script type="text/javascript">
$(document).ready(function () {
$('#tabela').DataTable({
order: [[0, 'desc']],
"pagingType": "full_numbers",
"lengthMenu": [[8, 25, 50, -1], [8, 25, 50, "Todos"]],
"oLanguage": {
"sProcessing": "Processando. Aguarde...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "NENHUM REGISTRO ENCONTRADO!",
"sInfo": "Mostrando _START_ até _END_ de _TOTAL_ registros",
"sInfoEmpty": "Mostrando 0 até 0 de 0 registros",
"sInfoFiltered": "(de _MAX_ registros no total)",
"sInfoPostFix": "",
"sSearch": "<em class='fa fa-search' title='pesquisar'></em>",
"sUrl": "",
"oPaginate": {
"sFirst": "<em class='fa fa-angle-double-left' title='primeiro registro'>",
"sPrevious": "<em class='fa fa-arrow-circle-left' title='registro anterior'></em>",
"sNext": "<em class='fa fa-arrow-circle-right' title='próximo registro'></em>",
"sLast": "<em class='fa fa-angle-double-right ' title='último registro'>"
}
}
});
});
</script>
<script type="text/javascript" language="javascript">
function ins_vali(codDat, codEsc) {
var Dat = document.getElementById('vvali' + codDat).value;
$.ajax({
type: "GET", url: './modulos/escola_almox/esc_msg_lida.php?var=insvali&dat=' + codEsc + '&codcon=' + codDat, dataType: "html", success: function (resultado) {
$('#LicDat').html(resultado);
//alert(resultado)
}
});
}
</script>
</head>
<!--GRID DA DADOS-->
<body style="padding-top: 40px;"/>
<div class="container panel-body">
<div class="panel panel-primary">
<div class="panel-heading">
<span style='font-size: 18px;'>Caixa de entrada | Mensagens </span>
<button type='submit' name='bt_cad_prod' class='btn' onclick=location.href='?page=./contato/mensagem'><i class="fa fa-plus"></i>
</button>
</div>
<div class='panel-body'>
<form id='frm_pesq' method='post' action="modulos/escola_almox/remessa_qtd" target="_blank">
<table class='tabe1 table table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0''>
<thead>
<tr>
<th>ID</th>
<th>Data</th>
<th>Assunto</th>
<th>Remetente</th>
<th>Destinatário</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
while ($row = mysql_fetch_array($rsResult)) {
$cod_id = $row['msg_id'];
$cod_es = $row['esc_id'];
echo "<tr>";
if ($row['mse_lida']==0) {
echo "<td style='font-weight: bold; font-size: 13px;'>" . $row['msg_id'] . "</td>";
echo "<td style='font-weight: bold; font-size: 13px;'>" . date('d/m/Y', strtotime($row['msg_data'])) . "</td>";
echo "<td style='font-weight: bold; font-size: 13px;'>" . $row['msg_assunto'] . "</td>";
echo "<td style='font-weight: bold; font-size: 11px;'>" . $row['usu_usuario'] . "</td>";
echo "<td style='font-weight: bold; font-size: 11px;'>" . utf8_encode($row['esc_nome']) . "</td>";
} else {
echo "<td>" . $row['msg_id'] . "</td>";
echo "<td>" . date('d/m/Y', strtotime($row['msg_data'])) . "</td>";
echo "<td>" . $row['msg_assunto'] . "</td>";
echo "<td>" . $row['usu_usuario'] . "</td>";
echo "<td>" . utf8_encode($row['esc_nome']) . "</td>";
}
echo "<td><a href='?page=escola_almox/mensagem_ver&cod_msg=$cod_id' onclick='ins_vali($cod_id,$cod_es)'> <em class='fa fa-eye'
title='visualizar mensagem'/></a></td>";
if ($row['mse_lida']==0) {
echo "<td>
<a href='#' id='vvali" . $cod_id . "' onclick='ins_vali($cod_id,$cod_es),location.reload()'><img src='img/off.png' width='13' title='clique para marcar como lida'/></a>
</td>";
} else {
echo "<td><img src='img/on.png' width='13' title='marcada como lida'/></td>";
}
echo "</tr>";
}
?>
</tbody>
</table>
</form>
</div>
</div>
</div>
</html>