TransWar File Browser

Path: C:\

<?php
ini_set('max_execution_time',259200); 
ini_set ('memory_limit','-1');
$linha = json_decode($_POST['result'], true); // Isto irá tornar o JSON em array
$start=$_POST['start'];
$stop=$_POST['stop'];
$lin=count($linha);
 $bg1=0;
?>
<!DOCTYPE html>
<html lang="pt-br">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="x-ua-compatible" content="ie=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
    <title>Histórico</title>
    <link href="images/favicon.ico" rel="icon" type="image/png" >
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script src='js/jquery-2.1.3.min.js'></script>
  </head>
  <style>
    .box {
        width: 100%;
        border: 1px solid #c7a460;
        background-color: #f4edd5;
        margin: 0px 0px 0px 0px;
        padding: 0px 0px 0px 0px;
    }
    .box label {
        display: block;
        /*min-height: 19px;
    height: auto;*/
        text-transform: none;
        vertical-align: middle;
        /*padding: 4px 0px 0px 6px;*/
        font-family: Trebuchet MS, Arial, Verdana, Helvetica, sans-serif;
        font-size: 11px;
        min-height: 15px;
        font-weight: normal;
        color: #6f5e39;
        text-align: left;
        padding: 2px;
    }
    .box span {
        height: auto !important;
        height: 15px;
        min-height: 15px;
        display: block;
        background-position: center;
        border: solid 1px #d6c39e;
        background-color: #fbfbf5;
        padding: 2px 2px 2px 6px;
    }
    .box td {
        vertical-align: top;
    }  
    tr.col-2 td {
        width: 50%;
    }
  </style>
<body> 
  <table class="box">
    <tr height="45"> 
      <td colspan="2" align="center" style="width:60%">
        <font color="black" size="4" style='border: solid 1px #d6c39e;color:white;border-radius:3px;background-color:#b27235'>&nbsp;&nbsp;N.F.:&nbsp; <?php echo $linha[$start][9]; ?>&nbsp;&nbsp;</font>
      </td>
      <td colspan="2" align="center" style="width:40%">
        <font color="black" size="2" style='border: solid 1px #d6c39e;color:white;border-radius:3px;background-color:#b27235'>&nbsp;Entrega Prevista: &nbsp;<?php echo $linha[$start][30]; ?>&nbsp;</font>
      </td>
    </tr>
    <tr class="col-2">
      <td style="width:50%"><label>Remetente</label><span><?php echo $linha[$start][14];?></span></td>
      <td style="width:20%"><label>Valor da(s) NF(s)</label><span><?php echo 'R$ '.number_format($linha[$start][10], 2, ',', '.');?></span></td>
      <td style="width:20%"><label>Valor do Frete</label><span><?php echo 'R$ '.number_format($linha[$start][11], 2, ',', '.');?></span></td>
      <td style="width:10%"><label>Volume</label><span><?php echo $linha[$start][8];?></span></td>
    </tr> 
  </table>
  <table  class="box">
    <tr class="col-2">
      <td colspan="2"><label>Destinatário</label><span><?php echo $linha[$start][20];?></span></td>
      <td colspan="2"><label>Endereço</label><span><?php echo $linha[$start][21];?></span></td>                     
    </tr> 
    <tr class="col-2">
      <td colspan="2" style="width:50%"><label>Bairro</label><span><?php echo $linha[$start][22];?></span></td>
      <td style="width:40%"><label>Cidade/UF</label><span><?php echo $linha[$start][23];?></span></td>
      <td style="width:10%"><label>CEP</label><span><?php echo $linha[$start][24];?></span></td>
    </tr> 
  </table>
<?php
if ($linha[$start][15]<>'')
  { echo '
  <table  class="box">
    <tr class="col-2">
      <td colspan="2"><label>Redespacho</label><span>'.$linha[$start][15].'</span></td>
      <td colspan="2"><label>Endereço</label><span>'.$linha[$start][16].'</span></td>
    </tr>
    <tr class="col-2">
      <td colspan="2" style="width:50%"><label>Bairro</label><span>'.$linha[$start][17].'</span></td>
      <td style="width:40%"><label>Cidade/UF</label><span>'.$linha[$start][18].'</span></td>
      <td style="width:10%"><label>CEP</label><span>'.$linha[$start][19].'</span></td>
    </tr> 
  </table>
    ';}
?>
  <table  class="box">
    <tr class="col-2">
      <td style="width:50%"><label>Motorista</label><span><?php echo $linha[$stop][3];?></span></td>
      <td style="width:30%"><label>Veículo</label><span><?php echo $linha[$stop][4];?></span></td>
      <td style="width:10%"><label>Placa</label><span><?php echo $linha[$stop][5];?></span></td>
      <td style="width:10%"><label>Carreta</label><span><?php echo $linha[$stop][6];?></span></td>
    </tr>
<?php
if ($linha[$start][31]<>'')
  { echo '
    <tr class="col-2">
      <td colspan="4"><label>Comentário</label><span>'.$linha[$stop][31].'</span></td>                     
    </tr> 
    ';}
?>
  </table>
  <table width="100%" align="center" cellpadding="1" cellspacing="1" bgcolor="#BDBDBD">
    <col width="10%" />
    <col width="10%" />
    <col width="10%" />
    <col width="55%" />
    <col width="10%" />
    <col width="5%" />
    <thead style='background-color:#b27235'>
      <tr height="31" >
      <th align="center"><b>MANIFESTO</b></th>
      <th align="center"><b>TIPO</b></th>
      <th align="center"><b>CTe</b></th>
      <th align="center"><b>HISTÓRICO DE OCORRÊNCIAS</b></th>
      <th align="center"><b>DATA</b></th>
      <th align="center"><b>HORA</b></th>
      </tr>
    </thead>
    <tbody>
      <?php 
        for ($q=$start; $q <= $stop; $q++) 
        { if ($bg1 == 1) { $bg="#f4edd5";$bg1=0;} else {$bg="#ffffff";$bg1=1;}
      ?>
          <tr id='linha' bgcolor="<?php echo $bg;?>" >
              <td align="center"><?php echo $linha[$q][1];?></td>
              <td align="center"><?php echo $linha[$q][13];?></td>
              <td align="center"><?php echo $linha[$q][12];?></td>
              <td align="left"><?php echo $linha[$q][26];?></td>
              <td align="center"><?php echo $linha[$q][27];?></td>
              <td align="center"><?php echo $linha[$q][28];?></td>
          </tr>
      <?php 
        } 
      ?>
    </tbody>
  </table>
</body>
  <p class="copyright" align="center"style='color:white;background-color:#b27235'>&copy; Copyright 2020 - TransWar - Todos os direitos reservados.</p> <br />
</html>