Ignore:
Timestamp:
Oct 8, 2012, 10:22:08 AM (12 years ago)
Author:
chronos
Message:
  • Opraveno: Zobrazení hlavní stránky modulu Portál.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Portal/UPagePortal.pas

    r103 r104  
    77uses
    88  Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, USqlDatabase, UUtils,
    9   SpecializedDictionary, UWebSession, SpecializedList;
     9  SpecializedDictionary, UWebSession, SpecializedList, UHtmlClasses,
     10  UModularSystem;
    1011
    1112type
     
    2021    function SystemMessage(Title, Text: string): string;
    2122    function ShowLinks(GroupId: Integer): string;
    22     function Show: string;
     23    procedure Show(HandlerData: THTTPHandlerData);
    2324    function OnlineHostList: string;
    2425    function UserPanel: string;
     
    4849  Session := TWebSession(HandlerData);
    4950  with TWebSession(HandlerData) do begin
    50 
     51    Show(HandlerData);
     52    GeneratePage(Self);
    5153  end;
    5254end;
     
    8587end;
    8688
    87 function TWebPagePortal.Show: string;
     89procedure TWebPagePortal.Show(HandlerData: THTTPHandlerData);
    8890var
    8991  Output: string;
     
    9799  I, J: Integer;
    98100begin
     101  try
     102    DbRows := TDbRows.Create;
     103    DbRows2 := TDbRows.Create;
    99104  Output := '';
    100105  with Session.Request do
     
    117122      TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Username').Value.Value,
    118123        TQueryFormGroup(Form.Groups[0]).Rows.FindByName('Password').Value.Value));
    119       Output := Output + SystemMessage('Přihlášení', Result);
     124      Output := Output + SystemMessage('Přihlášení', 'Přihlášení provedeno');
    120125      if Session.User.Id <> UnknownUser then begin
    121126        //Form.LoadValuesFromForm;
     
    165170      Form.Load(Session.Request.Post);
    166171      //Result = Session.User.PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']);
    167       Output := Output + SystemMessage('Obnova hesla', Result);
     172      Output := Output + SystemMessage('Obnova hesla', 'Heslo obnoveno');
    168173      //if Result <> USER_PASSWORD_RECOVERY_SUCCESS then begin
    169174        Output := Output + Form.AsXmlElement.AsString;
     
    219224      end;
    220225    end *);
     226    end;
    221227
    222228    //Session.Database.Database := Config['Database']['Database'];
     
    235241      Session.Database.Query(DbRows2, 'SELECT * FROM `Panel` WHERE `PanelColumn`=' +
    236242        PanelColumn.Values['Id'] + ' ORDER BY `Order`');
    237       for J := 0 to DbRows2.Count - 1 do
    238         Panel := DbRows[J];
     243      for J := 0 to DbRows2.Count - 1 do begin
     244        Panel := DbRows2[J];
    239245        if Panel.Values['Module'] = 'HyperlinkGroup' then
    240246          Output := Output + ShowLinks(StrToInt(Panel.Values['Parameters']))
     
    253259      Output := Output + '</td>';
    254260    end;
    255     Output := Output + '</table>';
    256     Result := Output;
     261    Output := Output + '</tr></table>';
     262    with TWebSession(HandlerData) do begin
     263      with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do
     264        Text := Text + Output;
     265    end;
     266  finally
     267    DbRows2.Free;
     268    DbRows.Free;
    257269  end;
     270end;
    258271
    259272function TWebPagePortal.OnlineHostList: string;
Note: See TracChangeset for help on using the changeset viewer.