Arquivos já criados em sala
This commit is contained in:
145
Example/Telas/listCliente.php
Normal file
145
Example/Telas/listCliente.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
//include '../Includes/valida_sessao.inc';
|
||||
header("Content-Type: text/html; charset=utf-8", true);
|
||||
require_once("../Controle/ControleCliente.php");
|
||||
$objCliente = new Cliente;
|
||||
if (isset($_GET["letra"])){
|
||||
$valor = $_GET["letra"];
|
||||
}else{
|
||||
$valor = "a";
|
||||
}
|
||||
$objClientes = $objCliente->buscarWhere("nome", "letra", $valor, "nome", "");
|
||||
$contador = count($objClientes);
|
||||
?>
|
||||
<!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"
|
||||
}
|
||||
function novo(){
|
||||
location.href = 'cadCliente.php';
|
||||
}
|
||||
function voltar(){
|
||||
location.href = 'index.php';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="menuInterno">
|
||||
<?php
|
||||
//include '../Includes/MenuPrincipal.php';
|
||||
?>
|
||||
</div>
|
||||
<fieldset id="IniciaisCliente">
|
||||
<a href="listCliente.php?letra=a" class="gmailButton">A</a>
|
||||
<a href="listCliente.php?letra=b" class="gmailButton">B</a>
|
||||
<a href="listCliente.php?letra=c" class="gmailButton">C</a>
|
||||
<a href="listCliente.php?letra=d" class="gmailButton">D</a>
|
||||
<a href="listCliente.php?letra=e" class="gmailButton">E</a>
|
||||
<a href="listCliente.php?letra=f" class="gmailButton">F</a>
|
||||
<a href="listCliente.php?letra=g" class="gmailButton">G</a>
|
||||
<a href="listCliente.php?letra=h" class="gmailButton">H</a>
|
||||
<a href="listCliente.php?letra=i" class="gmailButton">I</a>
|
||||
<a href="listCliente.php?letra=j" class="gmailButton">J</a>
|
||||
<a href="listCliente.php?letra=k" class="gmailButton">K</a>
|
||||
<a href="listCliente.php?letra=l" class="gmailButton">L</a>
|
||||
<a href="listCliente.php?letra=m" class="gmailButton">M</a>
|
||||
<a href="listCliente.php?letra=n" class="gmailButton">N</a>
|
||||
<a href="listCliente.php?letra=o" class="gmailButton">O</a>
|
||||
<a href="listCliente.php?letra=p" class="gmailButton">P</a>
|
||||
<a href="listCliente.php?letra=q" class="gmailButton">Q</a>
|
||||
<a href="listCliente.php?letra=r" class="gmailButton">R</a>
|
||||
<a href="listCliente.php?letra=s" class="gmailButton">S</a>
|
||||
<a href="listCliente.php?letra=t" class="gmailButton">T</a>
|
||||
<a href="listCliente.php?letra=u" class="gmailButton">U</a>
|
||||
<a href="listCliente.php?letra=v" class="gmailButton">V</a>
|
||||
<a href="listCliente.php?letra=w" class="gmailButton">W</a>
|
||||
<a href="listCliente.php?letra=x" class="gmailButton">X</a>
|
||||
<a href="listCliente.php?letra=y" class="gmailButton">Y</a>
|
||||
<a href="listCliente.php?letra=z" class="gmailButton">Z</a>
|
||||
</fieldset>
|
||||
<fieldset id="buscarCliente">
|
||||
<legend>Buscar Cliente</legend>
|
||||
<form action="buscaCliente.php" method="get">
|
||||
<input size="40" type="text" name="cliente" placeholder="Digite o nome do cliente para busca..." />
|
||||
<input type="submit" value="Buscar!" />
|
||||
</form>
|
||||
</fieldset>
|
||||
<table class="list">
|
||||
<tr>
|
||||
<th width="13%" class="titulo" >Nome</th>
|
||||
<th width="23%" class="titulo" >Endereço</th>
|
||||
<th width="5%" class="titulo" >Telefone</th>
|
||||
<th width="5%" class="titulo" >Celular</th>
|
||||
<th width="13%" class="titulo" >Email</th>
|
||||
<th width="7%" class="titulo" >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
|
||||
if ($objCliente->get('logradouro') != "") {
|
||||
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
|
||||
if ($objCliente->get('datNascimento') != "00/00/0000") {
|
||||
echo $objCliente->get('datNascimento');
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<table class="acao">
|
||||
<tr>
|
||||
<form id="alterar" name="alterar" method="post" action="altCliente.php">
|
||||
<td>
|
||||
<input name="codCliente" type="hidden" id="codCliente" value="<?php echo $objCliente->get('codCliente'); ?>" />
|
||||
<input type="image" class="acaoLista" src="../Imagens/alterar.png" name="Submit" value="Alterar" class="botaoAcao" title="Alterar"/>
|
||||
</td>
|
||||
</form>
|
||||
<form id="excluir" name="excluir" method="post" action="excCliente.php">
|
||||
<td>
|
||||
<input name="codCliente" type="hidden" id="codCliente" value="<?php echo $objCliente->get('codCliente'); ?>" />
|
||||
<input type="image" class="acaoLista" src="../Imagens/excluir.png" name="Submit2" value="Excluir" class="botaoAcao" title="Excluir"/>
|
||||
</td>
|
||||
</form>
|
||||
<form id="ordens" name="ordens" method="post" action="listOrdem.php?campo=cliente&valorBusca=<?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/list.png" name="Submit3" value="Ordens" class="botaoAcao" title="Listar Ordens de Serviço"/>
|
||||
</td>
|
||||
</form>
|
||||
<form id="ordens" name="criatermo" method="get" action="cadTermoCompromisso.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="addTermo" title="Criar Termo"/>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user