Commit 6b9b0bbe367f3b9bb61e206e6f3070198788a533

Authored by anderson.peterle@previdencia.gov.br
1 parent 61f0e50c
Exists in master

Detalhamento dos graficos estatisticos da pagina principal quando representarem …

…mais de um local(usuarios associados a locais secundarios e/ou niveis Administracao/Gestao Central). Melhoria no processo de liberacao de FTP por parte do cliente(Gerente de Coletas). Inicio de criacao do mecanismo de identificacao dinamica do S.O.(MS-Windows). Site para documentacao interna (FAQ, etc.).

git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/agente-windows@116 fecfc0c7-e812-0410-ae72-849f08638ee7
ger_cols/ger_cols.dof
@@ -115,7 +115,7 @@ AutoIncBuild=0 @@ -115,7 +115,7 @@ AutoIncBuild=0
115 MajorVer=2 115 MajorVer=2
116 MinorVer=2 116 MinorVer=2
117 Release=0 117 Release=0
118 -Build=8 118 +Build=23
119 Debug=0 119 Debug=0
120 PreRelease=0 120 PreRelease=0
121 Special=0 121 Special=0
@@ -126,7 +126,7 @@ CodePage=1252 @@ -126,7 +126,7 @@ CodePage=1252
126 [Version Info Keys] 126 [Version Info Keys]
127 CompanyName=Dataprev-ES 127 CompanyName=Dataprev-ES
128 FileDescription=Módulo Gerente de Coletas do Sistema CACIC 128 FileDescription=Módulo Gerente de Coletas do Sistema CACIC
129 -FileVersion=2.2.0.8 129 +FileVersion=2.2.0.23
130 InternalName= 130 InternalName=
131 LegalCopyright= 131 LegalCopyright=
132 LegalTrademarks= 132 LegalTrademarks=
ger_cols/ger_cols.dpr
@@ -62,16 +62,17 @@ var p_path_cacic, @@ -62,16 +62,17 @@ var p_path_cacic,
62 v_IV, 62 v_IV,
63 v_DatFileName, 63 v_DatFileName,
64 v_ResultCompress, 64 v_ResultCompress,
65 - v_ResultUnCompress : string; 65 + v_ResultUnCompress,
  66 + v_te_so : string;
66 67
67 var v_Aguarde : TextFile; 68 var v_Aguarde : TextFile;
68 69
69 var CountUPD, 70 var CountUPD,
70 intAux, 71 intAux,
71 intMontaBatch, 72 intMontaBatch,
72 - intLoop,  
73 - v_majorVer,  
74 - v_minorVer : integer; 73 + intLoop : integer;
  74 +
  75 +
75 76
76 var tstrTripa1, 77 var tstrTripa1,
77 v_tstrCipherOpened, 78 v_tstrCipherOpened,
@@ -416,15 +417,21 @@ const @@ -416,15 +417,21 @@ const
416 cOsWinServer2003 = 13; 417 cOsWinServer2003 = 13;
417 var 418 var
418 osVerInfo: TOSVersionInfo; 419 osVerInfo: TOSVersionInfo;
419 - majorVer, minorVer: Integer; 420 + platformID,
  421 + majorVer,
  422 + minorVer : Integer;
  423 + CSDVersion : String;
420 begin 424 begin
421 Result := cOsUnknown; 425 Result := cOsUnknown;
422 { set operating system type flag } 426 { set operating system type flag }
423 osVerInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo); 427 osVerInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
424 if GetVersionEx(osVerInfo) then 428 if GetVersionEx(osVerInfo) then
425 begin 429 begin
426 - majorVer := osVerInfo.dwMajorVersion;  
427 - minorVer := osVerInfo.dwMinorVersion; 430 + platformId := osVerInfo.dwPlatformId;
  431 + majorVer := osVerInfo.dwMajorVersion;
  432 + minorVer := osVerInfo.dwMinorVersion;
  433 + CSDVersion := trim(osVerInfo.szCSDVersion);
  434 +
428 case osVerInfo.dwPlatformId of 435 case osVerInfo.dwPlatformId of
429 VER_PLATFORM_WIN32_NT: {Windows NT Like} 436 VER_PLATFORM_WIN32_NT: {Windows NT Like}
430 begin 437 begin
@@ -465,8 +472,10 @@ begin @@ -465,8 +472,10 @@ begin
465 else 472 else
466 Result := cOsUnknown; 473 Result := cOsUnknown;
467 474
468 - v_minorVer := minorVer;  
469 - v_majorVer := majorVer; 475 + v_te_so := IntToStr(platformId) + '.' +
  476 + IntToStr(majorVer) + '.' +
  477 + IntToStr(minorVer) +
  478 + IfThen(CSDVersion='','','.'+CSDVersion);
470 end; 479 end;
471 480
472 procedure Matar(v_dir,v_files: string); 481 procedure Matar(v_dir,v_files: string);
@@ -1759,6 +1768,7 @@ Begin @@ -1759,6 +1768,7 @@ Begin
1759 Request_SVG.Values['in_teste'] := EnCrypt('OK',l_cs_compress); 1768 Request_SVG.Values['in_teste'] := EnCrypt('OK',l_cs_compress);
1760 Request_SVG.Values['te_node_address'] := EnCrypt(v_mac_address,l_cs_compress); 1769 Request_SVG.Values['te_node_address'] := EnCrypt(v_mac_address,l_cs_compress);
1761 Request_SVG.Values['id_so'] := EnCrypt(inttostr(GetWinVer),l_cs_compress); 1770 Request_SVG.Values['id_so'] := EnCrypt(inttostr(GetWinVer),l_cs_compress);
  1771 + Request_SVG.Values['te_so'] := EnCrypt(v_te_so,l_cs_compress);
1762 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetIPRede(te_ip, te_mascara),l_cs_compress); 1772 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetIPRede(te_ip, te_mascara),l_cs_compress);
1763 Request_SVG.Values['te_workgroup'] := EnCrypt(GetWorkgroup,l_cs_compress); 1773 Request_SVG.Values['te_workgroup'] := EnCrypt(GetWorkgroup,l_cs_compress);
1764 Request_SVG.Values['te_nome_computador']:= EnCrypt(te_nome_host,l_cs_compress); 1774 Request_SVG.Values['te_nome_computador']:= EnCrypt(te_nome_host,l_cs_compress);
@@ -1807,7 +1817,7 @@ Begin @@ -1807,7 +1817,7 @@ Begin
1807 Request_SVG := TStringList.Create; 1817 Request_SVG := TStringList.Create;
1808 Request_SVG.Values['te_node_address'] := EnCrypt(v_mac_address,l_cs_compress); 1818 Request_SVG.Values['te_node_address'] := EnCrypt(v_mac_address,l_cs_compress);
1809 Request_SVG.Values['id_so'] := EnCrypt(inttostr(GetWinVer),l_cs_compress); 1819 Request_SVG.Values['id_so'] := EnCrypt(inttostr(GetWinVer),l_cs_compress);
1810 - Request_SVG.Values['te_so'] := EnCrypt(inttostr(v_majorVer) + '.' + inttostr(v_minorVer),l_cs_compress); 1820 + Request_SVG.Values['te_so'] := EnCrypt(v_te_so,l_cs_compress);
1811 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetIPRede(te_ip, te_mascara),l_cs_compress); 1821 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetIPRede(te_ip, te_mascara),l_cs_compress);
1812 Request_SVG.Values['te_workgroup'] := EnCrypt(GetWorkgroup,l_cs_compress); 1822 Request_SVG.Values['te_workgroup'] := EnCrypt(GetWorkgroup,l_cs_compress);
1813 Request_SVG.Values['te_nome_computador']:= EnCrypt(te_nome_host,l_cs_compress); 1823 Request_SVG.Values['te_nome_computador']:= EnCrypt(te_nome_host,l_cs_compress);
@@ -1873,13 +1883,14 @@ Begin @@ -1873,13 +1883,14 @@ Begin
1873 1883
1874 1884
1875 // Verifica existência dos dados de configurações principais e estado de CountUPD. Caso verdadeiro, simula uma instalação pelo chkCACIC... 1885 // Verifica existência dos dados de configurações principais e estado de CountUPD. Caso verdadeiro, simula uma instalação pelo chkCACIC...
1876 - if (GetValorDatMemoria('Configs.TE_SERV_UPDATES' , v_tstrCipherOpened) = '') or 1886 + if ((GetValorDatMemoria('Configs.TE_SERV_UPDATES' , v_tstrCipherOpened) = '') or
1877 (GetValorDatMemoria('Configs.NM_USUARIO_LOGIN_SERV_UPDATES', v_tstrCipherOpened) = '') or 1887 (GetValorDatMemoria('Configs.NM_USUARIO_LOGIN_SERV_UPDATES', v_tstrCipherOpened) = '') or
1878 (GetValorDatMemoria('Configs.TE_SENHA_LOGIN_SERV_UPDATES' , v_tstrCipherOpened) = '') or 1888 (GetValorDatMemoria('Configs.TE_SENHA_LOGIN_SERV_UPDATES' , v_tstrCipherOpened) = '') or
1879 (GetValorDatMemoria('Configs.TE_PATH_SERV_UPDATES' , v_tstrCipherOpened) = '') or 1889 (GetValorDatMemoria('Configs.TE_PATH_SERV_UPDATES' , v_tstrCipherOpened) = '') or
1880 (GetValorDatMemoria('Configs.NU_PORTA_SERV_UPDATES' , v_tstrCipherOpened) = '') or 1890 (GetValorDatMemoria('Configs.NU_PORTA_SERV_UPDATES' , v_tstrCipherOpened) = '') or
1881 (GetValorDatMemoria('TcpIp.TE_ENDERECOS_MAC_INVALIDOS' , v_tstrCipherOpened) = '') or 1891 (GetValorDatMemoria('TcpIp.TE_ENDERECOS_MAC_INVALIDOS' , v_tstrCipherOpened) = '') or
1882 - (CountUPD > 0) then 1892 + (CountUPD > 0)) and
  1893 + (GetValorDatMemoria('Configs.ID_FTP', v_tstrCipherOpened) = '') then
