:
19.02.18

30.11.17
?
11.09.17

14.08.17

26.06.17

17.06.17

09.06.17
?
17.05.17
-?
04.05.17
:
29.04.17
:
.2018
.......
  12345
6789101112
13141516171819
20212223242526
2728293031  
!!!
!!!
.
.
, .

, , , : HTML

! () . , Word, , , ( pic), , , .., .

0)',[Gr1]);

try

Result := Result + GroupListProducer(GroupQuery,Kind);

if Gr10 then

Result := Result + Format('T
',

[Request.ScriptName, 0,0, Kind]);

except

on E:EDBEngineError do

begin

Result := Result + '+ BDE'+'
';

for i:=0 to E.ErrorCount -1 do

Result := Result + E.Errors[i].Message + '
';

end;

end;

end;

Result := Result+''

+CommonEnd;

end;

// QueryAction - GetGroup v v .

threadvar OperKind : Integer;

procedure TWebModule1.WebModule1GetGroupAction(Sender: TObject;

Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

var gn1,gn2 : Integer; OrderCol : THTMLTableColumn;

begin

with Request.QueryFields do

begin

gn1 := IndexOfName('Kind');

if (gn10) then OperKind := StrToIntDef(Values['Kind'],0);

if gn1>=0 then Delete(gn1);

gn1 := StrToIntDef(Values['Gr1'],0);

gn2 := StrToIntDef(Values['Gr2'],0);

end; //with

if gn1=0 then Response.Content := CommonLook+CreateGroupList(gn1,gn2,OperKind)

else if gn2=0 then Response.Content := CommonLook+CreateGroupList(gn1,gn2,OperKind)

else

begin

//define group name

with GroupQuery do

begin

SQL.Text := 'SELECT * FROM Groups WHERE (MainGroup=:gn1) and (SubGroup=:gn2)';

Params[0].AsInteger := gn1;

Params[1].AsInteger := gn2;

Open;

with StoreQTP do

begin

Header.Clear;

Header.Add(CommonLook);

if OperKind>0 then

begin

OrderCol := THTMLTableColumn.Create(StoreQTP.Columns);

OrderCol.Title.Caption := '';

end

else

OrderCol := nil;

case OperKind of

1: Header.Add('');

2: Header.Add('');

end;//case

Header.Add('
: '+FieldByName('GroupName').AsString+'
');

Close;

//

Footer.Clear;

if OperKind=1 then Footer.Add('
T v');

if OperKind>0 then

begin

Footer.Add(''

+'');

end;

Footer.Add(Format('T
',

[Request.ScriptName, gn1,0, OperKind]));

end;//with storeqtp

end;//with groupquery

Response.Content := StoreQTP.Content;

if Assigned(OrderCol) then OrderCol.Free;

end; //generating table

end;

procedure TWebModule1.StoreQTPFormatCell(Sender: TObject;

CellRow, CellColumn: Integer; var BgColor: THTMLBgColor;

var Align: THTMLAlign; var VAlign: THTMLVAlign; var CustomAttrs,

CellData: String);

var s: string;

begin

if (CellRow0) then if (CellRow mod 2=0) then BgColor:='silver' else BgColor:='Gray';

if (OperKind>0) and (CellColumn=0) and (CellRow>0) then

begin

CellData := ''

+CellData;

end;

if (OperKind>0) and (CellColumn=StoreQTP.Columns.Count-1) and (CellRow>0) then

begin

CellData := '';

s := '
';

end;

end;

procedure TWebModule1.StoreQTPGetTableCaption(Sender: TObject;

var Caption: String; var Alignment: THTMLCaptionAlignment);

begin

Caption :='= : '+ IntToStr(StoreQTP.Query.RecordCount);

end;

procedure TWebModule1.WebModule1ValidateAction(Sender: TObject;

Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

begin

with ValidateQuery do

begin

Params[0].AsString := Request.QueryFields.Values['UserName'];

Params[1].AsString := Request.QueryFields.Values['Password'];

try

Open;

if RecordCount>0 then

begin

UserStatus := FieldByName('UserCategory').AsInteger;

Response.Content := CommonLook+'
Tv v';

if UserStatus>0 then

Response.Content := Response.Content + '
Tv
'+CreateGroupList(0,0,1)

else

begin

Response.Content := Response.Content + '
T '

+'
T ';

end;

end

else

Response.Content := CommonLook+'T v 򺦪 . + xxx@yyy.zzz';

finally

Close;

end;

end;

end;

procedure TWebModule1.WebModule1AcceptOrderAction(Sender: TObject;

Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

begin

Response.Content := CommonLook+sOrderAccepted+CommonEnd;

// -

end;

procedure TWebModule1.WebModule1SearchAction(Sender: TObject;

Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

var s: string;

begin

s:= Request.QueryFields.Values['Phrase'];

GroupQuery.SQL.Text := 'SELECT * FROM Groups WHERE GroupName LIKE "%'+s+'%"';

Response.Content := CommonLook+'
v '+s+':
'

+GroupListProducer(GroupQuery,0)+CommonEnd;

end;

procedure TWebModule1.WebModule1AddMSgAction(Sender: TObject;

Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

var MCookies : TStringList;i: integer;

begin

Response.Content := CommonLook;

with AddMsgQuery do

try

Params[0].AsString:=Request.QueryFields.Values['Sender'];

Params[1].AsString:=Request.Host;

Params[2].AsDateTime:=Request.Date;

Params[3].AsMemo:=Request.QueryFields.Values['Message'];

Prepare;

ExecSQL;

MCookies := TStringList.Create;

MCookies.Add('User='+Request.PathTranslated);

MCookies.Add('Test='+Request.RemoteHost);

MCookies.Add('Time='+Request.UserAgent);

Response.SetCookieField(MCookies, '', Request.PathInfo , Date+1, False);

MCookies.Free;

Response.Content := Response.Content + 'T ' + CommonEnd;

except

on E:EDBEngineError do

begin

Response.Content := Response.Content + '+ BDE'+'
';

for i:=0 to E.ErrorCount -1 do

Response.Content := Response.Content + E.Errors[i].Message + '
';

Response.Content := Response.Content + CommonEnd;

end;

end;

end;

end.

.

1. N2 1997.

2. . , . Delphi 4

3. N4 1997.

4. N5 1998.

5. Computer Week N4(210) 1999.

6. Computer Week N17(223) 1996.

7. Computer Week N18(224) 1998.

8. N15(142) 1996.


! () . , Word, , , ( pic), , , ..,
: 20.08.10 | [ + ]   [ - ]  
: 108
: 0
20.08.10
20.08.10
20.08.10
20.08.10
20.08.10
{dnmbottom}
70 000 , , , .