Changeset 92 for trunk/UCore.pas
- Timestamp:
- Sep 7, 2012, 9:52:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r91 r92 9 9 UHTTPServer, USqlDatabase, INIFiles, DateUtils, UWebPage, UWebApp, 10 10 UXmlClasses, UHtmlClasses, UUtils, UApplicationInfo, UHTTPServerTCP, 11 U ModuleUser, UHTTPSessionFile, UUser, SpecializedList, Registry,11 UHTTPSessionFile, UUser, SpecializedList, Registry, 12 12 UModularSystem; 13 13 … … 50 50 procedure Show(Content: string); 51 51 procedure RegisterModules; 52 procedure CheckModules; 52 53 public 53 54 CommonDatabase: TSqlDatabase; … … 85 86 86 87 uses 87 UInternetPage, UHostingPage, UHistoryPage, UDocumentsPage, UVoIPPage, 88 ULinksPage, UPlansPage, UServerInfoPage, UWebCamPage, UUserControlPage, 89 UNetworkPage, UAboutPage, UContactPage, UProjectsPage; 88 UModuleSystem, UModuleZdechovNET, UModuleUser, UPageAdmin; 90 89 91 90 { TWebSession } … … 178 177 LoadFromRegistry; 179 178 with Pages do begin 180 RegisterPage(TInternetPage, InternetPage, 'internet'); 181 RegisterPage(THostingPage, HostingPage, 'hosting'); 182 RegisterPage(THistoryPage, HistoryPage, 'historie'); 183 RegisterPage(TDocumentsPage, DocumentsPage, 'dokumenty'); 184 RegisterPage(TVoIPPage, VoIPPage, 'voip'); 185 RegisterPage(TLinksPage, LinksPage, 'odkazy'); 186 RegisterPage(TContactPage, ContactPage, 'kontakt'); 187 RegisterPage(TServerInfoPage, ServerInfoPage, 'serverinfo'); 188 RegisterPage(TWebCamPage, WebCamPage, 'kamery'); 189 RegisterPage(TPlansPage, PlansPage, 'plany'); 190 RegisterPage(TNetworkPage, NetworkPage, 'sit'); 191 RegisterPage(TProjectsPage, ProjectsPage, 'projekty'); 192 RegisterPage(TAboutPage, AboutPage, ''); 179 RegisterPage(TPageAdmin, PageAdmin, 'administration'); 193 180 end; 194 181 with WebApp1 do begin … … 282 269 begin 283 270 with ModuleManager do begin 271 RegisterModule(TModuleSystem.Create(nil), True); 284 272 RegisterModule(TModuleUser.Create(nil), True); 273 RegisterModule(TModuleZdechovNET.Create(nil), True); 274 end; 275 end; 276 277 procedure TCore.CheckModules; 278 var 279 DbRows: TDbRows; 280 Module: TModule; 281 begin 282 try 283 DbRows := TDbRows.Create; 284 CommonDatabase.Query(DbRows, 'SELECT * FROM INFORMATION_SCHEMA.TABLES ' + 285 'WHERE TABLE_SCHEMA = "' + CommonDatabase.Database + '" AND TABLE_NAME = "SystemModule"'); 286 Module := ModuleManager.FindModuleByName('System'); 287 if DbRows.Count > 0 then Module.SetInstalledState(True) 288 else Module.SetInstalledState(False); 289 finally 290 DbRows.Free; 285 291 end; 286 292 end; … … 425 431 426 432 RegisterModules; 433 CheckModules; 427 434 ModuleManager.StartInstalled; 428 435
Note:
See TracChangeset
for help on using the changeset viewer.