procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
GetDir(0,t);
pass1:= Request.ContentFields.Values['pass'];
pass2:=Request.ContentFields.Values['pass2'];
login1:=Request.ContentFields.Values['login'];
passrest:=Request.ContentFields.Values['passrestword'];
Ini:= TIniFile.Create('F:\users.ini');
Ini.ReadSections(Strings);
login:=Ini.ReadString('0','login','');
MaxCount:=StrToInt(Ini.ReadString('sys','maxcount','-1'));
Ini.Free;
Response.Content:='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'+
'<html><head><title>Вход</title></head> <body bgcolor="#000000">'+
'<font face="Verdana" color="#ffccff" size="2"><strong><em>';
if (login1=login) or (login1='') then
Response.Content:=Response.Content+
'Введённое Вами имя уже используется. Введите другое и повторите регистрацию.'
else if (Length(pass1)>=4) and
(pass1=pass2) then
begin
Ini:= TIniFile.Create('F:\users.ini');
Ini.WriteString('1','login','a'); //например тут дает сбой!!!
Ini.WriteString(IntToStr(MaxCount+1),'pass',pass1);
Ini.WriteString(IntToStr(MaxCount+1),'passrest',passrest);
Ini.WriteString('sys','maxcount',IntToStr(MaxCount+1));
Response.Content:=Response.Content+login;
Response.Content:=Response.Content+
'Регистрация успешно завершена.';
Ini.Free;
end
else
Response.Content:=Response.Content+
'Повторите ввод паролей';
Response.Content:=Response.Content+'</em></strong></font></body></html>';
end;