 <?php session_start(); ?>
 
<!DOCTYPE html>
<html>
<head>

<?php include_once 'head.html' ?>

<title></title>
</head>

<body>

<?php include_once 'header.php'; ?>

<h2>Área de importação de Arquivos</h2>
<hr>
<section>

<h4>Importar Pedidos do Softcom</h4>
	
<form action="script_php/importarpedidos.php" method="post" enctype="multipart/form-data">

Arquivo

	
	<fieldset>		

		<input type="file" value="Escolher arquivo" name="file" required=""> <p>

	<p></p>

			<input type="submit" name=""  class="btn btn-primary" value="Subir">
		
	</fieldset>

</form>

	</section>


<hr>

<?php

$query = "SELECT max(seqsoft) as importacao from pedidos;";
$result = mysqli_query($conexao, $query);
$row = mysqli_fetch_assoc($result);

$ultimo = $row['importacao']; 


?>

<h3>Última importação: [<?php echo $ultimo; ?>] </h3>
<hr>

<form action="script_php/excluir_importacao.php" method="post">

	<h5> Excluir importação </h5> 
	
	<fieldset>

	<label>
	<h5>Registro: </h5>
	</label>
	
		<label>
			<input type="number" name="sequencia" required>
		</label>

		<p></p>

		<label>
			<input type="submit"  class="btn btn-danger" value="Excluir">
		</label>



	</fieldset>



</form>




<hr>
<h4>Importar Notas Cadastradas no Softcom</h4>

<section>
	
	
<form action="script_php/importarchaves.php" method="post" enctype="multipart/form-data">

Arquivo

	<fieldset>


		<input type="file" value="Escolher arquivo" name="file" required=""> <p>

	<p></p>

			<input type="submit" name=""  class="btn btn-primary" value="Subir">
		
	</fieldset>

</form>

</section>

<?php include_once 'footer.php' ?>