Changeset 27 for branches/lazarus/Application
- Timestamp:
- Sep 10, 2010, 8:09:21 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/lazarus/Application/UCustomCGIApplication.pas
r26 r27 7 7 uses 8 8 Classes, SysUtils, UCGIApplication, Contnrs, USqlDatabase, UConfig, DateUtils, 9 UXmlClasses, UHtmlClasses, UCore ;9 UXmlClasses, UHtmlClasses, UCore, UStringListEx; 10 10 11 11 type … … 89 89 TitleTag: THtmlString; 90 90 begin 91 //SysInfo;92 Style := 'Basic';91 Style := ConfigStyle; 92 BaseURL := ConfigBaseURL; 93 93 94 94 HtmlDocument.ContentLanguage := 'cs'; 95 95 GlobalTitle := 'ZděchovNET'; 96 HtmlDocument.Styles.Add('Style/' + Style + '/Style.css'); 97 HtmlDocument.Scripts.Add('Style/' + Style + '/Global.js'); 98 HtmlDocument.Scripts.Add('Style/' + Style + '/jquery.js'); 99 100 PageName := Query.Values['p']; 101 if PageName = '' then PageName := ''; 102 ModuleName := Query.Values['m']; 103 if ModuleName = '' then ModuleName := 'Main'; 96 HtmlDocument.Styles.Add(NavigationLink('/Style/' + Style + '/Style.css')); 97 HtmlDocument.Scripts.Add(NavigationLink('/Style/' + Style + '/Global.js')); 98 HtmlDocument.Scripts.Add(NavigationLink('/Style/' + Style + '/jquery.js')); 99 100 if QueryParts.Count > 0 then PageName := QueryParts[0] 101 else PageName := ''; 104 102 I := 0; 105 while (I < Pages.Count) and (TRegistredPage(Pages[I]).Name <> ModuleName) do Inc(I);106 if I < Pages.Countthen begin103 while (I < Pages.Count) and (TRegistredPage(Pages[I]).Name <> PageName) do Inc(I); 104 if (I < Pages.Count) then begin 107 105 TitleTag := THtmlString.Create; 108 106 HtmlDocument.Body.SubItems.Add(TitleTag); … … 111 109 TitleTag.Text := '<div class="TitlePanel"><span class="GlobalTitle">' + GlobalTitle + 112 110 '</span> - ' + HtmlDocument.Title + '</div>'; 113 with HtmlDocument.AsXmlDocument do begin 111 HtmlDocument.Title := GlobalTitle + ' - ' + HtmlDocument.Title; 112 with HtmlDocument.AsXmlDocument do try 114 113 Formated := ConfigFormatHTML; 115 114 Output.Add(AsString); 115 finally 116 116 Free; 117 117 end; … … 211 211 // Visitor 212 212 Text := Text + '<ul class="MenuItem">' + 213 '<li>' + MakeLink('O síti', Navigation MakeLink('Main', 'About')) + '</li>' +214 '<li>' + MakeLink('Internet', Navigation MakeLink('Main', 'Internet')) + '</li>' +215 '<li>' + MakeLink('Hosting', Navigation MakeLink('Main', 'Hosting')) + '</li>' +216 '<li>' + MakeLink('VoIP', Navigation MakeLink('Main', 'VoIP')) + '</li>' +213 '<li>' + MakeLink('O síti', NavigationLink('/')) + '</li>' + 214 '<li>' + MakeLink('Internet', NavigationLink('/internet/')) + '</li>' + 215 '<li>' + MakeLink('Hosting', NavigationLink('/hosting/')) + '</li>' + 216 '<li>' + MakeLink('VoIP', NavigationLink('/voip/')) + '</li>' + 217 217 '<li><a href="https://mail.zdechov.net/">Pošta</a></li>' + 218 '<li>' + MakeLink('Historie', Navigation MakeLink('Main', 'History')) + '</li>' +219 '<li>' + MakeLink('Dokumenty', Navigation MakeLink('Main', 'Documents')) + '</li>' +220 '<li>' + MakeLink('Odkazy', Navigation MakeLink('Main', 'Links')) + '</li>' +221 '<li>' + MakeLink('Kontakt', Navigation MakeLink('Main', 'Contact')) + '</li>';218 '<li>' + MakeLink('Historie', NavigationLink('/historie/')) + '</li>' + 219 '<li>' + MakeLink('Dokumenty', NavigationLink('/dokumenty/')) + '</li>' + 220 '<li>' + MakeLink('Odkazy', NavigationLink('/odkazy/')) + '</li>' + 221 '<li>' + MakeLink('Kontakt', NavigationLink('/kontakt/')) + '</li>'; 222 222 Text := Text + '</ul><ul class="MenuItem2"><li> </li>'; 223 223 (* if System.UserOnline.User = System.UserOnline.AnonymousUserId then begin
Note:
See TracChangeset
for help on using the changeset viewer.