Develop and Download Open Source Software

Browse Subversion Repository

Diff of /Unit1.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3 by yamat0jp, Sat Dec 26 07:30:17 2015 UTC revision 20 by yamat0jp, Sat Aug 27 21:03:47 2016 UTC
# Line 9  uses Line 9  uses
9    IWContainer, IWHTMLContainer, IWHTML40Container, IWRegion, IWDBStdCtrls,    IWContainer, IWHTMLContainer, IWHTML40Container, IWRegion, IWDBStdCtrls,
10    IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompLabel,    IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompLabel,
11    IWCompGrids, IWCompText, IWCompTabControl, IWCompButton, IWCompEdit,    IWCompGrids, IWCompText, IWCompTabControl, IWCompButton, IWCompEdit,
12    IWHTMLControls, IWCompExtCtrls, UserSessionUnit, PngImage, Data.DB,    IWHTMLControls, IWCompExtCtrls, PngImage, Data.DB,
13    IWCompListbox, IWBaseComponent, IWBaseHTMLComponent, IWBaseHTML40Component,    IWCompListbox, IWBaseComponent, IWBaseHTMLComponent, IWBaseHTML40Component,
14    IWCompMenu, Vcl.Menus, System.Variants;    IWCompMenu, Vcl.Menus, System.Variants, Vcl.Dialogs, System.UITypes, Unit8;
15    
16  type  type
17    TIWForm1 = class(TIWAppForm)    TIWForm1 = class(TIWAppForm)
     IWFrame1: TIWFrame1;  
18      IWTemplateProcessorHTML1: TIWTemplateProcessorHTML;      IWTemplateProcessorHTML1: TIWTemplateProcessorHTML;
19      IWLabel1: TIWLabel;      IWLabel1: TIWLabel;
20      IWDBLabel1: TIWDBLabel;      IWDBLabel1: TIWDBLabel;
# Line 40  type Line 39  type
39      IWLabel8: TIWLabel;      IWLabel8: TIWLabel;
40      IWList2: TIWList;      IWList2: TIWList;
41      IWLabel4: TIWLabel;      IWLabel4: TIWLabel;
     IWImageFile1: TIWImageFile;  
