<?php
ob_start();
clearstatcache();
include "connect.php";

if(isset($_GET['nr_comanda'])){
    //$id_comanda = base64_decode($_GET['id_comanda']);  
    $nr_comanda = $_GET['nr_comanda'];
    $id_unidade = $_GET['id_unidade'];
    $sql = "update erpc_comanda set st_impressao = 1 where nr_comanda = '$nr_comanda' and id_unidade = '$id_unidade';";
    mysqli_query($conexao, $sql);
}

?>
<!DOCTYPE html> 
<html> 
	<head>
  <meta charset="UTF-8">	
	<title>ERPC Code</title> 
	
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="jquery.mobile.structure-1.0.1.css" />
	<link rel="apple-touch-icon" href="images/launch_icon_57.png" />
	<link rel="apple-touch-icon" sizes="72x72" href="images/launch_icon_72.png" />
	<link rel="apple-touch-icon" sizes="114x114" href="images/launch_icon_114.png" />
	<link rel="stylesheet" href="jquery.mobile-1.0.1.css" />
	<link rel="stylesheet" href="custom.css" />
	
	
	<script src="js/jquery-1.7.1.min.js"></script>
	<script src="js/jquery.mobile-1.0.1.min.js"></script>
	<script src="js/comanda_nav.js"></script>
	

</head> 

<body> 
<div data-role="page" id="home" data-theme="c">

	<div data-role="content">
	
	<div id="branding">
		<h1>Sistema de Comandas</h1>
	</div>
	
	<div class="choice_list"> 
	<h1> INFORME A COMANDA</h1>
   <form action="erpc_comanda_categorias.php?teste=1" method="post" > 
   
    <input required type="number" min="1" step="1" name="id_comanda" id="id_comanda" />
    <!--input hidden name="redirect" id="redirect" value="2" /-->
    <input type="submit" value ="Cadastrar/Acessar comanda" name="comanda" id="comanda" />
  </form>
    <button value="Listar comanda" name="btn-list" id="btn-list">Listar Comanda</button>
    
  <br/>
  <br/>
  <br/>
            Desenvolvimento: <a href="http://www.codecrm.com.br/" title="Code Tecnologia">Code Tecnologia</a>	</div>
</div>

</div><!-- /page -->
</body>
</html>
