Changeset 81
- Timestamp:
- Jun 21, 2012, 12:21:50 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/UUtils.pas
r80 r81 21 21 22 22 uses 23 U MainModule;23 UCore; 24 24 25 25 function HtmlLink(Text, Target: string): string; … … 97 97 begin 98 98 if (Length(URL) > 0) and (URL[1] = '/') then 99 Result := MainModule.BaseURL + URL99 Result := Core.BaseURL + URL 100 100 else Result := URL; 101 101 end; -
trunk/Pages/UAboutPage.pas
r80 r81 28 28 29 29 uses 30 U MainModule, UUtils;30 UCore, UUtils; 31 31 32 32 { TAboutPage } -
trunk/Pages/UContactPage.pas
r78 r81 28 28 29 29 uses 30 U MainModule;30 UCore; 31 31 32 32 procedure TContactPage.DataModuleProduce(HandlerData: THTTPHandlerData); -
trunk/Pages/UDocumentsPage.pas
r80 r81 28 28 29 29 uses 30 U MainModule, UUtils;30 UCore, UUtils; 31 31 32 32 { TDocumentsPage } -
trunk/Pages/UHistoryPage.pas
r80 r81 28 28 29 29 uses 30 U MainModule, UUtils;30 UCore, UUtils; 31 31 32 32 { THistoryPage } -
trunk/Pages/UHostingPage.pas
r78 r81 29 29 30 30 uses 31 U MainModule;31 UCore; 32 32 33 33 { THostingPage } -
trunk/Pages/UInternetPage.pas
r78 r81 28 28 29 29 uses 30 U MainModule, UHtmlClasses;30 UCore, UHtmlClasses; 31 31 32 32 { TInternetPage } -
trunk/Pages/ULinksPage.pas
r78 r81 28 28 29 29 uses 30 U MainModule;30 UCore; 31 31 32 32 { TLinksPage } -
trunk/Pages/UNetworkPage.pas
r80 r81 28 28 29 29 uses 30 U MainModule, UUtils;30 UCore, UUtils; 31 31 32 32 { TNetworkPage } -
trunk/Pages/UPlansPage.pas
r79 r81 28 28 29 29 uses 30 U MainModule;30 UCore; 31 31 32 32 { TPlansPage } -
trunk/Pages/UProjectsPage.pas
r79 r81 28 28 29 29 uses 30 U MainModule;30 UCore; 31 31 32 32 { TProjectsPage } -
trunk/Pages/UServerInfoPage.pas
r78 r81 28 28 29 29 uses 30 U MainModule;30 UCore; 31 31 32 32 { TServerInfoPage } -
trunk/Pages/UUserControlPage.lfm
r56 r81 6 6 HorizontalOffset = 259 7 7 VerticalOffset = 250 8 Width = 508 Width = 104 9 9 end -
trunk/Pages/UUserControlPage.pas
r80 r81 32 32 33 33 uses 34 U MainModule, UUtils, UUser;34 UCore, UUtils, UUser; 35 35 36 36 { TUserControlPage } … … 63 63 UserId: Integer; 64 64 begin 65 with TWebSession(HandlerData), MainModule, HtmlDocument.Body do begin65 with TWebSession(HandlerData), Core, HtmlDocument.Body do begin 66 66 Form := TQueryForm.Create; 67 67 with Form do begin … … 108 108 UserId: Integer; 109 109 begin 110 with TWebSession(HandlerData), MainModule, HtmlDocument.Body do begin110 with TWebSession(HandlerData), Core, HtmlDocument.Body do begin 111 111 Form := TQueryForm.Create; 112 112 with Form do begin … … 165 165 procedure TUserControlPage.HandleLogout(HandlerData: THTTPHandlerData); 166 166 begin 167 with TWebSession(HandlerData), MainModule, HtmlDocument.Body do begin167 with TWebSession(HandlerData), Core, HtmlDocument.Body do begin 168 168 UserOnline.Logout; 169 169 with THtmlString(SubItems.AddNew(THtmlString.Create)) do -
trunk/Pages/UVoIPPage.pas
r78 r81 28 28 29 29 uses 30 U MainModule;30 UCore; 31 31 32 32 { TVoIPPage } -
trunk/Pages/UWebCamPage.pas
r80 r81 28 28 29 29 uses 30 U MainModule, UUtils;30 UCore, UUtils; 31 31 32 32 -
trunk/UCore.pas
r80 r81 1 unit U MainModule;1 unit UCore; 2 2 3 3 {$mode delphi} … … 16 16 17 17 type 18 T MainModule = class;18 TCore = class; 19 19 20 20 { TWebSession } … … 25 25 procedure Footer; 26 26 public 27 MainModule: T MainModule;27 MainModule: TCore; 28 28 Database: TSqlDatabase; 29 29 SessionStorage: THTTPSessionStorageMySQL; … … 40 40 end; 41 41 42 { T MainModule }43 44 T MainModule = class(TDataModule)42 { TCore } 43 44 TCore = class(TDataModule) 45 45 WebApp1: TWebApp; 46 46 procedure WebApp1PageProduce(HandlerData: THTTPHandlerData); … … 74 74 75 75 var 76 MainModule: TMainModule;76 Core: TCore; 77 77 78 78 … … 162 162 163 163 164 { T MainModule }165 166 constructor T MainModule.Create(AOwner: TComponent);164 { TCore } 165 166 constructor TCore.Create(AOwner: TComponent); 167 167 begin 168 168 inherited; … … 195 195 end; 196 196 197 destructor T MainModule.Destroy;197 destructor TCore.Destroy; 198 198 begin 199 199 //SaveToRegistry; … … 244 244 end; 245 245 246 procedure T MainModule.Show(Content: string);246 procedure TCore.Show(Content: string); 247 247 begin 248 248 //HtmlDocument.Title := ; … … 308 308 end; 309 309 310 procedure T MainModule.WebApp1PageProduce(HandlerData: THTTPHandlerData);310 procedure TCore.WebApp1PageProduce(HandlerData: THTTPHandlerData); 311 311 var 312 312 FileName: string; … … 349 349 end; 350 350 351 procedure T MainModule.LoadFromRegistry;351 procedure TCore.LoadFromRegistry; 352 352 const 353 353 SectionGeneral = 'General'; … … 366 366 DatabasePassword := ReadString(SectionDatabase, 'DatabasePassword', 'password'); 367 367 FormatHTML := ReadBool(SectionGeneral, 'FormatHTML', False); 368 // MainModule.WebApp1.LogException := not ReadBool(SectionGeneral, 'ShowException', False);368 //Core.WebApp1.LogException := not ReadBool(SectionGeneral, 'ShowException', False); 369 369 NetworkAddress := ReadString(SectionHTTPServer, 'NetworkAddress', 'localhost'); 370 370 NetworkPort := ReadInteger(SectionHTTPServer, 'NetworkPort', 80); … … 375 375 end; 376 376 377 procedure T MainModule.SaveToRegistry;377 procedure TCore.SaveToRegistry; 378 378 const 379 379 SectionGeneral = 'General'; … … 392 392 WriteString(SectionDatabase, 'DatabasePassword', DatabasePassword); 393 393 WriteBool(SectionGeneral, 'FormatHTML', FormatHTML); 394 //WriteBool(SectionGeneral, 'ShowException', not MainModule.WebApp1.LogException);394 //WriteBool(SectionGeneral, 'ShowException', not Core.WebApp1.LogException); 395 395 WriteString(SectionHTTPServer, 'NetworkAddress', NetworkAddress); 396 396 WriteInteger(SectionHTTPServer, 'NetworkPort', NetworkPort); … … 401 401 end; 402 402 403 procedure T MainModule.Run;403 procedure TCore.Run; 404 404 begin 405 405 WebApp1.HTTPServer.DocumentRoot := ExtractFileDir(ParamStrUTF8(0)); … … 409 409 410 410 initialization 411 {$I U MainModule.lrs}411 {$I UCore.lrs} 412 412 413 413 end. -
trunk/ZdechovNET.lpi
r80 r81 84 84 </Unit4> 85 85 <Unit5> 86 <Filename Value="Modules/UMainModule.pas"/> 87 <IsPartOfProject Value="True"/> 88 <ComponentName Value="MainModule"/> 89 <HasResources Value="True"/> 90 <ResourceBaseClass Value="DataModule"/> 91 <UnitName Value="UMainModule"/> 86 <Filename Value="Pages/UContactPage.pas"/> 87 <IsPartOfProject Value="True"/> 88 <ComponentName Value="ContactPage"/> 89 <ResourceBaseClass Value="DataModule"/> 90 <UnitName Value="UContactPage"/> 92 91 </Unit5> 93 92 <Unit6> 94 <Filename Value="Pages/U ContactPage.pas"/>95 <IsPartOfProject Value="True"/> 96 <ComponentName Value=" ContactPage"/>97 <ResourceBaseClass Value="DataModule"/> 98 <UnitName Value="U ContactPage"/>93 <Filename Value="Pages/UInternetPage.pas"/> 94 <IsPartOfProject Value="True"/> 95 <ComponentName Value="InternetPage"/> 96 <ResourceBaseClass Value="DataModule"/> 97 <UnitName Value="UInternetPage"/> 99 98 </Unit6> 100 99 <Unit7> 101 <Filename Value="Pages/U InternetPage.pas"/>102 <IsPartOfProject Value="True"/> 103 <ComponentName Value=" InternetPage"/>104 <ResourceBaseClass Value="DataModule"/> 105 <UnitName Value="U InternetPage"/>100 <Filename Value="Pages/UHostingPage.pas"/> 101 <IsPartOfProject Value="True"/> 102 <ComponentName Value="HostingPage"/> 103 <ResourceBaseClass Value="DataModule"/> 104 <UnitName Value="UHostingPage"/> 106 105 </Unit7> 107 106 <Unit8> 108 <Filename Value="Pages/UH ostingPage.pas"/>109 <IsPartOfProject Value="True"/> 110 <ComponentName Value="H ostingPage"/>111 <ResourceBaseClass Value="DataModule"/> 112 <UnitName Value="UH ostingPage"/>107 <Filename Value="Pages/UHistoryPage.pas"/> 108 <IsPartOfProject Value="True"/> 109 <ComponentName Value="HistoryPage"/> 110 <ResourceBaseClass Value="DataModule"/> 111 <UnitName Value="UHistoryPage"/> 113 112 </Unit8> 114 113 <Unit9> 115 <Filename Value="Pages/U HistoryPage.pas"/>116 <IsPartOfProject Value="True"/> 117 <ComponentName Value=" HistoryPage"/>118 <ResourceBaseClass Value="DataModule"/> 119 <UnitName Value="U HistoryPage"/>114 <Filename Value="Pages/UDocumentsPage.pas"/> 115 <IsPartOfProject Value="True"/> 116 <ComponentName Value="DocumentsPage"/> 117 <ResourceBaseClass Value="DataModule"/> 118 <UnitName Value="UDocumentsPage"/> 120 119 </Unit9> 121 120 <Unit10> 122 <Filename Value="Pages/U DocumentsPage.pas"/>123 <IsPartOfProject Value="True"/> 124 <ComponentName Value=" DocumentsPage"/>125 <ResourceBaseClass Value="DataModule"/> 126 <UnitName Value="U DocumentsPage"/>121 <Filename Value="Pages/UVoIPPage.pas"/> 122 <IsPartOfProject Value="True"/> 123 <ComponentName Value="VoIPPage"/> 124 <ResourceBaseClass Value="DataModule"/> 125 <UnitName Value="UVoIPPage"/> 127 126 </Unit10> 128 127 <Unit11> 129 <Filename Value="Pages/UVoIPPage.pas"/> 130 <IsPartOfProject Value="True"/> 131 <ComponentName Value="VoIPPage"/> 132 <ResourceBaseClass Value="DataModule"/> 133 <UnitName Value="UVoIPPage"/> 128 <Filename Value="Pages/UPlansPage.pas"/> 129 <IsPartOfProject Value="True"/> 130 <ComponentName Value="PlansPage"/> 131 <HasResources Value="True"/> 132 <ResourceBaseClass Value="DataModule"/> 133 <UnitName Value="UPlansPage"/> 134 134 </Unit11> 135 135 <Unit12> 136 <Filename Value="Pages/UPlansPage.pas"/> 137 <IsPartOfProject Value="True"/> 138 <ComponentName Value="PlansPage"/> 139 <HasResources Value="True"/> 140 <ResourceBaseClass Value="DataModule"/> 141 <UnitName Value="UPlansPage"/> 136 <Filename Value="Pages/ULinksPage.pas"/> 137 <IsPartOfProject Value="True"/> 138 <ComponentName Value="LinksPage"/> 139 <ResourceBaseClass Value="DataModule"/> 140 <UnitName Value="ULinksPage"/> 142 141 </Unit12> 143 142 <Unit13> 144 <Filename Value="Pages/U LinksPage.pas"/>145 <IsPartOfProject Value="True"/> 146 <ComponentName Value=" LinksPage"/>147 <ResourceBaseClass Value="DataModule"/> 148 <UnitName Value="U LinksPage"/>143 <Filename Value="Pages/UServerInfoPage.pas"/> 144 <IsPartOfProject Value="True"/> 145 <ComponentName Value="ServerInfoPage"/> 146 <ResourceBaseClass Value="DataModule"/> 147 <UnitName Value="UServerInfoPage"/> 149 148 </Unit13> 150 149 <Unit14> 151 <Filename Value="Pages/U ServerInfoPage.pas"/>152 <IsPartOfProject Value="True"/> 153 <ComponentName Value=" ServerInfoPage"/>154 <ResourceBaseClass Value="DataModule"/> 155 <UnitName Value="U ServerInfoPage"/>150 <Filename Value="Pages/UWebCamPage.pas"/> 151 <IsPartOfProject Value="True"/> 152 <ComponentName Value="WebCamPage"/> 153 <ResourceBaseClass Value="DataModule"/> 154 <UnitName Value="UWebCamPage"/> 156 155 </Unit14> 157 156 <Unit15> 158 <Filename Value="Pages/UWebCamPage.pas"/> 159 <IsPartOfProject Value="True"/> 160 <ComponentName Value="WebCamPage"/> 161 <ResourceBaseClass Value="DataModule"/> 162 <UnitName Value="UWebCamPage"/> 157 <Filename Value="Pages/UUserControlPage.pas"/> 158 <IsPartOfProject Value="True"/> 159 <ComponentName Value="UserControlPage"/> 160 <HasResources Value="True"/> 161 <ResourceBaseClass Value="DataModule"/> 162 <UnitName Value="UUserControlPage"/> 163 163 </Unit15> 164 164 <Unit16> 165 <Filename Value="Pages/U UserControlPage.pas"/>166 <IsPartOfProject Value="True"/> 167 <ComponentName Value=" UserControlPage"/>168 <HasResources Value="True"/> 169 <ResourceBaseClass Value="DataModule"/> 170 <UnitName Value="U UserControlPage"/>165 <Filename Value="Pages/UNetworkPage.pas"/> 166 <IsPartOfProject Value="True"/> 167 <ComponentName Value="NetworkPage"/> 168 <HasResources Value="True"/> 169 <ResourceBaseClass Value="DataModule"/> 170 <UnitName Value="UNetworkPage"/> 171 171 </Unit16> 172 172 <Unit17> 173 <Filename Value="Pages/U NetworkPage.pas"/>174 <IsPartOfProject Value="True"/> 175 <ComponentName Value=" NetworkPage"/>176 <HasResources Value="True"/> 177 <ResourceBaseClass Value="DataModule"/> 178 <UnitName Value="U NetworkPage"/>173 <Filename Value="Pages/UAboutPage.pas"/> 174 <IsPartOfProject Value="True"/> 175 <ComponentName Value="AboutPage"/> 176 <HasResources Value="True"/> 177 <ResourceBaseClass Value="DataModule"/> 178 <UnitName Value="UAboutPage"/> 179 179 </Unit17> 180 180 <Unit18> 181 <Filename Value="Pages/UAboutPage.pas"/> 182 <IsPartOfProject Value="True"/> 183 <ComponentName Value="AboutPage"/> 184 <HasResources Value="True"/> 185 <ResourceBaseClass Value="DataModule"/> 186 <UnitName Value="UAboutPage"/> 181 <Filename Value="ReadMe.txt"/> 182 <IsPartOfProject Value="True"/> 187 183 </Unit18> 188 184 <Unit19> 189 <Filename Value="ReadMe.txt"/> 190 <IsPartOfProject Value="True"/> 185 <Filename Value="Application/UApplicationInfo.pas"/> 186 <IsPartOfProject Value="True"/> 187 <UnitName Value="UApplicationInfo"/> 191 188 </Unit19> 192 189 <Unit20> 193 <Filename Value="Application/UApplicationInfo.pas"/> 194 <IsPartOfProject Value="True"/> 195 <UnitName Value="UApplicationInfo"/> 190 <Filename Value="Pages/UProjectsPage.pas"/> 191 <IsPartOfProject Value="True"/> 192 <ComponentName Value="ProjectsPage"/> 193 <ResourceBaseClass Value="DataModule"/> 194 <UnitName Value="UProjectsPage"/> 196 195 </Unit20> 197 196 <Unit21> 198 <Filename Value="Pages/UProjectsPage.pas"/> 199 <IsPartOfProject Value="True"/> 200 <ComponentName Value="ProjectsPage"/> 201 <ResourceBaseClass Value="DataModule"/> 202 <UnitName Value="UProjectsPage"/> 197 <Filename Value="Modules/User/UModuleUser.pas"/> 198 <IsPartOfProject Value="True"/> 199 <UnitName Value="UModuleUser"/> 203 200 </Unit21> 204 201 <Unit22> 205 <Filename Value=" Modules/User/UModuleUser.pas"/>206 <IsPartOfProject Value="True"/> 207 <UnitName Value="UModule User"/>202 <Filename Value="Common/UModule.pas"/> 203 <IsPartOfProject Value="True"/> 204 <UnitName Value="UModule"/> 208 205 </Unit22> 209 206 <Unit23> 210 <Filename Value="Common/UModule.pas"/> 211 <IsPartOfProject Value="True"/> 212 <UnitName Value="UModule"/> 207 <Filename Value="UCore.pas"/> 208 <IsPartOfProject Value="True"/> 209 <HasResources Value="True"/> 210 <UnitName Value="UCore"/> 213 211 </Unit23> 214 212 </Units> … … 220 218 </Target> 221 219 <SearchPaths> 222 <OtherUnitFiles Value="/usr/lib/mysql;/usr/lib64/mysql;Application;WebServer;Network; Modules;Pages;Modules/User;Common"/>220 <OtherUnitFiles Value="/usr/lib/mysql;/usr/lib64/mysql;Application;WebServer;Network;Pages;Modules/User;Common"/> 223 221 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> 224 222 </SearchPaths> -
trunk/ZdechovNET.lpr
r80 r81 10 10 UUser, UHTTPSessionMySQL, UHTTPSessionFile, 11 11 UCommon, UHTTPServer, UHTTPServerTCP, UHTTPServerCGI, UTCPServer, UPool, 12 UMemoryStreamEx, UMIMEType, UPageList, Interfaces, U MainModule, UWebApp;12 UMemoryStreamEx, UMIMEType, UPageList, Interfaces, UCore, UWebApp; 13 13 14 14 begin 15 15 with Application do begin 16 16 Initialize; 17 MainModule := TMainModule.Create(Application);18 MainModule.Run;17 Core := TCore.Create(Application); 18 Core.Run; 19 19 Run; 20 20 end;
Note:
See TracChangeset
for help on using the changeset viewer.