42      IWRegion7: TIWRegion;      IWRegion7: TIWRegion;
43      IWLabel5: TIWLabel;      IWLabel5: TIWLabel;
44      IWLabel6: TIWLabel;      IWLabel6: TIWLabel;
45      IWList3: TIWList;      IWList3: TIWList;
46        IWImage1: TIWImage;
47        IWFrame8: TIWFrame8;
48        IWLink4: TIWLink;
49        IWLink3: TIWLink;
50        IWLink5: TIWLink;
51        IWFrame1: TIWFrame1;
52        IWLink6: TIWLink;
53        IWLink7: TIWLink;
54        IWLink8: TIWLink;
55      procedure IWAppFormRender(Sender: TObject);      procedure IWAppFormRender(Sender: TObject);
56      procedure IWLink2Click(Sender: TObject);      procedure IWLink2Click(Sender: TObject);
57      procedure IWAppFormCreate(Sender: TObject);      procedure IWAppFormCreate(Sender: TObject);
58      procedure IWButton1Click(Sender: TObject);      procedure IWButton1Click(Sender: TObject);
59      procedure IWLink1Click(Sender: TObject);      procedure IWLink1Click(Sender: TObject);
60        procedure IWGrid1CellClick(ASender: TObject; const ARow, AColumn: Integer);
61        procedure IWFrame8IWButton1Click(Sender: TObject);
62        procedure IWFrame8IWLink1Click(Sender: TObject);
63        procedure IWLink4Click(Sender: TObject);
64        procedure IWLink3Click(Sender: TObject);
65        procedure IWLink5Click(Sender: TObject);
66        procedure IWLink6Click(Sender: TObject);
67        procedure IWLink8Click(Sender: TObject);
68    private    private
69      function GetPage: TPage;      function SearchCount: Integer;
70      procedure SetPage(const Value: TPage);      function GetPage: Boolean;
71        procedure SetPage(const Value: Boolean);
72      procedure LoadImage;      procedure LoadImage;
73      procedure ClearImage;      procedure ClearImage;
74        function GetThumbnail: Boolean;
75        procedure CallBack(EventParams: TStringList);
76        procedure SetThumbnail(const Value: Boolean);
77    public    public
78      property Page: TPage read GetPage write SetPage;      property Page: Boolean read GetPage write SetPage;
79        property Thumbnail: Boolean read GetThumbnail write SetThumbnail;
80    end;    end;
81    
82    var
83      IWForm1: TIWForm1;
84    
85  implementation  implementation
86    
87  {$R *.dfm}  {$R *.dfm}
88    
89  uses Unit3, ServerController, Unit6;  uses Unit3, ServerController, Unit6, Unit4, Unit9, Unit10, Unit5, Unit11,
90      Unit13, Unit14;
91    
92    const
93      table2filter = 'AGREE = true and ACTIVATE = true';
94    
95    procedure TIWForm1.CallBack(EventParams: TStringList);
96    begin
97      if SameText(EventParams.Values['RetValue'], 'true') = true then
98        TCartForm.Create(WebApplication).Show;
99      IWFrame8.IWEdit1.Text := '0';
100    end;
101    
102  procedure TIWForm1.ClearImage;  procedure TIWForm1.ClearImage;
103  var  var
# Line 73  begin Line 107  begin
107    for i := 0 to IWGrid1.RowCount - 1 do    for i := 0 to IWGrid1.RowCount - 1 do
108      for j := 0 to IWGrid1.ColumnCount - 1 do      for j := 0 to IWGrid1.ColumnCount - 1 do
109        IWGrid1.Cell[i, j].Control.Free;        IWGrid1.Cell[i, j].Control.Free;
110      IWGrid1.RowCount := 0;
111  end;  end;
112    
113  function TIWForm1.GetPage: TPage;  function TIWForm1.GetPage: Boolean;
114  begin  begin
115    result := UserSession.FPage;    result := UserSession.FPage;
116  end;  end;
117    
118    function TIWForm1.GetThumbnail: Boolean;
119    begin
120      result := UserSession.FThumbnail;
121    end;
122    
123  procedure TIWForm1.IWAppFormCreate(Sender: TObject);  procedure TIWForm1.IWAppFormCreate(Sender: TObject);
124  const  const
125    i = 120;    i = 120;
126  var  var
127    s: Integer;    s: Integer;
128  begin  begin
129      IWForm1 := Self;
130    Page := UserSession.FPage;    Page := UserSession.FPage;
131      Thumbnail := UserSession.FThumbnail;
132    s := DM.FDTable3.FieldByName('BGCOLOR').AsInteger;    s := DM.FDTable3.FieldByName('BGCOLOR').AsInteger;
133    IWLabel2.BGColor := s;    IWLabel2.BGColor := s;
134    IWLabel3.BGColor := s;    IWLabel3.BGColor := s;
135    IWLabel5.BGColor := s;    IWLabel5.BGColor := s;
136      IWLabel7.BGColor := s;
137      IWLabel8.BGColor := s;
138    IWRegion1.Width := i;    IWRegion1.Width := i;
139    IWRegion2.Width := i;    IWRegion2.Width := i;
140    IWRegion4.Width := i;    IWRegion4.Width := i;
141    IWRegion5.Width := i;    IWRegion5.Width := i;
142    IWRegion6.Width := i;    IWRegion6.Width := i;
143    IWRegion7.Width := i;    IWRegion7.Width := i;
144      WebApplication.RegisterCallBack('callback', CallBack);
145      DM.FDTable2.Filter := table2filter;
146  end;  end;
147    
148  procedure TIWForm1.IWAppFormRender(Sender: TObject);  procedure TIWForm1.IWAppFormRender(Sender: TObject);
# Line 107  begin Line 153  begin
153    IWList1.Items.Clear;    IWList1.Items.Clear;
154    with DM.FDTable2 do    with DM.FDTable2 do
155    begin    begin
156      if Filtered = true then      FindFirst;
157        while Found = true do
158      begin      begin
159        FindFirst;        s := FieldByName('CATEGORY').AsString;
160        while Found = true do        if s = '' then
161          begin
162            FindNext;
163            continue;
164          end;
165          if Filter = table2filter then
166          begin
167            i := IWList1.Items.IndexOf(s);
168            if i = -1 then
169              IWList1.Items.Add(s);
170          end
171          else
172        begin        begin
         s := FieldByName('CATEGORY').AsString;  
         if s = '' then  
         begin  
           FindNext;  
           continue;  
         end;  
