<?php
include 'header.php';
include 'erpc_clientes_categorias_toolbar.php';
include_once 'connect.php';

if(isset($_GET['id'])){
    $id = base64_decode($_GET['id']);
}
$sql = "select ds_categoria from erpc_clientes_categorias where id = $id";

$result = mysqli_query($conexao, $sql) or die ($conexao);

if(mysqli_num_rows($result)>0){
    while($registro = mysqli_fetch_assoc($result)){
        $ds_categoria = $registro['ds_categoria'];
    }
} 


?>

<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
  
  <!--
  <li role="presentation"><a href="#form2" aria-controls="form2" role="tab" data-toggle="tab">Form #2</a></li>
  <li role="presentation"><a href="#form3" aria-controls="form3" role="tab" data-toggle="tab">Form #3</a></li>
  <li role="presentation"><a href="#form4" aria-controls="form4" role="tab" data-toggle="tab">Form #4</a></li>
  -->
</ul>

<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane fade in active" id="form1">
<form id=validate_custom method=POST action="erpc_clientes_categoria_ws.php">
  <div class=block>
    <div class=header>
      <h2>Incluir Categoria de Cliente:</h2>
    </div>


      <div class="content controls">
      <input hidden name='id_categoria' value="<?=$id; ?>" />
  	  <div class=form-row>
          <div class=col-md-3>Descrição da Categoria:</div>
          <div class=col-md-6><input readonly type=text name="ds_cliente_categoria" value="<?=$ds_categoria; ?>" class="form-control" maxlength=100 class="validate[required]"/> </div>
        </div>
      </div>
  	  

    <div class=footer>
      <div class="side pull-right">
        <div class=btn-group>
		        <button class="btn btn-default" type="button" onClick="window.history.go(-1)" value="Voltar">Voltar</button>
            <button class="btn btn-success" type="submit" value="excluir" name="excluir">Excluir</button>
			  <!--botao antigo
		<button class="btn btn-default" type=button onClick="$('#validate_custom').validationEngine('hide');">Hide prompts</button>            <button class="btn btn-success" type=submit>Submit</button>
		-->
		    </div>
      </div>
    </div>

  </div>
</form>

  </div>

</div>


<?php include 'footer.php'; ?>
