<?php
header('Cache-Control: no-cache');
header('Pragma: no-cache'); 

include ("../conexion.php");
?>

<script>

function pon_prefijo(filas) {
	parent.document.formulario_lineas.filas.value=filas;
    
}



</script>

<?php
$codfactura=$_GET["codfactura"];
$numlinea=$_GET["numlinea"];

$consulta = "DELETE FROM factulineatmp_compra WHERE codfactura ='".$codfactura."' AND numlinea='".$numlinea."'";
$mysqli->query($consulta);
echo "<script>parent.location.href='frame_lineas.php?codfactura=".$codfactura."';</script>";


if ($result = $mysqli->query("SELECT * FROM factulineatmp_compra WHERE  codfactura=$codfactura" )) {
   $filas = $result->num_rows;
   $result->close();
}



?>


				<script languaje="javascript">
	pon_prefijo("<?php echo $filas ?>");
	
		</script>