173          i := IWList1.Items.IndexOfName(s);          i := IWList1.Items.IndexOfName(s);
174          if i = -1 then          if i = -1 then
175            IWList1.Items.Add(s + '=1')            IWList1.Items.Add(s + '=1')
# Line 126  begin Line 178  begin
178            j := IWList1.Items.ValueFromIndex[i].ToInteger + 1;            j := IWList1.Items.ValueFromIndex[i].ToInteger + 1;
179            IWList1.Items[i] := s + '=' + j.ToString;            IWList1.Items[i] := s + '=' + j.ToString;
180          end;          end;
         FindNext;  
       end;  
     end  
     else  
     begin  
       First;  
       while Eof = false do  
       begin  
         s := FieldByName('CATEGORY').AsString;  
         if s = '' then  
         begin  
           Next;  
           continue;  
         end;  
         i := IWList1.Items.IndexOf(s);  
         if i = -1 then  
           IWList1.Items.Add(s);  
         Next;  
181        end;        end;
182          FindNext;
183      end;      end;
184    end;    end;
185    if DM.FDTable2.Filtered = true then    if DM.FDTable2.Filter <> table2filter then
186      begin
187      for i := 0 to IWList1.Items.Count - 1 do      for i := 0 to IWList1.Items.Count - 1 do
188      begin      begin
189        s := IWList1.Items.ValueFromIndex[i];        s := IWList1.Items.ValueFromIndex[i];
190        if s = '1' then        IWList1.Items[i] := IWList1.Items.Names[i] + '(' + s + ')';
         IWList1.Items[i] := IWList1.Items.Names[i]  
       else  
         IWList1.Items[i] := IWList1.Items.Names[i] + '(' + s + ')';  
191      end;      end;
192      end;
193    IWList2.Items.Clear;    IWList2.Items.Clear;
194    if Page = TPage.Info then    with DM.FDQuery1 do
195    begin    begin
196      with DM.FDQuery1 do      SQL.Clear;
197        SQL.Add('select volume,name,price from cart_data,item_data');
198        SQL.Add(' where cart_data.serial = item_data.serial');
199        SQL.Add(' and number = :num;');
200        ParamByName('num').AsInteger := UserSession.user_number;
201        Open;
202        First;
203        i := 0;
204        while Eof = false do
205      begin      begin
206        SQL.Clear;        s := Fields.Fields[0].AsString + 'x' + Fields.Fields[1].AsString;
207        SQL.Add('select volume,name,price from cart_data join item_data');        i := i + Fields.Fields[0].AsInteger * Fields.Fields[2].AsInteger;
208        SQL.Add(' on (cart_data.serial = item_data.serial)');        IWList2.Items.Add(s);
209        SQL.Add(' where number = :num;');        Next;
210        Params.ParamByName('num').AsInteger := UserSession.user_number;      end;
211        Open;      IWList2.Items.Add(i.ToString + '円');
212        First;      Close;
213        i := 0;      IWList3.Items.Clear;
214        while Eof = false do      SQL.Clear;
215        begin      SQL.Add('select name from recent_data,item_data');
216          s := Fields.Fields[0].AsString + 'x' + Fields.Fields[1].AsString;      SQL.Add(' where recent_data.serial = item_data.serial');
217          i := i + Fields.Fields[2].AsInteger;      SQL.Add(' and number = :num;');
218          IWList2.Items.Add(s);      ParamByName('num').AsInteger := UserSession.user_number;
219          Next;      Open;
220        end;      First;
221        IWList2.Items.Add(i.ToString + '円');      while Eof = false do
222        Close;      begin
223        IWList3.Items.Clear;        IWList3.Items.Add(Fields.Fields[0].AsString);
224        SQL.Clear;        Next;
       SQL.Add('select name from recent_data join item_data');  
       SQL.Add(' on (recent_data.serial = item_data.serial)');  
       SQL.Add(' where number = :num;');  
       Params.ParamByName('num').AsInteger := UserSession.user_number;  
       Open;  
       First;  
       while Eof = false do  
       begin  
         IWList3.Items.Add(Fields.Fields[0].AsString);  
         Next;  
       end;  
       Close;  
