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 115 MajorVer=2
116 116 MinorVer=2
117 117 Release=0
118   -Build=8
  118 +Build=23
119 119 Debug=0
120 120 PreRelease=0
121 121 Special=0
... ... @@ -126,7 +126,7 @@ CodePage=1252
126 126 [Version Info Keys]
127 127 CompanyName=Dataprev-ES
128 128 FileDescription=Módulo Gerente de Coletas do Sistema CACIC
129   -FileVersion=2.2.0.8
  129 +FileVersion=2.2.0.23
130 130 InternalName=
131 131 LegalCopyright=
132 132 LegalTrademarks=
... ...
ger_cols/ger_cols.dpr
... ... @@ -62,16 +62,17 @@ var p_path_cacic,
62 62 v_IV,
63 63 v_DatFileName,
64 64 v_ResultCompress,
65   - v_ResultUnCompress : string;
  65 + v_ResultUnCompress,
  66 + v_te_so : string;
66 67  
67 68 var v_Aguarde : TextFile;
68 69  
69 70 var CountUPD,
70 71 intAux,
71 72 intMontaBatch,
72   - intLoop,
73   - v_majorVer,
74   - v_minorVer : integer;
  73 + intLoop : integer;
  74 +
  75 +
75 76  
76 77 var tstrTripa1,
77 78 v_tstrCipherOpened,
... ... @@ -416,15 +417,21 @@ const
416 417 cOsWinServer2003 = 13;
417 418 var
418 419 osVerInfo: TOSVersionInfo;
419   - majorVer, minorVer: Integer;
  420 + platformID,
  421 + majorVer,
  422 + minorVer : Integer;
  423 + CSDVersion : String;
