Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /Unit9.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (hide annotations) (download) (as text)
Fri Jul 22 23:40:03 2016 UTC (7 years, 7 months ago) by yamat0jp
File MIME type: text/x-pascal
File size: 3350 byte(s)
パスワードをハッシュ値に置き換えました
クッキーに対応
1 yamat0jp 7 unit Unit9;
2    
3     interface
4    
5     uses
6     Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, IWCompButton,
7     Vcl.Controls, IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl,
8     IWHTMLControls, IWVCLComponent, IWBaseLayoutComponent, IWBaseContainerLayout,
9 yamat0jp 8 IWContainerLayout, IWTemplateProcessorHTML, IWCompEdit;
10 yamat0jp 7
11     type
12     TMyPage = class(TIWAppForm)
13     IWTemplateProcessorHTML1: TIWTemplateProcessorHTML;
14     IWLink2: TIWLink;
15     IWButton1: TIWButton;
16     IWButton2: TIWButton;
17 yamat0jp 8 IWEdit1: TIWEdit;
18     IWEdit2: TIWEdit;
19     IWButton3: TIWButton;
20     IWEdit3: TIWEdit;
21     IWEdit4: TIWEdit;
22     IWButton4: TIWButton;
23     IWEdit5: TIWEdit;
24 yamat0jp 7 procedure IWButton2Click(Sender: TObject);
25     procedure IWButton1Click(Sender: TObject);
26     procedure IWLink2Click(Sender: TObject);
27 yamat0jp 8 procedure IWButton3Click(Sender: TObject);
28     procedure IWButton4Click(Sender: TObject);
29     procedure IWAppFormCreate(Sender: TObject);
30 yamat0jp 7 public
31     Form: TIWAppForm;
32     end;
33    
34     implementation
35    
36     {$R *.dfm}
37    
38     uses Unit3, ServerController, Unit1;
39    
40 yamat0jp 8 procedure TMyPage.IWAppFormCreate(Sender: TObject);
41     begin
42     with DM.FDTable1 do
43     begin
44     IWEdit1.Text := FieldByName('EMAIL').AsString;
45     IWEdit2.Text := FieldByName('ADDRESS').AsString;
46 yamat0jp 11 IWEdit4.Text:= FieldByName('PASSWORD').AsString;
47 yamat0jp 8 end;
48     end;
49    
50 yamat0jp 7 procedure TMyPage.IWButton1Click(Sender: TObject);
51     begin
52     DM.FDQuery1.Open('select * from recent_data where number = :num;',
53     [UserSession.user_number]);
54     DM.FDQuery1.Open;
55     while DM.FDQuery1.Eof = false do
56     DM.FDQuery1.Delete;
57     end;
58    
59     procedure TMyPage.IWButton2Click(Sender: TObject);
60     begin
61     IWButton1Click(Sender);
62     while DM.FDTable1.Locate('NUMBER', UserSession.user_number, []) = true do
63     DM.FDTable1.Delete;
64     with DM.FDQuery1 do
65     begin
66     Open;
67     while Eof = false do
68     Delete;
69     Open('select serial from cart_data where number = :num;',
70     [UserSession.user_number]);
71     Open;
72     while Eof = false do
73     Delete;
74     end;
75     (Form as TIWForm1).Page := true;
76     UserSession.user_number := 0;
77     WebApplication.ShowMessage('������������������');
78     end;
79    
80 yamat0jp 8 procedure TMyPage.IWButton3Click(Sender: TObject);
81     begin
82     with DM.FDTable1 do
83     if IWEdit1.Text <> FieldByName('EMAIL').AsString then
84     begin
85     if IWEdit1.Text = IWEdit3.Text then
86     begin
87     Edit;
88     FieldByName('EMAIL').AsString := IWEdit1.Text;
89     FieldByName('ADDRESS').AsString := IWEdit2.Text;
90     Post;
91     end
92     else
93     begin
94     WebApplication.ShowMessage('���������v��������');
95     IWEdit1.Text := FieldByName('EMAIL').AsString;
96     IWEdit3.Text := '';
97     end;
98     end
99     else
100     begin
101     Edit;
102     FieldByName('ADDRESS').AsString := IWEdit2.Text;
103     Post;
104     end;
105     end;
106    
107     procedure TMyPage.IWButton4Click(Sender: TObject);
108     begin
109     if IWEdit4.Text <> IWEdit5.Text then
110     begin
111     WebApplication.ShowMessage('���������v��������');
112     Exit;
113     end
114     else if Length(IWEdit4.Text) < 5 then
115     WebApplication.ShowMessage('�p�X���[�h���T�����������K�v����')
116     else
117     with DM.FDTable1 do
118     begin
119     Edit;
120     FieldByName('PASSWORD').AsString := IWEdit4.Text;
121     Post;
122     end;
123     end;
124    
125 yamat0jp 7 procedure TMyPage.IWLink2Click(Sender: TObject);
126     begin
127     Release;
128     end;
129    
130     end.

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