Changeset 36 for trunk/Application/UCustomApplication.pas
- Timestamp:
- Oct 29, 2010, 10:44:13 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UCustomApplication.pas
r35 r36 8 8 Classes, SysUtils, UHTTPServerCGI, Contnrs, USqlDatabase, UConfig, DateUtils, 9 9 UXmlClasses, UHtmlClasses, UCore, UStringListEx, UHTTPServer, UHTTPServerTCP, 10 UHTTPSessionMySQL, UHTTPSessionFile ;10 UHTTPSessionMySQL, UHTTPSessionFile, UUser; 11 11 12 12 type … … 46 46 ModuleName: string; 47 47 BaseURL: string; 48 User: TWebUser; 49 UserOnline: TWebOnlineUser; 48 50 procedure Run; 49 51 procedure Execute(HandlerData: THTTPHandlerData); … … 95 97 TitleTag: THtmlString; 96 98 begin 99 User.HandlerData := HandlerData; 100 UserOnline.HandlerData := HandlerData; 101 UserOnline.Update; 97 102 with HandlerData do begin 98 103 Style := ConfigStyle; … … 133 138 Pages := TObjectList.Create; 134 139 HtmlDocument := THtmlDocument.Create; 140 User := TWebUser.Create; 141 User.Database := Database; 142 UserOnline := TWebOnlineUser.Create; 143 UserOnline.Database := Database; 135 144 end; 136 145 … … 141 150 Pages.Free; 142 151 HTTPServer.Free; 152 User.Free; 153 UserOnline.Free; 143 154 inherited Destroy; 144 155 end; … … 230 241 '<li><a href="https://mail.zdechov.net/">Pošta</a></li>' + 231 242 '<li><a href="http://wiki.zdechov.net/">Wiki</a></li>' + 232 '</ul><ul class="MenuItem2"> <li> </li>';233 (* if System.UserOnline.User = System.UserOnline.AnonymousUserId then begin243 '</ul><ul class="MenuItem2">'; //<li> </li>'; 244 if UserOnline.User = AnonymousUserId then begin 234 245 Text := Text + '</ul>' + 235 246 '<ul class="MenuItem2">' + 236 '<li>' + MakeLink('Přihlášení', Navigation MakeLink('User', 'Login')) + '</li>';247 '<li>' + MakeLink('Přihlášení', NavigationLink('/uzivatel/prihlaseni/')) + '</li>'; 237 248 //$Output .= '<li>'.$this->System->HTML->MakeLink($this->System->Translate('UserRegistration'), $this->System->MakeLink('UserList', 'Register')).'</li>'; 238 249 end else begin 239 250 Text := Text + '</ul>' + 240 251 '<ul class="MenuItem2">' + 241 '<li>' + System.User.FullName + '</li>' + 242 '<li>' + MakeLink('Odhlášení', NavigationMakeLink('User', 'Logout')) + '</li>' + 243 '<li>' + MakeLink('Profil', NavigationMakeLink('User', 'View', 244 array('Id' => $this->System->User->Id))).'</li>'; 245 end; 246 *) 252 '<li>' + User.FullName + '</li>' + 253 '<li>' + MakeLink('Odhlášení', NavigationLink('/uzivatel/odhlaseni/')) + '</li>' + 254 '<li>' + MakeLink('Profil', NavigationLink('/uzivatel/profil/')) + '</li>'; 255 end; 247 256 Text := Text + '</ul></div>'; 248 257 end;
Note:
See TracChangeset
for help on using the changeset viewer.