📄 untpassword.pas
字号:
unit untpassword;
interface
uses
Classes, SysUtils, IWAppForm, IWApplication, IWTypes, IWCompEdit,
IWHTMLControls, IWCompButton, Controls, IWVCLBaseControl, IWBaseControl,
IWControl, IWCompLabel, DB, ADODB, IWBaseHTMLControl;
type
Tfrmpassword = class(TIWAppForm)
IWLabel1: TIWLabel;
IWLabel2: TIWLabel;
IWLabel3: TIWLabel;
IWButton1: TIWButton;
IWButton2: TIWButton;
IWHRule2: TIWHRule;
IWLabel4: TIWLabel;
IWEdit1: TIWEdit;
IWEdit2: TIWEdit;
IWEdit3: TIWEdit;
ADOTable1: TADOTable;
procedure IWButton1Click(Sender: TObject);
procedure IWButton2Click(Sender: TObject);
procedure IWAppFormCreate(Sender: TObject);
public
end;
implementation
uses tempuntmain, ServerController;
{$R *.dfm}
procedure Tfrmpassword.IWButton1Click(Sender: TObject);
begin
if iwedit2.Text<>iwedit3.Text then
begin
webapplication.ShowMessage('两次输入的新密码不相符',smAlert);
iwedit1.Text:='';
iwedit2.Text:='';
iwedit3.Text:='';
end
else
if temppassword<>iwedit1.Text then
begin
webapplication.ShowMessage('请正确输入您的旧密码',smAlert);
iwedit1.Text:='';
iwedit2.Text:='';
iwedit3.Text:='';
end
else
begin
adotable1.Open;
adotable1.Locate('Logname',templogname,[]);
with adotable1 do
begin
edit;
fieldbyname('password').AsString:=iwedit2.Text;
post;
end;
webapplication.ShowMessage('密码修改成功,您需重新登录,新密码才能生效!!',smAlert);
iwedit1.Text:='';
iwedit2.Text:='';
iwedit3.Text:='';
end;
end;
procedure Tfrmpassword.IWButton2Click(Sender: TObject);
begin
ttempfrmmain.Create(WebApplication).Show;
Release;
end;
procedure Tfrmpassword.IWAppFormCreate(Sender: TObject);
begin
adotable1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+strglob+';Persist Security Info=False';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -