|
@@ -64,6 +64,16 @@ begin
|
|
|
if Pos('http://', sIP) =1 then
|
|
|
Delete(sIP, 1, 7);
|
|
|
|
|
|
+ ini := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'Cloud.ini');
|
|
|
+ try
|
|
|
+ ini.WriteString('URL', 'Server', sIP);
|
|
|
+ ini.WriteString('URL', 'CompanyName', sN);
|
|
|
+ ini.WriteString('URL', 'LoginCloudURL', 'http://' + sIP);
|
|
|
+ PHPWeb.LoginCloudURL := 'http://' + sIP;
|
|
|
+ finally
|
|
|
+ ini.Free;
|
|
|
+ end;
|
|
|
+
|
|
|
iResult := PHPWeb.ConnectServer(sIP, sN);
|
|
|
if iResult = 1 then
|
|
|
begin
|
|
@@ -75,16 +85,6 @@ begin
|
|
|
|
|
|
G_Server := sIP;
|
|
|
G_CompanyName := sN;
|
|
|
-
|
|
|
- ini := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'Cloud.ini');
|
|
|
- try
|
|
|
- ini.WriteString('URL', 'Server', sIP);
|
|
|
- ini.WriteString('URL', 'CompanyName', sN);
|
|
|
- ini.WriteString('URL', 'LoginCloudURL', 'http://' + sIP);
|
|
|
- PHPWeb.LoginCloudURL := 'http://' + sIP;
|
|
|
- finally
|
|
|
- ini.Free;
|
|
|
- end;
|
|
|
end
|
|
|
else
|
|
|
begin
|