VERSION 5.00
Object = "{97CCB603-0956-11D4-9466-E4E10EC10000}#4.0#0"; "ctList.ocx"
Object = "{19B73C7C-C76C-11D2-849E-840A94D4800A}#2.2#0"; "FTP.ocx"
Begin VB.Form FMKassen 
   Caption         =   "Kassen"
   ClientHeight    =   7215
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5445
   Icon            =   "FMKassen.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   7215
   ScaleWidth      =   5445
   StartUpPosition =   3  'Windows-Standard
   Begin CTLISTLibCtl.ctList liftp 
      Height          =   3255
      Left            =   0
      TabIndex        =   1
      Top             =   3840
      Width           =   5415
      _Version        =   262144
      _ExtentX        =   9551
      _ExtentY        =   5741
      _StockProps     =   77
      BackColor       =   16777215
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      TitleBackImage  =   "FMKassen.frx":030A
      CheckPicDown    =   "FMKassen.frx":0326
      CheckPicUp      =   "FMKassen.frx":0342
      CheckPicDisabled=   "FMKassen.frx":035E
      BackImage       =   "FMKassen.frx":037A
      MouseIcon       =   "FMKassen.frx":0396
      PreColumnPicture=   "FMKassen.frx":03B2
      TitleText       =   "FTP-Log"
      ShowTitle       =   -1  'True
      HeaderData      =   "FMKassen.frx":03CE
      PicArray0       =   "FMKassen.frx":03F6
      PicArray1       =   "FMKassen.frx":0412
      PicArray2       =   "FMKassen.frx":042E
      PicArray3       =   "FMKassen.frx":044A
      PicArray4       =   "FMKassen.frx":0466
      PicArray5       =   "FMKassen.frx":0482
      PicArray6       =   "FMKassen.frx":049E
      PicArray7       =   "FMKassen.frx":04BA
      PicArray8       =   "FMKassen.frx":04D6
      PicArray9       =   "FMKassen.frx":04F2
      PicArray10      =   "FMKassen.frx":050E
      PicArray11      =   "FMKassen.frx":052A
      PicArray12      =   "FMKassen.frx":0546
      PicArray13      =   "FMKassen.frx":0562
      PicArray14      =   "FMKassen.frx":057E
      PicArray15      =   "FMKassen.frx":059A
      PicArray16      =   "FMKassen.frx":05B6
      PicArray17      =   "FMKassen.frx":05D2
      PicArray18      =   "FMKassen.frx":05EE
      PicArray19      =   "FMKassen.frx":060A
      PicArray20      =   "FMKassen.frx":0626
      PicArray21      =   "FMKassen.frx":0642
      PicArray22      =   "FMKassen.frx":065E
      PicArray23      =   "FMKassen.frx":067A
      PicArray24      =   "FMKassen.frx":0696
      PicArray25      =   "FMKassen.frx":06B2
      PicArray26      =   "FMKassen.frx":06CE
      PicArray27      =   "FMKassen.frx":06EA
      PicArray28      =   "FMKassen.frx":0706
      PicArray29      =   "FMKassen.frx":0722
      PicArray30      =   "FMKassen.frx":073E
      PicArray31      =   "FMKassen.frx":075A
      PicArray32      =   "FMKassen.frx":0776
      PicArray33      =   "FMKassen.frx":0792
      PicArray34      =   "FMKassen.frx":07AE
      PicArray35      =   "FMKassen.frx":07CA
      PicArray36      =   "FMKassen.frx":07E6
      PicArray37      =   "FMKassen.frx":0802
      PicArray38      =   "FMKassen.frx":081E
      PicArray39      =   "FMKassen.frx":083A
      PicArray40      =   "FMKassen.frx":0856
      PicArray41      =   "FMKassen.frx":0872
      PicArray42      =   "FMKassen.frx":088E
      PicArray43      =   "FMKassen.frx":08AA
      PicArray44      =   "FMKassen.frx":08C6
      PicArray45      =   "FMKassen.frx":08E2
      PicArray46      =   "FMKassen.frx":08FE
      PicArray47      =   "FMKassen.frx":091A
      PicArray48      =   "FMKassen.frx":0936
      PicArray49      =   "FMKassen.frx":0952
      PicArray50      =   "FMKassen.frx":096E
      PicArray51      =   "FMKassen.frx":098A
      PicArray52      =   "FMKassen.frx":09A6
      PicArray53      =   "FMKassen.frx":09C2
      PicArray54      =   "FMKassen.frx":09DE
      PicArray55      =   "FMKassen.frx":09FA
      PicArray56      =   "FMKassen.frx":0A16
      PicArray57      =   "FMKassen.frx":0A32
      PicArray58      =   "FMKassen.frx":0A4E
      PicArray59      =   "FMKassen.frx":0A6A
      PicArray60      =   "FMKassen.frx":0A86
      PicArray61      =   "FMKassen.frx":0AA2
      PicArray62      =   "FMKassen.frx":0ABE
      PicArray63      =   "FMKassen.frx":0ADA
      PicArray64      =   "FMKassen.frx":0AF6
      PicArray65      =   "FMKassen.frx":0B12
      PicArray66      =   "FMKassen.frx":0B2E
      PicArray67      =   "FMKassen.frx":0B4A
      PicArray68      =   "FMKassen.frx":0B66
      PicArray69      =   "FMKassen.frx":0B82
      PicArray70      =   "FMKassen.frx":0B9E
      PicArray71      =   "FMKassen.frx":0BBA
      PicArray72      =   "FMKassen.frx":0BD6
      PicArray73      =   "FMKassen.frx":0BF2
      PicArray74      =   "FMKassen.frx":0C0E
      PicArray75      =   "FMKassen.frx":0C2A
      PicArray76      =   "FMKassen.frx":0C46
      PicArray77      =   "FMKassen.frx":0C62
      PicArray78      =   "FMKassen.frx":0C7E
      PicArray79      =   "FMKassen.frx":0C9A
      PicArray80      =   "FMKassen.frx":0CB6
      PicArray81      =   "FMKassen.frx":0CD2
      PicArray82      =   "FMKassen.frx":0CEE
      PicArray83      =   "FMKassen.frx":0D0A
      PicArray84      =   "FMKassen.frx":0D26
      PicArray85      =   "FMKassen.frx":0D42
      PicArray86      =   "FMKassen.frx":0D5E
      PicArray87      =   "FMKassen.frx":0D7A
      PicArray88      =   "FMKassen.frx":0D96
      PicArray89      =   "FMKassen.frx":0DB2
      PicArray90      =   "FMKassen.frx":0DCE
      PicArray91      =   "FMKassen.frx":0DEA
      PicArray92      =   "FMKassen.frx":0E06
      PicArray93      =   "FMKassen.frx":0E22
      PicArray94      =   "FMKassen.frx":0E3E
      PicArray95      =   "FMKassen.frx":0E5A
      PicArray96      =   "FMKassen.frx":0E76
      PicArray97      =   "FMKassen.frx":0E92
      PicArray98      =   "FMKassen.frx":0EAE
      PicArray99      =   "FMKassen.frx":0ECA
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   10
      Left            =   3120
      Top             =   2760
   End
   Begin DevPowerFTP.FTP FTP1 
      Left            =   2640
      Top             =   480
      _ExtentX        =   847
      _ExtentY        =   847
      _Type           =   "00007211263922370A1D04132E74646065627564622A07282635313B352035243722743339223F"
      Asynchronous    =   0   'False
   End
   Begin CTLISTLibCtl.ctList LIKassen 
      Height          =   3615
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   2535
      _Version        =   262144
      _ExtentX        =   4471
      _ExtentY        =   6376
      _StockProps     =   77
      BackColor       =   16777215
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty HeaderFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      TitleBackImage  =   "FMKassen.frx":0EE6
      CheckPicDown    =   "FMKassen.frx":0F02
      CheckPicUp      =   "FMKassen.frx":0F1E
      CheckPicDisabled=   "FMKassen.frx":0F3A
      BackImage       =   "FMKassen.frx":0F56
      MouseIcon       =   "FMKassen.frx":0F72
      PreColumnPicture=   "FMKassen.frx":0F8E
      ShowHeader      =   -1  'True
      HeaderData      =   "FMKassen.frx":0FAA
      PicArray0       =   "FMKassen.frx":1031
      PicArray1       =   "FMKassen.frx":104D
      PicArray2       =   "FMKassen.frx":1069
      PicArray3       =   "FMKassen.frx":1085
      PicArray4       =   "FMKassen.frx":10A1
      PicArray5       =   "FMKassen.frx":10BD
      PicArray6       =   "FMKassen.frx":10D9
      PicArray7       =   "FMKassen.frx":10F5
      PicArray8       =   "FMKassen.frx":1111
      PicArray9       =   "FMKassen.frx":112D
      PicArray10      =   "FMKassen.frx":1149
      PicArray11      =   "FMKassen.frx":1165
      PicArray12      =   "FMKassen.frx":1181
      PicArray13      =   "FMKassen.frx":119D
      PicArray14      =   "FMKassen.frx":11B9
      PicArray15      =   "FMKassen.frx":11D5
      PicArray16      =   "FMKassen.frx":11F1
      PicArray17      =   "FMKassen.frx":120D
      PicArray18      =   "FMKassen.frx":1229
      PicArray19      =   "FMKassen.frx":1245
      PicArray20      =   "FMKassen.frx":1261
      PicArray21      =   "FMKassen.frx":127D
      PicArray22      =   "FMKassen.frx":1299
      PicArray23      =   "FMKassen.frx":12B5
      PicArray24      =   "FMKassen.frx":12D1
      PicArray25      =   "FMKassen.frx":12ED
      PicArray26      =   "FMKassen.frx":1309
      PicArray27      =   "FMKassen.frx":1325
      PicArray28      =   "FMKassen.frx":1341
      PicArray29      =   "FMKassen.frx":135D
      PicArray30      =   "FMKassen.frx":1379
      PicArray31      =   "FMKassen.frx":1395
      PicArray32      =   "FMKassen.frx":13B1
      PicArray33      =   "FMKassen.frx":13CD
      PicArray34      =   "FMKassen.frx":13E9
      PicArray35      =   "FMKassen.frx":1405
      PicArray36      =   "FMKassen.frx":1421
      PicArray37      =   "FMKassen.frx":143D
      PicArray38      =   "FMKassen.frx":1459
      PicArray39      =   "FMKassen.frx":1475
      PicArray40      =   "FMKassen.frx":1491
      PicArray41      =   "FMKassen.frx":14AD
      PicArray42      =   "FMKassen.frx":14C9
      PicArray43      =   "FMKassen.frx":14E5
      PicArray44      =   "FMKassen.frx":1501
      PicArray45      =   "FMKassen.frx":151D
      PicArray46      =   "FMKassen.frx":1539
      PicArray47      =   "FMKassen.frx":1555
      PicArray48      =   "FMKassen.frx":1571
      PicArray49      =   "FMKassen.frx":158D
      PicArray50      =   "FMKassen.frx":15A9
      PicArray51      =   "FMKassen.frx":15C5
      PicArray52      =   "FMKassen.frx":15E1
      PicArray53      =   "FMKassen.frx":15FD
      PicArray54      =   "FMKassen.frx":1619
      PicArray55      =   "FMKassen.frx":1635
      PicArray56      =   "FMKassen.frx":1651
      PicArray57      =   "FMKassen.frx":166D
      PicArray58      =   "FMKassen.frx":1689
      PicArray59      =   "FMKassen.frx":16A5
      PicArray60      =   "FMKassen.frx":16C1
      PicArray61      =   "FMKassen.frx":16DD
      PicArray62      =   "FMKassen.frx":16F9
      PicArray63      =   "FMKassen.frx":1715
      PicArray64      =   "FMKassen.frx":1731
      PicArray65      =   "FMKassen.frx":174D
      PicArray66      =   "FMKassen.frx":1769
      PicArray67      =   "FMKassen.frx":1785
      PicArray68      =   "FMKassen.frx":17A1
      PicArray69      =   "FMKassen.frx":17BD
      PicArray70      =   "FMKassen.frx":17D9
      PicArray71      =   "FMKassen.frx":17F5
      PicArray72      =   "FMKassen.frx":1811
      PicArray73      =   "FMKassen.frx":182D
      PicArray74      =   "FMKassen.frx":1849
      PicArray75      =   "FMKassen.frx":1865
      PicArray76      =   "FMKassen.frx":1881
      PicArray77      =   "FMKassen.frx":189D
      PicArray78      =   "FMKassen.frx":18B9
      PicArray79      =   "FMKassen.frx":18D5
      PicArray80      =   "FMKassen.frx":18F1
      PicArray81      =   "FMKassen.frx":190D
      PicArray82      =   "FMKassen.frx":1929
      PicArray83      =   "FMKassen.frx":1945
      PicArray84      =   "FMKassen.frx":1961
      PicArray85      =   "FMKassen.frx":197D
      PicArray86      =   "FMKassen.frx":1999
      PicArray87      =   "FMKassen.frx":19B5
      PicArray88      =   "FMKassen.frx":19D1
      PicArray89      =   "FMKassen.frx":19ED
      PicArray90      =   "FMKassen.frx":1A09
      PicArray91      =   "FMKassen.frx":1A25
      PicArray92      =   "FMKassen.frx":1A41
      PicArray93      =   "FMKassen.frx":1A5D
      PicArray94      =   "FMKassen.frx":1A79
      PicArray95      =   "FMKassen.frx":1A95
      PicArray96      =   "FMKassen.frx":1AB1
      PicArray97      =   "FMKassen.frx":1ACD
      PicArray98      =   "FMKassen.frx":1AE9
      PicArray99      =   "FMKassen.frx":1B05
   End
