Changeset 138 for trunk/Modules/User/UUserControlPage.pas
- Timestamp:
- Sep 9, 2022, 8:20:25 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/UUserControlPage.pas
r137 r138 87 87 AddNewAction('Přihlásit', 'Login'); 88 88 end; 89 if HandlerData.Request.Post. SearchKey('Login') <> -1then begin89 if HandlerData.Request.Post.ContainsKey('Login') then begin 90 90 Form.Load(HandlerData.Request.Post); 91 with THtmlString(SubItems.AddNew(THtmlString.Create))do91 with SubItems.AddString do 92 92 Text := 'Přihlášení uživatele: ' + TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value; 93 93 UserId := ModuleUser.User.GetIdByNamePassword(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value, 94 94 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Password').Value.Value); 95 95 if UserId = -1 then begin 96 with THtmlString(SubItems.AddNew(THtmlString.Create))do96 with SubItems.AddString do 97 97 Text := '<br/>Chybné jméno nebo heslo'; 98 98 end else ModuleUser.UserOnline.Login(UserId); 99 99 Form.Free; 100 100 end else 101 SubItems.Add New(Form);101 SubItems.Add(Form); 102 102 end; 103 103 end; … … 144 144 AddNewAction('Registrovat', 'Register'); 145 145 end; 146 if HandlerData.Request.Post. SearchKey('Register') <> -1then146 if HandlerData.Request.Post.ContainsKey('Register') then 147 147 with HandlerData.Request do begin 148 148 Form.Load(HandlerData.Request.Post); 149 with THtmlString(SubItems.AddNew(THtmlString.Create))do149 with SubItems.AddString do 150 150 Text := 'Registrace uživatele: ' + TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value; 151 151 ModuleUser.User.Add(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value, … … 156 156 if UserId <> -1 then ModuleUser.UserOnline.Login(UserId); 157 157 Form.Free; 158 end else SubItems.Add New(Form);158 end else SubItems.Add(Form); 159 159 end; 160 160 end; … … 164 164 with TWebSession(HandlerData), Core, HtmlDocument.Body do begin 165 165 ModuleUser.UserOnline.Logout; 166 with THtmlString(SubItems.AddNew(THtmlString.Create))do166 with SubItems.AddString do 167 167 Text := 'Uživatel odhlášen'; 168 168 end; … … 213 213 AddNewAction('Uložit', 'Save'); 214 214 end; 215 if HandlerData.Request.Post. SearchKey('Save') <> -1then215 if HandlerData.Request.Post.ContainsKey('Save') then 216 216 with HandlerData.Request do begin 217 217 Form.Load(HandlerData.Request.Post); 218 with THtmlString(SubItems.AddNew(THtmlString.Create))do218 with SubItems.AddString do 219 219 Text := 'Profil uživatele: ' + TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value + ' uložen'; 220 220 ModuleUser.User.Name := TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value; … … 223 223 ModuleUser.User.Save; 224 224 Form.Free; 225 end else SubItems.Add New(Form);225 end else SubItems.Add(Form); 226 226 end; 227 227 end;
Note:
See TracChangeset
for help on using the changeset viewer.