<?php


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

?>

<script>

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



</script>

<?php


$cdgexo=$_GET["cdgexo"];
$cedcli=$_GET["cedcli"];
$numautexo=$_GET["numautexo"];
$tipo=$_GET["tipo"];



if ($tipo <>1 ){
$posicion=0;

$consulta = "DELETE FROM exoneraciones WHERE cedcli ='".$cedcli."' AND numautexo='".$numautexo."'";
$mysqli->query($consulta);


$consulta2 = "DELETE FROM cabys_exoneracion WHERE cedcli ='".$cedcli."' AND numautexo='".$numautexo."'";
$mysqli->query($consulta2);

			
			

echo "<script>parent.location.href='frame_lineas_exoneraciones.php?numdocexo=".$numautexo."&cedula=".$cedcli."'</script>";

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



?>


				<script languaje="javascript">
	pon_prefijo("<?php echo $filas ?>");
	
		</script>
		
	<?php	
		
		}else{
$consulta = "DELETE FROM exoneraciones WHERE cedcli ='".$cedcli."'";
$mysqli->query($consulta);


$consulta2 = "DELETE FROM cabys_exoneracion WHERE cedcli ='".$cedcli."' ";
$mysqli->query($consulta2);

			
			

echo "<script>location.href='frame_lineas_exoneraciones.php?cedcli=".$cedcli."'</script>";		
		
		
		}
		
		
		
		
	?>	
		
		
		