<html>
<head>
<title>Buscador de Provedores</title>
<script>
var cursor;
		if (document.all) {
		// Está utilizando EXPLORER
		cursor='hand';
		} else {
		// Está utilizando MOZILLA/NETSCAPE
		cursor='pointer';
		}

function buscar() {
	if (document.getElementById("iniciopagina").value=="") {
		document.getElementById("iniciopagina").value=1;
	} else {
		document.getElementById("iniciopagina").value=document.getElementById("paginas").value;
	}
	document.getElementById("form1").submit();
	document.getElementById("tabla_resultado").style.display="";
}

function enviar() {
	document.getElementById("form1").submit();
}

</script>
<link href="../estilos/estilos.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	height: 700px;
}
-->
</style></head>
<?php 

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

$cedcli=$_GET["ACedula"];
$dsccli=$_GET["ANombre"];



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



$host = 'www.google.com';
$port = 80;
$timeout = 10; // Tiempo de espera en segundos

// Intentar abrir la conexión
$connection = @fsockopen($host, $port, $errno, $errstr, $timeout);

if ( ($connection) && ($filas > 0) ) {
    echo "Conexion a Internet disponible.";
    fclose($connection); // Cerrar la conexión
	 ?>
	 

 
<body onLoad="buscar()">
<form name="form1" id="form1" method="post" action="frame_actividades_comerciales.php" target="frame_resultado" onSubmit="buscar()">
  	<table class="fuente8" align="center" width="95%">
     <tr>
       <td width="6%" rowspan="2" class="busqueda">&nbsp;</td>
       <td width="8%" rowspan="2" class="busqueda">&nbsp;</td>
       <td>&nbsp;</td>
       <td width="54%" rowspan="2">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
     </tr>
     <tr>
       <td width="2%">&nbsp;</td>
       <td width="7%">&nbsp;</td>
       <td width="23%">&nbsp;</td>
     </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">Nombre : </td>
		  <td>&nbsp;</td>
		  <td><input autofocus  onKeyPress="enviar();"  autocomplete="off" name="dsccli" type="text" id="dsccli" size="50" value=" <?php  echo $dsccli ;?>" class="cajaGrande" onChange="buscar();" ></td>
		  <td>&nbsp;</td>
		  <td rowspan="2">&nbsp;</td>
	  </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">Cedula : </td>
		  <td>&nbsp;</td>
		  <td><input id="cedcli" name="cedcli" type="text"  class="cajaMedia" maxlength="15" style='text-align:left;' value=" <?php  echo $cedcli ;?>"  autocomplete="off"  onFocus=" siguienteCampo ='cdgpro';"  onChange="enviar()" title=""></td>
		  <td>&nbsp;</td>
	  </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">&nbsp;</td>
           <?php 

                     
						
						
			 $tipo="SELECT DISTINCT CAST(impuesto AS INT) AS impuesto  FROM `codigoshacienda` ORDER BY impuesto ASC";
                        $resultado5 = $mysqli->query($tipo) 
                        
                ?>        
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
	  </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
	  </tr>
</table>
  
  
  
  <table width="95%" id="tabla_resultado" name="tabla_resultado" style="display:none" align="center">
	<tr>
  		<td>
			<iframe width="100%" height="470" id="frame_resultado" name="frame_resultado">
				<ilayer width="100%" height="470" id="frame_resultado" name="frame_resultado"></ilayer>
			</iframe>	
		</td>
	</tr>
</table>
<input type="hidden" id="iniciopagina" name="iniciopagina">

<table width="98%" border="0">
  <tr>
    <td><div align="center">
      <img src="../img/Symbol-Delete_48x48-32.png" width="48" height="48" onClick="window.close()" border="0" onMouseOver="style.cursor=cursor">
    </div></td>
  </tr>
</table>
<iframe id="frame_datos" name="frame_datos" width="0%" height="0" frameborder="0">
	<ilayer width="0" height="0" id="frame_datos" name="frame_datos"></ilayer>
</iframe>
</form>
</body>
</html>
	 
	 
	 
	 
	<?php 
	
	
	} else {
    echo "No hay conexión a Internet.";
	
	?>
	<body onLoad="buscar()">
<form name="form1" id="form1" method="post" action="frame_actividades_comerciales_sin_internet.php" target="frame_resultado" onSubmit="buscar()">
  	<table class="fuente8" align="center" width="95%">
     <tr>
       <td width="6%" rowspan="2" class="busqueda">&nbsp;</td>
       <td width="8%" rowspan="2" class="busqueda">&nbsp;</td>
       <td>&nbsp;</td>
       <td width="54%" rowspan="2">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
     </tr>
     <tr>
       <td width="2%">&nbsp;</td>
       <td width="7%">&nbsp;</td>
       <td width="23%">&nbsp;</td>
     </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">Actividad: </td>
		  <td>&nbsp;</td>
		  <td><input autofocus  onKeyPress="enviar();"  autocomplete="off" name="actividad" type="text" id="actividad" size="50" value="" class="cajaGrande" onChange="buscar();" ></td>
		  <td>&nbsp;</td>
		  <td rowspan="2">&nbsp;</td>
	  </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">Codigo : </td>
		  <td>&nbsp;</td>
		  <td><input id="codigo" name="codigo" type="text"  class="cajaMedia" maxlength="15" style='text-align:left;' value=""  autocomplete="off"  onFocus=""  onChange="buscar()" title=""></td>
		  <td>&nbsp;</td>
	  </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">&nbsp;</td>
        
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
	  </tr>
		<tr>
		  <td class="busqueda">&nbsp;</td>
		  <td class="busqueda">&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
	  </tr>
</table>
  
  
  
  <table width="95%" id="tabla_resultado" name="tabla_resultado" style="display:none" align="center">
	<tr>
  		<td>
			<iframe width="100%" height="470" id="frame_resultado" name="frame_resultado">
				<ilayer width="100%" height="470" id="frame_resultado" name="frame_resultado"></ilayer>
			</iframe>	
		</td>
	</tr>
</table>
<input type="hidden" id="iniciopagina" name="iniciopagina">

<table width="98%" border="0">
  <tr>
    <td><div align="center">
      <img src="../img/Symbol-Delete_48x48-32.png" width="48" height="48" onClick="window.close()" border="0" onMouseOver="style.cursor=cursor">
    </div></td>
  </tr>
</table>
<iframe id="frame_datos" name="frame_datos" width="0%" height="0" frameborder="0">
	<ilayer width="0" height="0" id="frame_datos" name="frame_datos"></ilayer>
</iframe>
</form>
</body>
</html>
	 
	
	
	
	
	
	<?php 
	
	}	
 ?>
 
 