Changeset 138 for trunk/Modules/ZdechovNET/UModuleZdechovNET.pas
- Timestamp:
- Sep 9, 2022, 8:20:25 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/ZdechovNET/UModuleZdechovNET.pas
r137 r138 264 264 procedure TModuleZdechovNET.Upgrade; 265 265 begin 266 inherited Upgrade;266 inherited; 267 267 end; 268 268 … … 277 277 begin 278 278 with Session do 279 with TXmlTag(HtmlDocument.Body.SubItems.AddNew(TXmlTag.Create)) do begin 280 Name := 'ul'; 281 Attributes.Values['class'] := 'Footer'; 282 with TXmlTag(SubElements.AddNew(TXmlTag.Create)) do begin 283 Name := 'li'; 284 with TXmlString(SubElements.AddNew(TXmlString.Create)) do begin 285 Text := TCore(MainModule).Admin; 279 with HtmlDocument.Body.SubItems.AddList do begin 280 ClassId := 'Footer'; 281 with SubItems.AddString do begin 282 Text := TCore(MainModule).Admin; 283 end; 284 with SubItems.AddString do begin 285 Text := TCore(MainModule).AdminEmail; 286 end; 287 if TCore(MainModule).ShowRuntimeInfo then begin 288 with SubItems.AddString do begin 289 Text := 'Doba generování: ' + 290 FloatToStr(Round(((Now - TimeStart) / OneMillisecond) * 100) / 100) + ' s / '; // + ini_get('max_execution_time') + ' s'; 291 end; 292 with SubItems.AddString do begin 293 //Text := 'Použitá paměť: ' + System.PrefixMultiplier.AddPrefixMultipliers(memory_get_peak_usage(FALSE), 'B').' / '.ini_get('memory_limit').'B'; 286 294 end; 287 295 end; 288 with TXmlTag(SubElements.AddNew(TXmlTag.Create)) do begin289 Name := 'li';290 with TXmlString(SubElements.AddNew(TXmlString.Create)) do begin291 Text := TCore(MainModule).AdminEmail;292 end;293 end;294 if TCore(MainModule).ShowRuntimeInfo then begin295 with TXmlTag(SubElements.AddNew(TXmlTag.Create)) do begin296 Name := 'li';297 with TXmlString(SubElements.AddNew(TXmlString.Create)) do begin298 Text := 'Doba generování: ' +299 FloatToStr(Round(((Now - TimeStart) / OneMillisecond) * 100) / 100) + ' s / '; // + ini_get('max_execution_time') + ' s';300 end;301 end;302 with TXmlTag(SubElements.AddNew(TXmlTag.Create)) do begin303 Name := 'li';304 with TXmlString(SubElements.AddNew(TXmlString.Create)) do begin305 //Text := 'Použitá paměť: ' + System.PrefixMultiplier.AddPrefixMultipliers(memory_get_peak_usage(FALSE), 'B').' / '.ini_get('memory_limit').'B';306 end;307 end;308 end;309 296 end; 310 297 end; 311 298 312 299 procedure TModuleZdechovNET.TopMenu(Session: TWebSession); 313 begin 314 with Session, THtmlString(HtmlDocument.Body.SubItems.InsertNew(1, THtmlString.Create)) do begin 300 var 301 Output: THtmlString; 302 begin 303 Output := THtmlString.Create; 304 Session.HtmlDocument.Body.SubItems.Insert(1, Output); 305 with Output do begin 315 306 Text := '<div class="Navigation">'; 316 307 // Visitor … … 326 317 '<li>' + MakeLink('Kamery', NavigationLink('/kamery/')) + '</li>' + 327 318 '<li><a href="https://mail.zdechov.net/">Pošta</a></li>' + 328 '<li><a href="http ://wiki.zdechov.net/">Wiki</a></li>' +319 '<li><a href="https://wiki.zdechov.net/">Wiki</a></li>' + 329 320 '</ul><ul class="MenuItem2">'; //<li> </li>'; 330 321 if False and Assigned(ModuleBase.Pages.FindByName('uzivatel')) then begin … … 356 347 with ASession do begin 357 348 if Page.Raw then begin 358 Response.Content.WriteString( THtmlString(HtmlDocument.Body.SubItems[0]).Text);349 Response.Content.WriteString(HtmlDocument.Body.AsXmlElement.AsString); 359 350 end else begin 360 351 HtmlDocument.ContentLanguage := 'cs';
Note:
See TracChangeset
for help on using the changeset viewer.