admin" class="btn btn-danger glyphicon glyphicon-cog" style="float: right; margin: 25px;"></a> <div class="panel"> <table class="table table-striped table-hover table-bordered"> <thead> <tr> <th>Unidades</th> <th>Todos as impressoras</th> <th>Impressoras Pendentes</th> <th>Ações</th> </tr> </thead> <tbody> <?php $AdPostos->ListAdmin(); foreach ($AdPostos->getResult() as $imp) { extract((array) $imp); ?> <tr class="text-center" <?php echo !$cont ? "class='danger'" : ""; ?> > <td> <a href="<?php echo IMP_INCLUDE . $postos_id; ?> " class="text-capitalize"><?php echo strtolower($postos_nome); ?> </a> </td>
$Dados = filter_input_array(INPUT_POST, FILTER_DEFAULT); if (isset($Dados) && $Dados['SendPostForm']) { $Dados['postos_ativo'] = $Dados['SendPostForm'] == "Cadastrar" ? '0' : '1'; unset($Dados["SendPostForm"]); $AdminPostos = new AdminPostos(); if (in_array("", $Dados)) { WSErro("Preencha todos os campos!", WS_ALERT); } elseif (!is_numeric($Dados['postos_numero'])) { WSErro("O Campo <b>Numero</b>, deve ser um valor numerico.", WS_ERROR); } elseif ($AdminPostos->getPostoNumero($Dados['postos_numero'])) { $posto = $AdminPostos->getPostoNumero($Dados['postos_numero']); WSErro("Posto <b>{$posto->postos_nome}</b> já existe, crie um novo posto!", WS_INFOR); } else { if ($AdminPostos->ExeCreate($Dados)) { WSErro("Cadastrado com sucesso!", WS_ACCEPT); header("Location: " . IMP_INCLUDE . "admin/&exe=postos/update&create=true&postoId=" . $AdminPostos->getResult()); } else { WSErro("Erro no cadastro!", WS_ERROR); } } } ?> <article> <h1>Criar Postos:</h1> <div class="row"> <form class="form col-md-offset-2 col-md-8" name="postos" method="post"> <div class="form-group"> <label>Nome:</label> <input name="postos_nome" type="text" placeholder="Nome" class="form-control" value="<?php echo $Dados['postos_nome'];