<? require_once("../coneccion.php"); ?>
<?
$cont=0;
$sqll = "SELECT * FROM pertenece LEFT JOIN cie_cct ON pertenece.clavecct=cie_cct.clavecct 
WHERE pertenece.nv='A' order by cie_cct.nombremun, cie_cct.clavecct";
$resultt = mysql_query($sqll);  
$renglones = mysql_num_rows($resultt);

while($row = mysql_fetch_array($resultt)){
   //$segui02 = "SELECT * FROM seguimiento where m1!='' and m3!='' and m4!='' and m5!='' and m6!='' and m7!='' and id='$row[row_id]'";
      $segui02 = "SELECT * FROM seguimiento where (folio!='' or folio is not null) and id='$row[row_id]'";
   $segui01 = mysql_query($segui02);  
   
	$segui = mysql_fetch_array($segui01);
	
	if($segui==''){
		$cont=$cont+1;
		$porcentaje=$cont*100/4;
		}
	}
?>

<?

$sqll = "SELECT * FROM pertenece LEFT JOIN cie_cct ON pertenece.clavecct=cie_cct.clavecct 
WHERE pertenece.nv='B' order by cie_cct.nombremun, cie_cct.clavecct";
$resultt = mysql_query($sqll);  
$renglones2 = mysql_num_rows($resultt);

while($row = mysql_fetch_array($resultt)){
   //$segui02 = "SELECT * FROM seguimiento where m1!='' and m3!='' and m4!='' and m5!='' and m6!='' and m7!='' and id='$row[row_id]'";
      $segui02 = "SELECT * FROM seguimiento where (folio!='' or folio is not null) and id='$row[row_id]'";
   $segui01 = mysql_query($segui02);  
   
	$segui = mysql_fetch_array($segui01);
	
	if($segui==''){
		$cont2=$cont2+1;
		$porcentaje2=$cont2*100/92;
		}
	}
?>
<?

$sqll = "SELECT * FROM pertenece LEFT JOIN cie_cct ON pertenece.clavecct=cie_cct.clavecct 
WHERE pertenece.nv='C' order by cie_cct.nombremun, cie_cct.clavecct";
$resultt = mysql_query($sqll); 
$renglones3 = mysql_num_rows($resultt); 

while($row = mysql_fetch_array($resultt)){
   //$segui02 = "SELECT * FROM seguimiento where m1!='' and m3!='' and m4!='' and m5!='' and m6!='' and m7!='' and id='$row[row_id]'";
      $segui02 = "SELECT * FROM seguimiento where (folio!='' or folio is not null) and id='$row[row_id]'";
   $segui01 = mysql_query($segui02);  
   
	$segui = mysql_fetch_array($segui01);
	
	if($segui==''){
		$cont3=$cont3+1;
		$porcentaje3=$cont3*100/2;
		}
	}
?>
<?

$sqll = "SELECT * FROM pertenece LEFT JOIN cie_cct ON pertenece.clavecct=cie_cct.clavecct 
WHERE pertenece.nv='D' order by cie_cct.nombremun, cie_cct.clavecct";
$resultt = mysql_query($sqll);  
$renglones4 = mysql_num_rows($resultt);

while($row = mysql_fetch_array($resultt)){
   //$segui02 = "SELECT * FROM seguimiento where m1!='' and m3!='' and m4!='' and m5!='' and m6!='' and m7!='' and id='$row[row_id]'";
      $segui02 = "SELECT * FROM seguimiento where (folio!='' or folio is not null) and id='$row[row_id]'";
   $segui01 = mysql_query($segui02);  
   
	$segui = mysql_fetch_array($segui01);
	
	if($segui==''){
		$cont4=$cont4+1;
		$porcentaje4=$cont4*100/15;
		}
	}
?>

<?

$sqll = "SELECT * FROM pertenece LEFT JOIN cie_cct ON pertenece.clavecct=cie_cct.clavecct 
WHERE pertenece.nv='E' order by cie_cct.nombremun, cie_cct.clavecct";
$resultt = mysql_query($sqll);  
$renglones5 = mysql_num_rows($resultt);

