Ignore:
Timestamp:
Sep 9, 2022, 8:20:25 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Removed TemplateGenerics package. Generics usage replaced by standard Generics.Collections.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/ZdechovNET/UModuleZdechovNET.pas

    r137 r138  
    264264procedure TModuleZdechovNET.Upgrade;
    265265begin
    266   inherited Upgrade;
     266  inherited;
    267267end;
    268268
     
    277277begin
    278278  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';
    286294      end;
    287295    end;
    288     with TXmlTag(SubElements.AddNew(TXmlTag.Create)) do begin
    289       Name := 'li';
    290       with TXmlString(SubElements.AddNew(TXmlString.Create)) do begin
    291         Text := TCore(MainModule).AdminEmail;
    292       end;
    293     end;
    294     if TCore(MainModule).ShowRuntimeInfo then begin
    295       with TXmlTag(SubElements.AddNew(TXmlTag.Create)) do begin
    296         Name := 'li';
    297         with TXmlString(SubElements.AddNew(TXmlString.Create)) do begin
    298           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 begin
    303         Name := 'li';
    304         with TXmlString(SubElements.AddNew(TXmlString.Create)) do begin
    305           //Text := 'Použitá paměť: '  + System.PrefixMultiplier.AddPrefixMultipliers(memory_get_peak_usage(FALSE), 'B').' / '.ini_get('memory_limit').'B';
    306         end;
    307       end;
    308     end;
    309296  end;
    310297end;
    311298
    312299procedure TModuleZdechovNET.TopMenu(Session: TWebSession);
    313 begin
    314   with Session, THtmlString(HtmlDocument.Body.SubItems.InsertNew(1, THtmlString.Create)) do begin
     300var
     301  Output: THtmlString;
     302begin
     303  Output := THtmlString.Create;
     304  Session.HtmlDocument.Body.SubItems.Insert(1, Output);
     305  with Output do begin
    315306    Text := '<div class="Navigation">';
    316307    // Visitor
     
    326317      '<li>' + MakeLink('Kamery', NavigationLink('/kamery/')) + '</li>' +
    327318      '<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>' +
    329320      '</ul><ul class="MenuItem2">'; //<li>&nbsp;</li>';
    330321    if False and Assigned(ModuleBase.Pages.FindByName('uzivatel')) then begin
     
    356347  with ASession do begin
    357348    if Page.Raw then begin
    358       Response.Content.WriteString(THtmlString(HtmlDocument.Body.SubItems[0]).Text);
     349      Response.Content.WriteString(HtmlDocument.Body.AsXmlElement.AsString);
    359350    end else begin
    360351      HtmlDocument.ContentLanguage := 'cs';
Note: See TracChangeset for help on using the changeset viewer.