'22,31,27,29,46,27,47,20,57,13,60,16,56,28,52,41,51,42,41,43,28,50,28,46,24,42,20,36', 2=>'200,45,202,46,206,46,216,50,214,57,207,57,202,57,199,54,196,49', 3=>'209,186,214,186,219,186,225,186,228,184,233,183,239,188,243,194,249,196,249,199,244,199,237,200,237,204,234,210,231,214,224,214,219,216,215,221,212,216,211,213,208,210,207,205,206,200,202,197,206,191,206,186', 4=>'270,202,276,200,282,200,283,203,277,206,271,212,270,214,268,218,265,220,264,226,259,224,258,218,257,212,257,206,261,206', 5=>'206,257,208,252,212,247,215,241,215,237,220,240,219,247,225,250,227,252,227,257,224,261,221,265,219,267,219,269,215,268,209,268,206,269,204,272,200,272,198,269,198,265,201,259', 6=>'82,22,89,22,106,22,117,21,129,25,140,28,149,30,128,38,119,38,110,40,104,38,99,40,87,42,85,27,85,29', 7=>'134,116,142,115,146,121,148,125,150,129,153,133,153,136,147,141,138,144,132,148,129,144,117,142,127,133,132,128', 8=>'90,186,96,192,103,192,110,190,118,187,125,184,132,183,129,188,129,192,129,197,122,199,116,206,115,211,111,218,104,218,103,222,96,224,90,222,84,218,77,215,72,210,69,205,75,198,79,193,79,188,73,184,79,182,83,187', 9=>'307,173,322,165,335,155,341,147,355,142,366,142,379,137,391,142,397,151,374,157,365,167,359,178,339,174,327,184,322,193,310,203,302,187', 10=>'334,72,338,72,342,73,344,77,342,81,347,83,354,85,345,91,339,97,331,101,326,95,323,86,332,77', 11=>'173,45,175,42,185,39,187,42,189,56,188,61,190,74,193,79,185,89,176,93,172,95,167,93,168,84,164,77,161,68,162,53,168,54', 12=>'81,148,85,150,90,147,93,145,98,144,104,148,115,150,117,153,121,160,124,168,126,175,119,179,115,181,107,182,99,183,92,180,86,177,84,175,79,174,75,173,71,174,68,167,75,168,83,166,85,159', 13=>'93,273,98,275,103,273,109,272,117,271,116,277,111,280,111,283,116,285,121,289,116,293,112,298,107,296,102,290,99,283,92,279', 14=>'158,28,169,28,174,28,178,28,185,30,171,36,166,40,166,43,164,48,161,45,154,41,145,37,149,34', 15=>'283,132,287,136,290,137,290,142,285,146,282,154,277,158,264,158,266,158,269,150,274,143,276,136,276,132', 16=>'131,300,130,319,116,315,108,307,124,301', 17=>'148,182,154,179,160,184,167,186,176,185,185,181,193,181,194,188,193,195,192,203,194,205,193,206,186,209,174,211,162,213,154,213,148,209,139,203,141,197,143,189', 18=>'125,214,129,211,135,209,142,213,147,216,149,220,150,225,149,232,153,239,154,245,150,249,144,249,138,244,135,237,126,239,124,230,122,221', 19=>'219,137,224,140,231,146,237,152,242,156,243,162,237,166,234,174,227,178,223,176,219,178,213,179,207,175,204,170,200,161,199,154,201,150,206,147,212,142', 20=>'342,62,347,62,353,62,359,62,365,60,367,62,366,65,368,72,367,79,363,82,357,81,357,76,357,71,354,70,348,68,342,66', 22=>'186,110,192,109,198,113,202,115,207,118,212,118,219,117,219,117,228,117,231,123,230,129,232,131,230,134,220,130,213,129,206,132,201,136,198,139,195,144,191,142,189,137,187,127,186,119,186,113', 21=>'161,259,164,256,170,255,174,249,180,247,187,248,193,247,198,244,199,239,202,235,207,235,208,241,206,246,200,252,196,257,193,261,191,267,187,270,180,272,173,270,168,268,161,264', 23=>'212,34,218,34,225,34,222,40,219,48,212,43,212,38', 24=>'66,235,69,232,77,228,83,228,90,232,90,234,88,237,85,239,85,244,88,251,88,258,88,262,80,258,77,256,69,256,64,256,62,249,62,243', 25=>'266,53,271,52,275,55,283,55,287,55,291,54,293,60,295,66,296,72,293,80,288,86,289,90,287,94,279,94,275,91,270,85,268,82,264,78,262,77,262,72,261,66,259,60,258,56,258,52,264,52', 26=>'163,220,167,220,180,219,187,218,196,216,202,218,201,224,196,230,193,238,186,240,175,241,172,243,167,248,166,243,163,234,163,226', 27=>'195,59,200,62,207,62,215,65,221,68,221,74,214,73,206,73,200,74,198,71,195,66', 28=>'374,296,373,302,373,312,318,314,302,353,331,351,387,332,393,319,392,306,399,297,398,287,384,290', 29=>'86,45,95,44,104,40,115,44,123,43,140,35,139,47,135,65,129,66,124,75,113,71,105,69,97,69,93,67,91,61,87,58,85,56', 30=>'300,50,304,50,309,53,312,54,313,58,316,62,322,62,323,65,323,72,323,76,320,82,316,85,315,90,309,92,306,94,301,97,297,97,296,97,297,92,296,90,300,84,303,79,308,72,306,66,303,59,301,54', 31=>'67,15,71,17,78,21,77,31,79,31,82,36,81,44,80,50,78,55,75,58,69,58,63,58,61,58,59,55,56,44,57,32,62,24', 32=>'177,118,176,124,177,128,180,133,183,136,183,142,186,146,181,147,176,146,170,144,163,142,158,142,160,135,164,131,169,124,173,119', 33=>'126,273,130,269,137,265,141,263,144,263,148,266,154,271,161,273,156,275,149,277,142,277,139,283,135,283,129,284,123,284,122,280', 34=>'199,320,198,339,184,335,176,327,192,321', 35=>'232,221,238,220,242,216,243,208,245,208,246,217,247,224,251,232,256,235,255,242,245,244,237,247,232,244,228,239,227,234,221,232,221,228,227,223', 36=>'232,35,238,35,238,38,239,41,245,42,246,45,250,46,250,50,246,53,244,56,240,61,240,68,240,73,237,74,234,74,236,70,232,67,228,62,225,62,220,60,221,54,225,47,228,40', 37=>'50,57,58,61,61,64,66,64,72,64,82,60,84,65,78,73,76,79,71,79,65,81,58,79,47,80,48,69,45,59', 38=>'144,43,152,42,157,48,154,56,154,66,156,74,164,81,156,86,148,82,142,80,139,76,141,68,141,54', 39=>'52,46,54,52,43,54,40,58,43,71,36,71,27,76,34,65,27,58,31,52,40,49', 40=>'93,109,97,111,103,114,109,112,116,112,122,115,125,117,123,124,118,128,113,134,109,138,102,132,96,136,90,139,88,131,85,122,88,116', 41=>'251,306,256,308,263,315,263,323,274,320,287,316,297,314,307,316,308,325,304,323,299,333,301,335,297,335,292,335,292,333,301,338,296,344,287,345,277,345,270,344,264,348,261,354,252,358,244,358,238,349,240,340,249,336,245,326,242,310', 42=>'148,107,151,104,156,102,162,100,165,101,171,100,183,103,175,108,175,108,168,114,163,118,159,126,155,124,151,119,149,113', 44=>'202,81,207,79,214,78,219,81,225,83,224,89,220,94,219,98,218,105,216,108,212,108,208,105,203,102,199,102,194,102,190,99,188,93,190,90,193,85,197,81', 43=>'94,240,98,240,104,234,110,231,115,234,116,240,119,244,124,244,129,246,134,251,135,254,129,258,124,260,117,261,109,264,104,265,98,265,100,259,98,252,96,245', 45=>'293,109,296,106,304,103,310,102,315,97,319,100,321,104,319,105,310,108,304,112,303,114,302,118,302,121,302,124,296,124,291,124,293,118,291,112', 46=>'243,120,245,117,251,116,256,114,262,114,266,115,270,116,275,117,284,122,279,122,275,124,269,124,268,128,269,138,264,137,264,142,263,142,263,147,258,150,255,150,249,148,245,147,240,144,236,140,238,135,240,130,238,124', 47=>'135,154,141,154,148,150,156,149,162,150,169,152,167,156,167,160,174,158,179,156,183,156,187,160,188,166,191,172,186,172,175,174,174,177,167,176,166,171,161,171,158,172,154,172,148,173,144,174,141,168,135,162,131,156', 48=>'252,161,257,164,261,166,265,168,271,167,271,172,272,180,276,188,276,192,270,194,263,198,259,194,256,192,251,188,252,180,247,178,244,176,247,168', 49=>'131,74,135,79,136,86,141,90,149,90,156,92,158,96,154,101,147,103,143,108,141,111,135,110,131,106,130,98,130,92,130,86', 50=>'189,32,199,28,204,29,206,31,207,41,195,43,193,36', 51=>'85,72,99,77,109,78,117,80,122,84,123,87,123,93,125,99,122,105,116,105,109,106,102,105,103,100,104,94,102,91,99,91,98,85,94,81', 52=>'237,86,240,83,240,78,243,70,245,65,247,71,252,81,257,89,264,95,270,99,274,103,279,104,283,108,278,109,276,107,269,105,261,103,258,105,258,109,249,111,240,113,234,115,232,112,227,107,227,103,232,95,233,90' ); // recuperamos el numero total de asociados $query="SELECT COUNT(*) AS num FROM aprocins_usuarios WHERE NOT ISNULL(id_centro_trabajo) AND estado!=0"; if($result=sendQuery($query)){$row=mysql_fetch_array($result);$total_asociados=$row['num'];} // recuperamos todos los datos de cada provincia $provincias=array(); $query="SELECT aprocins_provincias.id AS id_provincia, aprocins_provincias.nombre AS provincia, aprocins_centros_trabajo.nombre AS centro, aprocins_centros_trabajo.id AS id_centro, COUNT(aprocins_usuarios.id) AS num_usuarios FROM aprocins_provincias, aprocins_centros_trabajo, aprocins_usuarios WHERE aprocins_provincias.id=aprocins_centros_trabajo.id_provincia AND aprocins_usuarios.id_centro_trabajo=aprocins_centros_trabajo.id GROUP by aprocins_usuarios.id_centro_trabajo ORDER BY id_provincia ASC, num_usuarios DESC"; if($result=sendQuery($query)){ $id_provincia=$socios_provincia=0; while($row=mysql_fetch_array($result)){ if($id_provincia!=$row['id_provincia']){ if($id_provincia!=0){$provincias[$id_provincia]['num_usuarios']=$socios_provincia;} $socios_provincia=0; $id_provincia=$row['id_provincia']; $provincias[$id_provincia]['nombre']=$row['provincia']; $provincias[$id_provincia]['centros']=array(); } $socios_provincia+=$row['num_usuarios']; $provincias[$id_provincia]['centros'][$row['id_centro']]['nombre']=$row['centro']; $provincias[$id_provincia]['centros'][$row['id_centro']]['usuarios']=$row['num_usuarios']; } if($id_provincia!=0){$provincias[$id_provincia]['num_usuarios']=$socios_provincia;} } //print_r($provincias); ?> APROCINS - MAPA DE SOCIOS