Changeset 137 for trunk/Modules/ZdechovNET/UModuleZdechovNET.pas
- Timestamp:
- Sep 9, 2022, 1:16:58 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/ZdechovNET/UModuleZdechovNET.pas
r135 r137 4 4 5 5 uses 6 Classes, SysUtils, UModularSystem, UWebPage, 6 Classes, SysUtils, UModularSystem, UWebPage, URobotsPage, 7 7 UWebSession, DateUtils, UModuleBase, UModuleUser, UIPTVPage, 8 8 UInternetPage, UHostingPage, UHistoryPage, UDocumentsPage, UVoIPPage, … … 30 30 AboutPage: TAboutPage; 31 31 IPTVPage: TIPTVPage; 32 RobotsPage: TRobotsPage; 32 33 procedure Footer(Session: TWebSession); 33 34 procedure GeneratePage(ASession: TWebSession; Page: TWebPage); … … 36 37 ModuleBase: TModuleBase; 37 38 ModuleUser: TModuleUser; 39 Raw: Boolean; 38 40 constructor Create(Owner: TComponent); override; 39 41 destructor Destroy; override; … … 74 76 BeforeStart; 75 77 ModuleBase := TModuleBase(Manager.FindModuleByName('Base')); 76 ModuleBase. GeneratePage := GeneratePage;78 ModuleBase.OnGeneratePage := GeneratePage; 77 79 ModuleUser := TModuleUser(Manager.FindModuleByName('User')); 78 80 with ModuleBase, Pages do begin 79 // GeneratePage :=GeneratePage;81 //OnGeneratePage := OnGeneratePage; 80 82 InternetPage := TInternetPage.Create(nil); 81 83 InternetPage.ModuleUser := ModuleUser; … … 120 122 IPTVPage.ModuleUser := ModuleUser; 121 123 RegisterPage(IPTVPage, 'televize'); 124 RobotsPage := TRobotsPage.Create(nil); 125 RobotsPage.ModuleUser := ModuleUser; 126 RegisterPage(RobotsPage, 'robots.txt'); 122 127 end; 123 128 AfterStart; … … 156 161 UnregisterPage(ProjectsPage); 157 162 FreeAndNil(ProjectsPage); 163 UnregisterPage(RobotsPage); 164 FreeAndNil(RobotsPage); 158 165 end; 159 166 ModuleBase := nil; … … 242 249 begin 243 250 inherited; 244 ModuleBase. GeneratePage := nil;251 ModuleBase.OnGeneratePage := nil; 245 252 try 246 253 DbRows := TDbRows.Create; … … 348 355 begin 349 356 with ASession do begin 350 HtmlDocument.ContentLanguage := 'cs'; 351 GlobalTitle := 'ZděchovNET'; 352 HtmlDocument.Styles.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/Style.css')); 353 HtmlDocument.Scripts.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/Global.js')); 354 HtmlDocument.Scripts.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/jquery.js')); 357 if Page.Raw then begin 358 Response.Content.WriteString(THtmlString(HtmlDocument.Body.SubItems[0]).Text); 359 end else begin 360 HtmlDocument.ContentLanguage := 'cs'; 361 GlobalTitle := 'ZděchovNET'; 362 HtmlDocument.Styles.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/Style.css')); 363 HtmlDocument.Scripts.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/Global.js')); 364 HtmlDocument.Scripts.Add(NavigationLink('/Style/' + TCore(MainModule).Style + '/jquery.js')); 355 365 356 366 TitleTag := THtmlString.Create; … … 370 380 end; 371 381 end; 382 end; 372 383 end; 373 384
Note:
See TracChangeset
for help on using the changeset viewer.