Last change
on this file was 286, checked in by george, 14 years ago |
- Odstraněno: Nadále nebude používána sada knihoven powutils.
- Přidáno: Vlastní třída pro obsluhu a podporu zpracování CGI programů.
- Upraveno: Korekce názvů sloupců a tabulek databáze.
|
-
Property svn:executable
set to
*
|
File size:
874 bytes
|
Line | |
---|
1 | program index;
|
---|
2 |
|
---|
3 | {$mode delphi}{$H+}
|
---|
4 |
|
---|
5 | uses
|
---|
6 | UCore, USqlDatabase, SysUtils, UMainPage,
|
---|
7 | UFinancePage, UNewsPage, UUserPage, UBill, UCGIApplication, UMainCGI, UStringListEx;
|
---|
8 |
|
---|
9 | type
|
---|
10 |
|
---|
11 | { TMyCGIApplication }
|
---|
12 |
|
---|
13 | TMyCGIApplication = class(TCGIApplication)
|
---|
14 | procedure Execute; override;
|
---|
15 | end;
|
---|
16 |
|
---|
17 | var
|
---|
18 | Application: TMyCGIApplication;
|
---|
19 |
|
---|
20 | { TMyCGIApplication }
|
---|
21 |
|
---|
22 | procedure TMyCGIApplication.Execute;
|
---|
23 | var
|
---|
24 | I: Integer;
|
---|
25 | PageName: string;
|
---|
26 | begin
|
---|
27 | Output.Add('Hello friend');
|
---|
28 | SysInfo;
|
---|
29 |
|
---|
30 | PageName := Query.Values['p'];
|
---|
31 | if PageName = '' then PageName := 'index';
|
---|
32 | I := 0;
|
---|
33 | while (I < Length(Pages)) and (Pages[I].Name <> PageName) do Inc(I);
|
---|
34 | if I < Length(Pages) then Output.Add(Pages[I].Producer)
|
---|
35 | else Output.Add('Stránka nenalezena');
|
---|
36 | // WebWriteLn(FormatOutput(Output));
|
---|
37 | end;
|
---|
38 |
|
---|
39 | begin
|
---|
40 | Application := TMyCGIApplication.Create;
|
---|
41 | Application.Run;
|
---|
42 | Application.Free;
|
---|
43 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.