Changeset 78 for trunk/Pages
- Timestamp:
- Jun 18, 2012, 10:44:21 PM (12 years ago)
- Location:
- trunk/Pages
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Pages/UAboutPage.pas
r77 r78 36 36 TextBlock: THtmlString; 37 37 begin 38 with MainModuledo begin39 LoadUserInfo (HandlerData);38 with TWebSession(HandlerData) do begin 39 LoadUserInfo; 40 40 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 41 41 Text := '<img align="left" src="' + NavigationLink('/images/umisteni.gif') + '" alt="Umístění obce"/>' + … … 80 80 '<i>Aktualizováno: 21.1.2011</i>'; 81 81 end; 82 GeneratePage(Self); 82 83 end; 83 MainModule.GeneratePage(HandlerData, Self);84 84 end; 85 85 -
trunk/Pages/UContactPage.pas
r77 r78 32 32 procedure TContactPage.DataModuleProduce(HandlerData: THTTPHandlerData); 33 33 begin 34 with MainModule, HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin35 LoadUserInfo (HandlerData);34 with TWebSession(HandlerData), HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 35 LoadUserInfo; 36 36 Text := '<strong>Kontaktní informace</strong><br/>' + 37 'Provozovatel: Ing. Jiří Hajda<br/>' +38 'Adresa: Zděchov 208, 75607<br/>' +39 'Telefon: 737785792<br/>' +37 'Provozovatel: <strong>Ing. Jiří Hajda</strong><br/>' + 38 'Adresa: <strong>Zděchov 208, 75607</strong><br/>' + 39 'Telefon: <strong>737785792</strong><br/>' + 40 40 'E-mail: <a href="mailto: robie@centrum.cz">robie@centrum.cz</a><br/>' + 41 'Jabber: chronos@jabbim.cz<br/>' +41 'Jabber: <strong>chronos@jabbim.cz</strong><br/>' + 42 42 'ICQ: <a href="http://www.icq.com/people/277158770">277158770</a><br/>' + 43 'IČ: 75904535<br/>' + 44 'DIČ: CZ8303255884<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/>'; 43 'IČ: <strong>75904535</strong><br/>' + 44 'DIČ: <strong>CZ8303255884</strong><br/>' + 45 'Bankovní spojení pro platby v CZK v ČR: <strong>2600134781 / 2010</strong><br/>' + 46 'Bankovní spojení pro platby v EUR v SR: <strong>2600134781 / 8330</strong><br/>' + 47 'Starý bankovní účet: <strong>218098370 / 0300</strong><br/>'; 48 GeneratePage(Self); 48 49 end; 49 MainModule.GeneratePage(HandlerData, Self);50 50 end; 51 51 -
trunk/Pages/UDocumentsPage.pas
r77 r78 34 34 procedure TDocumentsPage.DataModuleProduce(HandlerData: THTTPHandlerData); 35 35 begin 36 with MainModuledo begin37 LoadUserInfo (HandlerData);36 with TWebSession(HandlerData) do begin 37 LoadUserInfo; 38 38 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 39 39 Text := '<strong>O obci:</strong><br/>' + … … 52 52 IconedLink(NavigationLink('/docs/vyzva_do_infokanalu_15.8.2004.pdf'), 'Výzva do infokanálu (15.8.2004)') + '<br/>'; 53 53 end; 54 GeneratePage(Self); 54 55 end; 55 MainModule.GeneratePage(HandlerData, Self);56 56 end; 57 57 -
trunk/Pages/UHistoryPage.pas
r77 r78 37 37 I: Integer; 38 38 begin 39 with MainModuledo begin40 LoadUserInfo (HandlerData);39 with TWebSession(HandlerData) do begin 40 LoadUserInfo; 41 41 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 42 42 Text := '<table>'; … … 54 54 Text := Text + '</table>'; 55 55 end; 56 GeneratePage(Self); 56 57 end; 57 MainModule.GeneratePage(HandlerData, Self);58 58 end; 59 59 -
trunk/Pages/UHostingPage.pas
r77 r78 38 38 DbRows: TDbRows; 39 39 begin 40 with MainModuledo begin41 LoadUserInfo (HandlerData);40 with TWebSession(HandlerData) do begin 41 LoadUserInfo; 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/>' + … … 93 93 end; 94 94 end; 95 GeneratePage(Self); 95 96 end; 96 MainModule.GeneratePage(HandlerData, Self);97 97 end; 98 98 -
trunk/Pages/UInternetPage.pas
r77 r78 34 34 procedure TInternetPage.DataModuleProduce(HandlerData: THTTPHandlerData); 35 35 begin 36 with MainModuledo begin37 LoadUserInfo (HandlerData);36 with TWebSession(HandlerData) do begin 37 LoadUserInfo; 38 38 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 39 39 Text := Text + 'Hlavní náplní činnosti sítě je poskytovat výhodné připojení k internetu pro občany.<br/><br/>' + … … 54 54 '<i>Aktualizováno: 1.8.2011</i>'; 55 55 end; 56 GeneratePage(Self); 56 57 end; 57 MainModule.GeneratePage(HandlerData, Self);58 58 end; 59 59 -
trunk/Pages/ULinksPage.pas
r77 r78 34 34 procedure TLinksPage.DataModuleProduce(HandlerData: THTTPHandlerData); 35 35 begin 36 with MainModule, HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin37 LoadUserInfo (HandlerData);36 with TWebSession(HandlerData), HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 37 LoadUserInfo; 38 38 Text := '<strong>Odkazy související s obcí:</strong><br/>' + 39 39 … … 63 63 '<a href="http://www.ustinet.cz/">Ústí.Net</a> - síť v Ústí u Vsetína<br/>' + 64 64 '<br/>'; 65 GeneratePage(Self); 65 66 end; 66 MainModule.GeneratePage(HandlerData, Self);67 67 end; 68 68 -
trunk/Pages/UNetworkPage.pas
r77 r78 36 36 TextBlock: THtmlString; 37 37 begin 38 with MainModuledo begin39 LoadUserInfo (HandlerData);38 with TWebSession(HandlerData) do begin 39 LoadUserInfo; 40 40 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 41 41 Text := MakeLink('Historie', NavigationLink('/historie/')) + '<br/>' + … … 43 43 MakeLink('Plánované projekty', NavigationLink('/plany/')) + '<br/>'; 44 44 end; 45 GeneratePage(Self); 45 46 end; 46 MainModule.GeneratePage(HandlerData, Self);47 47 end; 48 48 -
trunk/Pages/UPlansPage.pas
r77 r78 37 37 I: Integer; 38 38 begin 39 with MainModuledo begin40 LoadUserInfo (HandlerData);39 with TWebSession(HandlerData) do begin 40 LoadUserInfo; 41 41 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 42 42 Text := '<table>'; … … 65 65 Text := Text + '</table>'; 66 66 end; 67 GeneratePage(Self); 67 68 end; 68 MainModule.GeneratePage(HandlerData, Self);69 69 end; 70 70 -
trunk/Pages/UServerInfoPage.pas
r77 r78 34 34 procedure TServerInfoPage.DataModuleProduce(HandlerData: THTTPHandlerData); 35 35 begin 36 with MainModuledo begin37 LoadUserInfo (HandlerData);38 HandlerData.Session.Values['Test'] := 'Tst';39 WebApp1.HTTPServer.ServerInfo(HandlerData);40 GeneratePage( HandlerData,Self);36 with TWebSession(HandlerData) do begin 37 LoadUserInfo; 38 Session.Values['Test'] := 'Tst'; 39 MainModule.WebApp1.HTTPServer.ServerInfo(HandlerData); 40 GeneratePage(Self); 41 41 end; 42 42 end; -
trunk/Pages/UUserControlPage.pas
r77 r78 43 43 NewItem: TQueryFormItem; 44 44 begin 45 if HandlerData.Request.QueryParts.Count > 1 then PageName := HandlerData.Request.QueryParts[1] 46 else PageName := ''; 47 with MainModule, HtmlDocument.Body do begin 48 LoadUserInfo(HandlerData); 49 if PageName = '' then PageName := 'prihlaseni'; 50 if PageName = 'prihlaseni' then HandleLogin(HandlerData) 51 else if PageName = 'registrace' then HandleRegistration(HandlerData) 52 else if PageName = 'odhlaseni' then HandleLogout(HandlerData) 53 else if PageName = 'profil' then HandleProfile(HandlerData); 54 end; 55 MainModule.GeneratePage(HandlerData, Self); 45 with TWebSession(HandlerData) do begin 46 if Request.Path.Count > 1 then PageName := Request.Path[1] 47 else PageName := ''; 48 with HtmlDocument.Body do begin 49 LoadUserInfo; 50 if PageName = '' then PageName := 'prihlaseni'; 51 if PageName = 'prihlaseni' then HandleLogin(HandlerData) 52 else if PageName = 'registrace' then HandleRegistration(HandlerData) 53 else if PageName = 'odhlaseni' then HandleLogout(HandlerData) 54 else if PageName = 'profil' then HandleProfile(HandlerData); 55 end; 56 GeneratePage(Self); 57 end; 56 58 end; 57 59 … … 61 63 UserId: Integer; 62 64 begin 63 with MainModule, HtmlDocument.Body do begin65 with TWebSession(MainModule), HtmlDocument.Body do begin 64 66 Form := TQueryForm.Create; 65 67 with Form do begin … … 92 94 with THtmlString(SubItems.AddNew(THtmlString.Create)) do 93 95 Text := 'Přihlášení user: ' + TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value; 94 UserId := MainModule.User.GetIdByNamePassword(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value,96 UserId := User.GetIdByNamePassword(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value, 95 97 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Password').Value.Value); 96 98 UserOnline.Login(UserId); … … 106 108 UserId: Integer; 107 109 begin 108 with MainModule, HtmlDocument.Body do begin110 with TWebSession(MainModule), HtmlDocument.Body do begin 109 111 Form := TQueryForm.Create; 110 112 with Form do begin … … 150 152 with THtmlString(SubItems.AddNew(THtmlString.Create)) do 151 153 Text := 'Registrace uživatele: ' + TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value; 152 MainModule.User.Add(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value,154 User.Add(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value, 153 155 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Password').Value.Value, 154 156 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Email').Value.Value); 155 UserId := MainModule.User.GetIdByNamePassword(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value,157 UserId := User.GetIdByNamePassword(TQueryFormGroup(Form.Groups[0]).Rows.FindByName('UserName').Value.Value, 156 158 TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Password').Value.Value); 157 MainModule.UserOnline.Login(UserId);159 UserOnline.Login(UserId); 158 160 Form.Free; 159 161 end else SubItems.AddNew(Form); … … 163 165 procedure TUserControlPage.HandleLogout(HandlerData: THTTPHandlerData); 164 166 begin 165 with MainModule, HtmlDocument.Body do begin167 with TWebSession(MainModule), HtmlDocument.Body do begin 166 168 UserOnline.Logout; 167 169 with THtmlString(SubItems.AddNew(THtmlString.Create)) do … … 174 176 Form: TQueryForm; 175 177 begin 176 with MainModule, HtmlDocument.Body do begin178 with TWebSession(HandlerData), HtmlDocument.Body do begin 177 179 Form := TQueryForm.Create; 178 180 with Form do begin -
trunk/Pages/UVoIPPage.pas
r77 r78 34 34 procedure TVoIPPage.DataModuleProduce(HandlerData: THTTPHandlerData); 35 35 begin 36 with MainModuledo begin37 LoadUserInfo (HandlerData);36 with TWebSession(HandlerData) do begin 37 LoadUserInfo; 38 38 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 39 39 Text := 'Volejte levněji do pevných a mobilních sítí s sekundovou tarifikací a bez měsíčního paušálu.' + … … 65 65 '</ol>'; 66 66 end; 67 GeneratePage(Self); 67 68 end; 68 MainModule.GeneratePage(HandlerData, Self);69 69 end; 70 70 -
trunk/Pages/UWebCamPage.pas
r77 r78 43 43 ImageWidth, ImageHeight: string; 44 44 begin 45 with MainModuledo begin46 LoadUserInfo (HandlerData);45 with TWebSession(HandlerData) do begin 46 LoadUserInfo; 47 47 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 48 48 Text := ''; … … 154 154 Text := Text + '</td></tr></table>'; 155 155 end; 156 GeneratePage(Self); 156 157 end; 157 MainModule.GeneratePage(HandlerData, Self);158 158 end; 159 159
Note:
See TracChangeset
for help on using the changeset viewer.