Changeset 32 for trunk/Application/UCustomCGIApplication.pas
- Timestamp:
- Sep 13, 2010, 8:35:39 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UCustomCGIApplication.pas
r29 r32 6 6 7 7 uses 8 Classes, SysUtils, U CGIApplication, Contnrs, USqlDatabase, UConfig, DateUtils,9 UXmlClasses, UHtmlClasses, UCore, UStringListEx ;8 Classes, SysUtils, UHTTPServerCGI, Contnrs, USqlDatabase, UConfig, DateUtils, 9 UXmlClasses, UHtmlClasses, UCore, UStringListEx, UHTTPServer; 10 10 11 11 type … … 21 21 { TCustomCGIApplication } 22 22 23 TCustomCGIApplication = class(T CGIApplication)23 TCustomCGIApplication = class(THTTPServerCGI) 24 24 private 25 25 procedure Footer; … … 43 43 PageName: string; 44 44 ModuleName: string; 45 procedure Execute; override; 45 BaseURL: string; 46 procedure Execute(HandlerData: THTTPHandlerData); 46 47 constructor Create; 47 48 destructor Destroy; override; … … 84 85 end; 85 86 86 procedure TCustomCGIApplication.Execute ;87 procedure TCustomCGIApplication.Execute(HandlerData: THTTPHandlerData); 87 88 var 88 89 I: Integer; 89 90 TitleTag: THtmlString; 90 91 begin 92 with HandlerData do begin 91 93 Style := ConfigStyle; 92 94 BaseURL := ConfigBaseURL; … … 98 100 HtmlDocument.Scripts.Add(NavigationLink('/Style/' + Style + '/jquery.js')); 99 101 100 if QueryParts.Count > 0 then PageName :=QueryParts[0]102 if Request.QueryParts.Count > 0 then PageName := Request.QueryParts[0] 101 103 else PageName := ''; 102 104 I := 0; … … 112 114 with HtmlDocument.AsXmlDocument do try 113 115 Formated := ConfigFormatHTML; 114 Output.Add(AsString);116 Response.Stream.WriteString(AsString); 115 117 finally 116 118 Free; 117 119 end; 118 end else Output.Add(SPageNotFound); 120 end else Response.Stream.WriteString(SPageNotFound); 121 end; 119 122 end; 120 123 … … 126 129 Pages := TObjectList.Create; 127 130 HtmlDocument := THtmlDocument.Create; 131 OnRequest := Execute; 128 132 end; 129 133
Note:
See TracChangeset
for help on using the changeset viewer.