source: trunk/Modules/ZdechovNET/NetworkPage.pas

Last change on this file was 151, checked in by chronos, 9 months ago
File size: 1.1 KB
Line 
1unit NetworkPage;
2
3interface
4
5uses
6 Classes, SysUtils, FileUtil, WebPage, HTTPServer, HtmlClasses, ModuleUser;
7
8type
9
10 { TNetworkPage }
11
12 TNetworkPage = class(TWebPage)
13 procedure DataModuleProduce(HandlerData: THTTPHandlerData);
14 end;
15
16var
17 NetworkPage: TNetworkPage;
18
19
20implementation
21
22{$R *.lfm}
23
24uses
25 Core, Utils, WebSession;
26
27{ TNetworkPage }
28
29procedure TNetworkPage.DataModuleProduce(HandlerData: THTTPHandlerData);
30var
31 TextBlock: THtmlString;
32 ModuleUser: TModuleUser;
33begin
34 with TWebSession(HandlerData) do begin
35 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User'));
36 if Request.Path.Count > 1 then begin
37 PageNotFound;
38 Exit;
39 end;
40
41 ModuleUser.LoadUserInfo;
42 with HtmlDocument.Body, SubItems.AddString do begin
43 Text := MakeLink('Dokumenty', NavigationLink('/dokumenty/')) + '<br/>' +
44 MakeLink('Historie', NavigationLink('/historie/')) + '<br/>' +
45 MakeLink('Plánované projekty', NavigationLink('/plany/')) + '<br/>' +
46 MakeLink('Měření rychlosti', 'http://speedtest.zdechov.net/') + '<br/>';
47 end;
48 GeneratePage(Self);
49 end;
50end;
51
52end.
53
Note: See TracBrowser for help on using the repository browser.