| 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/juridico/chorozinho/modulos/usuario/ |
Upload File : |
<?PHP
ini_set('display_errors', 'off');
//$conn = conexao::getInstance();
$usu = $conn->query("select * from v_lista_usuarios");
?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-br">
<head>
<script type="text/javascript">
function excluir_registro(e) {
if (!confirm('Deseja realmente excluir este registro?')) {
if (window.event)
window.event.returnValue = false; else
e.preventDefault();
}
}
</script>
</head>
<body style="padding-top: 40px;"/>
<div id='id_grid' class='container'>
<p style='font-size: 20px;'>Usuários | Listagem
<!--verifica se usuário tem permissão de administrador-->
<?php
if ($direito=="1") {
echo("
<button type='submit' name='bt_cad_prod' class='btn btn-primary btn-xs'
onclick=location.href='?page=usuario/usuario_cad'><span class='fa fa-plus-square'></span> Novo
</button>
");
}
?>
</p>
<div class='panel panel-body panel-primary filterable'>
<form id='frm_pesq' method='post'>
<table id='tabela' class='dtabelas table table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr>
<th>ID</th>
<th>Usuario</th>
<th>Login</th>
<th>E-mail</th>
<th>Profissão</th>
<th>Admin</th>
<th width="2%"></th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
while ($u = $usu->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $u->usu_id . "</td>";
echo "<td>" . $u->nome . "</td>";
echo "<td>" . $u->usu_usuario . "</td>";
echo "<td>" . $u->usu_mail . "</td>";
echo "<td>" . $u->profissao . "</td>";
$adm = $u->usu_admin==1 ? 'SIM' : 'NÃO';
echo "<td>" . $adm . "</td>";
echo "<td><a class='j80' href='index2.php?page=usuario/usuario_edit&cod_usu=$u->usu_id'><em class='fa fa-edit text-green' title='Editar registro'/></a></td>";
echo "<td><a href='?page=usuario/usuario_crud&cod_usu=$u->usu_id&var_acao=excluiru'><em class='fa fa-trash text-red' title='Excluir registro'/></a></td>";
echo "</tr>";
}
?>
</tbody>
</table>
</form>
</div>
</div>
</html>