225      end;      end;
226        Close;
227    end;    end;
228    LoadImage;    LoadImage;
229      if IWGrid1.Visible = false then
230        DM.FDTable2.Locate('SERIAL', UserSession.Serial);
231  end;  end;
232    
233  procedure TIWForm1.IWButton1Click(Sender: TObject);  procedure TIWForm1.IWButton1Click(Sender: TObject);
234    var
235      s: TStringList;
236      t: string;
237      i: Integer;
238  begin  begin
239    DM.FDTable2.Filtered := false;    Thumbnail := true;
240    if IWEdit1.Text <> '' then    if IWEdit1.Text <> '' then
241    begin    begin
242      DM.FDTable2.Filter := 'NAME like ' + QuotedStr('%'+IWEdit1.Text+'%');      s := TStringList.Create;
243      DM.FDTable2.Filtered := true;      try
244      IWLabel6.Caption := IWEdit1.Text + 'を検索しています';        s.Delimiter := ' ';
245          s.DelimitedText := IWEdit1.Text;
246          for i := 0 to s.Count - 1 do
247          begin
248            t := t + 'NAME like ' + QuotedStr('%' + s[i] + '%');
249            if i < s.Count - 1 then
250              t := t + ' or '
251            else
252              t := '(' + t + ')';
253          end;
254          DM.FDTable2.Filter := table2filter + ' and ' + t;
255          i := SearchCount;
256          if i = 0 then
257          begin
258            DM.FDTable2.Filter := table2filter;
259            IWLabel6.Caption := '該当する商品が見つかりませんでした';
260          end
261          else
262            IWLabel6.Caption := Format(IWEdit1.Text + 'を検索しています:%d件', [i]);
263          IWLabel6.Visible := true;
264        finally
265          s.Free;
266        end;
267      end
268      else
269      begin
270        DM.FDTable2.Filter := table2filter;
271        IWLabel6.Visible := false;
272      end;
273    end;
274    
275    procedure TIWForm1.IWFrame8IWButton1Click(Sender: TObject);
276    var
277      i, j: Integer;
278      s: string;
279    begin
280      if TryStrToInt(IWFrame8.IWEdit1.Text, i) = false then
281      begin
282        WebApplication.ShowMessage('個数が不正です');
283        Exit;
284      end;
285      if i = 0 then
286      begin
287        WebApplication.ShowMessage('1個以上のご注文が必要です');
288        Exit;
289      end;
290      s := WebApplication.Request.CookieFields.Values['user_cookie'];
291      if s = '' then
292      begin
293        DM.FDTable1.Last;
294        j := DM.FDTable1.FieldByName('NUMBER').AsInteger + 1;
295        while DM.FDTable1.Lookup('NUMBER', j, 'NUMBER') = j do
296          inc(j);
297        UserSession.user_number := j;
298        DM.FDTable1.AppendRecord([nil, nil, nil, nil, nil, nil,
299          UserSession.user_number, Date]);
300        WebApplication.Response.Cookies.AddCookie('user_cookie',
301          UserSession.user_number.ToString, '/', Date + 10);
302    end;    end;
303    IWLabel6.Visible := DM.FDTable2.Filtered;    with DM.FDQuery1 do
304      begin
305        Open('select * from cart_data;');
306        if Locate('NUMBER;SERIAL', VarArrayOf([UserSession.user_number,
307          UserSession.Serial]), []) = true then
308        begin
309          Edit;
310          FieldByName('VOLUME').AsInteger := FieldByName('VOLUME').AsInteger + i;
311          Post;
312        end
313        else
314          AppendRecord([nil, i, UserSession.user_number, UserSession.Serial]);
315      end;
316      WebApplication.ShowConfirm('カートに移動しますか', 'callback', '移動', 'はい', 'いいえ');
317    end;
318    
319    procedure TIWForm1.IWFrame8IWLink1Click(Sender: TObject);
320    begin
321      Thumbnail := true;
322    end;
323    
324    procedure TIWForm1.IWGrid1CellClick(ASender: TObject;
325      const ARow, AColumn: Integer);
326    begin
327      Thumbnail := false;
328      UserSession.Serial := Integer(IWGrid1.Cell[ARow, AColumn].Tag);
329  end;  end;
330    
331  procedure TIWForm1.IWLink1Click(Sender: TObject);  procedure TIWForm1.IWLink1Click(Sender: TObject);
# Line 215  begin Line 334  begin
334  end;  end;
335    
336  procedure TIWForm1.IWLink2Click(Sender: TObject);  procedure TIWForm1.IWLink2Click(Sender: TObject);
337    var
338      i: Integer;
339  begin  begin
340    case Page of    if Page = true then
341      Main:    begin
342        i := UserSession.user_number;
343        if (DM.FDTable1.Locate('EMAIL;PASSWORD',
344          VarArrayOf([IWEdit2.Text, UserSession.hash(IWEdit3.Text)]),
345          [loCaseInsensitive]) = true) and
346          (DM.FDTable1.FieldByName('EMAIL').AsString <> '') then
347        begin
348          IWEdit2.Text := '';
349          UserSession.user_number := DM.FDTable1.FieldByName('NUMBER').AsInteger;
350          if i <> 0 then
351        begin        begin
352          if DM.FDTable1.Locate('EMAIL;PASSWORD',          with DM.FDQuery1 do
           VarArrayOf([IWEdit2.Text, IWEdit3.Text]), [loCaseInsensitive]) = true  
         then  
