I removed some private code:
Public Sub Synchroniseren
........
......
hd.ProgressDialogShow("Login...")
htpcl.Initialize("webClient")
If htpcl.IsInitialized Then
httpreq.InitializePost2("
http://www.rijdendpersoneel.be/frpinlog.php", requeststring.GetBytes("UTF8"))
' httpreq.SetHeader("Content-Type", "text/xml; charset=utf-8")
httpreq.Timeout = 100000
htpcl.Execute(httpreq, 1)
End If
End Sub
Sub webclient_ResponseSuccess (Response As HttpResponse, TaskId As Int)
If TaskId = 1 Then
Try
resp = Response.GetString2("UTF8")
Catch
End Try
hd.ProgressDialogHide
If resp = "fout" Then
If lang = "fr" Then
Msgbox("Login erreur","Erreur")
Else
Msgbox("Login fout","Fout")
End If
Else
If File.Exists(TargetDir & "/diensttabel","") = False Then
File.MakeDir(TargetDir , "diensttabel")
End If
FrpIn.Initialize
FrpIn.Add("naam")'TSNaamInfrp.text)
FrpIn.Add("wacht")'TSWachtInfrp.text)
File.WriteList(TargetDir & "/diensttabel","frplogin.txt",FrpIn)
flok =True
Dim filename As String = yr & "_" & resp
FTPf.Initialize("FTPlistRoot","
ftp.rijdendpersoneel.be",21,*****,********)
ftpfn = filename
FTPf.PassiveMode = True
FTPf.List("/dtabs/")
End If
End Sub
Sub FTPlistRoot_ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
If Success = False Then
flok = False
Else
FTPf.Initialize("FTP1","
ftp.rijdendpersoneel.be",21,*****,********)
FTPf.PassiveMode = True
FTPf.DownloadFile("/specdnst.dks" , False,TargetDir & "/diensttabel", "Specdnst.dks")
For i = 0 To Files.Length - 1
Dim ftpt As Long=0
Dim ftps As Long =0
Dim flsi As String=Files(i).Name & " "
If flsi.Substring2(5,FTPfl.Length + 5) = ftpfn.Substring(5) Then
ftps = Files(i).Timestamp
Catch
End Try
If ftpt>ftps Then
FTPf.UploadFile(TargetDir & "/diensttabel" , Files(i).Name, False ,ServerPath & Files(i).Name)
Else If ftpt<ftps Then
FTPf.DownloadFile(ServerPath & Files(i).Name , False,TargetDir & "/diensttabel" , Files(i).Name )
End If
FTPf.DownloadFile("/" & flsi.SubString2(0,4) & ".sks" , True,TargetDir & "/diensttabel",flsi.subString2(0,4) & ".sks")
i=Files.Length
End If
FTP.DownloadFile("/Specdnst.dks" , True,TargetDir, "Diensttabel/Specdnst.dks")
Next
End If
End Sub
Sub FTP1_DownloadCompleted (ServerPath As String, Success As Boolean)
' Log(ServerPath & ", Success=" & Success)
If Success Then
' LDfilename.Text=LDfilename.Text & "Dnl " & ServerPath.substring(ServerPath.LastIndexOf("/")+1) & " ok" & CRLF
Else
' LDfilename.Text=LDfilename.Text & "Dnl " & ServerPath.substring(ServerPath.LastIndexOf("/")+1) & " err" & CRLF
flok = False
End If
'LDfilename.top = 10-su.MeasureMultilineTextHeight(LDfilename, LDfilename.Text)
If Success Then
.........