420 424 begin
421 425 Result := cOsUnknown;
422 426 { set operating system type flag }
423 427 osVerInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
424 428 if GetVersionEx(osVerInfo) then
425 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 435 case osVerInfo.dwPlatformId of
429 436 VER_PLATFORM_WIN32_NT: {Windows NT Like}
430 437 begin
... ... @@ -465,8 +472,10 @@ begin
465 472 else
466 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 479 end;
471 480  
472 481 procedure Matar(v_dir,v_files: string);
... ... @@ -1759,6 +1768,7 @@ Begin
1759 1768 Request_SVG.Values['in_teste'] := EnCrypt('OK',l_cs_compress);
1760 1769 Request_SVG.Values['te_node_address'] := EnCrypt(v_mac_address,l_cs_compress);
1761 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 1772 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetIPRede(te_ip, te_mascara),l_cs_compress);
1763 1773 Request_SVG.Values['te_workgroup'] := EnCrypt(GetWorkgroup,l_cs_compress);
1764 1774 Request_SVG.Values['te_nome_computador']:= EnCrypt(te_nome_host,l_cs_compress);
... ... @@ -1807,7 +1817,7 @@ Begin
1807 1817 Request_SVG := TStringList.Create;
1808 1818 Request_SVG.Values['te_node_address'] := EnCrypt(v_mac_address,l_cs_compress);
1809 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 1821 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetIPRede(te_ip, te_mascara),l_cs_compress);
1812 1822 Request_SVG.Values['te_workgroup'] := EnCrypt(GetWorkgroup,l_cs_compress);
1813 1823 Request_SVG.Values['te_nome_computador']:= EnCrypt(te_nome_host,l_cs_compress);
... ... @@ -1873,13 +1883,14 @@ Begin
1873 1883  
1874 1884  
1875 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 1887 (GetValorDatMemoria('Configs.NM_USUARIO_LOGIN_SERV_UPDATES', v_tstrCipherOpened) = '') or
1878 1888 (GetValorDatMemoria('Configs.TE_SENHA_LOGIN_SERV_UPDATES' , v_tstrCipherOpened) = '') or
1879 1889 (GetValorDatMemoria('Configs.TE_PATH_SERV_UPDATES' , v_tstrCipherOpened) = '') or
1880 1890 (GetValorDatMemoria('Configs.NU_PORTA_SERV_UPDATES' , v_tstrCipherOpened) = '') or
1881 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 1894 Begin
1884 1895 log_DEBUG('Preparando contato com módulo Gerente WEB para Downloads.');
1885 1896 v_acao_gercols := 'Contactando o módulo Gerente WEB: get_config.php...';
... ... @@ -1902,6 +1913,7 @@ Begin
1902 1913 SetValorDatMemoria('Configs.TE_PATH_SERV_UPDATES' ,DeCrypt(XML_RetornaValor('te_path_serv_updates' , strRetorno),true), v_tstrCipherOpened);
1903 1914 SetValorDatMemoria('Configs.NU_PORTA_SERV_UPDATES' ,DeCrypt(XML_RetornaValor('nu_porta_serv_updates' , strRetorno),true), v_tstrCipherOpened);
1904 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 1917 SetValorDatMemoria('TcpIp.TE_ENDERECOS_MAC_INVALIDOS' ,DeCrypt(XML_RetornaValor('te_enderecos_mac_invalidos' , strRetorno),true), v_tstrCipherOpened);
1906 1918 End;
1907 1919 End;
... ... @@ -2224,7 +2236,7 @@ Begin
2224 2236 Request_SVG := TStringList.Create;
2225 2237 Request_SVG.Values['te_node_address'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NODE_ADDRESS' , v_tstrCipherOpened),l_cs_compress);
2226 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 2240 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetValorDatMemoria('TcpIp.ID_IP_REDE' , v_tstrCipherOpened),l_cs_compress);
2229 2241 Request_SVG.Values['te_nome_computador'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NOME_COMPUTADOR', v_tstrCipherOpened),l_cs_compress);
2230 2242 Request_SVG.Values['te_ip'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_IP' , v_tstrCipherOpened),l_cs_compress);
... ... @@ -2285,7 +2297,7 @@ Begin
2285 2297 Request_SVG := TStringList.Create;
2286 2298 Request_SVG.Values['te_node_address'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NODE_ADDRESS' , v_tstrCipherOpened),l_cs_compress);
2287 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 2301 Request_SVG.Values['id_ip_rede'] := EnCrypt(GetValorDatMemoria('TcpIp.ID_IP_REDE' , v_tstrCipherOpened),l_cs_compress);
2290 2302 Request_SVG.Values['te_nome_computador'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_NOME_COMPUTADOR', v_tstrCipherOpened),l_cs_compress);
2291 2303 Request_SVG.Values['te_ip'] := EnCrypt(GetValorDatMemoria('TcpIp.TE_IP' , v_tstrCipherOpened),l_cs_compress);
... ... @@ -2515,7 +2527,7 @@ Begin
2515 2527 // Identifico a versão do Windows
2516 2528 If (GetWinVer <= 5) then
2517 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 2531 SetValorChaveRegEdit('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\cacic2', Trim(Copy(ParamStr(intAux),12,Length((ParamStr(intAux))))) + '\cacic2.exe');
2520 2532 log_DEBUG('Setando Chave de AutoExecução...');
2521 2533 end;
... ... @@ -2763,17 +2775,18 @@ Begin
2763 2775 Else
2764 2776 log_diario('Executável Col_Undi Inexistente!');
2765 2777 end;
2766   - if (countUPD > 0) then
  2778 + if (countUPD > 0) or
  2779 + (GetValorDatMemoria('Configs.ID_FTP',v_tstrCipherOpened)<>'') then
2767 2780 Begin
2768 2781 Request_Ger_Cols := TStringList.Create;
2769 2782 Request_Ger_Cols.Values['in_chkcacic'] := EnCrypt('chkcacic',l_cs_compress);
2770 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 2785 Request_Ger_Cols.Values['id_ip_estacao'] := EnCrypt(GetIP,l_cs_compress); // Informará o IP para registro na tabela redes_grupos_FTP
2772 2786 ComunicaServidor('get_config.php', Request_Ger_Cols, '>> Liberando Grupo FTP!...');
2773 2787 Request_Ger_Cols.Free;
2774   - log_DEBUG('intMontaBatch='+inttostr(intMontaBatch));
  2788 + SetValorDatMemoria('Configs.ID_FTP','', v_tstrCipherOpened)
2775 2789 End;
2776   -
2777 2790 if (intMontaBatch > 0) then
2778 2791 Begin
2779 2792 Ver_UPD('ini_cols','Inicializador de Coletas',p_path_cacic + 'modulos\','',false);
... ...
ger_cols/ger_cols.res
No preview for this file type