Changeset 105 for trunk/Modules/Portal/UPagePortal.pas
- Timestamp:
- Oct 9, 2012, 1:58:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Portal/UPagePortal.pas
r104 r105 8 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, USqlDatabase, UUtils, 9 9 SpecializedDictionary, UWebSession, SpecializedList, UHtmlClasses, 10 UModularSystem ;10 UModularSystem, UModuleUser, UModuleNews; 11 11 12 12 type … … 26 26 function WebcamPanel: string; 27 27 public 28 { public declarations } 28 ModuleUser: TModuleUser; 29 ModuleNews: TModuleNews; 29 30 end; 30 31 … … 37 38 38 39 uses 39 UCore, U ModuleUser, UWebObjects, UUser;40 UCore, UWebObjects, UUser; 40 41 41 42 function TWebPagePortal.SystemMessage(Title, Text: string): string; … … 76 77 if ((HyperLink.Values['PermissionModule'] = '') or 77 78 ((HyperLink.Values['PermissionModule'] <> '') and 78 Session.User.CheckPermission(HyperLink.Values['PermissionModule'], HyperLink.Values['PermissionOperation']))) then79 ModuleUser.User.CheckPermission(HyperLink.Values['PermissionModule'], HyperLink.Values['PermissionOperation']))) then 79 80 Result := Result + '<img alt="' + HyperLink.Values['Name'] + '" src="images/favicons/' + HyperLink.Values['IconFile'] + '" width="16" height="16" /> <a href="' + HyperLink.Values['URL'] + '">' + HyperLink.Values['Name'] + '</a><br />'; 80 81 end; … … 118 119 Form := TQueryForm.Create; // UserLogin 119 120 Form.Load(Session.Request.Post); 120 Session.UserOnline.Login(121 Session.User.GetIdByNamePassword(121 ModuleUser.UserOnline.Login( 122 ModuleUser.User.GetIdByNamePassword( 122 123 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Username').Value.Value, 123 124 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Password').Value.Value)); 124 125 Output := Output + SystemMessage('Přihlášení', 'Přihlášení provedeno'); 125 if Session.User.Id <> UnknownUser then begin126 if ModuleUser.User.Id <> UnknownUser then begin 126 127 //Form.LoadValuesFromForm; 127 128 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Password').Value.Value := ''; … … 132 133 end else 133 134 if Query.Values['Action'] = 'Logout' then begin 134 Session.UserOnline.Logout;135 ModuleUser.UserOnline.Logout; 135 136 Output := Output + SystemMessage('Odhlášení', 'Uživatel odhlášen'); 136 137 end else … … 249 250 else if Panel.Values['Module'] = 'UserOptions' then 250 251 begin 251 if Session.User.Id <> UnknownUser then252 if ModuleUser.User.Id <> UnknownUser then 252 253 Output := Output + ShowPanel('Přihlášený uživatel', UserPanel); 253 254 end else … … 255 256 Output := Output + ShowPanel('Kamery', WebcamPanel) 256 257 else if Panel.Values['Module'] = 'NewsGroupList' then 257 // Output := Output + Panel('Aktuality', $this->System->Modules['News']->Show(), array('<a href="?Action=CustomizeNews">Upravit</a>')); 258 //Output := Output + ShowPanel('Aktuality', 259 //ModuleNews.Show, 260 //['<a href="?Action=CustomizeNews">Upravit</a>']); 258 261 end; 259 262 Output := Output + '</td>';
Note:
See TracChangeset
for help on using the changeset viewer.