1883 Begin 1894 Begin
1884 log_DEBUG('Preparando contato com módulo Gerente WEB para Downloads.'); 1895 log_DEBUG('Preparando contato com módulo Gerente WEB para Downloads.');
1885 v_acao_gercols := 'Contactando o módulo Gerente WEB: get_config.php...'; 1896 v_acao_gercols := 'Contactando o módulo Gerente WEB: get_config.php...';
@@ -1902,6 +1913,7 @@ Begin @@ -1902,6 +1913,7 @@ Begin
1902 SetValorDatMemoria('Configs.TE_PATH_SERV_UPDATES' ,DeCrypt(XML_RetornaValor('te_path_serv_updates' , strRetorno),true), v_tstrCipherOpened); 1913 SetValorDatMemoria('Configs.TE_PATH_SERV_UPDATES' ,DeCrypt(XML_RetornaValor('te_path_serv_updates' , strRetorno),true), v_tstrCipherOpened);
1903 SetValorDatMemoria('Configs.NU_PORTA_SERV_UPDATES' ,DeCrypt(XML_RetornaValor('nu_porta_serv_updates' , strRetorno),true), v_tstrCipherOpened); 1914 SetValorDatMemoria('Configs.NU_PORTA_SERV_UPDATES' ,DeCrypt(XML_RetornaValor('nu_porta_serv_updates' , strRetorno),true), v_tstrCipherOpened);
1904 SetValorDatMemoria('Configs.TE_FILA_FTP' ,DeCrypt(XML_RetornaValor('te_fila_ftp' , strRetorno),true), v_tstrCipherOpened); 1915 SetValorDatMemoria('Configs.TE_FILA_FTP' ,DeCrypt(XML_RetornaValor('te_fila_ftp' , strRetorno),true), v_tstrCipherOpened);
  1916 + SetValorDatMemoria('Configs.ID_FTP' ,DeCrypt(XML_RetornaValor('id_ftp' , strRetorno),true), v_tstrCipherOpened);
