<?php // PAGINA QUE LISTADOR DE RESULTADOS DA PESQUISA DOS CLIENTES // ************************************* include "../../controlles/main.php"; if (!empty($_GET["valor"])) { $buscarCliente = buscarCliente($_GET["valor"]); if (count($buscarCliente) == 0) { echo "<p class='label label-danger' style='font-size: 16px'>Nada Encontrado Referente a Busca!</p>"; } else { ?> <html> <body> <p class="label label-info" style="font-size: 16px;">Resultados da Busca:<?php echo ' ' . count($buscarCliente) . ' Registro(s) Encontrado(s).'; ?> </p> <div class="box-body table-responsive no-padding"> <table class="table table-hover"> <tr> <th>Nome</th> <th>CPF/CNPJ</th> <th>Telefones</th> <th>Endereço</th> <th>E-Mail</th> <th>Data Cadastro</th> <th>Situação</th> <th></th> </tr> <?php foreach ($buscarCliente as $linha) {
} else { $msj = 30; header('Location:../view/cliente.php?clienteId=' . $objCliente->id . '&msj=' . $msj); } } elseif ($action == "buscar") { $objCliente = new Cliente(); $objCliente->nombre = $_POST['nombre']; $objCliente->id = $_POST['codigo']; $objCliente->documento = $_POST['documento']; if (isset($_POST['estado'])) { $objCliente->activo = $_POST['estado']; } if ($objCliente->activo == "off") { $resultadoCliente = buscarTodos($objCliente); } else { $resultadoCliente = buscarCliente($objCliente); } if ($resultadoCliente == TRUE) { include '../View/ListaClientes.php'; } else { $msj = 40; header('Location:../view/BusquedaCliente.php?msj=' . $msj); } } if (!empty($clienteId)) { $objCliente = new Cliente(); $objCliente->id = $clienteId; $resultadoCliente = consultarCliente($objCliente); } function mostrarDesactivados() {