Changeset 149 for trunk/Modules/ZdechovNET
- Timestamp:
- Feb 4, 2024, 2:14:37 PM (11 months ago)
- Location:
- trunk/Modules/ZdechovNET
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/ZdechovNET/AboutPage.pas
r147 r149 12 12 TAboutPage = class(TWebPage) 13 13 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 14 public 15 ModuleUser: TModuleUser; 16 end; 14 end; 17 15 18 16 var … … 34 32 DbRows: TDbRows; 35 33 I: Integer; 34 ModuleUser: TModuleUser; 36 35 begin 37 36 with TWebSession(HandlerData) do begin 37 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 38 38 if Request.Path.Count > 1 then begin 39 39 PageNotFound; -
trunk/Modules/ZdechovNET/ContactPage.pas
r147 r149 12 12 TContactPage = class(TWebPage) 13 13 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 14 public 15 ModuleUser: TModuleUser; 16 end; 14 end; 17 15 18 16 var … … 28 26 29 27 procedure TContactPage.DataModuleProduce(HandlerData: THTTPHandlerData); 28 var 29 ModuleUser: TModuleUser; 30 30 begin 31 31 with TWebSession(HandlerData), HtmlDocument.Body, SubItems.AddString do begin 32 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 32 33 if Request.Path.Count > 1 then begin 33 34 PageNotFound; -
trunk/Modules/ZdechovNET/DocumentsPage.pas
r146 r149 12 12 TDocumentsPage = class(TWebPage) 13 13 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 14 public 15 ModuleUser: TModuleUser; 16 end; 14 end; 17 15 18 16 var … … 30 28 31 29 procedure TDocumentsPage.DataModuleProduce(HandlerData: THTTPHandlerData); 30 var 31 ModuleUser: TModuleUser; 32 32 begin 33 33 with TWebSession(HandlerData) do begin 34 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 34 35 ModuleUser.LoadUserInfo; 35 36 with HtmlDocument.Body, SubItems.AddString do begin -
trunk/Modules/ZdechovNET/HistoryPage.pas
r146 r149 13 13 THistoryPage = class(TWebPage) 14 14 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 15 public 16 ModuleUser: TModuleUser; 17 end; 15 end; 18 16 19 17 var … … 34 32 DbRows: TDbRows; 35 33 I: Integer; 34 ModuleUser: TModuleUser; 36 35 begin 37 36 with TWebSession(HandlerData) do begin 37 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 38 38 if Request.Path.Count > 1 then begin 39 39 PageNotFound; -
trunk/Modules/ZdechovNET/HostingPage.pas
r146 r149 13 13 THostingPage = class(TWebPage) 14 14 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 15 public 16 ModuleUser: TModuleUser; 17 end; 15 end; 18 16 19 17 var … … 34 32 I: Integer; 35 33 DbRows: TDbRows; 34 ModuleUser: TModuleUser; 36 35 begin 37 36 with TWebSession(HandlerData) do begin 37 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 38 38 if Request.Path.Count > 1 then begin 39 39 PageNotFound; -
trunk/Modules/ZdechovNET/IPTVPage.pas
r146 r149 31 31 private 32 32 function Row(Cells: array of string): string; 33 public34 ModuleUser: TModuleUser;35 33 end; 36 34 … … 86 84 var 87 85 Channels: TChannels; 86 ModuleUser: TModuleUser; 88 87 begin 89 88 with TWebSession(HandlerData) do begin 89 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 90 90 if Request.Path.Count > 1 then begin 91 91 PageNotFound; -
trunk/Modules/ZdechovNET/InternetPage.pas
r147 r149 12 12 TInternetPage = class(TWebPage) 13 13 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 14 public 15 ModuleUser: TModuleUser; 16 end; 14 end; 17 15 18 16 var … … 30 28 31 29 procedure TInternetPage.DataModuleProduce(HandlerData: THTTPHandlerData); 30 var 31 ModuleUser: TModuleUser; 32 32 begin 33 33 with TWebSession(HandlerData) do begin 34 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 34 35 if Request.Path.Count > 1 then begin 35 36 PageNotFound; -
trunk/Modules/ZdechovNET/LinksPage.pas
r146 r149 12 12 TLinksPage = class(TWebPage) 13 13 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 14 public 15 ModuleUser: TModuleUser; 16 end; 14 end; 17 15 18 16 var … … 30 28 31 29 procedure TLinksPage.DataModuleProduce(HandlerData: THTTPHandlerData); 30 var 31 ModuleUser: TModuleUser; 32 32 begin 33 33 with TWebSession(HandlerData), HtmlDocument.Body, SubItems.AddString do begin 34 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 34 35 if Request.Path.Count > 1 then begin 35 36 PageNotFound; -
trunk/Modules/ZdechovNET/ModuleZdechovNET.pas
r146 r149 39 39 Raw: Boolean; 40 40 constructor Create(Owner: TComponent); override; 41 destructor Destroy; override; 41 42 procedure Start; override; 42 43 procedure Stop; override; … … 63 64 Dependencies.Add('User'); 64 65 Dependencies.Add('Base'); 66 67 // Pages 68 InternetPage := TInternetPage.Create(nil); 69 HostingPage := THostingPage.Create(nil); 70 HistoryPage := THistoryPage.Create(nil); 71 DocumentsPage := TDocumentsPage.Create(nil); 72 VoIPPage := TVoIPPage.Create(nil); 73 LinksPage := TLinksPage.Create(nil); 74 ContactPage := TContactPage.Create(nil); 75 ServerInfoPage := TServerInfoPage.Create(nil); 76 WebCamPage := TWebCamPage.Create(nil); 77 PlansPage := TPlansPage.Create(nil); 78 NetworkPage := TNetworkPage.Create(nil); 79 ProjectsPage := TProjectsPage.Create(nil); 80 AboutPage := TAboutPage.Create(nil); 81 IPTVPage := TIPTVPage.Create(nil); 82 RobotsPage := TRobotsPage.Create(nil); 83 end; 84 85 destructor TModuleZdechovNET.Destroy; 86 begin 87 FreeAndNil(IPTVPage); 88 FreeAndNil(AboutPage); 89 FreeAndNil(InternetPage); 90 FreeAndNil(HostingPage); 91 FreeAndNil(HistoryPage); 92 FreeAndNil(DocumentsPage); 93 FreeAndNil(VoIPPage); 94 FreeAndNil(LinksPage); 95 FreeAndNil(ContactPage); 96 FreeAndNil(ServerInfoPage); 97 FreeAndNil(WebCamPage); 98 FreeAndNil(PlansPage); 99 FreeAndNil(NetworkPage); 100 FreeAndNil(ProjectsPage); 101 FreeAndNil(RobotsPage); 102 inherited; 65 103 end; 66 104 … … 73 111 with ModuleBase, Pages do begin 74 112 //OnGeneratePage := OnGeneratePage; 75 InternetPage := TInternetPage.Create(nil); 76 InternetPage.ModuleUser := ModuleUser; 113 77 114 RegisterPage(InternetPage, 'internet'); 78 HostingPage := THostingPage.Create(nil);79 HostingPage.ModuleUser := ModuleUser;80 115 RegisterPage(HostingPage, 'hosting'); 81 HistoryPage := THistoryPage.Create(nil);82 HistoryPage.ModuleUser := ModuleUser;83 116 RegisterPage(HistoryPage, 'historie'); 84 DocumentsPage := TDocumentsPage.Create(nil);85 DocumentsPage.ModuleUser := ModuleUser;86 117 RegisterPage(DocumentsPage, 'dokumenty'); 87 VoIPPage := TVoIPPage.Create(nil);88 VoIPPage.ModuleUser := ModuleUser;89 118 RegisterPage(VoIPPage, 'voip'); 90 LinksPage := TLinksPage.Create(nil);91 LinksPage.ModuleUser := ModuleUser;92 119 RegisterPage(LinksPage, 'odkazy'); 93 ContactPage := TContactPage.Create(nil);94 ContactPage.ModuleUser := ModuleUser;95 120 RegisterPage(ContactPage, 'kontakt'); 96 ServerInfoPage := TServerInfoPage.Create(nil); 97 ServerInfoPage.ModuleUser := ModuleUser; 121 RegisterPage(WebCamPage, 'kamery'); 122 RegisterPage(PlansPage, 'plany'); 123 RegisterPage(NetworkPage, 'sit'); 124 RegisterPage(ProjectsPage, 'projekty'); 125 RegisterPage(AboutPage, ''); 126 RegisterPage(IPTVPage, 'televize'); 127 RegisterPage(RobotsPage, 'robots.txt'); 128 {$IFDEF DEBUG} 98 129 RegisterPage(ServerInfoPage, 'serverinfo'); 99 WebCamPage := TWebCamPage.Create(nil); 100 WebCamPage.ModuleUser := ModuleUser; 101 RegisterPage(WebCamPage, 'kamery'); 102 PlansPage := TPlansPage.Create(nil); 103 PlansPage.ModuleUser := ModuleUser; 104 RegisterPage(PlansPage, 'plany'); 105 NetworkPage := TNetworkPage.Create(nil); 106 NetworkPage.ModuleUser := ModuleUser; 107 RegisterPage(NetworkPage, 'sit'); 108 ProjectsPage := TProjectsPage.Create(nil); 109 ProjectsPage.ModuleUser := ModuleUser; 110 RegisterPage(ProjectsPage, 'projekty'); 111 AboutPage := TAboutPage.Create(nil); 112 AboutPage.ModuleUser := ModuleUser; 113 RegisterPage(AboutPage, ''); 114 IPTVPage := TIPTVPage.Create(nil); 115 IPTVPage.ModuleUser := ModuleUser; 116 RegisterPage(IPTVPage, 'televize'); 117 RobotsPage := TRobotsPage.Create(nil); 118 RobotsPage.ModuleUser := ModuleUser; 119 RegisterPage(RobotsPage, 'robots.txt'); 130 {$ENDIF} 120 131 end; 121 132 AfterStart; … … 127 138 with ModuleBase, Pages do begin 128 139 UnregisterPage(IPTVPage); 129 FreeAndNil(IPTVPage);130 140 UnregisterPage(AboutPage); 131 FreeAndNil(AboutPage);132 141 UnregisterPage(InternetPage); 133 FreeAndNil(InternetPage);134 142 UnregisterPage(HostingPage); 135 FreeAndNil(HostingPage);136 143 UnregisterPage(HistoryPage); 137 FreeAndNil(HistoryPage);138 144 UnregisterPage(DocumentsPage); 139 FreeAndNil(DocumentsPage);140 145 UnregisterPage(VoIPPage); 141 FreeAndNil(VoIPPage);142 146 UnregisterPage(LinksPage); 143 FreeAndNil(LinksPage);144 147 UnregisterPage(ContactPage); 145 FreeAndNil(ContactPage); 148 UnregisterPage(WebCamPage); 149 UnregisterPage(PlansPage); 150 UnregisterPage(NetworkPage); 151 UnregisterPage(ProjectsPage); 152 UnregisterPage(RobotsPage); 153 {$IFDEF DEBUG} 146 154 UnregisterPage(ServerInfoPage); 147 FreeAndNil(ServerInfoPage); 148 UnregisterPage(WebCamPage); 149 FreeAndNil(WebCamPage); 150 UnregisterPage(PlansPage); 151 FreeAndNil(PlansPage); 152 UnregisterPage(NetworkPage); 153 FreeAndNil(NetworkPage); 154 UnregisterPage(ProjectsPage); 155 FreeAndNil(ProjectsPage); 156 UnregisterPage(RobotsPage); 157 FreeAndNil(RobotsPage); 155 {$ENDIF} 158 156 end; 159 157 ModuleBase := nil; -
trunk/Modules/ZdechovNET/NetworkPage.pas
r146 r149 12 12 TNetworkPage = class(TWebPage) 13 13 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 14 public 15 ModuleUser: TModuleUser; 16 end; 14 end; 17 15 18 16 var … … 32 30 var 33 31 TextBlock: THtmlString; 32 ModuleUser: TModuleUser; 34 33 begin 35 34 with TWebSession(HandlerData) do begin 35 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 36 36 if Request.Path.Count > 1 then begin 37 37 PageNotFound; -
trunk/Modules/ZdechovNET/PlansPage.pas
r146 r149 13 13 TPlansPage = class(TWebPage) 14 14 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 15 public 16 ModuleUser: TModuleUser; 17 end; 15 end; 18 16 19 17 var … … 34 32 DbRows: TDbRows; 35 33 I: Integer; 34 ModuleUser: TModuleUser; 36 35 begin 37 36 with TWebSession(HandlerData) do begin 37 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 38 38 if Request.Path.Count > 1 then begin 39 39 PageNotFound; -
trunk/Modules/ZdechovNET/ProjectsPage.pas
r146 r149 13 13 TProjectsPage = class(TWebPage) 14 14 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 15 public16 ModuleUser: TModuleUser;17 15 end; 18 16 … … 34 32 DbRows: TDbRows; 35 33 I: Integer; 34 ModuleUser: TModuleUser; 36 35 begin 37 36 with TWebSession(HandlerData) do begin 37 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 38 38 if Request.Path.Count > 1 then begin 39 39 PageNotFound; -
trunk/Modules/ZdechovNET/RobotsPage.pas
r146 r149 12 12 TRobotsPage = class(TWebPage) 13 13 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 14 public15 ModuleUser: TModuleUser;16 14 end; 17 15 … … 34 32 DbRows: TDbRows; 35 33 I: Integer; 34 ModuleUser: TModuleUser; 36 35 begin 37 36 with TWebSession(HandlerData) do begin 37 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 38 38 if Request.Path.Count > 1 then begin 39 39 PageNotFound; -
trunk/Modules/ZdechovNET/VoIPPage.pas
r146 r149 12 12 TVoIPPage = class(TWebPage) 13 13 procedure DataModuleProduce(HandlerData: THTTPHandlerData); 14 public 15 ModuleUser: TModuleUser; 16 end; 14 end; 17 15 18 16 var … … 30 28 31 29 procedure TVoIPPage.DataModuleProduce(HandlerData: THTTPHandlerData); 30 var 31 ModuleUser: TModuleUser; 32 32 begin 33 33 with TWebSession(HandlerData) do begin 34 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 34 35 if Request.Path.Count > 1 then begin 35 36 PageNotFound; -
trunk/Modules/ZdechovNET/WebCamPage.pas
r146 r149 19 19 function GetSingle(HandlerData: THTTPHandlerData; Id: Integer): string; 20 20 function GetVideoArchive(Id: string): string; 21 public 22 ModuleUser: TModuleUser; 23 end; 21 end; 24 22 25 23 var … … 46 44 NotFound: Boolean; 47 45 WidthValue: string; 46 ModuleUser: TModuleUser; 48 47 begin 49 48 with TWebSession(HandlerData) do begin 49 ModuleUser := TModuleUser(ModuleManager.FindModuleByName('User')); 50 50 ModuleUser.LoadUserInfo; 51 51 with HtmlDocument.Body, SubItems.AddString do begin
Note:
See TracChangeset
for help on using the changeset viewer.