353          begin          begin
354            Page := Info;            Open('select * from user_data where number = :num', [i]);
355            UserSession.user_number := DM.FDTable1.FieldByName('NUMBER')            Delete;
356              .AsInteger;            Open('select number from cart_data where number = :num;', [i]);
357            IWEdit2.Text := '';            First;
358              while Eof = false do
359              begin
360                Edit;
361                FieldByName('number').AsInteger := UserSession.user_number;
362                Next;
363              end;
364          end;          end;
         IWEdit3.Text := '';  
       end;  
     Info:  
       begin  
         DM.FDTable1.Filtered := false;  
         Page := Main;  
365        end;        end;
366          Page := false;
367        end;
368        IWEdit3.Text := '';
369      end
370      else
371        Page := true;
372    end;
373    
374    procedure TIWForm1.IWLink3Click(Sender: TObject);
375    begin
376      with TMyPage.Create(WebApplication) do
377      begin
378        Form := Self;
379        Show;
380    end;    end;
381  end;  end;
382    
383    procedure TIWForm1.IWLink4Click(Sender: TObject);
384    begin
385      TCartForm.Create(WebApplication).Show;
386    end;
387    
388    procedure TIWForm1.IWLink5Click(Sender: TObject);
389    begin
390      TIWForm10.Create(WebApplication).Show;
391    end;
392    
393    procedure TIWForm1.IWLink6Click(Sender: TObject);
394    begin
395      Page := true;
396      if Sender = IWLink6 then
397        TAdminPage.Create(WebApplication).Show
398      else
399        TAdminFile.Create(WebApplication).Show;
400    end;
401    
402    procedure TIWForm1.IWLink8Click(Sender: TObject);
403    begin
404      TMasterForm.Create(WebApplication).Show;
405    end;
406    
407  procedure TIWForm1.LoadImage;  procedure TIWForm1.LoadImage;
408  var  var
409    s: TStream;    pic: TIWImage;
   png: TPngImage;  
   pic: TIWImageFile;  
410    i: Integer;    i: Integer;
411    j: Integer;    j: Integer;
412    k: Integer;    t: string;
413  label label1;  label label1;
414  begin  begin
415    ClearImage;    ClearImage;
416    exit;    if Thumbnail = true then
417    png:=TPngImage.Create;    begin
418    try      i := DM.FDTable2.RecordCount div IWGrid1.ColumnCount;
419      IWGrid1.RowCount := DM.FDTable2.RecordCount div IWGrid1.ColumnCount;      if DM.FDTable2.RecordCount mod IWGrid1.ColumnCount > 0 then
420      k := 1;        inc(i);
421        IWGrid1.RowCount := i;
422        DM.FDTable2.FindLast;
423      for i := 0 to IWGrid1.RowCount - 1 do      for i := 0 to IWGrid1.RowCount - 1 do
424        for j := 0 to IWGrid1.ColumnCount - 1 do        for j := 0 to IWGrid1.ColumnCount - 1 do
425        begin        begin
426          s := DM.FDTable2.CreateBlobStream          if DM.FDTable2.Found = false then
           (DM.FDTable2.FieldByName('THUMBNAIL'), bmRead);  
         try  
           png.LoadFromStream(s);  
           pic := TIWImageFile.Create(IWGrid1);  
           pic.Picture.Assign(png);  
           IWGrid1.Cell[i, j].Control := pic;  
           IWGrid1.Cell[i, j].Text := k.ToString;  
           inc(k);  
         finally  
           s.Free;  
         end;  
         if DM.FDTable2.Bof = true then  