1905 SetValorDatMemoria('TcpIp.TE_ENDERECOS_MAC_INVALIDOS' ,DeCrypt(XML_RetornaValor('te_enderecos_mac_invalidos' , strRetorno),true), v_tstrCipherOpened); 1917 SetValorDatMemoria('TcpIp.TE_ENDERECOS_MAC_INVALIDOS' ,DeCrypt(XML_RetornaValor('te_enderecos_mac_invalidos' , strRetorno),true), v_tstrCipherOpened);
1906 End; 1918 End;
1907 End; 1919 End;
@@ -2224,7 +2236,7 @@ Begin @@ -2224,7 +2236,7 @@ Begin
2224 Request_SVG := TStringList.Create; 2236 Request_SVG := TStringList.Create;
2225 Request_SVG.Values['te_node_address'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NODE_ADDRESS' , v_tstrCipherOpened),l_cs_compress); 2237 Request_SVG.Values['te_node_address'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NODE_ADDRESS' , v_tstrCipherOpened),l_cs_compress);
2226 Request_SVG.Values['id_so'] := EnCrypt(GetValorDatMemoria('Configs.ID_SO' , v_tstrCipherOpened),l_cs_compress); 2238 Request_SVG.Values['id_so'] := EnCrypt(GetValorDatMemoria('Configs.ID_SO' , v_tstrCipherOpened),l_cs_compress);
2227 - Request_SVG.Values['te_so'] := EnCrypt(inttostr(v_majorVer) + '.' + inttostr(v_minorVer),l_cs_compress); 2239 + Request_SVG.Values['te_so'] := EnCrypt(v_te_so,l_cs_compress);
2228 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetValorDatMemoria('TcpIp.ID_IP_REDE' , v_tstrCipherOpened),l_cs_compress); 2240 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetValorDatMemoria('TcpIp.ID_IP_REDE' , v_tstrCipherOpened),l_cs_compress);
2229 Request_SVG.Values['te_nome_computador'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NOME_COMPUTADOR', v_tstrCipherOpened),l_cs_compress); 2241 Request_SVG.Values['te_nome_computador'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NOME_COMPUTADOR', v_tstrCipherOpened),l_cs_compress);
2230 Request_SVG.Values['te_ip'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_IP' , v_tstrCipherOpened),l_cs_compress); 2242 Request_SVG.Values['te_ip'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_IP' , v_tstrCipherOpened),l_cs_compress);
@@ -2285,7 +2297,7 @@ Begin @@ -2285,7 +2297,7 @@ Begin
2285 Request_SVG := TStringList.Create; 2297 Request_SVG := TStringList.Create;
2286 Request_SVG.Values['te_node_address'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NODE_ADDRESS' , v_tstrCipherOpened),l_cs_compress); 2298 Request_SVG.Values['te_node_address'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NODE_ADDRESS' , v_tstrCipherOpened),l_cs_compress);
2287 Request_SVG.Values['id_so'] := EnCrypt(GetValorDatMemoria('Configs.ID_SO' , v_tstrCipherOpened),l_cs_compress); 2299 Request_SVG.Values['id_so'] := EnCrypt(GetValorDatMemoria('Configs.ID_SO' , v_tstrCipherOpened),l_cs_compress);
2288 - Request_SVG.Values['te_so'] := EnCrypt(inttostr(v_majorVer) + '.' + inttostr(v_minorVer),l_cs_compress); 2300 + Request_SVG.Values['te_so'] := EnCrypt(v_te_so,l_cs_compress);
2289 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetValorDatMemoria('TcpIp.ID_IP_REDE' , v_tstrCipherOpened),l_cs_compress); 2301 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetValorDatMemoria('TcpIp.ID_IP_REDE' , v_tstrCipherOpened),l_cs_compress);
2290 Request_SVG.Values['te_nome_computador'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NOME_COMPUTADOR', v_tstrCipherOpened),l_cs_compress); 2302 Request_SVG.Values['te_nome_computador'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NOME_COMPUTADOR', v_tstrCipherOpened),l_cs_compress);
2291 Request_SVG.Values['te_ip'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_IP' , v_tstrCipherOpened),l_cs_compress); 2303 Request_SVG.Values['te_ip'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_IP' , v_tstrCipherOpened),l_cs_compress);
@@ -2515,7 +2527,7 @@ Begin @@ -2515,7 +2527,7 @@ Begin
2515 // Identifico a versão do Windows 2527 // Identifico a versão do Windows
2516 If (GetWinVer <= 5) then 2528 If (GetWinVer <= 5) then
2517 begin 2529 begin
2518 - //Se for 95/95OSR2/98/98SE/ME faço aqui... (Em like NT isto é feito no LoginScript) 2530 + //Se for 95/95OSR2/98/98SE/ME faço aqui... (Em NT Like isto é feito no LoginScript)
2519 SetValorChaveRegEdit('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\cacic2', Trim(Copy(ParamStr(intAux),12,Length((ParamStr(intAux))))) + '\cacic2.exe'); 2531 SetValorChaveRegEdit('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\cacic2', Trim(Copy(ParamStr(intAux),12,Length((ParamStr(intAux))))) + '\cacic2.exe');
2520 log_DEBUG('Setando Chave de AutoExecução...'); 2532 log_DEBUG('Setando Chave de AutoExecução...');
2521 end; 2533 end;
@@ -2763,17 +2775,18 @@ Begin @@ -2763,17 +2775,18 @@ Begin
2763 Else 2775 Else
2764 log_diario('Executável Col_Undi Inexistente!'); 2776 log_diario('Executável Col_Undi Inexistente!');
2765 end; 2777 end;
2766 - if (countUPD > 0) then 2778 + if (countUPD > 0) or
  2779 + (GetValorDatMemoria('Configs.ID_FTP',v_tstrCipherOpened)<>'') then
