D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
novonote_ant
/
adm
/
app
/
gre
/
Views
/
Cliente
/
Filename :
VieListarCliente.php
back
Copy
<?php if (!defined('URL')) { header("Location: /"); exit(); } //var_dump($this->Dados['botao']); ?> <style> .table td, .table th { padding: 2px !important; font-size: 0.9rem !important; vertical-align: middle !important; } .fit-content { width: fit-content; } </style> <div class="content"> <div class="list-group-item"> <div class="d-flex align-items-center justify-content-between"> <div class="mr-auto p-2"> <h2 class="display-4 titulo">Listar Clientes</h2> </div> <?php if ($this->Dados['botao']['cad_cliente']) { ?> <a href="<?php echo URLADM . 'cliente-cadastrar/cad-cliente'; ?>"> <div class="p-2"> <button class="btn btn-outline-success btn-sm"> Cadastrar </button> </div> </a> <?php } ?> </div> <?php if (empty($this->Dados['listCliente'])) { ?> <div class='alert alert-success alert-dismissible fade show' role='alert'> Nenhum Cliente encontrado! <button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'> </button> </div> <?php } if (isset($_SESSION['msg'])) { echo $_SESSION['msg']; unset($_SESSION['msg']); } ?> <div class="table-responsive"> <table class="table table-striped table-hover table-bordered"> <thead class="text-center"> <tr> <th class="d-none d-lg-table-cell">ID</th> <th>Nome</th> <th>Tipo Cliente</th> <th class="d-none d-lg-table-cell">Documento</th> <th class="d-none d-lg-table-cell">Município</th> <th>Situação</th> <th width="250px" class="text-center">Ações</th> </tr> </thead> <tbody> <?php foreach ($this->Dados['listCliente'] as $cliente) { extract($cliente); ?> <tr> <th class="d-none d-lg-table-cell text-center"><?php echo $id; ?></th> <td> <?php echo $nome; ?> </td> <td class="text-center"> <?php echo $nome_tipo_pessoa; ?> </td> <?php if ($gre_tipo_id == 1){ ?> <td class="d-none d-sm-table-cell text-center"><?php echo $cnpj; ?></td> <td class="d-none d-sm-table-cell"><?php echo $municipio; ?></td> <?php }else{ ?> <td class="d-none d-sm-table-cell text-center"><?php echo $cpf; ?></td> <td class="d-none d-sm-table-cell"><?php echo $municipio; ?></td> <?php } ?> <td class="text-center"> <span class="badge bg-<?php echo $cor_cr; ?>"><?php echo $nome_sit; ?></span> </td> <td class="text-center"> <span class="d-none d-md-block"> <?php if ($this->Dados['botao']['vis_cliente']) { echo "<a href='" . URLADM . "cliente-ver/ver-cliente/$id' class='btn btn-outline-primary btn-sm'>Visualizar</a> "; } if ($this->Dados['botao']['edit_cliente']) { echo "<a href='" . URLADM . "cliente-editar/edit-cliente/$id' class='btn btn-outline-warning btn-sm'>Editar</a> "; } if ($this->Dados['botao']['inat_cliente']) { if($gre_sit_id == 1){ echo "<a href='#' class='btn btn-outline-danger btn-sm' onclick='confirmarInativar(\"" . URLADM . "cliente-inativar/inat-cliente/?opcao=I&id=$id\", \"$nome\")'>Inativar</a>"; }else{ echo "<a href='#' class='btn btn-outline-primary btn-sm' onclick='confirmarAtivar(\"" . URLADM . "cliente-inativar/inat-cliente/?opcao=A&id=$id\", \"$nome\")'>Ativar</a>"; } } ?> </span> <div class="dropdown d-block d-md-none"> <button class="btn btn-primary dropdown-toggle btn-sm" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false"> Ações </button> <div class="dropdown-menu dropdown-menu-left" aria-labelledby="dropdownMenuLink"> <?php if ($this->Dados['botao']['vis_cliente']) { echo "<a class='dropdown-item' href='" . URLADM . "cliente-ver/ver-cliente/$id'>Visualizar</a>"; } if ($this->Dados['botao']['edit_cliente']) { echo "<a class='dropdown-item' href='" . URLADM . "cliente-editar/edit-cliente/$id'>Editar</a>"; } if ($this->Dados['botao']['inat_cliente']) { if($gre_sit_id == 1){ echo "<a href='#' style='text-decoration: none !important;' class='dropdown-item' onclick='confirmarInativar(\"" . URLADM . "cliente-inativar/inat-cliente/?opcao=I&id=$id\", \"$nome\")'>Inativar</a>"; }else{ echo "<a href='#' style='text-decoration: none !important;' class='dropdown-item' onclick='confirmarAtivar(\"" . URLADM . "cliente-inativar/inat-cliente/?opcao=A&id=$id\", \"$nome\")'>Ativar</a>"; } } ?> </div> </div> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div>