Changeset 77
- Timestamp:
- Jun 18, 2012, 8:48:28 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UApplicationInfo.pas
r71 r77 53 53 Name := 'ZděchovNET'; 54 54 Identification := 1; 55 ReleaseDate := EncodeDate(2012, 2, 11);55 ReleaseDate := EncodeDate(2012, 6, 18); 56 56 MajorVersion := 1; 57 57 MinorVersion := 0; -
trunk/Modules/UMainModule.lfm
r76 r77 20 20 end 21 21 object WebApp1: TWebApp 22 On BeforePageProduce = DoBeforePageProduce23 ServerType = st CGI22 OnPageProduce = WebApp1PageProduce 23 ServerType = stTCP 24 24 left = 160 25 25 top = 88 -
trunk/Modules/UMainModule.lrs
r76 r77 7 7 +'base'#7'Timeout'#3'0*'#19'SessionIdCookieName'#6#9'SessionId'#4'left'#3'0'#1 8 8 +#3'top'#2' '#0#0#12'TSqlDatabase'#8'Database'#9'Connected'#8#4'Port'#3#234#12 9 +#8'Encoding'#6#4'utf8'#4'left'#2'Q'#3'top'#2'V'#0#0#7'TWebApp'#7'WebApp1'#1 910 +'On BeforePageProduce'#7#19'DoBeforePageProduce'#10'ServerType'#7#5'stCGI'#411 + 'left'#3#160#0#3'top'#2'X'#0#0#09 +#8'Encoding'#6#4'utf8'#4'left'#2'Q'#3'top'#2'V'#0#0#7'TWebApp'#7'WebApp1'#13 10 +'OnPageProduce'#7#18'WebApp1PageProduce'#10'ServerType'#7#5'stTCP'#4'left'#3 11 +#160#0#3'top'#2'X'#0#0#0 12 12 ]); -
trunk/Modules/UMainModule.pas
r76 r77 15 15 16 16 type 17 TSession = class 18 19 end; 20 17 21 { TMainModule } 18 22 … … 21 25 Database: TSqlDatabase; 22 26 WebApp1: TWebApp; 23 procedure DoBeforePageProduce(HandlerData: THTTPHandlerData);27 procedure WebApp1PageProduce(HandlerData: THTTPHandlerData); 24 28 private 25 29 procedure Footer; … … 46 50 NetworkPort: Integer; 47 51 MaxConnections: Integer; 52 Pages: TPageList; 53 procedure LoadUserInfo(HandlerData: THTTPHandlerData); 48 54 procedure LoadFromRegistry; 49 55 procedure SaveToRegistry; … … 115 121 begin 116 122 inherited; 117 with WebApp1 do begin 123 Pages := TPageList.Create; 124 HtmlDocument := THtmlDocument.Create; 125 User := TWebUser.Create; 126 User.Database := Database; 127 UserOnline := TWebOnlineUser.Create; 128 UserOnline.Database := Database; 129 LoadFromRegistry; 130 with Pages do begin 118 131 RegisterPage(TInternetPage, InternetPage, 'internet'); 119 132 RegisterPage(THostingPage, HostingPage, 'hosting'); … … 130 143 RegisterPage(TAboutPage, AboutPage, ''); 131 144 //RegisterPage(TUserControlPage, UserControlPage, ''); 145 end; 146 with WebApp1 do begin 132 147 if ServerType = stTCP then begin 133 THTTPServerTCP(HTTPServer).Socket.Address := MainModule.NetworkAddress; 134 THTTPServerTCP(HTTPServer).Socket.Port := MainModule.NetworkPort; 135 THTTPServerTCP(HTTPServer).MaxConnection := MainModule.MaxConnections; 136 end; 137 end; 138 139 HtmlDocument := THtmlDocument.Create; 140 User := TWebUser.Create; 141 User.Database := Database; 142 UserOnline := TWebOnlineUser.Create; 143 UserOnline.Database := Database; 144 LoadFromRegistry; 148 THTTPServerTCP(HTTPServer).Socket.Address := NetworkAddress; 149 THTTPServerTCP(HTTPServer).Socket.Port := NetworkPort; 150 THTTPServerTCP(HTTPServer).MaxConnection := MaxConnections; 151 end; 152 end; 145 153 end; 146 154 … … 151 159 User.Free; 152 160 UserOnline.Free; 161 Pages.Free; 153 162 inherited Destroy; 154 163 end; … … 240 249 '<li><a href="http://wiki.zdechov.net/">Wiki</a></li>' + 241 250 '</ul><ul class="MenuItem2">'; //<li> </li>'; 242 if Assigned(MainModule. WebApp1.Pages.FindByName('uzivatel')) then begin251 if Assigned(MainModule.Pages.FindByName('uzivatel')) then begin 243 252 if UserOnline.User = AnonymousUserId then begin 244 253 Text := Text + '</ul>' + … … 260 269 end; 261 270 262 procedure TMainModule. DoBeforePageProduce(HandlerData: THTTPHandlerData);271 procedure TMainModule.LoadUserInfo(HandlerData: THTTPHandlerData); 263 272 begin 264 273 User.HandlerData := HandlerData; … … 267 276 User.Id := UserOnline.User; 268 277 User.Load; 278 end; 279 280 procedure TMainModule.WebApp1PageProduce(HandlerData: THTTPHandlerData); 281 var 282 FileName: string; 283 begin 284 with HandlerData do begin 285 if not Pages.ProducePage(HandlerData) then begin 286 WebApp1.HTTPServer.FileResponse(HandlerData) 287 end; 288 end; 269 289 end; 270 290 … … 325 345 InitDatabase; 326 346 //Database.Query('SELECT * FROM ssss'); 347 327 348 WebApp1.Run; 328 349 end; -
trunk/Pages/UAboutPage.pas
r70 r77 37 37 begin 38 38 with MainModule do begin 39 LoadUserInfo(HandlerData); 39 40 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 40 41 Text := '<img align="left" src="' + NavigationLink('/images/umisteni.gif') + '" alt="Umístění obce"/>' + -
trunk/Pages/UContactPage.pas
r56 r77 32 32 procedure TContactPage.DataModuleProduce(HandlerData: THTTPHandlerData); 33 33 begin 34 with MainModule.HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 34 with MainModule, HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 35 LoadUserInfo(HandlerData); 35 36 Text := '<strong>Kontaktní informace</strong><br/>' + 36 37 'Provozovatel: Ing. Jiří Hajda<br/>' + … … 42 43 'IČ: 75904535<br/>' + 43 44 'DIČ: CZ8303255884<br/>' + 44 'Bankovní účet: 218098370 / 0300<br/>'; 45 'Bankovní spojení pro platby v CZK v ČR: 2600134781 / 2010' + 46 'Bankovní spojení pro platby v EUR v SR: 2600134781 / 8330' + 47 'Starý bankovní účet: 218098370 / 0300<br/>'; 45 48 end; 46 49 MainModule.GeneratePage(HandlerData, Self); -
trunk/Pages/UDocumentsPage.pas
r56 r77 35 35 begin 36 36 with MainModule do begin 37 LoadUserInfo(HandlerData); 37 38 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 38 39 Text := '<strong>O obci:</strong><br/>' + -
trunk/Pages/UHistoryPage.pas
r56 r77 38 38 begin 39 39 with MainModule do begin 40 LoadUserInfo(HandlerData); 40 41 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 41 42 Text := '<table>'; -
trunk/Pages/UHostingPage.pas
r56 r77 39 39 begin 40 40 with MainModule do begin 41 41 LoadUserInfo(HandlerData); 42 42 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 43 43 Text := 'V nabídce je provoz virtualizovaných Linuxových serverů dle dohodnutých parameterů.<br/><br/>' + -
trunk/Pages/UInternetPage.pas
r70 r77 35 35 begin 36 36 with MainModule do begin 37 LoadUserInfo(HandlerData); 37 38 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 38 39 Text := Text + 'Hlavní náplní činnosti sítě je poskytovat výhodné připojení k internetu pro občany.<br/><br/>' + -
trunk/Pages/ULinksPage.pas
r71 r77 34 34 procedure TLinksPage.DataModuleProduce(HandlerData: THTTPHandlerData); 35 35 begin 36 with MainModule.HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 36 with MainModule, HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 37 LoadUserInfo(HandlerData); 37 38 Text := '<strong>Odkazy související s obcí:</strong><br/>' + 38 39 -
trunk/Pages/UNetworkPage.pas
r56 r77 37 37 begin 38 38 with MainModule do begin 39 LoadUserInfo(HandlerData); 39 40 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 40 41 Text := MakeLink('Historie', NavigationLink('/historie/')) + '<br/>' + -
trunk/Pages/UPlansPage.pas
r56 r77 38 38 begin 39 39 with MainModule do begin 40 LoadUserInfo(HandlerData); 40 41 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 41 42 Text := '<table>'; -
trunk/Pages/UServerInfoPage.pas
r76 r77 34 34 procedure TServerInfoPage.DataModuleProduce(HandlerData: THTTPHandlerData); 35 35 begin 36 HandlerData.Session.Values['Test'] := 'Tst'; 37 MainModule.WebApp1.HTTPServer.ServerInfo(HandlerData); 38 MainModule.GeneratePage(HandlerData, Self); 36 with MainModule do begin 37 LoadUserInfo(HandlerData); 38 HandlerData.Session.Values['Test'] := 'Tst'; 39 WebApp1.HTTPServer.ServerInfo(HandlerData); 40 GeneratePage(HandlerData, Self); 41 end; 39 42 end; 40 43 -
trunk/Pages/UUserControlPage.pas
r71 r77 46 46 else PageName := ''; 47 47 with MainModule, HtmlDocument.Body do begin 48 LoadUserInfo(HandlerData); 48 49 if PageName = '' then PageName := 'prihlaseni'; 49 50 if PageName = 'prihlaseni' then HandleLogin(HandlerData) -
trunk/Pages/UVoIPPage.pas
r56 r77 35 35 begin 36 36 with MainModule do begin 37 LoadUserInfo(HandlerData); 37 38 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 38 39 Text := 'Volejte levněji do pevných a mobilních sítí s sekundovou tarifikací a bez měsíčního paušálu.' + -
trunk/Pages/UWebCamPage.pas
r74 r77 44 44 begin 45 45 with MainModule do begin 46 LoadUserInfo(HandlerData); 46 47 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 47 48 Text := ''; -
trunk/ZdechovNET.lpi
r76 r77 173 173 <IsPartOfProject Value="True"/> 174 174 <ComponentName Value="NetworkPage"/> 175 <HasResources Value="True"/> 175 176 <ResourceBaseClass Value="DataModule"/> 176 177 <UnitName Value="UNetworkPage"/> … … 231 232 <CompilerPath Value="$(CompPath)"/> 232 233 </Other> 234 <LCLWidgetType Value="nogui"/> 233 235 </CompilerOptions> 234 236 </CONFIG>
Note:
See TracChangeset
for help on using the changeset viewer.