2767 Begin 2780 Begin
2768 Request_Ger_Cols := TStringList.Create; 2781 Request_Ger_Cols := TStringList.Create;
2769 Request_Ger_Cols.Values['in_chkcacic'] := EnCrypt('chkcacic',l_cs_compress); 2782 Request_Ger_Cols.Values['in_chkcacic'] := EnCrypt('chkcacic',l_cs_compress);
2770 Request_Ger_Cols.Values['te_fila_ftp'] := EnCrypt('2',l_cs_compress); // Indicará sucesso na operação de FTP e liberará lugar para o próximo 2783 Request_Ger_Cols.Values['te_fila_ftp'] := EnCrypt('2',l_cs_compress); // Indicará sucesso na operação de FTP e liberará lugar para o próximo
  2784 + Request_Ger_Cols.Values['id_ftp'] := EnCrypt(GetValorDatMemoria('Configs.ID_FTP',v_tstrCipherOpened),l_cs_compress); // Indicará sucesso na operação de FTP e liberará lugar para o próximo
2771 Request_Ger_Cols.Values['id_ip_estacao'] := EnCrypt(GetIP,l_cs_compress); // Informará o IP para registro na tabela redes_grupos_FTP 2785 Request_Ger_Cols.Values['id_ip_estacao'] := EnCrypt(GetIP,l_cs_compress); // Informará o IP para registro na tabela redes_grupos_FTP
2772 ComunicaServidor('get_config.php', Request_Ger_Cols, '>> Liberando Grupo FTP!...'); 2786 ComunicaServidor('get_config.php', Request_Ger_Cols, '>> Liberando Grupo FTP!...');
2773 Request_Ger_Cols.Free; 2787 Request_Ger_Cols.Free;
2774 - log_DEBUG('intMontaBatch='+inttostr(intMontaBatch)); 2788 + SetValorDatMemoria('Configs.ID_FTP','', v_tstrCipherOpened)
2775 End; 2789 End;
2776 -  
2777 if (intMontaBatch > 0) then 2790 if (intMontaBatch > 0) then
2778 Begin 2791 Begin
2779 Ver_UPD('ini_cols','Inicializador de Coletas',p_path_cacic + 'modulos\','',false); 2792 Ver_UPD('ini_cols','Inicializador de Coletas',p_path_cacic + 'modulos\','',false);
ger_cols/ger_cols.res
No preview for this file type