<?php
include 'header.php';
include 'erpc_dom_status_solicitacao_compra_toolbar.php';
include 'connect.php';

$id_crip = $_GET['id'];
$id = base64_decode($id_crip);
?>


<!-- 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_dom_status_solicitacao_compra_ws.php">
  <input type="hidden" value="<?php echo $id; ?>" name="id" id="id">

  <div class=block>
    <div class=header>
      <h2>Editar Status de Solicitação de Compra</h2>
      <div class="side pull-right"> <button class="btn btn-default btn-clean" onClick="clear_form('#validate_custom');" type=button>Clear form</button>      </div>
    </div>

    <div class="content controls">
	<?php
		$consulta = "select * from erpc_status_solicitacao_compra where id = '$id' and st_ativo =1";

		$resultado = mysqli_query($conexao, $consulta) or die ($erro = mysqli_error($conexao));
		if (mysqli_num_rows($resultado)>0) {
		while ($registro = mysqli_fetch_assoc($resultado)){

			$ds_status	= $registro['ds_status'];
			}
		}
	?>
	<div class=form-row>
        <div class=col-md-3>Descrição do Status de Solicitação de Compra:</div>
        <div class=col-md-6><input type=text name="ds_status" value="<? echo $ds_status?>" class="form-control" class="validate[required]" maxlength=100 /> </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="editar" onClick="$('#validate_custom').validationEngine('hide');" name="editar">EDITAR</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';?>
