Arquivos já criados em sala
This commit is contained in:
93
Example/Telas/buscaCliente.php
Normal file
93
Example/Telas/buscaCliente.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
//include '../Includes/valida_sessao.inc';
|
||||
require_once("../Controle/ControleCliente.php");
|
||||
//header("Content-Type: text/html; charset=utf-8", true);
|
||||
$nome = $_GET["cliente"];
|
||||
$objCliente = new Cliente;
|
||||
$objClientes = $objCliente->buscarPorNome($nome);
|
||||
$contador = count($objClientes)
|
||||
?>
|
||||
<!--Esta pagina recebera via GET uma parte do nome do cliente ou codigo do cliente e listará todas as entradas do banco com akeles criterios e retornara para a pagina ../Telas/locacao.php uma variavel nomeCliente contendo nome completo do cliente e codCliente contendo o codigo do cliente-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="../CSS/estilo.css" media="screen" />
|
||||
<title>Listar Clientes</title>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function mudar_cor_over(celula) {
|
||||
celula.style.backgroundColor = "#bbbbff"
|
||||
}
|
||||
function mudar_cor_out(celula) {
|
||||
celula.style.backgroundColor = "#ddddff"
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="menuInterno">
|
||||
<?php
|
||||
include '../Includes/MenuPrincipal.php';
|
||||
?>
|
||||
</div>
|
||||
<div id="geral">
|
||||
<div id="conteudo">
|
||||
<table cellspacing="2" cellpadding="2" class="list">
|
||||
<tr>
|
||||
<th width="18%" class="titulo">Nome</th>
|
||||
<th width="26%" class="titulo">Endereço</th>
|
||||
<th width="6%" class="titulo">Telefone</th>
|
||||
<th width="6%" class="titulo">Celular</th>
|
||||
<th width="11%" class="titulo">Email</th>
|
||||
<th width="5%" class="titulo">Data de Nascimento</th>
|
||||
<th width="5%" class="titulo">Ações</th>
|
||||
</tr>
|
||||
<?php
|
||||
for ($x = 0; $x < $contador; $x++) {
|
||||
$objCliente = $objClientes[$x];
|
||||
?>
|
||||
<tr id="<?php echo $objCliente->get('codCliente') ?>" onmouseover="mudar_cor_over(this)" onmouseout="mudar_cor_out(this)">
|
||||
<td><?php echo $objCliente->get('nome'); ?></td>
|
||||
<td><?php echo $objCliente->get('logradouro') . " " . $objCliente->get('numero') . ", " . $objCliente->get('bairro') . ", " . $objCliente->get('cidade') ?></td>
|
||||
<td><?php echo $objCliente->get('telefone') ?></td>
|
||||
<td><?php echo $objCliente->get('celular') ?></td>
|
||||
<td><?php echo $objCliente->get('email') ?></td>
|
||||
<td><?php echo $objCliente->get('datNascimento') ?></td>
|
||||
<td>
|
||||
<table class="acao">
|
||||
<tr>
|
||||
<form id="alterar" name="alterar" method="post" action="altCliente.php">
|
||||
<td width="50%">
|
||||
<input name="codCliente" type="hidden" id="codCliente" value="<?php echo $objCliente->get('codCliente'); ?>" />
|
||||
<input type="image" src="../Imagens/alterar.png" name="Submit" value="Alterar" />
|
||||
</td>
|
||||
</form>
|
||||
<form id="excluir" name="excluir" method="post" action="excCliente.php">
|
||||
<td width="50%">
|
||||
<input name="codCliente" type="hidden" id="codCliente" value="<?php echo $objCliente->get('codCliente'); ?>" />
|
||||
<input type="image" src="../Imagens/excluir.png" name="Submit2" value="Excluir" />
|
||||
</td>
|
||||
</form>
|
||||
<form id="ordens" name="ordens" method="post" action="listOrdem.php?campo=cliente&valorBusca=<?php echo $objCliente->get("codCliente"); ?>">
|
||||
<td width="50%">
|
||||
<input name="codCliente" type="hidden" id="codCliente" value="<?php echo $objCliente->get('codCliente'); ?>" />
|
||||
<input type="image" class="acaoLista" src="../Imagens/list.jpg" name="Submit3" value="Ordens" class="botaoAcao" />
|
||||
</td>
|
||||
</form>
|
||||
<form id="ordens" name="criaordem" method="get" action="cadOrdem.php?codCliente=<?php echo $objCliente->get("codCliente"); ?>" >
|
||||
<td>
|
||||
<input name="codCliente" type="hidden" id="codCliente" value="<?php echo $objCliente->get('codCliente'); ?>" />
|
||||
<input type="image" class="acaoLista" src="../Imagens/add.png" name="Submit" value="addMovimentacao" title="Criar OS"/>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div> <!--FIM DA DIV CONTEUDO-->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user