Changeset 76 for trunk/Modules
- Timestamp:
- Apr 29, 2012, 9:44:14 PM (13 years ago)
- Location:
- trunk/Modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/UMainModule.lfm
r62 r76 19 19 top = 86 20 20 end 21 object WebApp1: TWebApp 22 OnBeforePageProduce = DoBeforePageProduce 23 ServerType = stCGI 24 left = 160 25 top = 88 26 end 21 27 end -
trunk/Modules/UMainModule.lrs
r62 r76 7 7 +'base'#7'Timeout'#3'0*'#19'SessionIdCookieName'#6#9'SessionId'#4'left'#3'0'#1 8 8 +#3'top'#2' '#0#0#12'TSqlDatabase'#8'Database'#9'Connected'#8#4'Port'#3#234#12 9 +#8'Encoding'#6#4'utf8'#4'left'#2'Q'#3'top'#2'V'#0#0#0 9 +#8'Encoding'#6#4'utf8'#4'left'#2'Q'#3'top'#2'V'#0#0#7'TWebApp'#7'WebApp1'#19 10 +'OnBeforePageProduce'#7#19'DoBeforePageProduce'#10'ServerType'#7#5'stCGI'#4 11 +'left'#3#160#0#3'top'#2'X'#0#0#0 10 12 ]); -
trunk/Modules/UMainModule.pas
r71 r76 20 20 HTTPSessionStorageMySQL1: THTTPSessionStorageMySQL; 21 21 Database: TSqlDatabase; 22 WebApp1: TWebApp; 23 procedure DoBeforePageProduce(HandlerData: THTTPHandlerData); 22 24 private 23 25 procedure Footer; … … 25 27 procedure Show(Content: string); 26 28 procedure TopMenu; 27 procedure DoBeforePageProduce(HandlerData: THTTPHandlerData);28 29 public 29 30 TimeStart: TDateTime; … … 60 61 61 62 uses 62 UApplicationInfo; 63 UApplicationInfo, UInternetPage, UHostingPage, UHistoryPage, UDocumentsPage, UVoIPPage, 64 ULinksPage, UPlansPage, UServerInfoPage, UWebCamPage, UUserControlPage, 65 UNetworkPage, UAboutPage, UContactPage; 63 66 64 67 { TMainModule } … … 112 115 begin 113 116 inherited; 117 with WebApp1 do begin 118 RegisterPage(TInternetPage, InternetPage, 'internet'); 119 RegisterPage(THostingPage, HostingPage, 'hosting'); 120 RegisterPage(THistoryPage, HistoryPage, 'historie'); 121 RegisterPage(TDocumentsPage, DocumentsPage, 'dokumenty'); 122 RegisterPage(TVoIPPage, VoIPPage, 'voip'); 123 RegisterPage(TLinksPage, LinksPage, 'odkazy'); 124 RegisterPage(TContactPage, ContactPage, 'kontakt'); 125 RegisterPage(TServerInfoPage, ServerInfoPage, 'serverinfo'); 126 RegisterPage(TWebCamPage, WebCamPage, 'kamery'); 127 RegisterPage(TUserControlPage, UserControlPage, 'uzivatel'); 128 RegisterPage(TPlansPage, PlansPage, 'plany'); 129 RegisterPage(TNetworkPage, NetworkPage, 'sit'); 130 RegisterPage(TAboutPage, AboutPage, ''); 131 //RegisterPage(TUserControlPage, UserControlPage, ''); 132 if ServerType = stTCP then begin 133 THTTPServerTCP(HTTPServer).Socket.Address := MainModule.NetworkAddress; 134 THTTPServerTCP(HTTPServer).Socket.Port := MainModule.NetworkPort; 135 THTTPServerTCP(HTTPServer).MaxConnection := MainModule.MaxConnections; 136 end; 137 end; 138 114 139 HtmlDocument := THtmlDocument.Create; 115 140 User := TWebUser.Create; … … 122 147 destructor TMainModule.Destroy; 123 148 begin 124 SaveToRegistry;149 //SaveToRegistry; 125 150 HtmlDocument.Free; 126 151 User.Free; … … 215 240 '<li><a href="http://wiki.zdechov.net/">Wiki</a></li>' + 216 241 '</ul><ul class="MenuItem2">'; //<li> </li>'; 217 if Assigned( Application.Pages.FindByName('uzivatel')) then begin242 if Assigned(MainModule.WebApp1.Pages.FindByName('uzivatel')) then begin 218 243 if UserOnline.User = AnonymousUserId then begin 219 244 Text := Text + '</ul>' + … … 261 286 Database.Password := ReadString(SectionDatabase, 'DatabasePassword', 'password'); 262 287 FormatHTML := ReadBool(SectionGeneral, 'FormatHTML', False); 263 Application.LogException := not ReadBool(SectionGeneral, 'ShowException', False);288 //MainModule.WebApp1.LogException := not ReadBool(SectionGeneral, 'ShowException', False); 264 289 NetworkAddress := ReadString(SectionHTTPServer, 'NetworkAddress', 'localhost'); 265 290 NetworkPort := ReadInteger(SectionHTTPServer, 'NetworkPort', 80); … … 287 312 WriteString(SectionDatabase, 'DatabasePassword', Database.Password); 288 313 WriteBool(SectionGeneral, 'FormatHTML', FormatHTML); 289 WriteBool(SectionGeneral, 'ShowException', not Application.LogException);314 //WriteBool(SectionGeneral, 'ShowException', not MainModule.WebApp1.LogException); 290 315 WriteString(SectionHTTPServer, 'NetworkAddress', NetworkAddress); 291 316 WriteInteger(SectionHTTPServer, 'NetworkPort', NetworkPort); … … 300 325 InitDatabase; 301 326 //Database.Query('SELECT * FROM ssss'); 302 Application.OnBeforePageProduce := DoBeforePageProduce;327 WebApp1.Run; 303 328 end; 304 329
Note:
See TracChangeset
for help on using the changeset viewer.