427            goto label1;            goto label1;
428            pic := TIWImage.Create(IWGrid1);
429            UserSession.FieldToImg(pic.Picture,
430              DM.FDTable2.FieldByName('THUMBNAIL'));
431            IWGrid1.Cell[i, j].Control := pic;
432            t := DM.FDTable2.FieldByName('NAME').AsString;
433            if Length(t) > 10 then
434              t := Copy(t, 1, 8) + '..';
435            IWGrid1.Cell[i, j].Tag :=
436              Pointer(DM.FDTable2.FieldByName('SERIAL').AsInteger);
437            IWGrid1.Cell[i, j].Text := t;
438            IWGrid1.Cell[i, j].Alignment := taCenter;
439            IWGrid1.Cell[i, j].Clickable := true;
440            DM.FDTable2.FindPrior;
441        end;        end;
442    label1:    label1:
443    finally    end
444      png.Free;    else if DM.FDTable2.Locate('SERIAL', UserSession.Serial, []) = true then
445    end;      UserSession.FieldToImg(IWFrame8.IWImage1.Picture,
446    png := nil;        DM.FDTable2.FieldByName('IMAGE'));
   s := nil;  
447    Randomize;    Randomize;
448    DM.FDTable2.Last;    DM.FDTableView.Filter := 'DATE > ' + QuotedStr(DateTimeToStr(Date - 10));
449    DM.FDTable2.MoveBy(-Random(DM.FDTable2.RecordCount div 5));    DM.FDTableView.First;
450    s := DM.FDTable2.CreateBlobStream    DM.FDTableView.MoveBy(Random(DM.FDTableView.RecordCount));
451      (DM.FDTable2.FieldByName('THUMBNAIL'), bmRead);    UserSession.FieldToImg(IWImage1.Picture,
452    png := TPngImage.Create;      DM.FDTableView.FieldByName('THUMBNAIL'));
453    try    IWLabel4.Caption := DM.FDTableView.FieldByName('NAME').AsString;
454      png.LoadFromStream(s);  end;
455      IWImageFile1.Picture.Assign(png);  
456    finally  function TIWForm1.SearchCount: Integer;
457      png.Free;  begin
458      s.Free;    with DM.FDTable2 do
459      begin
460        if FindFirst = true then
461        begin
462          result := 1;
463          while FindNext = true do
464            inc(result);
465        end
466        else
467          result := 0;
468    end;    end;
   IWLabel4.Caption := DM.FDTable2.FieldByName('NAME').AsString;  
469  end;  end;
470    
471  procedure TIWForm1.SetPage(const Value: TPage);  procedure TIWForm1.SetPage(const Value: Boolean);
 var  
   x: Boolean;  
472  begin  begin
473    UserSession.FPage := Value;    UserSession.FPage := Value;
474    x := Value = Info;    IWRegion7.Visible := not Value;
475    IWRegion7.Visible := x;    IWDBLabel1.Visible := not Value;
476    IWLabel6.Visible := x;    IWLink3.Visible := not Value;
477    IWDBLabel1.Visible := x;    IWLink1.Visible := Value;
478    IWLink1.Visible := not x;    IWText1.Visible := Value;
479    IWText1.Visible := not x;    if Value = false then
   if x = true then  
480    begin    begin
481      IWLabel1.Caption := 'ようこそ';      IWLabel1.Caption := 'ようこそ';
482      IWLink2.Caption := 'ログアウト';      IWLink2.Caption := 'ログアウト';
483        WebApplication.Response.Cookies.AddCookie('user_cookie',
484          UserSession.user_number.ToString, '/', Date + 10);
485    end    end
486    else    else
487    begin    begin
488      IWLabel1.Caption := 'ようこそゲスト様';      IWLabel1.Caption := 'ようこそゲスト様';
489      IWLink2.Caption := 'ログイン';      IWLink2.Caption := 'ログイン';
490        Thumbnail := true;
491        IWText1.Text := '';
492        DM.FDTable2.Filter := table2filter;
493        if DM.FDTable1.FieldByName('EMAIL').AsString <> '' then
494        begin
495          WebApplication.Response.Cookies.AddCookie('user_cookie', '0', '/',
496            Date - 1);
497          UserSession.user_number := 0;
498        end;
499    end;    end;
500  end;  end;
501    
502    procedure TIWForm1.SetThumbnail(const Value: Boolean);
503    begin
504      UserSession.FThumbnail := Value;
505      IWGrid1.Visible := Value;
506      IWFrame8.IWEdit1.Text := '1';
507      IWFrame8.Visible := not Value;
508    end;
509    
510  initialization  initialization
511    
512  TIWForm1.SetAsMainForm;  TIWForm1.SetAsMainForm;

Legend:
Removed from v.3  
changed lines
  Added in v.20

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26