Path: C:\
<?php
$resultado=sqlsrv_query($conn2,"SELECT * FROM dbo.usuarios ORDER BY 'nome'", array(), array( "Scrollable" => SQLSRV_CURSOR_KEYSET ));
$linhas=sqlsrv_num_rows($resultado);
?>
<aside role="complementary" class="col-md-9">
<div class="page-header">
<h2>Lista de Usuários</h2>
</div>
<div class="row">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Nome</th>
<th>E-mail</th>
<th>Setor de Acesso</th>
<th>Ações</th>
</tr>
</thead>
<tbody align="left">
<?php
$array = array("Geral", "Setor 1", "Setor 2", "Setor 3", "Setor 4", "Setor 5");
while($linhas = sqlsrv_fetch_array($resultado, SQLSRV_FETCH_ASSOC)){
echo "<tr>";
echo "<td>".$linhas['id']."</td>";
echo "<td>".$linhas['nome']."</td>";
echo "<td>".$linhas['email']."</td>";
echo "<td>".$array[$linhas['nivel_acesso_id']]."</td>";
?>
<td>
<a href='main.php?link=4&id=<?php echo$linhas['id']; ?>'><button type='button' class='btn btn-xs btn-primary'>Visualizar</button></a>
<?php if ($_SESSION['usuarioNivelAcesso'] == 0) {
echo "<a href='main.php?link=3&id=".$linhas['id']."'><button type='button' class='btn btn-xs btn-warning'>Editar</button></a>
<a href='processa/proc_apaga_usuario.php?id=".$linhas['id']."'><button type='button' class='btn btn-xs btn-danger' onclick=\"return confirm('Certeza que quer apagar esse Usuário?');\">Apagar</button></a>";
}?>
</td><?php
echo "</tr>";
}
?>
</tbody>
</table>
</div>
</div>
</aside>