<?php
$local = "localhost";
$name = "root";
$pass = "";
$data = "reporte40dias";
$conexion = mysqli_connect($local,$name,$pass,$data);
	if(mysqli_connect_errno()){

		echo "Fallo al conectar con BBDD";

		exit();

		}

?>

<div class="row">
	<div class="col-sm-12">
    	<h2> Bitacora de Registro Amazon</h2>
    	<table class="table table-hover table-condensed table-bordered">
        	<caption>

                <button class="btn btn-primary" data-toggle="modal" data-target="#modalBuscar"> Buscar Datos
                <span class="glyphicon glyphicon-search"></span>
                </button>
								<button class="btn btn-success" data-toggle="modal" data-target="#modalAgregar">Agregar Archivos
			          		<span class="glyphicon glyphicon-upload"></span>
			          </button>
            </caption>
     <tr>
          <td>PO#</td>
          <td>SO#</td>
          <td>Ship-Date</td>
          <td>Scanlist-Date</td>
          <td>Part#</td>
          <td>Part-Desc</td>
          <td>Part-Type</td>
          <td>Qty</td>
          <td>Unite-Price</td>
          <td>Total-Price</td>
          <td>Case#</td>
          <td>Dim/Peso</td>
          <td>COO</td>
          <td>Invoice#</td>
          <td>Carrier</td>
          <td>TrackID</td>
          <td>Man/Way</td>
          <td>ShipTo</td>
          <td>CountryTo</td>
          <td>MOT</td>
          <td>Ship-Address</td>
          <td>Ship-Time</td>
          <td>Scanlist-Time</td>
          <td>Seal</td>
          <td>Scanlist</td>
          <td>Scanlist-Transmitted</td>
          <td>Service-Level</td>
          <td>Sap-Inovice</td>
          <td>UserID</td>
          <td>AssetID</td>
          <td>Unit-Serial</td>
          <td>Eco-Remolque</td>
          <td>Eta-Comitted</td>
          <td>Arrival-Date</td>
          <td>Est-Delivery</td>
          <td>Re-Program</td>
          <td>Uncreate</td>
          <td>Delivery-Date</td>
          <td>Signed-By</td>
          <td>Pod-File</td>
          <td>Is-Order</td>
          <td>DCO</td>
          <td>Accidente-Imputable/(No pagar flete)</td>
          <td>Real-Delivery</td>
          <td>Factura-Pagada</td>
          <td>Invoice-Sumary</td>
          <td>Fecha-Resumen</td>
          <td>Costo</td>
          <td>Comentarios</td>
          <td>Editar</td>
          <td>Eliminar</td>
      </tr>

          <?php

					mysqli_set_charset($conexion, "utf8");
             	$sql= "SELECT * FROM bitacora WHERE po ='2302048330' " ;

								$result = mysqli_query($conexion,$sql);
					        	while ($mostrar = mysqli_fetch_row($result))
								{

									
          ?>

      <tr>
					<td><?php echo $mostrar[0]?></td>
					<td><?php echo $mostrar[1]?></td>
					<td><?php echo $mostrar[2]?></td>
					<td><?php echo $mostrar[3]?></td>
					<td><?php echo $mostrar[4]?></td>
					<td><?php echo $mostrar[5]?></td>
					<td><?php echo $mostrar[6]?></td>
					<td><?php echo $mostrar[7]?></td>
					<td><?php echo $mostrar[8]?></td>
					<td><?php echo $mostrar[9]?></td>
					<td><?php echo $mostrar[10]?></td>
					<td><?php echo $mostrar[11]?></td>
					<td><?php echo $mostrar[12]?></td>
					<td><?php echo $mostrar[13]?></td>
					<td><?php echo $mostrar[14]?></td>
					<td><?php echo $mostrar[15]?></td>
					<td><?php echo $mostrar[16]?></td>
					<td><?php echo $mostrar[17]?></td>
					<td><?php echo $mostrar[18]?></td>
					<td><?php echo $mostrar[19]?></td>
					<td><?php echo $mostrar[20]?></td>
					<td><?php echo $mostrar[21]?></td>
					<td><?php echo $mostrar[22]?></td>
					<td><?php echo $mostrar[23]?></td>
					<td><?php echo $mostrar[24]?></td>
					<td><?php echo $mostrar[25]?></td>
					<td><?php echo $mostrar[26]?></td>
					<td><?php echo $mostrar[27]?></td>
					<td><?php echo $mostrar[28]?></td>
					<td><?php echo $mostrar[29]?></td>
					<td><?php echo $mostrar[30]?></td>
					<td><?php echo $mostrar[31]?></td>
					<td><?php echo $mostrar[32]?></td>
					<td><?php echo $mostrar[33]?></td>
					<td><?php echo $mostrar[34]?></td>
					<td><?php echo $mostrar[35]?></td>
					<td><?php echo $mostrar[36]?></td>
					<td><?php echo $mostrar[37]?></td>
					<td><?php echo $mostrar[38]?></td>
					<td><?php echo $mostrar[39]?></td>
					<td><?php echo $mostrar[40]?></td>
					<td><?php echo $mostrar[41]?></td>
					<td><?php echo $mostrar[42]?></td>
					<td><?php echo $mostrar[43]?></td>
					<td><?php echo $mostrar[44]?></td>
					<td><?php echo $mostrar[45]?></td>
					<td><?php echo $mostrar[46]?></td>
					<td><?php echo $mostrar[47]?></td>
					<td><?php echo $mostrar[48]?></td>

         		 <td>
         <button class="btn btn-info" data-toggle="modal" data-target="#modalEditar" onclick="agrgarform('<?php echo $datos ?>')">
         	Actualizar <spanglyphicon class="glyphicon glyphicon-refresh"></span>
         </button>
          </td>
          <td>
              <button class="btn btn-danger glyphicon glyphicon-trash"></button>
          </td>

            </tr>
							<?php
						}

						mysqli_close($conexion);
							 ?>
        </table>
    </div>
</div>
or so='' or shipdate='$shipdate' or scanlistDate='$scanlistDate' or part='$partDesc' or partDesc='' or partType='$partType' or qty='' or unitePrice='' or totalPrice='' or caseNum='' or dimepeso='' or coo='' or invoice ='' or carrier='$carrier' or trackID='$trackID' or manway='' or shipto='' or countryto='$countryto' or mot='' or shipAddress='$shipAddress' or shipTime='' or scanlistime='' or seal='' or scanlist='' or transmitted='$transmitted' or servicelevel='' or sapinvoice='' or userID='' or,assetID='$assetID' or unitserial='$unitserial' or eco='' or eta='' or arrival='' or est='' or reprogram='' or uncreate='' or delivery='' or signed='' or pod='' or isorder='' or dco='' or accidente='' or realDelivery='' or factura='' or invoiceSumari='' or fecha='' or costo='' or comentarios=''


 $shipdate=$_GET['ship'];
          $scanlistDate=$_GET['scan'];
          $partDesc=$_GET['part'];
          $assetID=$_GET['asset'];
          $unitserial=$_GET['unit'];
          $trackID=$_GET['track'];
          $shipAddress=$_GET['address'];
          $transmitted=$_GET['k'];
          $countryto=$_GET['e'];
          $carrier=$_GET['f'];
          $partType=$_GET['a'];