End
Attribute VB_Name = "FMKassen"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()

Timer1.Enabled = True


End Sub

Function kassles(ByVal kas As Integer) As String

  On Error Resume Next
  Kill Environ("temp") & "\ok.ok"
  On Error GoTo err
  FTP1.GetFile "ok." & Format(kas), Environ("temp"), "ok.ok"
  Open Environ("temp") & "\ok.ok" For Input As #1
  Line Input #1, vers
  Close #1
  vers = Piece(vers, Chr(10), 1)
  LIKassen.AddItem Format(kas) & Chr(10) & vers
  DoEvents
  kassles = vers
  Exit Function
err:
  kassles = ""
End Function

Private Sub FTP1_ServerResponse(ByVal message As String)
liftp.InsertItem message, 0
DoEvents
End Sub

Private Sub Timer1_Timer()


Timer1.Enabled = False
Screen.MousePointer = 11
liftp.ClearList
DoEvents

i = FMStart.LIServ.ListIndex
ip = Piece(FMStart.LIServ.ListText(i), Chr(10), 3)
user = Piece(FMStart.LIServ.ListText(i), Chr(10), 4)
passw = Piece(FMStart.LIServ.ListText(i), Chr(10), 5)

'On Error GoTo err
FTP1.Connect ip, user, passw
FTP1.CD "/asci/kasoft"
FTP1.TransferType = ftpBinary


LIKassen.ClearList
vers = ""
sw = True
For i = 1 To 10
  erg = kassles(i)
  If erg <> "" Then
    If vers = "" Then
         vers = erg
     Else
         If erg <> vers Then sw = False
    End If
  End If
Next
If sw Then
    Dim obj As Object
    Set obj = WWS_Server.OpenId("BM.KassaSW", FMStart.LIServ.ListCargo(FMStart.LIServ.ListIndex))
    obj.FtpVersion = vers
    obj.sys_Save
    obj.SYS_Close
    servakt
End If

FTP1.Disconnect
Screen.MousePointer = 1
DoEvents
Exit Sub

err:
On Error Resume Next
FTP1.Disconnect
Screen.MousePointer = 1
DoEvents
MsgBox "FTP-Verbindungsfehler"
FMKassen.Hide

End Sub
