Line | |
---|
1 | unit NetworkPage;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, FileUtil, WebPage, HTTPServer, HtmlClasses, ModuleUser;
|
---|
7 |
|
---|
8 | type
|
---|
9 |
|
---|
10 | { TNetworkPage }
|
---|
11 |
|
---|
12 | TNetworkPage = class(TWebPage)
|
---|
13 | procedure DataModuleProduce(HandlerData: THTTPHandlerData);
|
---|
14 | end;
|
---|
15 |
|
---|
16 | var
|
---|
17 | NetworkPage: TNetworkPage;
|
---|
18 |
|
---|
19 |
|
---|
20 | implementation
|
---|
21 |
|
---|
22 | {$R *.lfm}
|
---|
23 |
|
---|
24 | uses
|
---|
25 | Core, Utils, WebSession;
|
---|
26 |
|
---|
27 | { TNetworkPage }
|
---|
28 |
|
---|
29 | procedure TNetworkPage.DataModuleProduce(HandlerData: THTTPHandlerData);
|
---|
30 | var
|
---|
31 | TextBlock: THtmlString;
|
---|
32 | ModuleUser: TModuleUser;
|
---|
33 | begin
|
---|
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;
|
---|
50 | end;
|
---|
51 |
|
---|
52 | end.
|
---|
53 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.