Path: C:\
<?php
date_default_timezone_set('America/Sao_Paulo');
$dateadded = date("d/m/Y -- G:i");
$erro='Sem Erro';$achou='S';$a=0;
?>
<!DOCTYPE html>
<html lang='pt-br'>
<head>
<meta charset='utf-8'/>
<meta http-equiv="pragma" content="no-cache">
<meta content='width=device-width, initial-scale=1, maximum-scale=1' name='viewport'>
<title>TransWar</title>
<link rel='icon' type='image/png' href='images/favicon.ico'>
<link href='css/bootstrap.min.css' rel='stylesheet'>
<link href='css/bootstrap-theme.min.css' rel='stylesheet'>
<link href='css/theme.css' rel='stylesheet'>
<link href='css/signin.css' rel='stylesheet'>
<script src='js/jquery.min.js'></script>
<script src='js/ie-emulation-modes-warning.js'></script>
</head>
<style >
table:nth-child(even) {
border: 1px solid #d4d4d4}
td:nth-child(even) {
border: 1px solid #d4d4d4}
tr:nth-child(even) {
border: 1px solid #d4d4d4}
td {
padding: 1px 30px;
}
</style>
<body role='document'>
<div class='container '>
<?php
echo "<div class='col-sm-12' align='center'><table width='100%'><tr><td><h2>Gerar PDF e XML de Nota Fiscal Eletrônica.</h2></td></tr> <tr><td height='30' background='images/top-menubg.gif' > ";
echo $dateadded;
echo "</td> </tr></table></div>";
?>
<div class='col-md-12'>
<form method='post' action=''>
<label class='col-sm-2' align="right">Chave da NFe:</label>
<div class='col-sm-5' align="left">
<?php if (isset($_POST['chave'])) { $chave = $_POST['chave'];} else{$chave="";} ?>
<input id="chave" type="text" class='form-control' size="45" maxlength="45" name='chave' value='<?php echo $chave;?>' required autofocus>
</div>
<div class='col-sm-5'>
<button type='submit' class='btn btn-success'>OK</button>
</div>
</form>
</div>
<div class='col-md-12' align='center'>
<?php
if (isset($_POST['chave']))
{
$chave=$_POST['chave'];
$nrNF= substr($chave, 26, 8);
include "consulta1.php";
header('Content-Type: text/html; charset=utf-8');
echo '<tr><td><font color="red">PDF da Nota Fiscal ➔ '.$nrNF;
if ($achou=='S')
{ echo '➔ OK</font></td></tr>';
echo" <div class='col-md-12' align='center'><form method='POST' action=''>
<tr>
<td>
<button type='submit' class='btn btn-primary'><a style='color:white;' href='".$arquivo."' download>Baixar PDF</a>
</button>
</td>
<td>
<button type='submit' class='btn btn-warning'><a style='color:white;' href='".$arquivo2."' download>Baixar XML</a>
</button>
</td>
</tr><tr><h2>↓ ↓</h2></tr>
</form></div>";
}
else
{ echo '➔ Não Encontrada</font></td></tr>';}
}
?>
</div><div></div>
</div>
</body>
<p class="copyright" align="center">© Copyright 2018 TransWar - Todos os direitos reservados. Versão 1.0</p>
<br />
<script src='js/bootstrap.min.js'></script>
<script src='js/docs.min.js'></script>
</html>