procedure DoGetAllyCom(AType : Boolean;ASB : TScrollBox);
var
lData : TIdMultiPartFormDataStream;
sl : TStringList;
lNick,lDate :
string;
begin
lData := TIdMultiPartFormDataStream.Create;
//Struktur erzeugen
try
try
with lData
do
begin
AddFormField(cAlly,IntTostr(Player.AllyID));
//Feld hinzufügen
AddFormField(cUserID,IntToStr(Player.ID));
//Feld hinzufügen
if AType
then
AddFormField(cTyp,'
1');
//Feld hinzufügen
end;
with ConHTTP
do
try
sl:=TStringList.Create;
sl.Text := Post(Data.FURL+Data.FGetShoutSkript,lData);
if AType
then
begin
FreeAndNil(ldata);
lData := TIdMultiPartFormDataStream.Create;
//Struktur neu erzeugen
lData.AddFormField(cAlly,IntTostr(Player.AllyID));
//Feld hinzufügen
lData.AddFormField(cNick,Player.Nick);
//Feld hinzufügen
end;
while sl.Count > 0
do
begin
lDate:=sl.Strings[0];
lNick:=sl.Strings[1];
sl.Delete(1);
sl.Delete(0);
SetLength(AllyComFrames,Length(AllyComFrames)+1);
AllyComFrames[Pred(Length(AllyComFrames))]:=TAllyComFrame.Create(ASB,lNick,lDate,sl.Text);
AllyComFrames[Pred(Length(AllyComFrames))].
Name:='
AllyComFrame'+IntToStr(Pred(Length(AllyComFrames)));
Data.FDM.SkinData1.AddNestForm(tfmain,AllyComFrames[Pred(Length(AllyComFrames))]);
Application.ProcessMessages;
sl.Text := Post(Data.FURL+Data.FGetShoutSkript,lData);
Application.ProcessMessages;
end;
finally
Free;
sl.Free;
end;
except
on e:
exception do
showmessage(e.
Message);
end;
finally
lData.Free;
lData:=nil;
end;
end;