Ignore:
Timestamp:
Dec 31, 2010, 9:56:34 PM (14 years ago)
Author:
george
Message:
  • Přidáno: Jednotka UWebObjects, která obsahuje specifické grafické komponenty pro danou aplikaci.
  • Upraveno: Konfigurace aplikace předělána z globálních konstant na proměnnou Config strukturovaného typu record.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UCustomApplication.pas

    r42 r45  
    88  Classes, SysUtils, UHTTPServerCGI, USqlDatabase, UConfig, DateUtils,
    99  UXmlClasses, UHtmlClasses, UCore, UHTTPServer, UHTTPServerTCP,
    10   UHTTPSessionMySQL, UHTTPSessionFile, UUser, SpecializedObjectList;
     10  UHTTPSessionMySQL, UHTTPSessionFile, UUser, SpecializedList;
    1111
    1212type
     
    7979begin
    8080  with Database do begin
    81     Hostname := DatabaseHostName;
    82     Database := DatabaseDatabase;
    83     UserName := DatabaseUserName;
    84     Password := DatabasePassword;
     81    Hostname := Config.DatabaseHostName;
     82    Database := Config.DatabaseDatabase;
     83    UserName := Config.DatabaseUserName;
     84    Password := Config.DatabasePassword;
    8585    Connect;
    8686  end;
     
    102102  UserOnline.Update;
    103103  with HandlerData do begin
    104   Style := ConfigStyle;
    105   BaseURL := ConfigBaseURL;
     104  Style := Config.Style;
     105  BaseURL := Config.BaseURL;
    106106
    107107  HtmlDocument.ContentLanguage := 'cs';
     
    110110  HtmlDocument.Scripts.Add(NavigationLink('/Style/' + Style + '/Global.js'));
    111111  HtmlDocument.Scripts.Add(NavigationLink('/Style/' + Style + '/jquery.js'));
     112
     113  Request.QueryParts.Count := 2;
     114  Request.QueryParts[0] := 'uzivatel';
     115  Request.QueryParts[1] := 'prihlaseni';
    112116
    113117  if Request.QueryParts.Count > 0 then PageName := Request.QueryParts[0]
     
    124128    HtmlDocument.Title := GlobalTitle + ' - ' + HtmlDocument.Title;
    125129    with HtmlDocument.AsXmlDocument do try
    126       Formated := ConfigFormatHTML;
     130      Formated := Config.FormatHTML;
    127131      Response.Stream.WriteString(AsString);
    128132    finally
     
    262266begin
    263267  InitDatabase;
     268  HTTPServer.ShowExceptions := Config.ShowException;
    264269  //Database.Query('SELECT * FROM ssss');
    265270  HTTPServer.SessionStorage := THTTPSessionStorageMySQL.Create;
Note: See TracChangeset for help on using the changeset viewer.