Changeset 105 for trunk/Modules/ZdechovNET
- Timestamp:
- Oct 9, 2012, 1:58:45 PM (12 years ago)
- Location:
- trunk/Modules/ZdechovNET
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/ZdechovNET/UAboutPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses ;8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, UModuleUser; 9 9 10 10 type … … 17 17 { private declarations } 18 18 public 19 { public declarations }19 ModuleUser: TModuleUser; 20 20 end; 21 21 … … 37 37 begin 38 38 with TWebSession(HandlerData) do begin 39 LoadUserInfo;39 ModuleUser.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"/>' + -
trunk/Modules/ZdechovNET/UContactPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses ;8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, UModuleUser; 9 9 10 10 type … … 17 17 { private declarations } 18 18 public 19 { public declarations }19 ModuleUser: TModuleUser; 20 20 end; 21 21 … … 33 33 begin 34 34 with TWebSession(HandlerData), HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 35 LoadUserInfo;35 ModuleUser.LoadUserInfo; 36 36 Text := '<strong>Kontaktní informace</strong><br/>' + 37 37 'Provozovatel: <strong>Ing. Jiří Hajda</strong><br/>' + -
trunk/Modules/ZdechovNET/UDocumentsPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses ;8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, UModuleUser; 9 9 10 10 type … … 17 17 { private declarations } 18 18 public 19 { public declarations }19 ModuleUser: TModuleUser; 20 20 end; 21 21 … … 35 35 begin 36 36 with TWebSession(HandlerData) do begin 37 LoadUserInfo;37 ModuleUser.LoadUserInfo; 38 38 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 39 39 Text := '<strong>O obci:</strong><br/>' + -
trunk/Modules/ZdechovNET/UHistoryPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, USqlDatabase; 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, USqlDatabase, 9 UModuleUser; 9 10 10 11 type … … 17 18 { private declarations } 18 19 public 19 { public declarations }20 ModuleUser: TModuleUser; 20 21 end; 21 22 … … 38 39 begin 39 40 with TWebSession(HandlerData) do begin 40 LoadUserInfo;41 ModuleUser.LoadUserInfo; 41 42 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 42 43 Text := '<table>'; -
trunk/Modules/ZdechovNET/UHostingPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, USqlDatabase, UHtmlClasses; 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, USqlDatabase, UHtmlClasses, 9 UModuleUser; 9 10 10 11 type … … 17 18 { private declarations } 18 19 public 19 { public declarations }20 ModuleUser: TModuleUser; 20 21 end; 21 22 … … 39 40 begin 40 41 with TWebSession(HandlerData) do begin 41 LoadUserInfo;42 ModuleUser.LoadUserInfo; 42 43 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 43 44 Text := 'V nabídce je provoz virtualizovaných Linuxových serverů dle dohodnutých parameterů.<br/><br/>' + -
trunk/Modules/ZdechovNET/UInternetPage.pas
r102 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer ;8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UModuleUser; 9 9 10 10 type … … 17 17 { private declarations } 18 18 public 19 { public declarations }19 ModuleUser: TModuleUser; 20 20 end; 21 21 … … 35 35 begin 36 36 with TWebSession(HandlerData) do begin 37 LoadUserInfo;37 ModuleUser.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/>' + -
trunk/Modules/ZdechovNET/ULinksPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses ;8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, UModuleUser; 9 9 10 10 type … … 17 17 { private declarations } 18 18 public 19 { public declarations }19 ModuleUser: TModuleUser; 20 20 end; 21 21 … … 35 35 begin 36 36 with TWebSession(HandlerData), HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 37 LoadUserInfo;37 ModuleUser.LoadUserInfo; 38 38 Text := '<strong>Odkazy související s obcí:</strong><br/>' + 39 39 -
trunk/Modules/ZdechovNET/UModuleZdechovNET.pas
r104 r105 7 7 uses 8 8 Classes, SysUtils, UModularSystem, SpecializedDictionary, UWebPage, 9 UWebSession, DateUtils; 9 UWebSession, DateUtils, UModuleBase, UModuleUser, 10 UInternetPage, UHostingPage, UHistoryPage, UDocumentsPage, UVoIPPage, 11 ULinksPage, UPlansPage, UServerInfoPage, UWebCamPage, UUser, 12 UNetworkPage, UAboutPage, UContactPage, UProjectsPage; 10 13 11 14 type … … 15 18 TModuleZdechovNET = class(TModule) 16 19 private 20 InternetPage: TInternetPage; 21 HostingPage: THostingPage; 22 HistoryPage: THistoryPage; 23 DocumentsPage: TDocumentsPage; 24 VoIPPage: TVoIPPage; 25 LinksPage: TLinksPage; 26 ContactPage: TContactPage; 27 ServerInfoPage: TServerInfoPage; 28 WebCamPage: TWebCamPage; 29 PlansPage: TPlansPage; 30 NetworkPage: TNetworkPage; 31 ProjectsPage: TProjectsPage; 32 AboutPage: TAboutPage; 17 33 procedure Footer(Session: TWebSession); 18 34 procedure GeneratePage(ASession: TWebSession; Page: TWebPage); 19 35 procedure TopMenu(Session: TWebSession); 20 36 public 37 ModuleBase: TModuleBase; 38 ModuleUser: TModuleUser; 21 39 constructor Create(Owner: TComponent); override; 22 40 destructor Destroy; override; … … 32 50 33 51 uses 34 UCore, USqlDatabase, UXmlClasses, UHtmlClasses, UUtils, 35 UInternetPage, UHostingPage, UHistoryPage, UDocumentsPage, UVoIPPage, 36 ULinksPage, UPlansPage, UServerInfoPage, UWebCamPage, UUser, 37 UNetworkPage, UAboutPage, UContactPage, UProjectsPage; 52 UCore, USqlDatabase, UXmlClasses, UHtmlClasses, UUtils; 38 53 39 54 { TModuleZdechovNET } … … 48 63 Author := 'Chronosoft'; 49 64 Dependencies.Add('User'); 65 Dependencies.Add('Base'); 50 66 end; 51 67 … … 57 73 procedure TModuleZdechovNET.Start; 58 74 begin 59 with Core.Pages do begin 60 Core.GeneratePage := GeneratePage; 61 RegisterPage(TInternetPage, InternetPage, 'internet'); 62 RegisterPage(THostingPage, HostingPage, 'hosting'); 63 RegisterPage(THistoryPage, HistoryPage, 'historie'); 64 RegisterPage(TDocumentsPage, DocumentsPage, 'dokumenty'); 65 RegisterPage(TVoIPPage, VoIPPage, 'voip'); 66 RegisterPage(TLinksPage, LinksPage, 'odkazy'); 67 RegisterPage(TContactPage, ContactPage, 'kontakt'); 68 RegisterPage(TServerInfoPage, ServerInfoPage, 'serverinfo'); 69 RegisterPage(TWebCamPage, WebCamPage, 'kamery'); 70 RegisterPage(TPlansPage, PlansPage, 'plany'); 71 RegisterPage(TNetworkPage, NetworkPage, 'sit'); 72 RegisterPage(TProjectsPage, ProjectsPage, 'projekty'); 73 RegisterPage(TAboutPage, AboutPage, ''); 75 ModuleBase := TModuleBase(Manager.FindModuleByName('Base')); 76 ModuleUser := TModuleUser(Manager.FindModuleByName('User')); 77 with ModuleBase, Pages do begin 78 //GeneratePage := GeneratePage; 79 InternetPage := TInternetPage.Create(nil); 80 RegisterPage(InternetPage, 'internet'); 81 HostingPage := THostingPage.Create(nil); 82 RegisterPage(HostingPage, 'hosting'); 83 HistoryPage := THistoryPage.Create(nil); 84 RegisterPage(HistoryPage, 'historie'); 85 DocumentsPage := TDocumentsPage.Create(nil); 86 RegisterPage(DocumentsPage, 'dokumenty'); 87 VoIPPage := TVoIPPage.Create(nil); 88 RegisterPage(VoIPPage, 'voip'); 89 LinksPage := TLinksPage.Create(nil); 90 RegisterPage(LinksPage, 'odkazy'); 91 ContactPage := TContactPage.Create(nil); 92 RegisterPage(ContactPage, 'kontakt'); 93 ServerInfoPage := TServerInfoPage.Create(nil); 94 RegisterPage(ServerInfoPage, 'serverinfo'); 95 WebCamPage := TWebCamPage.Create(nil); 96 RegisterPage(WebCamPage, 'kamery'); 97 PlansPage := TPlansPage.Create(nil); 98 RegisterPage(PlansPage, 'plany'); 99 NetworkPage := TNetworkPage.Create(nil); 100 RegisterPage(NetworkPage, 'sit'); 101 ProjectsPage := TProjectsPage.Create(nil); 102 RegisterPage(ProjectsPage, 'projekty'); 103 AboutPage := TAboutPage.Create(nil); 104 RegisterPage(AboutPage, ''); 74 105 end; 75 106 inherited; … … 79 110 begin 80 111 inherited Stop; 81 with Core.Pages do begin 82 UnregisterPage('internet'); 83 UnregisterPage('hosting'); 84 UnregisterPage('historie'); 85 UnregisterPage('dokumenty'); 86 UnregisterPage('voip'); 87 UnregisterPage('odkazy'); 88 UnregisterPage('kontakt'); 89 UnregisterPage('serverinfo'); 90 UnregisterPage('kamery'); 91 UnregisterPage('plany'); 92 UnregisterPage('sit'); 93 UnregisterPage('projekty'); 94 UnregisterPage(''); 95 end; 112 with ModuleBase, Pages do begin 113 UnregisterPage(AboutPage); 114 FreeAndNil(AboutPage); 115 UnregisterPage(InternetPage); 116 FreeAndNil(InternetPage); 117 UnregisterPage(HostingPage); 118 FreeAndNil(HostingPage); 119 UnregisterPage(HistoryPage); 120 FreeAndNil(HistoryPage); 121 UnregisterPage(DocumentsPage); 122 FreeAndNil(DocumentsPage); 123 UnregisterPage(VoIPPage); 124 FreeAndNil(VoIPPage); 125 UnregisterPage(LinksPage); 126 FreeAndNil(LinksPage); 127 UnregisterPage(ContactPage); 128 FreeAndNil(ContactPage); 129 UnregisterPage(ServerInfoPage); 130 FreeAndNil(ServerInfoPage); 131 UnregisterPage(WebCamPage); 132 FreeAndNil(WebCamPage); 133 UnregisterPage(PlansPage); 134 FreeAndNil(PlansPage); 135 UnregisterPage(NetworkPage); 136 FreeAndNil(NetworkPage); 137 UnregisterPage(ProjectsPage); 138 FreeAndNil(ProjectsPage); 139 end; 140 ModuleBase := nil; 141 ModuleUser := nil; 96 142 end; 97 143 … … 179 225 begin 180 226 inherited Uninstall; 181 Core.GeneratePage := nil;227 ModuleBase.GeneratePage := nil; 182 228 try 183 229 DbRows := TDbRows.Create; … … 257 303 '<li><a href="http://wiki.zdechov.net/">Wiki</a></li>' + 258 304 '</ul><ul class="MenuItem2">'; //<li> </li>'; 259 if Assigned( TCore(MainModule).Pages.FindByName('uzivatel')) then begin260 if UserOnline.User = UnknownUser then begin305 if Assigned(ModuleBase.Pages.FindByName('uzivatel')) then begin 306 if ModuleUser.UserOnline.User = UnknownUser then begin 261 307 Text := Text + '</ul>' + 262 308 '<ul class="MenuItem2">' + … … 268 314 Text := Text + '</ul>' + 269 315 '<ul class="MenuItem2">' + 270 '<li>' + User.FullName + '</li>' +316 '<li>' + ModuleUser.User.FullName + '</li>' + 271 317 '<li>' + MakeLink('Odhlášení', NavigationLink('/uzivatel/odhlaseni/')) + '</li>' + 272 318 '<li>' + MakeLink('Profil', NavigationLink('/uzivatel/profil/')) + '</li>'; -
trunk/Modules/ZdechovNET/UNetworkPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses ;8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, UModuleUser; 9 9 10 10 type … … 17 17 { private declarations } 18 18 public 19 { public declarations }19 ModuleUser: TModuleUser; 20 20 end; 21 21 … … 37 37 begin 38 38 with TWebSession(HandlerData) do begin 39 LoadUserInfo;39 ModuleUser.LoadUserInfo; 40 40 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 41 41 Text := MakeLink('Historie', NavigationLink('/historie/')) + '<br/>' + -
trunk/Modules/ZdechovNET/UPlansPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHtmlClasses, UHTTPServer, USqlDatabase; 8 Classes, SysUtils, FileUtil, UWebPage, UHtmlClasses, UHTTPServer, USqlDatabase, 9 UModuleUser; 9 10 10 11 type … … 17 18 { private declarations } 18 19 public 19 { public declarations }20 ModuleUser: TModuleUser; 20 21 end; 21 22 … … 38 39 begin 39 40 with TWebSession(HandlerData) do begin 40 LoadUserInfo;41 ModuleUser.LoadUserInfo; 41 42 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 42 43 Text := '<table>'; -
trunk/Modules/ZdechovNET/UProjectsPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHtmlClasses, UHTTPServer, USqlDatabase; 8 Classes, SysUtils, FileUtil, UWebPage, UHtmlClasses, UHTTPServer, USqlDatabase, 9 UModuleUser; 9 10 10 11 type … … 17 18 { private declarations } 18 19 public 19 { public declarations }20 ModuleUser: TModuleUser; 20 21 end; 21 22 … … 38 39 begin 39 40 with TWebSession(HandlerData) do begin 40 LoadUserInfo;41 ModuleUser.LoadUserInfo; 41 42 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 42 43 try -
trunk/Modules/ZdechovNET/UVoIPPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHtmlClasses, UHTTPServer ;8 Classes, SysUtils, FileUtil, UWebPage, UHtmlClasses, UHTTPServer, UModuleUser; 9 9 10 10 type … … 17 17 { private declarations } 18 18 public 19 { public declarations }19 ModuleUser: TModuleUser; 20 20 end; 21 21 … … 35 35 begin 36 36 with TWebSession(HandlerData) do begin 37 LoadUserInfo;37 ModuleUser.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.' + -
trunk/Modules/ZdechovNET/UWebCamPage.pas
r103 r105 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, USqlDatabase; 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, UHtmlClasses, USqlDatabase, 9 UModuleUser; 9 10 10 11 type … … 17 18 { private declarations } 18 19 public 19 { public declarations }20 ModuleUser: TModuleUser; 20 21 end; 21 22 … … 46 47 begin 47 48 with TWebSession(HandlerData) do begin 48 LoadUserInfo;49 ModuleUser.LoadUserInfo; 49 50 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 50 51 Text := '';
Note:
See TracChangeset
for help on using the changeset viewer.