while($row = mysql_fetch_array($resultt)){
   //$segui02 = "SELECT * FROM seguimiento where m1!='' and m3!='' and m4!='' and m5!='' and m6!='' and m7!='' and id='$row[row_id]'";
      $segui02 = "SELECT * FROM seguimiento where (folio!='' or folio is not null) and id='$row[row_id]'";
   $segui01 = mysql_query($segui02);  
   
	$segui = mysql_fetch_array($segui01);
	
	if($segui==''){
		$cont5=$cont5+1;
		$porcentaje5=$cont5*100/104;
		}
	}
?>
<?

$sqll = "SELECT * FROM pertenece LEFT JOIN cie_cct ON pertenece.clavecct=cie_cct.clavecct 
WHERE pertenece.nv='F' order by cie_cct.nombremun, cie_cct.clavecct";
$resultt = mysql_query($sqll);
$renglones6 = mysql_num_rows($resultt);  

while($row = mysql_fetch_array($resultt)){
   //$segui02 = "SELECT * FROM seguimiento where m1!='' and m3!='' and m4!='' and m5!='' and m6!='' and m7!='' and id='$row[row_id]'";
      $segui02 = "SELECT * FROM seguimiento where (folio!='' or folio is not null) and id='$row[row_id]'";
   $segui01 = mysql_query($segui02);  
   
	$segui = mysql_fetch_array($segui01);
	
	if($segui==''){
		$cont6=$cont6+1;
		$porcentaje6=$cont6*100/9;
		}
	}
?>
<?

$sqll = "SELECT * FROM pertenece LEFT JOIN cie_cct ON pertenece.clavecct=cie_cct.clavecct 
WHERE pertenece.nv='G' order by cie_cct.nombremun, cie_cct.clavecct";
$resultt = mysql_query($sqll);  
$renglones7 = mysql_num_rows($resultt);

while($row = mysql_fetch_array($resultt)){
   //$segui02 = "SELECT * FROM seguimiento where m1!='' and m3!='' and m4!='' and m5!='' and m6!='' and m7!='' and id='$row[row_id]'";
      $segui02 = "SELECT * FROM seguimiento where (folio!='' or folio is not null) and id='$row[row_id]'";
   $segui01 = mysql_query($segui02);  
   
	$segui = mysql_fetch_array($segui01);
	
	if($segui==''){
		$cont7=$cont7+1;
		$porcentaje7=$cont7*100/63;
		}
	}
?>
<?

$sqll = "SELECT * FROM pertenece LEFT JOIN cie_cct ON pertenece.clavecct=cie_cct.clavecct 
WHERE pertenece.nv='H' order by cie_cct.nombremun, cie_cct.clavecct";
$resultt = mysql_query($sqll);  
$renglones8 = mysql_num_rows($resultt);

while($row = mysql_fetch_array($resultt)){
   //$segui02 = "SELECT * FROM seguimiento where m1!='' and m3!='' and m4!='' and m5!='' and m6!='' and m7!='' and id='$row[row_id]'";
      $segui02 = "SELECT * FROM seguimiento where (folio!='' or folio is not null) and id='$row[row_id]'";
   $segui01 = mysql_query($segui02);  
   
	$segui = mysql_fetch_array($segui01);
	
	if($segui==''){
		$cont8=$cont8+1;
		$porcentaje8=$cont8*100/133;
		}
	}

?>

<?

$sqll = "SELECT * FROM pertenece LEFT JOIN cie_cct ON pertenece.clavecct=cie_cct.clavecct 
WHERE pertenece.nv='I' order by cie_cct.nombremun, cie_cct.clavecct";
$resultt = mysql_query($sqll); 
$renglones9 = mysql_num_rows($resultt); 

while($row = mysql_fetch_array($resultt)){
   //$segui02 = "SELECT * FROM seguimiento where m1!='' and m3!='' and m4!='' and m5!='' and m6!='' and m7!='' and id='$row[row_id]'";
      $segui02 = "SELECT * FROM seguimiento where (folio!='' or folio is not null) and id='$row[row_id]'";
   $segui01 = mysql_query($segui02);  
   
	$segui = mysql_fetch_array($segui01);
	
	if($segui==''){
		$cont9=$cont9+1;
		$porcentaje9=$cont9*100/5;
		}
	}
?>
