From f40c7147e7c7f9d352c172b8acdd8ac4e88fefee Mon Sep 17 00:00:00 2001 From: anderson.peterle@previdencia.gov.br Date: Thu, 10 Mar 2011 19:22:52 +0000 Subject: [PATCH] Atualizacao de pasta MapaCACIC 2.6-Beta-2 --- mapa/LEIAME | 2 ++ mapa/acesso.dcu | Bin 0 -> 11798 bytes mapa/acesso.ddp | Bin 0 -> 51 bytes mapa/acesso.dfm | 334 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mapa/acesso.pas | 246 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mapa/main_mapa.dcu | Bin 0 -> 50931 bytes mapa/main_mapa.ddp | Bin 0 -> 51 bytes mapa/main_mapa.dfm | 613 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mapa/main_mapa.pas | 1102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mapa/mapa.res | Bin 0 -> 5100 bytes mapa/mapa_icon.ico | Bin 0 -> 4086 bytes mapa/mapacacic.cfg | 43 +++++++++++++++++++++++++++++++++++++++++++ mapa/mapacacic.dof | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mapa/mapacacic.dpr | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mapa/mapacacic.dproj | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mapa/mapacacic.identcache | Bin 0 -> 285 bytes mapa/mapacacic.res | Bin 0 -> 5144 bytes 17 files changed, 2646 insertions(+), 0 deletions(-) create mode 100755 mapa/LEIAME create mode 100755 mapa/acesso.dcu create mode 100755 mapa/acesso.ddp create mode 100755 mapa/acesso.dfm create mode 100755 mapa/acesso.pas create mode 100755 mapa/main_mapa.dcu create mode 100755 mapa/main_mapa.ddp create mode 100755 mapa/main_mapa.dfm create mode 100755 mapa/main_mapa.pas create mode 100755 mapa/mapa.res create mode 100755 mapa/mapa_icon.ico create mode 100755 mapa/mapacacic.cfg create mode 100755 mapa/mapacacic.dof create mode 100755 mapa/mapacacic.dpr create mode 100755 mapa/mapacacic.dproj create mode 100755 mapa/mapacacic.identcache create mode 100755 mapa/mapacacic.res diff --git a/mapa/LEIAME b/mapa/LEIAME new file mode 100755 index 0000000..27bc416 --- /dev/null +++ b/mapa/LEIAME @@ -0,0 +1,2 @@ + +Esse módulo foi desenvolvido para atender à necessidade de coleta de informações patrimoniais de forma seletiva por estação, onde o técnico vai presencialmente e, de posse do nível de acesso "Técnico" no módulo gerente WEB, realiza o preenchimento dos campos relativos ao Patrimônio e Localização Física. diff --git a/mapa/acesso.dcu b/mapa/acesso.dcu new file mode 100755 index 0000000..ea9a810 Binary files /dev/null and b/mapa/acesso.dcu differ diff --git a/mapa/acesso.ddp b/mapa/acesso.ddp new file mode 100755 index 0000000..4370276 Binary files /dev/null and b/mapa/acesso.ddp differ diff --git a/mapa/acesso.dfm b/mapa/acesso.dfm new file mode 100755 index 0000000..cbb4c7e --- /dev/null +++ b/mapa/acesso.dfm @@ -0,0 +1,334 @@ +object frmAcesso: TfrmAcesso + Left = 301 + Top = 147 + BorderIcons = [] + BorderStyle = bsSingle + Caption = + 'MapaCacic - M'#243'dulo Avulso para Coleta de Informa'#231#245'es Patrimoniai' + + 's' + ClientHeight = 305 + ClientWidth = 605 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Icon.Data = { + 0000010001003232000001000800E00F00001600000028000000320000006400 + 00000100080000000000B80B0000000000000000000000010000000000000000 + 0000FFFFFF006699FF0099FFFF0066FFFF000033FF00002BD70000156A001534 + 380065CA320063C6310052A529004B9625002C59160066CC330066CB330060C0 + 30005DBA2F0059B12D00376D1C004589240059B233001A350F003C77240054A8 + 370034672200234618001E3B150050A23C00478A37000F1E0C004F9940001223 + 0F00315D2A00152A1200539E4A003D7238002A5028001223130026462800438E + 49000E1C10003F874B003A7E4600326D3D00101F130068BD7B00457C57006BC0 + 8A00294935006FC395000B16120012231D001B413500357B680074C7B0002851 + 47001B4239000E1B18006AB4AA007BD0C400183E3B000F2524007FD5D2008BE9 + E70088E4E30086E0DE00183E3E004FC8C8003D9A9A00193F3F001C4444001C41 + 41001F4545001E3B3B0097FDFD0095FAFA008EEEEE008CEBEB0087E2E20081D8 + D8005D9C9C003B63630098FEFE0093F5F50090F0F00079CACA006BB3B300416C + 6C0047757500122E2F00235455006FBBBF004D8285004A7C7F0015353800538D + 94003255590060A2A900416F76002B494D0050878E002C6D79001526290078CB + D8004D8590001C30350031C4F60033CCFF0033CAFD0032C5F80031BFF10031B8 + EA0032B0E400296781001E36400032AADD0013354400508EAA004E89A3001E34 + 3E0033A1D50035A5DA005CA3C800369AD00030566A0061ACD5003892CA000409 + 0C00569BC600368BC2000E1A220027475D00223F55000B263D001D4F78003C89 + C500060C1100549BD5001F394E004F92CC00235A8E004388CD00285B99004688 + D6004989D200335E93001E324900030C180010315B0018315100071934003369 + B500020407003E7ED600152A4800080E17004F88D8004D85D300548DE1001444 + 96005A8EE9005C90EC000C131F005E92F000141F33001145AD00010204000305 + 09000E1625001B2A47000D1422000B111D00111A2C000F1727001E2E4D004A70 + BC003956910036528900273B63006598FE006395F9006295F7006192F4006090 + F1005E8EED005B8AE500517ACC004C73C000486CB500466AB1004264A7004162 + A4004060A1006597FD006496FA005E8DEB005D8BE9005A87E1005985DF005782 + DA00547ED2004E75C3004466AA003F5E9D00354F8400324B7D002C426E002A3F + 690024365A0022335500203050001A2741003C5A95000A0F1A00162138002639 + 60004F76C6004567AD000E3288000F2B70000938B900040D2400184AD2000736 + C50002030600032BBF000837D7000629A7000032FE000031FD000031F9000031 + F5000030F100002FEB00002CDF000029D0000028C8000026BF000024B600001E + 9800001D9300001A880000187D0000156C0000156B0000146400000E4900000A + 3500000724000230E3000534E60000051D0001092D0000000100FFFFFF000000 + 0000F9FC00000000000000000000000000000000000000000000000000000000 + 00000000000000000000FC0000000000000000000000F6F60000000000000000 + 000000000000000000000000000000000000000000000000000000000000F0F8 + 000000000000000000FDE8E7F800000000000000000000000000000000000000 + 0000000000000000000000000000000000F705EBF900000000000000F9ED0505 + ECF9000000000000000000000000000000000000000000000000000000000000 + 00000000FDE90505F100000000000000F605050505F800000000000000000000 + 000000000000000000000000000000000000000000000000F7050505E5F80000 + 000000F9EA05050505F600000000000000000000000000000000000000000000 + 000000000000000000000000E4E5050505EE0000000000F705050505E5EE0000 + 00000000000000000000000000000000000000000000000000000000000000FD + E905050505E5FD00000000A5DCEAE5E6EAEFDE00000000000000000000000000 + 00000000000000000000000000000000000000DEEDE8050506DCA30000008057 + 5096EBDB7D626A00000000000000000000000000000000000000000000000000 + 0000000000000064608BE2E2844E630000008356034D96840303640000000000 + 0000000000000000ABAEAEAEAE00000000000000000000000000005D034C9B85 + 4C036000000083500303424F0303630000000000000000ABA5CFD5BDBBC5B4B7 + C8BCC0CDAAA90000000000000000995703535655030362000000805703030303 + 03035E0000000000A9D7B1BA02020202020202020202020202B5BDD2AE000000 + 0000895C0303030303036300000000614B030303030364000000A3D3C6020202 + 02020202020202020202020202020202C3B1A900000000605303030303546A00 + 0000001E314F030303503300D6A5BB0202020202020202020202B70202020202 + 020202020202B8CFAB0000344D030353562720000000002012275603572720A3 + C102020202020202020202B9D5D2B3D1CFBD02020202020202020202C7A5001E + 3150033B250B290000000080170A2531171433CAC3020202020202020202C7D3 + BCB40202C4D5B3B70202020202020202C2B7D4290B2138190F1A000000000000 + 2914091A091BB09F7C8E0202020202020202D3B9020202020202BBB302020202 + 020202B67F7FA2AE190E110E1020000000000000AD515959A226A19E716D7FB5 + 0202020202D9B10202020202020202CCBF0202020202A47C6C799DB720090E0F + 1A000000000000AE5D593B5159B7717C9E746C7CA40202020202C20202020202 + 02020202B502020202A17A6C7C9D747A93190919330000000000AB5159BD5157 + 5159C36C7A9E796C79A10202020202020202020202020202020202029F716C7F + 9D716D88B5261334A300000000006F6590D9BD513B5159B46C719E7C6C79A102 + 0202020202020202020202020202029D706D88916F6B88B402BD3A02CDAC0000 + 00006F6F6F9FBCBD513B5159026D7091828E0202020202020202020202020202 + 020202C288888E6B6F8E02020202020202CF00000000006F6F6E9F9ADA515751 + 59B46B74BA02020202020202020202020202020202020202029E6F7091020202 + 020202020202D3000000AEC26F6F029F9ABD51575159029D0202020202020202 + 02020202020202020202020202028E9D02020202020202020202C6AE0000A502 + 026F6D6F9FD9BD513B5159020202020202020202020202020202020202020202 + 020202020202020202020202020202D70000ADB4026F6F686E9FD9BD51575102 + 0202020202020202020202020202020202020202020202020202020202020202 + 020202AD000000C002026F6F6F027A9ABD513B59BAC8C9D9B0BDDABA02020202 + 020202BADABDB0D9C9C8BAB8B4020202020202020202BED6000000A3C002026F + 6F6F6E9FD9BD3B5159B1CCBFBEBDBC020202020202020202BCBDBEBFCCB1B2CC + B502020202020202B9D8AC00000000009CB802026F6F6C027A9A515751020202 + 02020202020202020202020202020202020202020202020202020202AA000000 + 00000000FED4BFB9026F6C6FA4BCBD5151510259595959595959595902020202 + 02020202020202020202020202C3CAD0E1000000000000000000FED6A5D20268 + 6EB9D951515159595959595959595959595902020202020202020202B9BBC1D0 + D4AB9900000000000000000000000000000000026F6F56513B5759595900320F + 00000059595959C1B1CECFD8D2AAA5A9D6A80000000000000000000000000000 + 0000000000000000026F6F6F59595959000F0F0F000000000059595900000000 + 0000000000000000000000000000000000000000000000000000000000006F6F + 5959590000000000000000000000595959000000000000000000000000000000 + 0000000000000000000000000000000000000059595906060606060606060606 + 0606065959590000000000000000000000000000000000000000000000000000 + 00000000000000595906060F0F0F060606060606060606065959000000000000 + 0000000000000000000000000000000000FD070707070707070759595906060F + 0F06060606060606060606062E5959070707070707070707070707F4FC000000 + 0000000000F8EF06060606060606595959060F0F060606060606060606060606 + 0F5959060606060606060606060606F100000000000000000000945A08080808 + 0859590000000000000F0F0F0000000000000000005959080808080808080808 + 085F3E0000000000000000000000005A4404040404595932033204040F0F0404 + 040404040404040404595904040404040404040404455A000000000000000000 + 000000008646354748595905030332320F3204323204040404040404042F5949 + 4375393D49467535474A0000000000000000000000000000EE95175864595959 + 0503560F0F04323204040404040404042E59595E78F10D1651DEF11400570000 + 000000000000000000000000E8A0103762E65959050556033232320432043204 + 040415153259123F77E52B1D038FE91F1F0300000000000000000000000000EF + 05E00A304CE3595959055603032E2E2E2E0505050505151559590F3250EA7211 + 42810536184B57000000000000000000000000EE05FA112E03DFDD5959055603 + 03012E2E2E0505050505153259E00E324DFA8D093C7B056615555C0000000000 + 00000000000000EE05E9152E03DFE0595959560303322E2E2E3205050505322E + 59E009304CE38D0F377E057211415C000000000000000000000000EF05E00932 + 4EFBA60E59595903032E2E2E2E3205050505595959A60E3768E76615558C0536 + 184B570000000000000000000000000005A00A375C058711405959592E2E2E2E + 2E05050559595959058712407B052A1C0398E81C230300000000000000000000 + 0000000006380C5669EB2C143F8D5959592E2E2E2E32595959593F65EB2C143F + 92ED0B2442E4EF122F5600000000000000000000000000000700005800070000 + 5800000D5959595959595959000059000700005800000D005800000D00000000 + 000000000000F3FFFFFFFFF7C000F3FFFFFFFFF3C000E1FFFFFFFFE1C000C0FF + FFFFFFC1C000C0FFFFFFFFC0C00080FFFFFFFFC0C00080FFFFFFFF804000807F + FFFFFF804000007FFFFFFF804000007FFC1FFF804000007F8000FF004000007C + 00001F0040008070000007804000804000000180400080000000008040008000 + 00000000C000C00000000000C000C00000000001C000800000000001C0000000 + 00000001C000000000000000C000000000000000C00080000000000040000000 + 0000000000000000000000000000000000000000000080000000000000008000 + 0000000040008000000000004000800000000000400080000000000040008000 + 00000000C000C00000000000C000C00000000000C000C00000000001C000E000 + 00000001C000E00000000001C000E00000000003C000F00000000007C000F800 + 00000007C000FC000000000FC000FC000000002FC000FC000000000FC000F800 + 00000007C000F80000000007C000F80000000007C000F80000000007C000FC00 + 0000000FC000FC000000000FC000FDAD8035B5BFC000} + KeyPreview = True + OldCreateOrder = False + Position = poDesktopCenter + OnActivate = FormActivate + OnCreate = FormCreate + OnKeyDown = FormKeyDown + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object lbVersao: TLabel + Left = 512 + Top = 289 + Width = 90 + Height = 13 + Alignment = taRightJustify + AutoSize = False + Caption = 'Vers'#227'o: X.X.X.X' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -9 + Font.Name = 'Arial' + Font.Style = [] + ParentFont = False + end + object lbTeWebManagerAddress: TLabel + Left = 1 + Top = 289 + Width = 153 + Height = 13 + AutoSize = False + Caption = 'Endere'#231'o do Servidor de Aplica'#231#227'o:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -9 + Font.Name = 'Arial' + Font.Style = [] + ParentFont = False + end + object edTeWebManagerAddress: TLabel + Left = 156 + Top = 287 + Width = 146 + Height = 14 + Caption = 'EdTeWebManagerAddress' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Arial' + Font.Style = [fsBold] + ParentFont = False + end + object btAcesso: TButton + Left = 177 + Top = 242 + Width = 105 + Height = 33 + Caption = 'Acessar' + Default = True + Enabled = False + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'Arial' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 0 + OnClick = btAcessoClick + end + object btCancela: TButton + Left = 333 + Top = 242 + Width = 105 + Height = 33 + Caption = 'Cancelar' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'Arial' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 1 + OnClick = btCancelaClick + end + object pnAcesso: TPanel + Left = 2 + Top = 3 + Width = 602 + Height = 196 + BevelInner = bvRaised + BevelOuter = bvLowered + TabOrder = 2 + object lbNomeUsuarioAcesso: TLabel + Left = 56 + Top = 35 + Width = 127 + Height = 20 + Caption = 'Nome de Usu'#225'rio:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + end + object lbSenhaAcesso: TLabel + Left = 394 + Top = 35 + Width = 130 + Height = 20 + Caption = 'Senha de Acesso:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + end + object lbAviso: TLabel + Left = 4 + Top = 121 + Width = 593 + Height = 13 + Alignment = taCenter + AutoSize = False + Caption = + 'ATEN'#199#195'O: O usu'#225'rio deve estar cadastrado no Gerente WEB e deve t' + + 'er acesso PRIM'#193'RIO ou SECUND'#193'RIO a este local' + Font.Charset = DEFAULT_CHARSET + Font.Color = clNavy + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + end + object edNomeUsuarioAcesso: TEdit + Left = 56 + Top = 55 + Width = 150 + Height = 28 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [] + MaxLength = 20 + ParentFont = False + TabOrder = 0 + OnKeyUp = edNomeUsuarioAcessoKeyUp + end + object edSenhaAcesso: TEdit + Left = 394 + Top = 55 + Width = 150 + Height = 28 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -16 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + PasswordChar = #7 + TabOrder = 1 + OnKeyUp = edSenhaAcessoKeyUp + end + end + object pnMensagens: TPanel + Left = 1 + Top = 200 + Width = 602 + Height = 24 + BevelInner = bvLowered + TabOrder = 3 + object lbMsg_Erro_Senha: TLabel + Left = 3 + Top = 4 + Width = 589 + Height = 17 + Alignment = taCenter + AutoSize = False + end + end + object tm_Mensagem: TTimer + Enabled = False + Interval = 5000 + OnTimer = tm_MensagemTimer + Left = 282 + Top = 241 + end +end diff --git a/mapa/acesso.pas b/mapa/acesso.pas new file mode 100755 index 0000000..09c91b5 --- /dev/null +++ b/mapa/acesso.pas @@ -0,0 +1,246 @@ +(** +--------------------------------------------------------------------------------------------------------------------------------------------------------------- +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil + +Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais + +O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. + +Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer +MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. + +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software +Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +--------------------------------------------------------------------------------------------------------------------------------------------------------------- +*) + +unit acesso; + +interface + +uses + Windows, + Messages, + SysUtils, + Variants, + Classes, + Graphics, + Controls, + Forms, + StdCtrls, + ExtCtrls, + dialogs; + +type + TfrmAcesso = class(TForm) + btAcesso: TButton; + btCancela: TButton; + pnAcesso: TPanel; + lbNomeUsuarioAcesso: TLabel; + edNomeUsuarioAcesso: TEdit; + lbSenhaAcesso: TLabel; + edSenhaAcesso: TEdit; + pnMensagens: TPanel; + lbMsg_Erro_Senha: TLabel; + lbAviso: TLabel; + tm_Mensagem: TTimer; + lbVersao: TLabel; + lbTeWebManagerAddress: TLabel; + edTeWebManagerAddress: TLabel; + procedure btAcessoClick(Sender: TObject); + procedure btCancelaClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure edNomeUsuarioAcessoKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure FormShow(Sender: TObject); + procedure edSenhaAcessoKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure tm_MensagemTimer(Sender: TObject); + procedure FormActivate(Sender: TObject); + function VerificaVersao : boolean; + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + private + { Private declarations } + public + { Public declarations } + end; + +var + frmAcesso: TfrmAcesso; + +implementation +uses main_mapa; +{$R *.dfm} + +procedure TfrmAcesso.btAcessoClick(Sender: TObject); +var Request_mapa : TStringList; + strRetorno, + str_local_Aux : String; +begin + frmMapaCacic.boolAcessoOK := false; + Request_mapa:=TStringList.Create; + + lbMsg_Erro_Senha.Caption := str_local_Aux; + + // Autenticação de Programa e Usuário + Request_mapa.Values['nm_acesso'] := g_oCacic.enCrypt(edNomeUsuarioAcesso.Text); + Request_mapa.Values['te_senha'] := g_oCacic.enCrypt(edSenhaAcesso.Text); + Request_mapa.Values['cs_MapaCacic'] := g_oCacic.enCrypt('S'); + Request_mapa.Values['te_operacao'] := g_oCacic.enCrypt('Autentication'); + Request_mapa.Values['te_versao_mapa'] := g_oCacic.enCrypt(g_oCacic.getVersionInfo(ParamStr(0))); + + strRetorno := frmMapaCacic.ComunicaServidor('mapa_acesso.php', Request_mapa, 'Autenticando o Acesso...'); + Request_mapa.free; + + if (g_oCacic.xmlGetValue('STATUS', strRetorno)='OK') then + Begin + str_local_Aux := trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_USUARIO',strRetorno))); + if (str_local_Aux <> '') then + Begin + frmMapaCacic.strId_usuario := str_local_Aux; + str_local_Aux := ''; + frmMapaCacic.boolAcessoOK := true; // Acesso OK! + End + else + Begin + str_local_Aux := 'Usuário/Senha incorretos ou Usuário sem Acesso Primário/Secundário a este local!'; + End + End + else + Begin + str_local_Aux := 'Problemas na comunicação!'; + End; + + lbMsg_Erro_Senha.Caption := str_local_Aux; + + if (frmMapaCacic.boolAcessoOK) then + Begin + lbAviso.Caption := 'USUÁRIO AUTENTICADO: "' + trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('NM_USUARIO_COMPLETO',strRetorno)))+'"'; + lbAviso.Font.Style := [fsBold]; + lbAviso.Font.Color := clGreen; + Application.ProcessMessages; + Sleep(3000); + End + else + lbMsg_Erro_Senha.Font.Color := clRed; + + tm_Mensagem.Enabled := true; + + g_oCacic.writeDailyLog(str_local_Aux); + + Application.ProcessMessages; + + if (frmMapaCacic.boolAcessoOK) then + self.Close + else + Begin + edNomeUsuarioAcesso.AutoSelect := false; + edNomeUsuarioAcesso.SetFocus; + End; +end; + +Function TfrmAcesso.VerificaVersao : boolean; +var Request_mapa : TStringList; + strRetorno, + strAUX : String; +begin + Result := false; + Request_mapa:=TStringList.Create; + + // Envio dos dados ao DataBase... + Request_mapa.Values['cs_MapaCacic'] := g_oCacic.enCrypt('S'); + Request_mapa.Values['te_operacao'] := g_oCacic.enCrypt('Autentication'); + Request_mapa.Values['te_versao_mapa'] := g_oCacic.enCrypt(g_oCacic.getVersionInfo(ParamStr(0))); + + strRetorno := frmMapaCacic.ComunicaServidor('mapa_acesso.php', Request_mapa, 'Verificando Versão...'); + Request_mapa.free; + + if (g_oCacic.xmlGetValue('STATUS', strRetorno)='OK') then + Begin + strAUX := trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_VERSAO_MAPA',strRetorno))); + if (strAUX = '') then + Result := true + else + MessageDLG(#13#10#13#10+'ATENÇÃO! Encontra-se disponibilizada a versão "'+strAUX+'".'+#13#10#13#10+'Acesse o Gerente WEB do CACIC, opção "Repositório" e baixe o programa "MapaCACIC"!'+#13#10,mtWarning,[mbOK],0); + End + else + MessageDLG(#13#10#13#10+'ATENÇÃO! Há problema na comunicação com o módulo Gerente WEB.'+#13#10#13#10,mtWarning,[mbOK],0); +end; + + +procedure TfrmAcesso.btCancelaClick(Sender: TObject); +begin + lbMsg_Erro_Senha.Caption := 'Aguarde... Finalizando!'; + Application.ProcessMessages; + Self.Close; + boolFinalizar := true; +end; + +procedure TfrmAcesso.FormCreate(Sender: TObject); +begin + intPausaPadrao := 3000; //(3 mil milisegundos = 3 segundos) + frmAcesso.lbVersao.Caption := 'Versão: ' + g_oCacic.getVersionInfo(ParamStr(0)); + frmMapaCacic.lbMensagens.Caption := 'Entrada de Dados para Autenticação no Módulo Gerente WEB Cacic'; +end; + +procedure TfrmAcesso.edNomeUsuarioAcessoKeyUp(Sender: TObject; + var Key: Word; Shift: TShiftState); +begin + if not (trim(frmAcesso.edNomeUsuarioAcesso.Text) = '') and + not (trim(frmAcesso.edSenhaAcesso.Text) = '') then + frmAcesso.btAcesso.Enabled := true + else + frmAcesso.btAcesso.Enabled := false; +end; + +procedure TfrmAcesso.FormShow(Sender: TObject); +begin + frmAcesso.edNomeUsuarioAcesso.SetFocus; +end; + +procedure TfrmAcesso.edSenhaAcessoKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + if not (trim(frmAcesso.edNomeUsuarioAcesso.Text) = '') and + not (trim(frmAcesso.edSenhaAcesso.Text) = '') then + frmAcesso.btAcesso.Enabled := true + else + frmAcesso.btAcesso.Enabled := false; +end; + +procedure TfrmAcesso.tm_MensagemTimer(Sender: TObject); +begin + tm_Mensagem.Enabled := false; + lbMsg_Erro_Senha.Caption := ''; + lbMsg_Erro_Senha.Font.Color := clBlack; +end; + +procedure TfrmAcesso.FormActivate(Sender: TObject); +begin + if (g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress',g_oCacic.getLocalFolder + 'GER_COLS.inf'))='') then + Begin + frmMapaCacic.Mensagem('Favor verificar a instalação do Cacic.' +#13#10 + 'Não Existe Servidor de Aplicação configurado!',true,intPausaPadrao); + frmMapaCacic.Finalizar(true); + End + else + frmAcesso.edTeWebManagerAddress.Caption := frmMapaCacic.edTeWebManagerAddress.Caption; + + if not VerificaVersao then + frmMapaCacic.Finalizar(false); +end; + +procedure TfrmAcesso.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + IF (key = VK_RETURN) then + Begin + if (edNomeUsuarioAcesso.Focused) and (trim(edNomeUsuarioAcesso.Text) <> '') then + edSenhaAcesso.SetFocus + else if (edSenhaAcesso.Focused) and (trim(edSenhaAcesso.Text) <> '') then + btAcessoClick(nil); + End; +end; + +end. diff --git a/mapa/main_mapa.dcu b/mapa/main_mapa.dcu new file mode 100755 index 0000000..984e38d Binary files /dev/null and b/mapa/main_mapa.dcu differ diff --git a/mapa/main_mapa.ddp b/mapa/main_mapa.ddp new file mode 100755 index 0000000..4370276 Binary files /dev/null and b/mapa/main_mapa.ddp differ diff --git a/mapa/main_mapa.dfm b/mapa/main_mapa.dfm new file mode 100755 index 0000000..6ff40e0 --- /dev/null +++ b/mapa/main_mapa.dfm @@ -0,0 +1,613 @@ +object frmMapaCacic: TfrmMapaCacic + Left = 211 + Top = 193 + BorderIcons = [biSystemMenu] + BorderStyle = bsSingle + Caption = + 'MapaCacic - M'#243'dulo Avulso para Coleta de Informa'#231#245'es Patrimoniai' + + 's' + ClientHeight = 327 + ClientWidth = 782 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -9 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Icon.Data = { + 0000010001003232000001000800E00F00001600000028000000320000006400 + 00000100080000000000B80B0000000000000000000000010000000000000000 + 0000FFFFFF006699FF0099FFFF0066FFFF000033FF00002BD70000156A001534 + 380065CA320063C6310052A529004B9625002C59160066CC330066CB330060C0 + 30005DBA2F0059B12D00376D1C004589240059B233001A350F003C77240054A8 + 370034672200234618001E3B150050A23C00478A37000F1E0C004F9940001223 + 0F00315D2A00152A1200539E4A003D7238002A5028001223130026462800438E + 49000E1C10003F874B003A7E4600326D3D00101F130068BD7B00457C57006BC0 + 8A00294935006FC395000B16120012231D001B413500357B680074C7B0002851 + 47001B4239000E1B18006AB4AA007BD0C400183E3B000F2524007FD5D2008BE9 + E70088E4E30086E0DE00183E3E004FC8C8003D9A9A00193F3F001C4444001C41 + 41001F4545001E3B3B0097FDFD0095FAFA008EEEEE008CEBEB0087E2E20081D8 + D8005D9C9C003B63630098FEFE0093F5F50090F0F00079CACA006BB3B300416C + 6C0047757500122E2F00235455006FBBBF004D8285004A7C7F0015353800538D + 94003255590060A2A900416F76002B494D0050878E002C6D79001526290078CB + D8004D8590001C30350031C4F60033CCFF0033CAFD0032C5F80031BFF10031B8 + EA0032B0E400296781001E36400032AADD0013354400508EAA004E89A3001E34 + 3E0033A1D50035A5DA005CA3C800369AD00030566A0061ACD5003892CA000409 + 0C00569BC600368BC2000E1A220027475D00223F55000B263D001D4F78003C89 + C500060C1100549BD5001F394E004F92CC00235A8E004388CD00285B99004688 + D6004989D200335E93001E324900030C180010315B0018315100071934003369 + B500020407003E7ED600152A4800080E17004F88D8004D85D300548DE1001444 + 96005A8EE9005C90EC000C131F005E92F000141F33001145AD00010204000305 + 09000E1625001B2A47000D1422000B111D00111A2C000F1727001E2E4D004A70 + BC003956910036528900273B63006598FE006395F9006295F7006192F4006090 + F1005E8EED005B8AE500517ACC004C73C000486CB500466AB1004264A7004162 + A4004060A1006597FD006496FA005E8DEB005D8BE9005A87E1005985DF005782 + DA00547ED2004E75C3004466AA003F5E9D00354F8400324B7D002C426E002A3F + 690024365A0022335500203050001A2741003C5A95000A0F1A00162138002639 + 60004F76C6004567AD000E3288000F2B70000938B900040D2400184AD2000736 + C50002030600032BBF000837D7000629A7000032FE000031FD000031F9000031 + F5000030F100002FEB00002CDF000029D0000028C8000026BF000024B600001E + 9800001D9300001A880000187D0000156C0000156B0000146400000E4900000A + 3500000724000230E3000534E60000051D0001092D0000000100FFFFFF000000 + 0000F9FC00000000000000000000000000000000000000000000000000000000 + 00000000000000000000FC0000000000000000000000F6F60000000000000000 + 000000000000000000000000000000000000000000000000000000000000F0F8 + 000000000000000000FDE8E7F800000000000000000000000000000000000000 + 0000000000000000000000000000000000F705EBF900000000000000F9ED0505 + ECF9000000000000000000000000000000000000000000000000000000000000 + 00000000FDE90505F100000000000000F605050505F800000000000000000000 + 000000000000000000000000000000000000000000000000F7050505E5F80000 + 000000F9EA05050505F600000000000000000000000000000000000000000000 + 000000000000000000000000E4E5050505EE0000000000F705050505E5EE0000 + 00000000000000000000000000000000000000000000000000000000000000FD + E905050505E5FD00000000A5DCEAE5E6EAEFDE00000000000000000000000000 + 00000000000000000000000000000000000000DEEDE8050506DCA30000008057 + 5096EBDB7D626A00000000000000000000000000000000000000000000000000 + 0000000000000064608BE2E2844E630000008356034D96840303640000000000 + 0000000000000000ABAEAEAEAE00000000000000000000000000005D034C9B85 + 4C036000000083500303424F0303630000000000000000ABA5CFD5BDBBC5B4B7 + C8BCC0CDAAA90000000000000000995703535655030362000000805703030303 + 03035E0000000000A9D7B1BA02020202020202020202020202B5BDD2AE000000 + 0000895C0303030303036300000000614B030303030364000000A3D3C6020202 + 02020202020202020202020202020202C3B1A900000000605303030303546A00 + 0000001E314F030303503300D6A5BB0202020202020202020202B70202020202 + 020202020202B8CFAB0000344D030353562720000000002012275603572720A3 + C102020202020202020202B9D5D2B3D1CFBD02020202020202020202C7A5001E + 3150033B250B290000000080170A2531171433CAC3020202020202020202C7D3 + BCB40202C4D5B3B70202020202020202C2B7D4290B2138190F1A000000000000 + 2914091A091BB09F7C8E0202020202020202D3B9020202020202BBB302020202 + 020202B67F7FA2AE190E110E1020000000000000AD515959A226A19E716D7FB5 + 0202020202D9B10202020202020202CCBF0202020202A47C6C799DB720090E0F + 1A000000000000AE5D593B5159B7717C9E746C7CA40202020202C20202020202 + 02020202B502020202A17A6C7C9D747A93190919330000000000AB5159BD5157 + 5159C36C7A9E796C79A10202020202020202020202020202020202029F716C7F + 9D716D88B5261334A300000000006F6590D9BD513B5159B46C719E7C6C79A102 + 0202020202020202020202020202029D706D88916F6B88B402BD3A02CDAC0000 + 00006F6F6F9FBCBD513B5159026D7091828E0202020202020202020202020202 + 020202C288888E6B6F8E02020202020202CF00000000006F6F6E9F9ADA515751 + 59B46B74BA02020202020202020202020202020202020202029E6F7091020202 + 020202020202D3000000AEC26F6F029F9ABD51575159029D0202020202020202 + 02020202020202020202020202028E9D02020202020202020202C6AE0000A502 + 026F6D6F9FD9BD513B5159020202020202020202020202020202020202020202 + 020202020202020202020202020202D70000ADB4026F6F686E9FD9BD51575102 + 0202020202020202020202020202020202020202020202020202020202020202 + 020202AD000000C002026F6F6F027A9ABD513B59BAC8C9D9B0BDDABA02020202 + 020202BADABDB0D9C9C8BAB8B4020202020202020202BED6000000A3C002026F + 6F6F6E9FD9BD3B5159B1CCBFBEBDBC020202020202020202BCBDBEBFCCB1B2CC + B502020202020202B9D8AC00000000009CB802026F6F6C027A9A515751020202 + 02020202020202020202020202020202020202020202020202020202AA000000 + 00000000FED4BFB9026F6C6FA4BCBD5151510259595959595959595902020202 + 02020202020202020202020202C3CAD0E1000000000000000000FED6A5D20268 + 6EB9D951515159595959595959595959595902020202020202020202B9BBC1D0 + D4AB9900000000000000000000000000000000026F6F56513B5759595900320F + 00000059595959C1B1CECFD8D2AAA5A9D6A80000000000000000000000000000 + 0000000000000000026F6F6F59595959000F0F0F000000000059595900000000 + 0000000000000000000000000000000000000000000000000000000000006F6F + 5959590000000000000000000000595959000000000000000000000000000000 + 0000000000000000000000000000000000000059595906060606060606060606 + 0606065959590000000000000000000000000000000000000000000000000000 + 00000000000000595906060F0F0F060606060606060606065959000000000000 + 0000000000000000000000000000000000FD070707070707070759595906060F + 0F06060606060606060606062E5959070707070707070707070707F4FC000000 + 0000000000F8EF06060606060606595959060F0F060606060606060606060606 + 0F5959060606060606060606060606F100000000000000000000945A08080808 + 0859590000000000000F0F0F0000000000000000005959080808080808080808 + 085F3E0000000000000000000000005A4404040404595932033204040F0F0404 + 040404040404040404595904040404040404040404455A000000000000000000 + 000000008646354748595905030332320F3204323204040404040404042F5949 + 4375393D49467535474A0000000000000000000000000000EE95175864595959 + 0503560F0F04323204040404040404042E59595E78F10D1651DEF11400570000 + 000000000000000000000000E8A0103762E65959050556033232320432043204 + 040415153259123F77E52B1D038FE91F1F0300000000000000000000000000EF + 05E00A304CE3595959055603032E2E2E2E0505050505151559590F3250EA7211 + 42810536184B57000000000000000000000000EE05FA112E03DFDD5959055603 + 03012E2E2E0505050505153259E00E324DFA8D093C7B056615555C0000000000 + 00000000000000EE05E9152E03DFE0595959560303322E2E2E3205050505322E + 59E009304CE38D0F377E057211415C000000000000000000000000EF05E00932 + 4EFBA60E59595903032E2E2E2E3205050505595959A60E3768E76615558C0536 + 184B570000000000000000000000000005A00A375C058711405959592E2E2E2E + 2E05050559595959058712407B052A1C0398E81C230300000000000000000000 + 0000000006380C5669EB2C143F8D5959592E2E2E2E32595959593F65EB2C143F + 92ED0B2442E4EF122F5600000000000000000000000000000700005800070000 + 5800000D5959595959595959000059000700005800000D005800000D00000000 + 000000000000F3FFFFFFFFF7C000F3FFFFFFFFF3C000E1FFFFFFFFE1C000C0FF + FFFFFFC1C000C0FFFFFFFFC0C00080FFFFFFFFC0C00080FFFFFFFF804000807F + FFFFFF804000007FFFFFFF804000007FFC1FFF804000007F8000FF004000007C + 00001F0040008070000007804000804000000180400080000000008040008000 + 00000000C000C00000000000C000C00000000001C000800000000001C0000000 + 00000001C000000000000000C000000000000000C00080000000000040000000 + 0000000000000000000000000000000000000000000080000000000000008000 + 0000000040008000000000004000800000000000400080000000000040008000 + 00000000C000C00000000000C000C00000000000C000C00000000001C000E000 + 00000001C000E00000000001C000E00000000003C000F00000000007C000F800 + 00000007C000FC000000000FC000FC000000002FC000FC000000000FC000F800 + 00000007C000F80000000007C000F80000000007C000F80000000007C000FC00 + 0000000FC000FC000000000FC000FDAD8035B5BFC000} + OldCreateOrder = False + Position = poDesktopCenter + Visible = True + OnActivate = FormActivate + OnClose = FormClose + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object lbTeWebManagerAddress: TLabel + Left = 1 + Top = 309 + Width = 153 + Height = 13 + AutoSize = False + Caption = 'Endere'#231'o do Servidor de Aplica'#231#227'o:' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -9 + Font.Name = 'Arial' + Font.Style = [] + ParentFont = False + end + object lbVersao: TLabel + Left = 689 + Top = 310 + Width = 90 + Height = 13 + Alignment = taRightJustify + AutoSize = False + Caption = 'v: X.X.X.X' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -9 + Font.Name = 'Arial' + Font.Style = [] + ParentFont = False + end + object edTeWebManagerAddress: TLabel + Left = 156 + Top = 308 + Width = 146 + Height = 14 + Caption = 'EdTeWebManagerAddress' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Arial' + Font.Style = [fsBold] + ParentFont = False + end + object gbLeiaComAtencao: TGroupBox + Left = 1 + Top = -1 + Width = 780 + Height = 53 + Caption = ' Leia com aten'#231#227'o ' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clRed + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentColor = False + ParentFont = False + TabOrder = 0 + Visible = False + object lbLeiaComAtencao: TLabel + Left = 5 + Top = 14 + Width = 769 + Height = 32 + AutoSize = False + Caption = + 'O preenchimento correto dos campos abaixo '#233' de extrema import'#226'nc' + + 'ia para um efetivo controle patrimonial e de localiza'#231#227'o de equi' + + 'pamentos.' + Font.Charset = DEFAULT_CHARSET + Font.Color = clBlack + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + WordWrap = True + end + end + object gbInformacoesSobreComputador: TGroupBox + Left = 1 + Top = 61 + Width = 780 + Height = 151 + Caption = + 'Informa'#231#245'es sobre localiza'#231#227'o f'#237'sica e patrimonial deste computa' + + 'dor' + Font.Charset = DEFAULT_CHARSET + Font.Color = clBlue + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 1 + Visible = False + object lbEtiqueta1: TLabel + Left = 3 + Top = 15 + Width = 48 + Height = 13 + Caption = 'Etiqueta 1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object lbEtiqueta2: TLabel + Left = 3 + Top = 105 + Width = 48 + Height = 13 + Caption = 'Etiqueta 2' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object lbEtiqueta3: TLabel + Left = 341 + Top = 15 + Width = 48 + Height = 13 + Caption = 'Etiqueta 3' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object lbEtiqueta4: TLabel + Left = 341 + Top = 60 + Width = 48 + Height = 13 + Caption = 'Etiqueta 4' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object lbEtiqueta5: TLabel + Left = 493 + Top = 60 + Width = 48 + Height = 13 + Caption = 'Etiqueta 5' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object lbEtiqueta6: TLabel + Left = 645 + Top = 60 + Width = 48 + Height = 13 + Caption = 'Etiqueta 6' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object lbEtiqueta7: TLabel + Left = 341 + Top = 105 + Width = 48 + Height = 13 + Caption = 'Etiqueta 7' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object lbEtiqueta8: TLabel + Left = 493 + Top = 105 + Width = 48 + Height = 13 + Caption = 'Etiqueta 8' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object lbEtiqueta9: TLabel + Left = 645 + Top = 105 + Width = 48 + Height = 13 + Caption = 'Etiqueta 9' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object lbEtiqueta1a: TLabel + Left = 3 + Top = 60 + Width = 54 + Height = 13 + Caption = 'Etiqueta 1a' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + Visible = False + end + object cb_id_unid_organizacional_nivel1: TComboBox + Left = 3 + Top = 30 + Width = 325 + Height = 21 + Hint = 'Esse '#233' o texto de ajuda da "Etiqueta 1"' + Style = csDropDownList + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ItemHeight = 13 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 0 + Visible = False + OnChange = cb_id_unid_organizacional_nivel1Change + end + object cb_id_unid_organizacional_nivel2: TComboBox + Left = 3 + Top = 120 + Width = 325 + Height = 21 + Style = csDropDownList + Enabled = False + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ItemHeight = 13 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 1 + Visible = False + end + object ed_te_localizacao_complementar: TEdit + Left = 341 + Top = 30 + Width = 434 + Height = 22 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Arial' + Font.Style = [] + MaxLength = 100 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 2 + Visible = False + end + object ed_te_info_patrimonio3: TEdit + Left = 645 + Top = 75 + Width = 130 + Height = 21 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + MaxLength = 20 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 5 + Visible = False + end + object ed_te_info_patrimonio1: TEdit + Left = 341 + Top = 75 + Width = 130 + Height = 21 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + MaxLength = 20 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 3 + Visible = False + end + object ed_te_info_patrimonio2: TEdit + Left = 493 + Top = 75 + Width = 130 + Height = 21 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + MaxLength = 20 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 4 + Visible = False + end + object ed_te_info_patrimonio6: TEdit + Left = 645 + Top = 120 + Width = 130 + Height = 21 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + MaxLength = 20 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 8 + Visible = False + end + object ed_te_info_patrimonio4: TEdit + Left = 341 + Top = 120 + Width = 130 + Height = 21 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + MaxLength = 20 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 6 + Visible = False + end + object ed_te_info_patrimonio5: TEdit + Left = 493 + Top = 120 + Width = 130 + Height = 21 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + MaxLength = 20 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 7 + Visible = False + end + object cb_id_unid_organizacional_nivel1a: TComboBox + Left = 3 + Top = 75 + Width = 325 + Height = 22 + Style = csDropDownList + Enabled = False + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Arial' + Font.Style = [] + ItemHeight = 14 + ParentFont = False + ParentShowHint = False + ShowHint = True + TabOrder = 9 + Visible = False + OnChange = cb_id_unid_organizacional_nivel1aChange + end + object Panel1: TPanel + Left = 333 + Top = 16 + Width = 2 + Height = 125 + Caption = 'Panel1' + TabOrder = 10 + end + end + object btGravarInformacoes: TButton + Left = 192 + Top = 259 + Width = 401 + Height = 30 + Caption = 'Grava e Envia Informa'#231#245'es Patrimoniais ao Gerente WEB' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'Arial' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 2 + Visible = False + OnClick = AtualizaPatrimonio + end + object pnMensagens: TPanel + Left = 1 + Top = 212 + Width = 779 + Height = 22 + BevelInner = bvLowered + TabOrder = 3 + object lbMensagens: TLabel + Left = 2 + Top = 2 + Width = 775 + Height = 18 + Align = alClient + Alignment = taCenter + AutoSize = False + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + end + end +end diff --git a/mapa/main_mapa.pas b/mapa/main_mapa.pas new file mode 100755 index 0000000..4527714 --- /dev/null +++ b/mapa/main_mapa.pas @@ -0,0 +1,1102 @@ +(** +--------------------------------------------------------------------------------------------------------------------------------------------------------------- +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil + +Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais + +O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. + +Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer +MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. + +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software +Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +--------------------------------------------------------------------------------------------------------------------------------------------------------------- +*) + +unit main_mapa; + +interface + +uses + Windows, + Sysutils, // Deve ser colocado após o Windows acima, nunca antes + strutils, + IdTCPConnection, + IdTCPClient, + IdHTTP, + IdBaseComponent, + IdComponent, + WinSock, + NB30, + StdCtrls, + Controls, + Classes, + Forms, + ExtCtrls, + Graphics, + Dialogs, + CACIC_Library, + LibXmlParser; // Usado em MontaCombos + +var + intPausaPadrao : integer; + +var v_Aguarde : TextFile; + +var + boolDebugs, + boolFinalizar : boolean; + +var + g_oCacic : TCACIC; + +type + TfrmMapaCacic = class(TForm) + gbLeiaComAtencao: TGroupBox; + lbLeiaComAtencao: TLabel; + gbInformacoesSobreComputador: TGroupBox; + lbEtiqueta1: TLabel; + lbEtiqueta2: TLabel; + lbEtiqueta3: TLabel; + cb_id_unid_organizacional_nivel1: TComboBox; + cb_id_unid_organizacional_nivel2: TComboBox; + ed_te_localizacao_complementar: TEdit; + btGravarInformacoes: TButton; + lbEtiqueta4: TLabel; + lbEtiqueta5: TLabel; + lbEtiqueta6: TLabel; + lbEtiqueta7: TLabel; + lbEtiqueta8: TLabel; + lbEtiqueta9: TLabel; + ed_te_info_patrimonio1: TEdit; + ed_te_info_patrimonio2: TEdit; + ed_te_info_patrimonio3: TEdit; + ed_te_info_patrimonio4: TEdit; + ed_te_info_patrimonio5: TEdit; + ed_te_info_patrimonio6: TEdit; + pnMensagens: TPanel; + lbMensagens: TLabel; + lbEtiqueta1a: TLabel; + cb_id_unid_organizacional_nivel1a: TComboBox; + Panel1: TPanel; + lbTeWebManagerAddress: TLabel; + lbVersao: TLabel; + edTeWebManagerAddress: TLabel; + + procedure mapa; + procedure MontaCombos(p_strConfigs : String); + procedure MontaInterface(p_strConfigs : String); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure cb_id_unid_organizacional_nivel1Change(Sender: TObject); + procedure AtualizaPatrimonio(Sender: TObject); + procedure RecuperaValoresAnteriores(p_strConfigs : String); + procedure CriaFormSenha(Sender: TObject); + Function ComunicaServidor(URL : String; Request : TStringList; MsgAcao: String) : String; + procedure Finalizar(p_pausa:boolean); + procedure Sair; + function LastPos(SubStr, S: string): Integer; + Function Rat(OQue: String; Onde: String) : Integer; + Function RetornaValorVetorUON1(id1 : string) : String; + Function RetornaValorVetorUON1a(id1a : string) : String; + Function RetornaValorVetorUON2(id2,idLocal : string) : String; + function LetrasDrives: string; + function SearchFile(p_Drive,p_File:string) : boolean; + procedure GetSubDirs(Folder:string; sList:TStringList); + procedure Mensagem(p_strMsg : String; p_boolAlerta : boolean; p_intPausaSegundos : integer); + procedure cb_id_unid_organizacional_nivel1aChange(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + strId_unid_organizacional_nivel1, + strId_unid_organizacional_nivel1a, + strId_unid_organizacional_nivel2, + strId_Local, + strTe_localizacao_complementar, + strTe_info_patrimonio1, + strTe_info_patrimonio2, + strTe_info_patrimonio3, + strTe_info_patrimonio4, + strTe_info_patrimonio5, + strTe_info_patrimonio6 : String; + public + boolAcessoOK : boolean; + strId_usuario : String; + end; + +var + frmMapaCacic: TfrmMapaCacic; + +implementation + +uses acesso, Math; + +{$R *.dfm} + + +// Estruturas de dados para armazenar os itens das Unidades Organizacionais de Níveis 1, 1a e 2 +type + TRegistroUON1 = record + id1 : String; + nm1 : String; + end; + TVetorUON1 = array of TRegistroUON1; + + TRegistroUON1a = record + id1 : String; + id1a : String; + nm1a : String; + id_local: String; + end; + + TVetorUON1a = array of TRegistroUON1a; + + TRegistroUON2 = record + id1a : String; + id2 : String; + nm2 : String; + id_local: String; + end; + TVetorUON2 = array of TRegistroUON2; + +var VetorUON1 : TVetorUON1; + VetorUON1a : TVetorUON1a; + VetorUON2 : TVetorUON2; + + // Esse array é usado apenas para saber a uon1a, após a filtragem pelo uon1 + VetorUON1aFiltrado : array of String; + + // Esse array é usado apenas para saber a uon2, após a filtragem pelo uon1a + VetorUON2Filtrado : array of String; + +// Baixada de http://www.geocities.com/SiliconValley/Bay/1058/fdelphi.html +Function TfrmMapaCacic.Rat(OQue: String; Onde: String) : Integer; +// Procura uma string dentro de outra, da direita para esquerda +// Retorna a posição onde foi encontrada ou 0 caso não seja encontrada +var +Pos : Integer; +Tam1 : Integer; +Tam2 : Integer; +Achou : Boolean; +begin +Tam1 := Length(OQue); +Tam2 := Length(Onde); +Pos := Tam2-Tam1+1; +Achou := False; +while (Pos >= 1) and not Achou do + begin + if Copy(Onde, Pos, Tam1) = OQue then + begin + Achou := True + end + else + begin + Pos := Pos - 1; + end; + end; +Result := Pos; +end; + +procedure TfrmMapaCacic.Mensagem(p_strMsg : String; p_boolAlerta : boolean; p_intPausaSegundos : integer); +Begin + g_oCacic.writeDebugLog(p_strMsg); + if p_boolAlerta then + lbMensagens.Font.Color := clRed + else + lbMensagens.Font.Color := clBlack; + + lbMensagens.Caption := p_strMsg; + g_oCacic.writeDailyLog(lbMensagens.Caption); + Application.ProcessMessages; + if (p_intPausaSegundos > 0) then + sleep(p_intPausaSegundos); +End; + +procedure TfrmMapaCacic.Sair; +Begin + g_oCacic.Free(); + Application.Terminate; +End; + +procedure TfrmMapaCacic.Finalizar(p_pausa:boolean); +Begin + Mensagem('Finalizando MapaCacic...',false,0); + + g_oCacic.killFiles(g_oCacic.getLocalFolder + 'Temp','*.vbs'); + g_oCacic.killFiles(g_oCacic.getLocalFolder + 'Temp','*.txt'); + if p_pausa then sleep(2000); // Pausa de 2 segundos para conclusão de operações de arquivos. + Sair; +End; +// +function TfrmMapaCacic.LastPos(SubStr, S: string): Integer; +var + Found, Len, Pos: integer; +begin + Pos := Length(S); + Len := Length(SubStr); + Found := 0; + while (Pos > 0) and (Found = 0) do + begin + if Copy(S, Pos, Len) = SubStr then + Found := Pos; + Dec(Pos); + end; + LastPos := Found; +end; + +Function TfrmMapaCacic.ComunicaServidor(URL : String; Request : TStringList; MsgAcao: String) : String; +var Response_CS : TStringStream; + strAddress, + strTeWebManagerAddress, + strTeWebServicesFolder : String; + idHTTP1 : TIdHTTP; + intAux : integer; + tStringListAuxRequest : TStringList; +Begin + tStringListAuxRequest := TStringList.Create; + tStringListAuxRequest := Request; + + tStringListAuxRequest.Values['cs_cipher'] := '1'; + tStringListAuxRequest.Values['cs_compress'] := '0'; + + + strTeWebServicesFolder := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebServicesFolder', g_oCacic.getWinDir + 'chksis.ini')); + strTeWebManagerAddress := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress', g_oCacic.getWinDir + 'chksis.ini')); + + if (trim(strTeWebServicesFolder)='') then + strTeWebServicesFolder := '/ws/'; + + if (trim(strTeWebManagerAddress)='') then + strTeWebManagerAddress := Trim(g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress',g_oCacic.getLocalFolder + 'GER_COLS.inf'))); + + strAddress := 'http://' + strTeWebManagerAddress + strTeWebServicesFolder + URL; + + if (trim(MsgAcao)='') then + MsgAcao := '>> Enviando informações iniciais ao Gerente WEB.'; + + g_oCacic.writeDailyLog(MsgAcao); + + Application.ProcessMessages; + + Response_CS := TStringStream.Create(''); + + g_oCacic.writeDebugLog('Iniciando comunicação com http://' + strTeWebManagerAddress + strTeWebServicesFolder + URL); + + Try + idHTTP1 := TIdHTTP.Create(nil); + idHTTP1.AllowCookies := true; + idHTTP1.ASCIIFilter := false; + idHTTP1.AuthRetries := 1; + idHTTP1.BoundPort := 0; + idHTTP1.HandleRedirects := false; + idHTTP1.ProxyParams.BasicAuthentication := false; + idHTTP1.ProxyParams.ProxyPort := 0; + idHTTP1.ReadTimeout := 0; + idHTTP1.RecvBufferSize := 32768; + idHTTP1.RedirectMaximum := 15; + idHTTP1.Request.UserAgent := g_oCacic.enCrypt('AGENTE_CACIC'); + idHTTP1.Request.Username := g_oCacic.enCrypt('USER_CACIC'); + idHTTP1.Request.Password := g_oCacic.enCrypt('PW_CACIC'); + idHTTP1.Request.Accept := 'text/html, */*'; + idHTTP1.Request.BasicAuthentication := true; + idHTTP1.Request.ContentLength := -1; + idHTTP1.Request.ContentRangeStart := 0; + idHTTP1.Request.ContentRangeEnd := 0; + idHTTP1.Request.ContentType := 'text/html'; + idHTTP1.SendBufferSize := 32768; + idHTTP1.Tag := 0; + + if boolDebugs then + Begin + g_oCacic.writeDebugLog('Valores de REQUEST para envio ao Gerente WEB:'); + for intAux := 0 to tStringListAuxRequest.count -1 do + g_oCacic.writeDebugLog('#'+inttostr(intAux)+': '+tStringListAuxRequest[intAux]); + End; + + IdHTTP1.Post(strAddress, tStringListAuxRequest, Response_CS); + idHTTP1.Free; + g_oCacic.writeDebugLog('Retorno: "'+Response_CS.DataString+'"'); + Except + Mensagem('ERRO! Comunicação impossível com o endereço ' + strAddress + ': '+Response_CS.DataString,true,intPausaPadrao); + result := '0'; + Exit; + end; + + Application.ProcessMessages; + Try + if (UpperCase(g_oCacic.xmlGetValue('Status', Response_CS.DataString)) <> 'OK') Then + Begin + Mensagem('PROBLEMAS DURANTE A COMUNICAÇÃO',true,intPausaPadrao); + g_oCacic.writeDailyLog('Endereço: ' + strAddress); + g_oCacic.writeDailyLog('Mensagem: ' + Response_CS.DataString); + result := '0'; + end + Else + Begin + result := Response_CS.DataString; + end; + Response_CS.Free; + Except + Begin + Mensagem('PROBLEMAS DURANTE A COMUNICAÇÃO',true,intPausaPadrao); + g_oCacic.writeDailyLog('Endereço: ' + strAddress); + g_oCacic.writeDailyLog('Mensagem: ' + Response_CS.DataString); + result := '0'; + End; + End; +end; + +Function TfrmMapaCacic.RetornaValorVetorUON1(id1 : string) : String; +var I : Integer; +begin + For I := 0 to (Length(VetorUON1)-1) Do + If (VetorUON1[I].id1 = id1) Then Result := VetorUON1[I].nm1; +end; + +Function TfrmMapaCacic.RetornaValorVetorUON1a(id1a : string) : String; +var I : Integer; +begin + For I := 0 to (Length(VetorUON1a)-1) Do + If (VetorUON1a[I].id1a = id1a) Then Result := VetorUON1a[I].nm1a; +end; + +Function TfrmMapaCacic.RetornaValorVetorUON2(id2, idLocal: string) : String; +var I : Integer; +begin + For I := 0 to (Length(VetorUON2)-1) Do + If (VetorUON2[I].id2 = id2) and + (VetorUON2[I].id_local = idLocal) Then Result := VetorUON2[I].nm2; +end; + +procedure TfrmMapaCacic.RecuperaValoresAnteriores(p_strConfigs : String); +begin + Mensagem('Recuperando Valores Anteriores...',false,intPausaPadrao div 3); + + strId_unid_organizacional_nivel1 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','id_unid_organizacional_nivel1',g_oCacic.getLocalFolder + g_oCacic.getInfFileName) ); + if (strId_unid_organizacional_nivel1='') then + strId_unid_organizacional_nivel1 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_UON1', p_strConfigs)); + + strId_unid_organizacional_nivel1a := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','id_unid_organizacional_nivel1a',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + if (strId_unid_organizacional_nivel1a='') then + strId_unid_organizacional_nivel1a := g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_UON1a', p_strConfigs)); + + strId_unid_organizacional_nivel2 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','id_unid_organizacional_nivel2',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + if (strId_unid_organizacional_nivel2='') then + strId_unid_organizacional_nivel2 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_UON2', p_strConfigs)); + + strId_Local := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','id_local',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + if (strId_Local='') then + strId_Local := g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_LOCAL', p_strConfigs)); + + Try + cb_id_unid_organizacional_nivel1.ItemIndex := cb_id_unid_organizacional_nivel1.Items.IndexOf(RetornaValorVetorUON1(strId_unid_organizacional_nivel1)); + cb_id_unid_organizacional_nivel1Change(Nil); // Para filtrar os valores do combo2 de acordo com o valor selecionado no combo1 + cb_id_unid_organizacional_nivel1a.ItemIndex := cb_id_unid_organizacional_nivel1a.Items.IndexOf(RetornaValorVetorUON1(strId_unid_organizacional_nivel1)); + Except + end; + + Try + cb_id_unid_organizacional_nivel1a.ItemIndex := cb_id_unid_organizacional_nivel1a.Items.IndexOf(RetornaValorVetorUON1a(strId_unid_organizacional_nivel1a)); + cb_id_unid_organizacional_nivel1aChange(Nil); // Para filtrar os valores do combo3 de acordo com o valor selecionado no combo2 + cb_id_unid_organizacional_nivel2.ItemIndex := cb_id_unid_organizacional_nivel2.Items.IndexOf(RetornaValorVetorUON2(strId_unid_organizacional_nivel2,strId_Local)); + Except + end; + + lbEtiqueta1.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta1', p_strConfigs)); + lbEtiqueta1a.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta1a', p_strConfigs)); + + strTe_localizacao_complementar := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_localizacao_complementar',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + if (strTe_localizacao_complementar='') then strTe_localizacao_complementar := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_LOC_COMPL', p_strConfigs)); + + // Tentarei buscar informação gravada no Registry + strTe_info_patrimonio1 := g_oCacic.getValueRegistryKey('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio1'); + if (strTe_info_patrimonio1='') then strTe_info_patrimonio1 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio1',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + if (strTe_info_patrimonio1='') then strTe_info_patrimonio1 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO1', p_strConfigs)); + + strTe_info_patrimonio2 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio2',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + if (strTe_info_patrimonio2='') then strTe_info_patrimonio2 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO2', p_strConfigs)); + + strTe_info_patrimonio3 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio3',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + if (strTe_info_patrimonio3='') then strTe_info_patrimonio3 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO3', p_strConfigs)); + + // Tentarei buscar informação gravada no Registry + strTe_info_patrimonio4 := g_oCacic.getValueRegistryKey('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio4'); + if (strTe_info_patrimonio4='') then strTe_info_patrimonio4 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio4',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + + if (strTe_info_patrimonio4='') then strTe_info_patrimonio4 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO4', p_strConfigs)); + + strTe_info_patrimonio5 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio5',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + if (strTe_info_patrimonio5='') then strTe_info_patrimonio5 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO5', p_strConfigs)); + + strTe_info_patrimonio6 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio6',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + if (strTe_info_patrimonio6='') then strTe_info_patrimonio6 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO6', p_strConfigs)); +end; + +procedure TfrmMapaCacic.MontaCombos(p_strConfigs : String); +var Parser : TXmlParser; + i : integer; + strAux, + strAux1, + strTagName, + strItemName : string; +begin + Mensagem('Montando Listas para Seleção de Unidades Organizacionais...',false,intPausaPadrao div 3); + + Parser := TXmlParser.Create; + Parser.Normalize := True; + Parser.LoadFromBuffer(PAnsiChar(p_strConfigs)); + g_oCacic.writeDebugLog('p_strConfigs: '+p_strConfigs); + Parser.StartScan; + i := -1; + strItemName := ''; + strTagName := ''; + While Parser.Scan DO + Begin + strItemName := UpperCase(Parser.CurName); + if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT1') Then + Begin + i := i + 1; + SetLength(VetorUON1, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. + strTagName := 'IT1'; + end + else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT1') then + strTagName := '' + else if (Parser.CurPartType in [ptContent, ptCData]) and (strTagName='IT1')Then + Begin + strAux1 := g_oCacic.deCrypt(Parser.CurContent); + if (strItemName = 'ID1') then + Begin + VetorUON1[i].id1 := strAux1; + g_oCacic.writeDebugLog('Gravei VetorUON1.id1: "'+strAux1+'"'); + End + else if (strItemName = 'NM1') then + Begin + VetorUON1[i].nm1 := strAux1; + g_oCacic.writeDebugLog('Gravei VetorUON1.nm1: "'+strAux1+'"'); + End; + End; + End; + + // Código para montar o combo 2 + Parser.StartScan; + strTagName := ''; + strAux1 := ''; + + i := -1; + While Parser.Scan DO + Begin + strItemName := UpperCase(Parser.CurName); + if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT1A') Then + Begin + i := i + 1; + SetLength(VetorUON1a, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. + strTagName := 'IT1A'; + end + else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT1A') then + strTagName := '' + else if (Parser.CurPartType in [ptContent, ptCData]) and (strTagName='IT1A')Then + Begin + strAux1 := g_oCacic.deCrypt(Parser.CurContent); + if (strItemName = 'ID1') then + Begin + VetorUON1a[i].id1 := strAux1; + g_oCacic.writeDebugLog('Gravei VetorUON1a.id1: "'+strAux1+'"'); + End + else if (strItemName = 'SG_LOC') then + Begin + strAux := ' ('+strAux1 + ')'; + End + else if (strItemName = 'ID1A') then + Begin + VetorUON1a[i].id1a := strAux1; + g_oCacic.writeDebugLog('Gravei VetorUON1a.id1a: "'+strAux1+'"'); + End + else if (strItemName = 'NM1A') then + Begin + VetorUON1a[i].nm1a := strAux1+strAux; + g_oCacic.writeDebugLog('Gravei VetorUON1a.nm1a: "'+strAux1+strAux+'"'); + End + else if (strItemName = 'ID_LOCAL') then + Begin + VetorUON1a[i].id_local := strAux1; + g_oCacic.writeDebugLog('Gravei VetorUON1a.id_local: "'+strAux1+'"'); + End; + + End; + end; + + // Código para montar o combo 3 + Parser.StartScan; + strTagName := ''; + i := -1; + + While Parser.Scan DO + Begin + strItemName := UpperCase(Parser.CurName); + if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT2') Then + Begin + i := i + 1; + SetLength(VetorUON2, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. + strTagName := 'IT2'; + end + else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT2') then + strTagName := '' + else if (Parser.CurPartType in [ptContent, ptCData]) and (strTagName='IT2')Then + Begin + strAux1 := g_oCacic.deCrypt(Parser.CurContent); + if (strItemName = 'ID1A') then + Begin + VetorUON2[i].id1a := strAux1; + g_oCacic.writeDebugLog('Gravei VetorUON2.id1a: "'+strAux1+'"'); + End + else if (strItemName = 'ID2') then + Begin + VetorUON2[i].id2 := strAux1; + g_oCacic.writeDebugLog('Gravei VetorUON2.id2: "'+strAux1+'"'); + End + else if (strItemName = 'NM2') then + Begin + VetorUON2[i].nm2 := strAux1; + g_oCacic.writeDebugLog('Gravei VetorUON2.nm2: "'+strAux1+'"'); + End + else if (strItemName = 'ID_LOCAL') then + Begin + VetorUON2[i].id_local := strAux1; + g_oCacic.writeDebugLog('Gravei VetorUON2.id_local: "'+strAux1+'"'); + End; + + End; + end; + Parser.Free; + + // Como os itens do combo1 nunca mudam durante a execução do programa (ao contrario dos combo2 e 3), posso colocar o seu preenchimento aqui mesmo. + cb_id_unid_organizacional_nivel1.Items.Clear; + For i := 0 to Length(VetorUON1) - 1 Do + cb_id_unid_organizacional_nivel1.Items.Add(VetorUON1[i].nm1); + + if (Length(VetorUON1) = 0) then + Begin + frmMapaCacic.Mensagem('ATENÇÃO! Não encontrei Entidades, Linhas de Negócio ou Órgãos cadastrados para esta subrede.',true,intPausaPadrao * 2); + Finalizar(true); + End; + + For i := 0 to Length(VetorUON1) - 1 Do + Begin + g_oCacic.writeDebugLog('VetorUON1['+IntToStr(i)+'].id1='+VetorUON1[i].id1); + g_oCacic.writeDebugLog('VetorUON1['+IntToStr(i)+'].nm1='+VetorUON1[i].nm1); + End; + + For i := 0 to Length(VetorUON1a) - 1 Do + Begin + g_oCacic.writeDebugLog('VetorUON1a['+IntToStr(i)+'].id1='+VetorUON1a[i].id1); + g_oCacic.writeDebugLog('VetorUON1a['+IntToStr(i)+'].id1a='+VetorUON1a[i].id1a); + g_oCacic.writeDebugLog('VetorUON1a['+IntToStr(i)+'].nm1a='+VetorUON1a[i].nm1a); + g_oCacic.writeDebugLog('VetorUON1a['+IntToStr(i)+'].id_local='+VetorUON1a[i].id_local); + End; + + For i := 0 to Length(VetorUON2) - 1 Do + Begin + g_oCacic.writeDebugLog('VetorUON2['+IntToStr(i)+'].id1a='+VetorUON2[i].id1a); + g_oCacic.writeDebugLog('VetorUON2['+IntToStr(i)+'].id2='+VetorUON2[i].id2); + g_oCacic.writeDebugLog('VetorUON2['+IntToStr(i)+'].nm2='+VetorUON2[i].nm2); + g_oCacic.writeDebugLog('VetorUON2['+IntToStr(i)+'].id_local='+VetorUON2[i].id_local); + End; +end; + + +procedure TfrmMapaCacic.cb_id_unid_organizacional_nivel1Change(Sender: TObject); +var i, j: Word; + strIdUON1 : String; +begin + g_oCacic.writeDebugLog('Nível 1 CHANGE'); + // Filtro os itens do combo2, de acordo com o item selecionado no combo1 + strIdUON1 := VetorUON1[cb_id_unid_organizacional_nivel1.ItemIndex].id1; + cb_id_unid_organizacional_nivel1a.Items.Clear; + cb_id_unid_organizacional_nivel2.Items.Clear; + cb_id_unid_organizacional_nivel1a.Enabled := false; + cb_id_unid_organizacional_nivel2.Enabled := false; + SetLength(VetorUON1aFiltrado, 0); + + g_oCacic.writeDebugLog('Tamanho de VetorUON1..: '+IntToStr(Length(VetorUON1))); + g_oCacic.writeDebugLog('ItemIndex de cb_nivel1: '+IntToStr(cb_id_unid_organizacional_nivel1.ItemIndex)); + g_oCacic.writeDebugLog('Tamanho de VetorUON1a.: '+IntToStr(Length(VetorUON1a))); + For i := 0 to Length(VetorUON1a) - 1 Do + Begin + Try + if VetorUON1a[i].id1 = strIdUON1 then + Begin + g_oCacic.writeDebugLog('Add em cb_nivel1a: '+VetorUON1a[i].nm1a); + cb_id_unid_organizacional_nivel1a.Items.Add(VetorUON1a[i].nm1a); + j := Length(VetorUON1aFiltrado); + SetLength(VetorUON1aFiltrado, j + 1); + VetorUON1aFiltrado[j] := VetorUON1a[i].id1a + '#' +VetorUON1a[i].id_local; + g_oCacic.writeDebugLog('VetorUON1aFiltrado['+IntToStr(j)+']= '+VetorUON1aFiltrado[j]); + end; + Except + End; + end; + if (cb_id_unid_organizacional_nivel1a.Items.Count > 0) then + Begin + cb_id_unid_organizacional_nivel1a.Enabled := true; + cb_id_unid_organizacional_nivel1a.ItemIndex := 0; + g_oCacic.writeDebugLog('Provocando CHANGE em nivel1a'); + cb_id_unid_organizacional_nivel1aChange(nil); + End; +end; + +procedure TfrmMapaCacic.cb_id_unid_organizacional_nivel1aChange( + Sender: TObject); +var i, j: Word; + strIdUON1a, + strIdLocal : String; + intAux : integer; + tstrAux : TStrings; +begin + g_oCacic.writeDebugLog('Nível 1a CHANGE'); + // Filtro os itens do combo2, de acordo com o item selecionado no combo1 + //intAux := IfThen(cb_id_unid_organizacional_nivel1a.Items.Count > 1,cb_id_unid_organizacional_nivel1a.ItemIndex+1,0); + intAux := cb_id_unid_organizacional_nivel1a.ItemIndex; + g_oCacic.writeDebugLog('cb_id_unid_organizacional_nivel1a.ItemIndex = '+intToStr(cb_id_unid_organizacional_nivel1a.ItemIndex)); + + g_oCacic.writeDebugLog('VetorUON1aFiltrado['+intToStr(cb_id_unid_organizacional_nivel1a.ItemIndex)+'] => '+VetorUON1aFiltrado[cb_id_unid_organizacional_nivel1a.ItemIndex]); + tstrAux := TStrings.Create; + tstrAux := g_oCacic.explode(VetorUON1aFiltrado[cb_id_unid_organizacional_nivel1a.ItemIndex],'#'); + + strIdUON1a := tstrAux[0]; + strIdLocal := tstrAux[1]; + + tstrAux.Free; + + g_oCacic.writeDebugLog('strIdLocal = '+strIdLocal); + cb_id_unid_organizacional_nivel2.Items.Clear; + cb_id_unid_organizacional_nivel2.Enabled := false; + SetLength(VetorUON2Filtrado, 0); + + g_oCacic.writeDebugLog('Tamanho de VetorUON1a..: '+IntToStr(Length(VetorUON1a))); + g_oCacic.writeDebugLog('ItemIndex de cb_nivel1a: '+IntToStr(cb_id_unid_organizacional_nivel1a.ItemIndex)); + g_oCacic.writeDebugLog('Tamanho de VetorUON2...: '+IntToStr(Length(VetorUON2))); + + For i := 0 to Length(VetorUON2) - 1 Do + Begin + Try + if (VetorUON2[i].id1a = strIdUON1a) and + (VetorUON2[i].id_local = strIdLocal) then + Begin + g_oCacic.writeDebugLog('Add em cb_nivel2: '+VetorUON2[i].nm2); + cb_id_unid_organizacional_nivel2.Items.Add(VetorUON2[i].nm2); + j := Length(VetorUON2Filtrado); + SetLength(VetorUON2Filtrado, j + 1); + VetorUON2Filtrado[j] := VetorUON2[i].id2 + '#' + VetorUON2[i].id_local; + g_oCacic.writeDebugLog('VetorUON2Filtrado['+IntToStr(j)+']= '+VetorUON2Filtrado[j]); + end; + Except + End; + end; + if (cb_id_unid_organizacional_nivel2.Items.Count > 0) then + Begin + cb_id_unid_organizacional_nivel2.Enabled := true; + cb_id_unid_organizacional_nivel2.ItemIndex := 0; + End; +end; + + +procedure TfrmMapaCacic.AtualizaPatrimonio(Sender: TObject); +var strIdUON1, + strIdUON1a, + strIdUON2, + strIdLocal, + strRetorno : String; + tstrListAux : TStringList; + tstrAux : TStrings; +begin + tstrAux := TStrings.Create; + tstrAux := g_oCacic.explode(VetorUON2Filtrado[cb_id_unid_organizacional_nivel2.ItemIndex],'#'); + Try + strIdUON1 := VetorUON1[cb_id_unid_organizacional_nivel1.ItemIndex].id1; + strIdUON2 := tstrAux[0]; + strIdLocal := tstrAux[1]; + Except + end; + + tstrAux := g_oCacic.explode(VetorUON1aFiltrado[cb_id_unid_organizacional_nivel1a.ItemIndex],'#'); + Try + strIdUON1a := tstrAux[0]; + Except + end; + + tstrAux.Free; + Mensagem('Enviando Informações Coletadas ao Banco de Dados...',false,intPausaPadrao div 3); + // Envio dos Dados Coletados ao Banco de Dados + tstrListAux := TStringList.Create; + tstrListAux.Values['te_node_address'] := g_oCacic.GetValueFromFile('TcpIp','TE_NODE_ADDRESS' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + tstrListAux.Values['id_so'] := g_oCacic.GetValueFromFile('Configs','ID_SO' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + tstrListAux.Values['te_so'] := g_oCacic.enCrypt(g_oCacic.getWindowsStrId()); + tstrListAux.Values['id_ip_rede'] := g_oCacic.GetValueFromFile('TcpIp','ID_IP_REDE' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + tstrListAux.Values['te_ip'] := g_oCacic.GetValueFromFile('TcpIp','TE_IP' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + tstrListAux.Values['te_nome_computador'] := g_oCacic.GetValueFromFile('TcpIp','TE_NOME_COMPUTADOR' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + tstrListAux.Values['te_workgroup'] := g_oCacic.GetValueFromFile('TcpIp','TE_WORKGROUP' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + tstrListAux.Values['id_usuario'] := g_oCacic.enCrypt(frmMapaCacic.strId_usuario); + tstrListAux.Values['id_unid_organizacional_nivel1'] := g_oCacic.enCrypt(strIdUON1); + tstrListAux.Values['id_unid_organizacional_nivel1a']:= g_oCacic.enCrypt(strIdUON1A); + tstrListAux.Values['id_unid_organizacional_nivel2'] := g_oCacic.enCrypt(strIdUON2); + tstrListAux.Values['te_localizacao_complementar' ] := g_oCacic.enCrypt(ed_te_localizacao_complementar.Text); + tstrListAux.Values['te_info_patrimonio1' ] := g_oCacic.enCrypt(ed_te_info_patrimonio1.Text); + tstrListAux.Values['te_info_patrimonio2' ] := g_oCacic.enCrypt(ed_te_info_patrimonio2.Text); + tstrListAux.Values['te_info_patrimonio3' ] := g_oCacic.enCrypt(ed_te_info_patrimonio3.Text); + tstrListAux.Values['te_info_patrimonio4' ] := g_oCacic.enCrypt(ed_te_info_patrimonio4.Text); + tstrListAux.Values['te_info_patrimonio5' ] := g_oCacic.enCrypt(ed_te_info_patrimonio5.Text); + tstrListAux.Values['te_info_patrimonio6' ] := g_oCacic.enCrypt(ed_te_info_patrimonio6.Text); + + g_oCacic.writeDebugLog('Informações para contato com mapa_set_patrimonio:'); + g_oCacic.writeDebugLog('te_node_address: '+tstrListAux.Values['te_node_address']); + g_oCacic.writeDebugLog('id_so: '+tstrListAux.Values['id_so']); + g_oCacic.writeDebugLog('te_so: '+tstrListAux.Values['te_so']); + g_oCacic.writeDebugLog('id_ip_rede: '+tstrListAux.Values['id_ip_rede']); + g_oCacic.writeDebugLog('te_ip: '+tstrListAux.Values['te_ip']); + g_oCacic.writeDebugLog('te_nome_computador: '+tstrListAux.Values['te_nome_computador']); + g_oCacic.writeDebugLog('te_workgroup: '+tstrListAux.Values['te_workgroup']); + + strRetorno := frmMapaCacic.ComunicaServidor('mapa_set_patrimonio.php', tstrListAux, ''); + tstrListAux.Free; + + if not (g_oCacic.xmlGetValue('STATUS', strRetorno)='OK') then + Mensagem('ATENÇÃO: PROBLEMAS NO ENVIO DAS INFORMAÇÕES COLETADAS AO BANCO DE DADOS...',true,intPausaPadrao) + else + Begin + Mensagem('Salvando Informações Coletadas em Base Local...',false,intPausaPadrao div 3); + g_oCacic.setValueToFile('Patrimonio','id_unid_organizacional_nivel1' , g_oCacic.enCrypt( strIdUON1), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','id_unid_organizacional_nivel1a', g_oCacic.enCrypt(strIdUON1a), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','id_unid_organizacional_nivel2' , g_oCacic.enCrypt(strIdUON2) , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','id_local' , g_oCacic.enCrypt(strIdLocal), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','te_localizacao_complementar' , g_oCacic.enCrypt(ed_te_localizacao_complementar.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio1' , g_oCacic.enCrypt(ed_te_info_patrimonio1.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio2' , g_oCacic.enCrypt(ed_te_info_patrimonio2.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio3' , g_oCacic.enCrypt(ed_te_info_patrimonio3.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio4' , g_oCacic.enCrypt(ed_te_info_patrimonio4.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio5' , g_oCacic.enCrypt(ed_te_info_patrimonio5.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio6' , g_oCacic.enCrypt(ed_te_info_patrimonio6.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','ultima_rede_obtida' , g_oCacic.GetValueFromFile('TcpIp','ID_IP_REDE',g_oCacic.getLocalFolder + 'GER_COLS.inf'),g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + g_oCacic.setValueToFile('Patrimonio','dt_ultima_renovacao' , g_oCacic.enCrypt(FormatDateTime('yyyymmddhhnnss', Now)),g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + + g_oCacic.setValueRegistryKey('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio1', ed_te_info_patrimonio1.Text); + g_oCacic.setValueRegistryKey('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio4', ed_te_info_patrimonio4.Text); + End; + Finalizar(true); +end; + +procedure TfrmMapaCacic.MontaInterface(p_strConfigs : String); +Begin + Mensagem('Montando Interface para Coleta de Informações...',false,intPausaPadrao div 3); + + lbEtiqueta1.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta1', p_strConfigs)); + lbEtiqueta1.Visible := true; + cb_id_unid_organizacional_nivel1.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta1', p_strConfigs)); + cb_id_unid_organizacional_nivel1.Visible := true; + + lbEtiqueta1a.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta1a', p_strConfigs)); + lbEtiqueta1a.Visible := true; + cb_id_unid_organizacional_nivel1a.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta1a', p_strConfigs)); + cb_id_unid_organizacional_nivel1a.Visible := true; + + lbEtiqueta2.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta2', p_strConfigs)); + lbEtiqueta2.Visible := true; + cb_id_unid_organizacional_nivel2.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta2', p_strConfigs)); + cb_id_unid_organizacional_nivel2.Visible := true; + + lbEtiqueta3.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta3', p_strConfigs)); + lbEtiqueta3.Visible := true; + ed_te_localizacao_complementar.Text := strTe_localizacao_complementar; + ed_te_localizacao_complementar.Visible := true; + + g_oCacic.writeDebugLog('in_exibir_etiqueta4 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta4', p_strConfigs))+'"'); + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta4', p_strConfigs))) = 'S') then + begin + lbEtiqueta4.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta4', p_strConfigs)); + lbEtiqueta4.Visible := true; + ed_te_info_patrimonio1.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta4', p_strConfigs)); + ed_te_info_patrimonio1.Text := strTe_info_patrimonio1; + ed_te_info_patrimonio1.visible := True; + end; + + g_oCacic.writeDebugLog('in_exibir_etiqueta5 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta5', p_strConfigs))+'"'); + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta5', p_strConfigs))) = 'S') then + begin + lbEtiqueta5.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta5', p_strConfigs)); + lbEtiqueta5.Visible := true; + ed_te_info_patrimonio2.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta5', p_strConfigs)); + ed_te_info_patrimonio2.Text := strTe_info_patrimonio2; + ed_te_info_patrimonio2.visible := True; + end; + + g_oCacic.writeDebugLog('in_exibir_etiqueta6 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta6', p_strConfigs))+'"'); + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta6', p_strConfigs))) = 'S') then + begin + lbEtiqueta6.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta6', p_strConfigs)); + lbEtiqueta6.Visible := true; + ed_te_info_patrimonio3.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta6', p_strConfigs)); + ed_te_info_patrimonio3.Text := strTe_info_patrimonio3; + ed_te_info_patrimonio3.visible := True; + end; + + g_oCacic.writeDebugLog('in_exibir_etiqueta7 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta7', p_strConfigs))+'"'); + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta7', p_strConfigs))) = 'S') then + begin + lbEtiqueta7.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta7', p_strConfigs)); + lbEtiqueta7.Visible := true; + ed_te_info_patrimonio4.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta7', p_strConfigs)); + ed_te_info_patrimonio4.Text := strTe_info_patrimonio4; + ed_te_info_patrimonio4.visible := True; + end; + + g_oCacic.writeDebugLog('in_exibir_etiqueta8 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta8', p_strConfigs))+'"'); + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta8', p_strConfigs))) = 'S') then + begin + lbEtiqueta8.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta8', p_strConfigs)); + lbEtiqueta8.Visible := true; + ed_te_info_patrimonio5.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta8', p_strConfigs)); + ed_te_info_patrimonio5.Text := strTe_info_patrimonio5; + ed_te_info_patrimonio5.visible := True; + end; + + g_oCacic.writeDebugLog('in_exibir_etiqueta9 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta9', p_strConfigs))+'"'); + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta9', p_strConfigs))) = 'S') then + begin + lbEtiqueta9.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta9', p_strConfigs)); + lbEtiqueta9.Visible := true; + ed_te_info_patrimonio6.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta9', p_strConfigs)); + ed_te_info_patrimonio6.Text := strTe_info_patrimonio6; + ed_te_info_patrimonio6.visible := True; + end; + + Application.ProcessMessages; + Mensagem('',false,0); + btGravarInformacoes.Visible := true; +end; + +procedure TfrmMapaCacic.FormClose(Sender: TObject; var Action: TCloseAction); +begin + Finalizar(true); +end; + +procedure TfrmMapaCacic.CriaFormSenha(Sender: TObject); +begin + Application.CreateForm(TfrmAcesso, frmAcesso); +end; + +// Baixada de http://www.infoeng.hpg.ig.com.br/borland_delphi_dicas_2.htm +function TfrmMapaCacic.LetrasDrives: string; +var +Drives: DWord; +I, Tipo: byte; +v_Unidade : string; +begin +Result := ''; +Drives := GetLogicalDrives; +if Drives <> 0 then +for I := 65 to 90 do + if ((Drives shl (31 - (I - 65))) shr 31) = 1 then + Begin + v_Unidade := Char(I) + ':\'; + Tipo := GetDriveType(PChar(v_Unidade)); + case Tipo of + DRIVE_FIXED: Result := Result + Char(I); + end; + End; +end; +// By Muad Dib 2003 +// at http://www.planet-source-code.com. +// Excelente!!! +function TfrmMapaCacic.SearchFile(p_Drive,p_File:string) : boolean; +var sr:TSearchRec; + sDirList:TStringList; + i:integer; + strResSearch : String; +begin + Result := false; + strResSearch := ''; + if FindFirst(p_Drive+p_File,faAnyFile,sr) = 0 then + Begin + strResSearch := p_Drive+p_File; + Result := true; + End + else + Begin + repeat + until FindNext(sr)<>0; + FindClose(sr); + sDirList:= TStringList.Create; + try + GetSubDirs(p_Drive,sDirList); + for i:=0 to sDirList.Count-1 do + if (sDirList[i]<>'.') and (sDirList[i]<>'..') then + begin + //Application.ProcessMessages; + if (SearchFile(IncludeTrailingPathDelimiter(p_Drive+sDirList[i]),p_File)) then + Begin + Result := true; + Break; + End; + end; + finally + sDirList.Free; + End; + end; +end; +procedure TfrmMapaCacic.GetSubDirs(Folder:string; sList:TStringList); + var + sr:TSearchRec; +begin + if FindFirst(Folder+'*.*',faDirectory,sr)=0 then + try + repeat + if(sr.Attr and faDirectory)=faDirectory then + sList.Add(sr.Name); + until FindNext(sr)<>0; + finally + FindClose(sr); + end; +end; + +procedure TfrmMapaCacic.mapa; +var strConfigs : String; + tstrAUX : TStrings; +begin + tstrAUX := TStrings.Create; + + Try + strConfigs := g_oCacic.GetValueFromFile('Patrimonio','Configs',g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + gbLeiaComAtencao.Visible := true; + gbInformacoesSobreComputador.Visible := true; + MontaCombos(strConfigs); + RecuperaValoresAnteriores(strConfigs); + MontaInterface(strConfigs); + Application.ProcessMessages; + Except + End; +End; + +procedure TfrmMapaCacic.FormActivate(Sender: TObject); +var intAux : integer; + strLetrasDrives, + strRetorno, + v_strTeLocalFolder, + strAux : String; + Request_mapa : TStringList; +begin + if not boolFinalizar then + Begin + g_oCacic := TCACIC.Create(); + + g_oCacic.setBoolCipher(true); + frmMapaCacic.lbVersao.Caption := 'Versão: ' + g_oCacic.GetVersionInfo(ParamStr(0)); + + if (g_oCacic.isWindowsNTPlataform()) and (not g_oCacic.isWindowsAdmin()) then + MessageDLG(#13#10+'ATENÇÃO! Essa aplicação requer execução com nível administrativo.',mtError,[mbOK],0) + else + Begin + // Buscarei o caminho do Sistema em \WinDIR\chkSIS.ini + v_strTeLocalFolder := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeLocalFolder',g_oCacic.getWinDir + 'chksis.ini')); + + if not (v_strTeLocalFolder = '') then + Begin + g_oCacic.setLocalFolder(v_strTeLocalFolder); + + // A existência e bloqueio do arquivo abaixo evitará que o Agente Principal entre em ação + AssignFile(v_Aguarde,g_oCacic.getLocalFolder + '\temp\aguarde_MAPACACIC.txt'); {Associa o arquivo a uma variável do tipo TextFile} + {$IOChecks off} + Reset(v_Aguarde); {Abre o arquivo texto} + {$IOChecks on} + if (IOResult <> 0) then // Arquivo não existe, será recriado. + Rewrite (v_Aguarde); + + Append(v_Aguarde); + Writeln(v_Aguarde,'Apenas um pseudo-cookie para o Agente Principal esperar o término de MapaCACIC'); + Append(v_Aguarde); + + strAux := Trim(g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','dt_ultima_renovacao',g_oCacic.getLocalFolder + 'GER_COLS.inf'))); + if not FileExists(g_oCacic.getLocalFolder + g_oCacic.getInfFileName) or + (g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','dt_ultima_renovacao',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)) = '') or + (strAux <> '') and (StrToInt64(g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','dt_ultima_renovacao',g_oCacic.getLocalFolder + g_oCacic.getInfFileName))) < StrToInt64(g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','dt_ultima_renovacao',g_oCacic.getLocalFolder + 'GER_COLS.inf')))) then + CopyFile(PChar(g_oCacic.getLocalFolder + 'GER_COLS.inf'), PChar(g_oCacic.getLocalFolder + g_oCacic.getInfFileName), true); + + frmMapaCacic.edTeWebManagerAddress.Caption := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress', g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); + + frmMapaCacic.lbMensagens.Caption := 'Entrada de Dados para Autenticação no Módulo Gerente WEB Cacic'; + if (g_oCacic.deCrypt( g_oCacic.GetValueFromFile('TcpIp','TE_NODE_ADDRESS' , g_oCacic.getLocalFolder + 'GER_COLS.inf'))='') then + Begin + frmMapaCacic.boolAcessoOK := false; + MessageDLG(#13#10+'Atenção! É necessário executar as coletas do Sistema Cacic.' + #13#10 + #13#10 + + 'Caso o Sistema Cacic já esteja instalado, clique com botão direito' + #13#10 + + 'sobre o ícone da bandeja, escolha a opção "Executar Agora" e aguarde' + #13#10 + + 'o fim do processo.',mtError,[mbOK],0); + frmMapaCacic.Finalizar(false); + End + else + Begin + + g_oCacic.checkDebugMode; + g_oCacic.writeDebugLog('Versão do MapaCacic: '+frmMapaCacic.lbVersao.Caption); + + // Acessar... + CriaFormSenha(nil); + frmAcesso.ShowModal; + + if boolFinalizar then + Finalizar(false) + else if boolAcessoOK then + Begin + pnMensagens.Visible := true; + Mensagem('Efetuando Comunicação com o Módulo Gerente WEB em "'+g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress',g_oCacic.getLocalFolder + 'GER_COLS.inf'))+'"...',false,intPausaPadrao div 3); + frmAcesso.Free; + + // Povoamento com dados de configurações da interface patrimonial + // Solicita ao servidor as configurações para a Coleta de Informações de Patrimônio + Request_mapa := TStringList.Create; + Request_mapa.Values['te_node_address'] := g_oCacic.GetValueFromFile('TcpIp','TE_NODE_ADDRESS' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); + Request_mapa.Values['id_so'] := g_oCacic.GetValueFromFile('Configs','ID_SO' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); + Request_mapa.Values['te_so'] := g_oCacic.enCrypt(g_oCacic.getWindowsStrId()); + Request_mapa.Values['id_ip_rede'] := g_oCacic.GetValueFromFile('TcpIp','ID_IP_REDE' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); + Request_mapa.Values['te_ip'] := g_oCacic.GetValueFromFile('TcpIp','TE_IP' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); + Request_mapa.Values['te_nome_computador']:= g_oCacic.GetValueFromFile('TcpIp','TE_NOME_COMPUTADOR', g_oCacic.getLocalFolder + 'GER_COLS.inf'); + Request_mapa.Values['te_workgroup'] := g_oCacic.GetValueFromFile('TcpIp','TE_WORKGROUP' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); + Request_mapa.Values['id_usuario'] := g_oCacic.enCrypt(frmMapaCacic.strId_usuario); + + strRetorno := frmMapaCacic.ComunicaServidor('mapa_get_patrimonio.php', Request_mapa, '.'); + + g_oCacic.writeDebugLog('Retorno: "'+strRetorno+'"'); + + if (g_oCacic.xmlGetValue('STATUS', strRetorno)='OK') then + Begin + Mensagem('Comunicação Efetuada com Sucesso! Salvando as Configurações Obtidas...',false,intPausaPadrao div 3); + g_oCacic.setValueToFile('Patrimonio','Configs', strRetorno, g_oCacic.getLocalFolder + g_oCacic.getInfFileName); + End + else + Begin + Mensagem('PROBLEMAS NA COMUNICAÇÃO COM O MÓDULO GERENTE WEB...',true,intPausaPadrao); + Finalizar(true); + End; + + Request_mapa.Free; + + mapa; + End; + End; + End + else + Begin + frmMapaCacic.boolAcessoOK := false; + MessageDLG(#13#10+'Atenção! É necessário reinstalar o CACIC nesta estação.' + #13#10 + #13#10 + + 'A estrutura encontra-se corrompida.' + #13#10,mtError,[mbOK],0); + frmMapaCacic.Finalizar(false); + End; + End; + End; +end; + +procedure TfrmMapaCacic.FormCreate(Sender: TObject); +begin + boolFinalizar := false; +end; + +end. diff --git a/mapa/mapa.res b/mapa/mapa.res new file mode 100755 index 0000000..8227be9 Binary files /dev/null and b/mapa/mapa.res differ diff --git a/mapa/mapa_icon.ico b/mapa/mapa_icon.ico new file mode 100755 index 0000000..9421fff Binary files /dev/null and b/mapa/mapa_icon.ico differ diff --git a/mapa/mapacacic.cfg b/mapa/mapacacic.cfg new file mode 100755 index 0000000..bb5a036 --- /dev/null +++ b/mapa/mapacacic.cfg @@ -0,0 +1,43 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J- +-$K- +-$L+ +-$M- +-$N+ +-$O+ +-$P+ +-$Q- +-$R- +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-E"C:\arariboia_mod_BINARIOS" +-LE"c:\program files\borland\delphi7\Projects\Bpl" +-LN"c:\program files\borland\delphi7\Projects\Bpl" +-U"C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion" +-O"C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion" +-I"C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion" +-R"C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion" +-w-UNSAFE_TYPE +-w-UNSAFE_CODE +-w-UNSAFE_CAST diff --git a/mapa/mapacacic.dof b/mapa/mapacacic.dof new file mode 100755 index 0000000..e67adca --- /dev/null +++ b/mapa/mapacacic.dof @@ -0,0 +1,154 @@ +[FileVersion] +Version=7.0 +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=0 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +NamespacePrefix= +SymbolDeprecated=1 +SymbolLibrary=1 +SymbolPlatform=1 +UnitLibrary=1 +UnitPlatform=1 +UnitDeprecated=1 +HResultCompat=1 +HidingMember=1 +HiddenVirtual=1 +Garbage=1 +BoundsError=1 +ZeroNilCompat=1 +StringConstTruncated=1 +ForLoopVarVarPar=1 +TypedConstVarPar=1 +AsgToTypedConst=1 +CaseLabelRange=1 +ForVariable=1 +ConstructingAbstract=1 +ComparisonFalse=1 +ComparisonTrue=1 +ComparingSignedUnsigned=1 +CombiningSignedUnsigned=1 +UnsupportedConstruct=1 +FileOpen=1 +FileOpenUnitSrc=1 +BadGlobalSymbol=1 +DuplicateConstructorDestructor=1 +InvalidDirective=1 +PackageNoLink=1 +PackageThreadVar=1 +ImplicitImport=1 +HPPEMITIgnored=1 +NoRetVal=1 +UseBeforeDef=1 +ForLoopVarUndef=1 +UnitNameMismatch=1 +NoCFGFileFound=1 +MessageDirective=1 +ImplicitVariants=1 +UnicodeToLocale=1 +LocaleToUnicode=1 +ImagebaseMultiple=1 +SuspiciousTypecast=1 +PrivatePropAccessor=1 +UnsafeType=0 +UnsafeCode=0 +UnsafeCast=0 +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +[Directories] +OutputDir=C:\arariboia_mod_BINARIOS +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath=C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion +Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOffice2k;MSI_D7_Rtl +Conditionals= +DebugSourceDirs=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Hashes +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= +[Language] +ActiveLang= +ProjectLang= +RootDir=C:\Arquivos de programas\Borland\Delphi7\Bin\ +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=0 +MajorVer=2 +MinorVer=6 +Release=0 +Build=2 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1046 +CodePage=1252 +[Version Info Keys] +CompanyName=Dataprev - Emp. de TI da Prev.Social - UDSL/SSLC +FileDescription=Sistema CACIC - Módulo Avulso para Coleta de Informações Patrimoniais +FileVersion=2.6.0.2 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName=MapaCACIC +ProductVersion=2.6-Beta-2 +Comments=Licença: GNU/LGPL +[HistoryLists\hlDebugSourcePath] +Count=2 +Item0=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Hashes +Item1=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7 +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[HistoryLists\hlSearchPath] +Count=4 +Item0=C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion +Item1=C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP +Item2=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Ciphers;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Hashes +Item3=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7 +[HistoryLists\hlOutputDirectorry] +Count=3 +Item0=C:\arariboia_mod_BINARIOS +Item1=Z:\cacic2\repositorio +Item2=..\ diff --git a/mapa/mapacacic.dpr b/mapa/mapacacic.dpr new file mode 100755 index 0000000..93c5097 --- /dev/null +++ b/mapa/mapacacic.dpr @@ -0,0 +1,60 @@ +(** +--------------------------------------------------------------------------------------------------------------------------------------------------------------- +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil + +Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais + +O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. + +Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer +MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. + +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software +Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +--------------------------------------------------------------------------------------------------------------------------------------------------------------- +*) + +program MapaCacic; + +uses + Forms, + Windows, + main_mapa in 'main_mapa.pas' {frmMapaCacic}, + acesso in 'acesso.pas' {frmAcesso}, + CACIC_Library in '..\CACIC_Library.pas'; +// LibXmlParser in '..\LibXmlParser.pas'; + +{$R *.res} + +const + CACIC_APP_NAME = 'MapaCacic'; + +var + hwind:HWND; + oCacic : TCACIC; + +begin + oCacic := TCACIC.Create(); + + if( oCacic.isAppRunning( CACIC_APP_NAME ) ) + then begin + hwind := 0; + repeat // The string 'My app' must match your App Title (below) + hwind:=Windows.FindWindowEx(0,hwind,'TApplication', CACIC_APP_NAME ); + until (hwind<>Application.Handle); + IF (hwind<>0) then + begin + Windows.ShowWindow(hwind,SW_SHOWNORMAL); + Windows.SetForegroundWindow(hwind); + end; + FreeMemory(0); + end + else + begin + Application.Initialize; + Application.CreateForm(TfrmMapaCacic, frmMapaCacic); + Application.Run; + end; + oCacic.Free(); +end. diff --git a/mapa/mapacacic.dproj b/mapa/mapacacic.dproj new file mode 100755 index 0000000..96dd7d5 --- /dev/null +++ b/mapa/mapacacic.dproj @@ -0,0 +1,92 @@ + + + {f5ef289b-8ae5-459f-a58d-b460febcbefd} + mapacacic.dpr + Debug + AnyCPU + DCC32 + ..\mapacacic.exe + + + 7.0 + False + False + 0 + ..\ + C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion + C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion + C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion + C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion + RELEASE + + + 7.0 + ..\ + C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion + C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion + C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion + C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion + DEBUG + + + Delphi.Personality + VCLApplication + + + C:\Arquivos de programas\Borland\Delphi7\Mitec\D7;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Hashes + False + True + False + + + C:\Arquivos de programas\Borland\Delphi7\Bin\ + + + True + False + 2 + 6 + 0 + 0 + False + False + False + False + False + 1046 + 1252 + + + Dataprev - Emp. de TI da Prev.Social - UDSL/SSLC + Sistema CACIC - Módulo Avulso para Coleta de Informações Patrimoniais + 2.5.9.0 + + + + + MapaCACIC + 2.6.0.0 + Licença: GNU/LGPL + + + mapacacic.dpr + + + + + + + MainSource + + + +
frmAcesso
+
+ + +
frmMapaCacic
+
+ +
+ +
\ No newline at end of file diff --git a/mapa/mapacacic.identcache b/mapa/mapacacic.identcache new file mode 100755 index 0000000..9e36090 Binary files /dev/null and b/mapa/mapacacic.identcache differ diff --git a/mapa/mapacacic.res b/mapa/mapacacic.res new file mode 100755 index 0000000..91cdbbb Binary files /dev/null and b/mapa/mapacacic.res differ -- libgit2 0.21.2