예제 #1
0
파일: home.php 프로젝트: vitorgja/Fatec-rl
 public function listar()
 {
     require_once "model/usuarioDAO.php";
     $dao = new UsuarioDAO();
     $vetor = $dao->listar();
     require_once "view/view.php";
     $view = new View();
     $view->listarUsuarios($vetor);
 }
			<th>E-mail</th>
			<th>Permissão</th>
			<th>Ação</th>
		</tr>
		</thead>
		<!-- Busca usuários cadastrados no banco -->
		<!-- Se a pesquisa foi acionada, busca por nome, senão lista todos -->
		<tbody>
		<?php 
if (!$usuarioDao) {
    $usuarioDao = new UsuarioDAO();
}
if (isset($_GET["nPesquisa"])) {
    $lista = $usuarioDao->buscaPorNome($_GET["nPesquisa"]);
} else {
    $lista = $usuarioDao->listar();
}
/* Imprime na tabela em HTML os usuários encontrados */
foreach ($lista as $indice => $usuario) {
    ?>
			<tr>
				<td><?php 
    echo "{$usuario->nome} {$usuario->sobrenome}";
    ?>
</td>
				<td><?php 
    echo $usuario->email;
    ?>
</td>
				<td><?php 
    if ($usuario->admin == 0) {
예제 #3
0
파일: index.php 프로젝트: hexti/troncal
}
?>
						
						<table class="table table-striped table-bordered bootstrap-datatable datatable">
						  <thead>
							  <tr>
								  <th>Nome</th>
								  <th>Empresa</th>
								  <th width="10%">Grupo</th>
								  <th>Email</th>
								  <th>A&ccedil;&atilde;o</th>
							  </tr>
						  </thead>   
						  <tbody>
							<?php 
$DAO->listar();
?>
						  </tbody>
					  </table>            
					</div>
				</div>
			</div>
					
					<!-- content ends -->
			</div><!--/#content.span10-->
				</div><!--/fluid-row-->
				
		<hr>

		<?php 
include_once '../../footer.php';
예제 #4
0
<?php

$dao = new UsuarioDAO();
$listaUsuarios = $dao->listar();