Changeset 107 for trunk/Modules
- Timestamp:
- Oct 10, 2012, 2:50:48 PM (12 years ago)
- Location:
- trunk/Modules
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Base/UModuleBase.pas
r105 r107 19 19 FGeneratePage: TGeneratePageEvent; 20 20 public 21 Session: TWebSession; 21 22 Pages: TPageList; 22 23 HandlerData: THTTPHandlerData; -
trunk/Modules/News/UModuleNews.pas
r105 r107 6 6 7 7 uses 8 Classes, SysUtils, UModularSystem, SpecializedDictionary, UModuleBase; 8 Classes, SysUtils, UModularSystem, SpecializedDictionary, UModuleBase, UNews, 9 UHTTPServer, UModuleUser; 9 10 10 11 type … … 14 15 public 15 16 ModuleBase: TModuleBase; 16 procedure Show; 17 News: TNews; 18 function Show(HandlerData: THTTPHandlerData): string; 17 19 constructor Create(Owner: TComponent); override; 18 20 destructor Destroy; override; … … 32 34 { TModuleNews } 33 35 34 procedure TModuleNews.Show;36 function TModuleNews.Show(HandlerData: THTTPHandlerData): string; 35 37 begin 36 38 Result := News.Show(HandlerData); 37 39 end; 38 40 … … 57 59 BeforeStart; 58 60 ModuleBase := TModuleBase(Manager.FindModuleByName('Base')); 59 UserControlPage := TUserControlPage.Create(nil);60 ModuleBase.Pages.RegisterPage(UserControlPage, 'uzivatel');61 //UserControlPage := TUserControlPage.Create(nil); 62 //ModuleBase.Pages.RegisterPage(UserControlPage, 'uzivatel'); 61 63 //RegisterPage(TUserControlPage, UserControlPage, ''); 64 News := TNews.Create; 65 News.ModuleUser := TModuleUser(Manager.FindModuleByName('User')); 66 News.Database := ModuleBase.Session.Database; 67 News.ModuleBase := ModuleBase; 62 68 AfterStart; 63 69 end; … … 66 72 begin 67 73 BeforeStop; 68 ModuleBase.Pages.UnregisterPage(UserControlPage); 69 FreeAndNil(UserControlPage); 74 FreeAndNil(News); 75 //ModuleBase.Pages.UnregisterPage(UserControlPage); 76 //FreeAndNil(UserControlPage); 70 77 ModuleBase := nil; 71 78 AfterStop; -
trunk/Modules/Portal/UModulePortal.pas
r105 r107 8 8 Classes, SysUtils, UModularSystem, SpecializedDictionary, USqlDatabase, 9 9 UUtils, UWebSession, SpecializedList, UUser, UWebPage, UHtmlClasses, 10 UModuleBase, UModuleUser ;10 UModuleBase, UModuleUser, UModuleNews; 11 11 12 12 type … … 66 66 WebPagePortal := TWebPagePortal.Create(nil); 67 67 ModuleBase.Pages.RegisterPage(WebPagePortal, ''); 68 TWebPagePortal(WebPagePortal).ModuleUser := TModuleUser(Manager.FindModuleByName('User')); 68 ModuleUser := TModuleUser(Manager.FindModuleByName('User')); 69 TWebPagePortal(WebPagePortal).ModuleUser := ModuleUser; 70 TWebPagePortal(WebPagePortal).ModuleNews := TModuleNews(Manager.FindModuleByName('News')); 69 71 AfterStart; 70 72 end; … … 76 78 FreeAndNil(WebPagePortal); 77 79 ModuleBase := nil; 80 ModuleUser := nil; 78 81 AfterStop; 79 82 end; -
trunk/Modules/Portal/UPagePortal.pas
r105 r107 256 256 Output := Output + ShowPanel('Kamery', WebcamPanel) 257 257 else if Panel.Values['Module'] = 'NewsGroupList' then 258 //Output := Output + ShowPanel('Aktuality',259 //ModuleNews.Show,258 Output := Output + ShowPanel('Aktuality', 259 ModuleNews.Show(HandlerData)); //, 260 260 //['<a href="?Action=CustomizeNews">Upravit</a>']); 261 261 end; -
trunk/Modules/User/UModuleUser.pas
r105 r107 61 61 //RegisterPage(TUserControlPage, UserControlPage, ''); 62 62 User := TWebUser.Create; 63 //User.Database :=Database;63 User.Database := ModuleBase.Session.Database; 64 64 UserOnline := TWebOnlineUser.Create; 65 //UserOnline.Database :=Database;65 UserOnline.Database := ModuleBase.Session.Database; 66 66 AfterStart; 67 67 end;
Note:
See TracChangeset
for help on using the changeset viewer.