Changeset 91


Ignore:
Timestamp:
Dec 21, 2009, 1:19:39 PM (14 years ago)
Author:
george
Message:
  • Upraveno: Třída TWebServer oddělena do samostatné jednotky.
Location:
branches/DirectWeb
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/DirectWeb/Data/Style.css

    r82 r91  
    66  padding: 0px;
    77  border-collapse: collapse;
     8  text-align: center;
     9  margin-left: auto;
     10  margin-right: auto; 
    811}
    912
     
    2326  padding: 5px;
    2427}
     28
     29.MainMenu
     30{
     31  text-align: center;
     32  margin-left: auto;
     33  margin-right: auto; 
     34}
     35
     36.MainMenu span
     37{
     38  padding-left: 5px;
     39  padding-right: 5px;
     40}
     41
     42.Page
     43{
     44  text-align: center;
     45  margin-left: auto;
     46  margin-right: auto; 
     47}
  • branches/DirectWeb/UHTMLControls.pas

    r88 r91  
    4949    Page := StrToInt(HandlerData.Request.Query.Values[PageIndexName]);
    5050
    51   Count := Round(TotalCount / ItemPerPage);
     51  Count := Trunc(TotalCount / ItemPerPage) + 1;
     52  if Page > Count - 1 then Page := Count - 1;
     53
    5254  Output := '';
    5355  if Count > 1 then
    5456  with HandlerData, Request do begin
    55     if Page > Count - 1 then Page := Count - 1;
    5657
    5758    if Page > 0 then begin
     
    6869    if PagesMax > Count - 1 then PagesMax := Count - 1;
    6970
     71    if PagesMin > 0 then Output := Output + ' .. ';
    7072    // Show page numbers
    7173    for I := PagesMin to PagesMax do begin
     
    7880      end;
    7981    end;
     82    if PagesMax < (Count - 1) then Output := Output + ' .. ';
    8083
    81     if PagesMax < (Count - 1) then Output := Output + ' .. ';
    8284    if Page < (Count - 1) then begin
    8385      Query.Values[PageIndexName] := IntToStr(Page + 1);
  • branches/DirectWeb/URSS.pas

    r90 r91  
    66
    77uses
    8   Classes, SysUtils, pwmain, dateutils;
     8  Classes, SysUtils, DateUtils;
    99
    1010type
     
    5656  with TRSSChannelItem(Items[I]) do begin
    5757    Result := Result + '<item>' +
    58       '<title>' + FilterHTML(Title) + '</title>' +
    59       '<description>' + FilterHTML(Description) + '</description>' +
     58      '<title>' + Title + '</title>' +
     59      '<description>' + Description + '</description>' +
    6060      '<pubDate>' + RFC2822TimeFormat(Time) + '</pubDate>' +
    6161      '<link>' + Link + '</link>' +
  • branches/DirectWeb/UWebServer.pas

    r89 r91  
    1818type
    1919
    20   { TDatabasePool }
    2120
    22   TDatabasePool = class(TThreadedPool)
    23   private
    24     FActive: Boolean;
    25     procedure SetActive(const AValue: Boolean);
    26   public
    27     property Active: Boolean read FActive write SetActive;
    28   public
    29     HostName: string;
    30     Schema: string;
    31     UserName: string;
    32     Password: string;
    33     constructor Create;
    34     destructor Destroy; override;
    35   end;
    3621
    3722  { TWebServer }
     
    3924  TWebServer = class
    4025  private
    41     SessionStorage: TFileHTTPSessionStorage;
    42     procedure ServerInfo(HandlerData: THTTPHandlerData);
    4326  public
    4427    HTTPServer: THTTPServer;
    45     DatabasePool: TDatabasePool;
    46 
    47     procedure ViewList(HandlerData: THTTPHandlerData);
    48     procedure ViewItem(HandlerData: THTTPHandlerData);
    49     procedure SendIndex(HandlerData: THTTPHandlerData);
    50     procedure WriteHeader(Stream: TMemoryStreamEx);
    51     procedure WriteFooter(Stream: TMemoryStreamEx);
    5228    constructor Create;
    5329    destructor Destroy; override;
    54     procedure LoadConfiguration;
    55     procedure Run;
    5630  end;
    5731
    5832implementation
    5933
    60 procedure TWebServer.LoadConfiguration;
    61 var
    62   Config: TXMLDocument;
    63   I1: Integer;
    64   I2: Integer;
    65   I3: Integer;
    66 begin
    67   if FileExists(ConfigFileName) then begin
    68     ReadXMLFile(Config, ConfigFileName);
    69     for I1 := 0 to Config.ChildNodes.Count - 1 do
    70     with Config.ChildNodes[I1] do begin
    71       if NodeName = 'configuration' then
    72       for I2 := 0 to ChildNodes.Count - 1 do
    73       with ChildNodes[I2] do begin
    74         if NodeName = 'database' then
    75         for I3 := 0 to ChildNodes.Count - 1 do
    76         with ChildNodes[I3] do begin
    77           if NodeName = 'hostname' then
    78             DatabasePool.HostName := TextContent;
    79           if NodeName = 'schema' then
    80             DatabasePool.Schema := TextContent;
    81           if NodeName = 'username' then
    82             DatabasePool.UserName := TextContent;
    83           if NodeName = 'password' then
    84             DatabasePool.Password := TextContent;
    85         end;
    86         if NodeName = 'server' then
    87         for I3 := 0 to ChildNodes.Count - 1 do
    88         with ChildNodes[I3] do begin
    89           if NodeName = 'address' then
    90             HTTPServer.Socket.Address := TextContent;
    91           if NodeName = 'port' then
    92             HTTPServer.Socket.Port := StrToInt(TextContent);
    93         end;
    94       end;
    95     end;
    96     Config.Destroy;
    97   end;
    98 end;
    99 
    100 procedure TWebServer.Run;
    101 var
    102   Command: string;
    103 begin
    104   LoadConfiguration;
    105   DatabasePool.Active := True;
    106   WriteLn('WoW hosting web server');
    107   with HTTPServer do begin
    108     Socket.Active := True;
    109     WriteLn('Accepting connections.');
    110     repeat
    111       Write('Server command: ');
    112       ReadLn(Command);
    113     until Command = 'quit';
    114     //WaitForFinish;
    115   end;
    116 end;
    117 
    118 procedure TWebServer.ViewList(HandlerData: THTTPHandlerData);
    119 var
    120   SqlDatabase: TSqlDatabase;
    121   DbRows: TDbRows;
    122   I, II: integer;
    123   OrderColumn: string;
    124   OrderDirection: string;
    125   Title: string;
    126   LinkQuery: TQueryParameterList;
    127   PageList: TPageList;
    128 begin
    129   SqlDatabase := TSqlDatabase(DatabasePool.Acquire);
    130   with HandlerData, Response, Stream, SqlDatabase do
    131   begin
    132     WriteHeader(Stream);
    133 
    134     WriteString('<div align="center">');
    135 
    136     // Prepare table paging
    137     DbRows := Query('SELECT COUNT(*) FROM ' + Request.Query.Values['Table']);
    138     PageList := TPageList.Create;
    139     PageList.HandlerData := HandlerData;
    140     with PageList do begin
    141       TotalCount := StrToInt(DbRows[0].ValuesAtIndex[0]);
    142       ItemPerPage := 20;
    143       NavigatorVisibleItems := 5;
    144       Process;
    145     end;
    146     DbRows.Destroy;
    147 
    148     //WriteString(Request.Query.Values['Table']);
    149     OrderColumn    := Request.Query.Values['OrderCol'];
    150     OrderDirection := Request.Query.Values['OrderDir'];
    151     if OrderDirection = '1' then
    152       OrderDirection := 'ASC'
    153     else
    154       OrderDirection := 'DESC';
    155     DbRows := Query('SELECT * FROM ' + Request.Query.Values['Table'] +
    156       ' ORDER BY ' + OrderColumn + ' ' + OrderDirection + PageList.SQLLimit);
    157 
    158     LinkQuery := TQueryParameterList.Create;
    159     LinkQuery.Assign(Request.Query);
    160 
    161     WriteString('<strong>Seznam typů karet</strong><br/>');
    162     WriteString(PageList.Output);
    163     WriteString('<table><tr>');
    164     if DbRows.Count > 0 then
    165       for I := 0 to DbRows[0].Count - 1 do
    166       begin
    167         Title := DbRows[0].Names[I];
    168         LinkQuery.Values['OrderCol'] := Title;
    169         if Title = OrderColumn then
    170           LinkQuery.Values['OrderDir'] :=
    171             IntToStr(1 - StrToInt(Request.Query.Values['OrderDir']))
    172         else
    173           LinkQuery.Values['OrderDir'] := Request.Query.Values['OrderDir'];
    174         Title := '<a href="?' + LinkQuery.Syntetize + '">' + Title + '</a>';
    175 
    176         WriteString('<th>' + Title + '</th>');
    177       end;
    178     WriteString('</tr>');
    179 
    180     LinkQuery.Destroy;
    181     for II := 0 to DbRows.Count - 1 do
    182     begin
    183       WriteString('<tr>');
    184       for I := 0 to DbRows[II].Count - 1 do
    185         WriteString('<td>' + DbRows[II].ValuesAtIndex[I] + '</td>');
    186       WriteString('</tr>');
    187     end;
    188     WriteString('</table>');
    189     WriteString(PageList.Output);
    190     WriteString('</div>');
    191 
    192     DbRows.Destroy;
    193     WriteFooter(Stream);
    194   end;
    195   PageList.Destroy;
    196   DatabasePool.Release(SqlDatabase);
    197 end;
    198 
    199 procedure TWebServer.ViewItem(HandlerData: THTTPHandlerData);
    200 var
    201   SqlDatabase: TSqlDatabase;
    202   DbRows: TDbRows;
    203   I, II: Integer;
    204   OrderColumn: string;
    205   OrderDirection: string;
    206   Title: string;
    207   LinkQuery: TQueryParameterList;
    208 begin
    209   SqlDatabase := TSqlDatabase(DatabasePool.Acquire);
    210   with HandlerData, Response, Stream, SqlDatabase do
    211   begin
    212     WriteHeader(Stream);
    213     DbRows := Query('SELECT * FROM ' + Request.Query.Values['Table'] +
    214       ' WHERE Id=' + Request.Query.Values['Id']);
    215     if DbRows.Count > 0 then begin
    216       WriteString('<strong>Zobrazení položky</strong>');
    217       WriteString('<table><tr><th>Vlastnost</th><th>Hodnota</th></tr>');
    218       for I := 0 to DbRows[0].Count - 1 do begin
    219         WriteString('<tr><td>' + DbRows[0].Names[I] + '</td><td>' +
    220           DbRows[0].ValuesAtIndex[I] + '</td></tr>');
    221       end;
    222     end else WriteString('Položka nenalezena.');
    223     WriteString('</table>');
    224     DbRows.Destroy;
    225     WriteFooter(Stream);
    226   end;
    227   DatabasePool.Release(SqlDatabase);
    228 end;
    229 
    230 procedure TWebServer.ServerInfo(HandlerData: THTTPHandlerData);
    231 var
    232   I: Integer;
    233 begin
    234   with HandlerData, Response.Stream do begin
    235     //Response.Cookies.Values['Test'] := 'Halo';
    236     //Response.Cookies.Values['Test2'] := 'Halo2';
    237 
    238     //HTTPServer.SessionHandler.Variables.Values['Session1'] := 'Value1';
    239     //HTTPServer.SessionHandler.Variables.Values['Session2'] := 'Value2';
    240 
    241     WriteString('<a href="?ServerInfo">Refresh</a>');
    242 
    243     WriteString('<h5>Request HTTP headers</h5>');
    244     for I := 0 to Request.Headers.Count - 1 do begin;
    245       WriteString(Request.Headers.Strings[I] + '<br/>');
    246     end;
    247 
    248     WriteString('<h5>Request HTTP cookies</h5>');
    249     for I := 0 to Request.Cookies.Count - 1 do begin;
    250       WriteString(Request.Cookies.Strings[I] + '<br/>');
    251     end;
    252 
    253     WriteString('<h5>Session variables</h5>');
    254     for I := 0 to Session.Count - 1 do begin;
    255       WriteString(Session.Strings[I] + '<br/>');
    256     end;
    257 
    258     WriteString('<h5>Response HTTP headers</h5>');
    259     with Response.Stream do
    260     for I := 0 to Response.Headers.Count - 1 do begin;
    261       WriteString(Response.Headers.Strings[I] + '<br/>');
    262     end;
    263   end;
    264 end;
    265 
    266 procedure TWebServer.SendIndex(HandlerData: THTTPHandlerData);
    267 begin
    268   with HandlerData, Response, Stream do
    269   begin
    270     WriteHeader(Stream);
    271     WriteString('Index');
    272     WriteFooter(Stream);
    273   end;
    274 end;
    275 
    276 procedure TWebServer.WriteHeader(Stream: TMemoryStreamEx);
    277 begin
    278   with Stream do
    279   begin
    280     WriteString('<?xml version="1.0" encoding="UTF-8"?>');
    281     WriteString('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">');
    282     WriteString('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs">');
    283     WriteString('<head>');
    284     WriteString('<title>');
    285     WriteString('Dispečink výtahů');
    286     WriteString('</title>');
    287     WriteString('<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>');
    288     WriteString('<link rel="stylesheet" href="Style.css" type="text/css" media="all"/>');
    289     WriteString('<script type="text/javascript" src="Application/Style/Custom/Global.js">');
    290     WriteString('</script>');
    291     WriteString('<script type="text/javascript" src="Base/Style/jquery.js">');
    292     WriteString('</script>');
    293     WriteString('</head>');
    294     WriteString('<body>');
    295   end;
    296 end;
    297 
    298 procedure TWebServer.WriteFooter(Stream: TMemoryStreamEx);
    299 begin
    300   with Stream do
    301   begin
    302     WriteString('</body>');
    303     WriteString('</html>');
    304   end;
    305 end;
    306 
    30734constructor TWebServer.Create;
    30835begin
    30936  inherited Create;
    310   DatabasePool := TDatabasePool.Create;
    311   DatabasePool.TotalCount := 20;
    312 
    313   SessionStorage := TFileHTTPSessionStorage.Create;
    31437  HTTPServer := THTTPServer.Create;
    31538  with HTTPServer, Socket do begin
    316     SessionStorage := Self.SessionStorage;
    317     DocumentRoot := 'Data';
    318     with RequestHandlerList do begin
    319       Add('/', SendIndex);
    320       Add('/index.htm', SendIndex);
    321       Add('/index.html', SendIndex);
    322       Add('/logo.png', FileResponse);
    323       Add('/Style.css', FileResponse);
    324       Add('/ViewList', ViewList);
    325       Add('/ViewItem', ViewItem);
    326       Add('/ServerInfo', ServerInfo);
    327     end;
    32839  end;
    32940end;
     
    33142destructor TWebServer.Destroy;
    33243begin
    333   DatabasePool.Destroy;
    33444  HTTPServer.Destroy;
    335   SessionStorage.Destroy;
    33645  inherited Destroy;
    33746end;
    33847
    339 { TDatabasePool }
    340 
    341 procedure TDatabasePool.SetActive(const AValue: Boolean);
    342 var
    343   I: Integer;
    344 begin
    345   if not FActive and AValue then begin
    346     for I := 0 to TotalCount - 1 do
    347     with TThreadedPoolItem(Items[I]) do begin
    348       Item := TSqlDatabase.Create;
    349       with TSqlDatabase(Item) do begin
    350         HostName := Self.HostName;
    351         UserName := Self.UserName;
    352         Password := Self.Password;
    353         Database := Self.Schema;
    354         Connect;
    355       end;
    356     end;
    357   end else
    358   if FActive and not AValue then begin
    359 
    360   end;
    361   FActive := AValue;
    362 end;
    363 
    364 constructor TDatabasePool.Create;
    365 begin
    366   inherited;
    367 end;
    368 
    369 destructor TDatabasePool.Destroy;
    370 begin
    371   inherited Destroy;
    372 end;
    37348
    37449end.
  • branches/DirectWeb/UXMLClasses.pas

    r90 r91  
    7070  I: Integer;
    7171begin
    72   Attributes.Free;
    73   for I := 0 to SubElements.Count - 1 do TXmlElement(SubElements[I]).Free;
    74   SubElements.Free;
     72  Attributes.Destroy;
     73  for I := 0 to SubElements.Count - 1 do
     74    TXmlElement(SubElements[I]).Destroy;
     75  SubElements.Destroy;
    7576  inherited;
    7677end;
     
    116117begin
    117118  inherited;
    118   Encoding := 'windows-1250';
     119  Encoding := 'utf-8';
    119120  XmlVersion := '1.0';
    120121  MainTag := TXmlTag.Create;
     
    123124    EndTagSymbol := '?';
    124125    Attributes.Add('version=1.0');
    125     Attributes.Add('encoding=windows-1250');
     126    Attributes.Add('encoding=utf-8');
    126127  end;
    127128  Content := TXmlTag.Create;
     
    130131destructor TXmlDocument.Destroy;
    131132begin
    132   Content.Free;
    133   MainTag.Free;
     133  Content.Destroy;
     134  MainTag.Destroy;
    134135  inherited;
    135136end;
  • branches/DirectWeb/WoWHostingWebServer.lpi

    r89 r91  
    1313      <Icon Value="0"/>
    1414      <UseXPManifest Value="True"/>
    15       <ActiveEditorIndexAtStart Value="1"/>
     15      <ActiveEditorIndexAtStart Value="5"/>
    1616    </General>
    1717    <VersionInfo>
     
    3737      </Item1>
    3838    </RequiredPackages>
    39     <Units Count="38">
     39    <Units Count="31">
    4040      <Unit0>
    4141        <Filename Value="WoWHostingWebServer.lpr"/>
    4242        <IsPartOfProject Value="True"/>
    4343        <UnitName Value="WoWHostingWebServer"/>
    44         <CursorPos X="1" Y="24"/>
    45         <TopLine Value="1"/>
    46         <EditorIndex Value="0"/>
     44        <CursorPos X="85" Y="20"/>
     45        <TopLine Value="1"/>
     46        <EditorIndex Value="2"/>
    4747        <UsageCount Value="200"/>
    4848        <Loaded Value="True"/>
     
    5252        <CursorPos X="1" Y="1"/>
    5353        <TopLine Value="1"/>
    54         <UsageCount Value="191"/>
     54        <UsageCount Value="177"/>
    5555        <SyntaxHighlighter Value="None"/>
    5656      </Unit1>
     
    5858        <Filename Value="mimetable.pp"/>
    5959        <UnitName Value="mimetable"/>
    60         <UsageCount Value="191"/>
     60        <UsageCount Value="177"/>
    6161      </Unit2>
    6262      <Unit3>
    6363        <Filename Value="BreakTokens.pp"/>
    6464        <UnitName Value="BreakTokens"/>
    65         <UsageCount Value="191"/>
     65        <UsageCount Value="177"/>
    6666      </Unit3>
    6767      <Unit4>
     
    7070        <CursorPos X="3" Y="208"/>
    7171        <TopLine Value="202"/>
    72         <UsageCount Value="195"/>
     72        <UsageCount Value="181"/>
    7373      </Unit4>
    7474      <Unit5>
     
    7676        <IsPartOfProject Value="True"/>
    7777        <UnitName Value="UHTTPServer"/>
    78         <CursorPos X="17" Y="92"/>
    79         <TopLine Value="74"/>
    80         <EditorIndex Value="13"/>
     78        <CursorPos X="1" Y="218"/>
     79        <TopLine Value="308"/>
     80        <EditorIndex Value="9"/>
    8181        <UsageCount Value="200"/>
    8282        <Loaded Value="True"/>
     
    8686        <CursorPos X="14" Y="1436"/>
    8787        <TopLine Value="1419"/>
    88         <EditorIndex Value="10"/>
    89         <UsageCount Value="98"/>
    90         <Loaded Value="True"/>
     88        <UsageCount Value="167"/>
    9189      </Unit6>
    9290      <Unit7>
     
    9593        <CursorPos X="15" Y="397"/>
    9694        <TopLine Value="380"/>
    97         <UsageCount Value="95"/>
     95        <UsageCount Value="81"/>
    9896      </Unit7>
    9997      <Unit8>
     
    103101        <CursorPos X="24" Y="148"/>
    104102        <TopLine Value="130"/>
    105         <EditorIndex Value="3"/>
     103        <EditorIndex Value="6"/>
    106104        <UsageCount Value="200"/>
    107105        <Loaded Value="True"/>
     
    116114      </Unit9>
    117115      <Unit10>
    118         <Filename Value="..\..\..\..\Knihovny\Free Pascal\synapse\sswin32.pas"/>
    119         <UnitName Value="sswin32"/>
    120         <CursorPos X="54" Y="330"/>
    121         <TopLine Value="327"/>
    122         <UsageCount Value="7"/>
     116        <Filename Value="UAssociativeArray.pas"/>
     117        <IsPartOfProject Value="True"/>
     118        <UnitName Value="UAssociativeArray"/>
     119        <CursorPos X="24" Y="61"/>
     120        <TopLine Value="25"/>
     121        <EditorIndex Value="3"/>
     122        <UsageCount Value="273"/>
     123        <Loaded Value="True"/>
    123124      </Unit10>
    124125      <Unit11>
    125         <Filename Value="UAssociativeArray.pas"/>
    126         <IsPartOfProject Value="True"/>
    127         <UnitName Value="UAssociativeArray"/>
    128         <CursorPos X="24" Y="61"/>
    129         <TopLine Value="1"/>
    130         <UsageCount Value="135"/>
    131       </Unit11>
    132       <Unit12>
    133         <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\objpas\classes\stringl.inc"/>
    134         <CursorPos X="41" Y="704"/>
    135         <TopLine Value="690"/>
    136         <UsageCount Value="6"/>
    137       </Unit12>
    138       <Unit13>
    139         <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\objpas\classes\streams.inc"/>
    140         <CursorPos X="9" Y="356"/>
    141         <TopLine Value="348"/>
    142         <UsageCount Value="6"/>
    143       </Unit13>
    144       <Unit14>
    145126        <Filename Value="UMemoryStreamEx.pas"/>
    146127        <IsPartOfProject Value="True"/>
     
    148129        <CursorPos X="3" Y="130"/>
    149130        <TopLine Value="121"/>
    150         <UsageCount Value="134"/>
    151       </Unit14>
    152       <Unit15>
     131        <UsageCount Value="272"/>
     132      </Unit11>
     133      <Unit12>
    153134        <Filename Value="UMIMEType.pas"/>
    154135        <IsPartOfProject Value="True"/>
     
    156137        <CursorPos X="26" Y="28"/>
    157138        <TopLine Value="25"/>
    158         <UsageCount Value="134"/>
    159       </Unit15>
    160       <Unit16>
     139        <UsageCount Value="272"/>
     140      </Unit12>
     141      <Unit13>
    161142        <Filename Value="USqlDatabase.pas"/>
    162143        <IsPartOfProject Value="True"/>
     
    164145        <CursorPos X="20" Y="178"/>
    165146        <TopLine Value="164"/>
    166         <EditorIndex Value="8"/>
    167         <UsageCount Value="81"/>
    168         <Loaded Value="True"/>
    169       </Unit16>
    170       <Unit17>
    171         <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\packages\mysql\src\mysql.inc"/>
    172         <CursorPos X="52" Y="6"/>
    173         <TopLine Value="1392"/>
    174         <UsageCount Value="5"/>
    175       </Unit17>
    176       <Unit18>
    177         <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\inc\systemh.inc"/>
    178         <CursorPos X="29" Y="275"/>
    179         <TopLine Value="260"/>
    180         <UsageCount Value="5"/>
    181       </Unit18>
    182       <Unit19>
     147        <EditorIndex Value="7"/>
     148        <UsageCount Value="219"/>
     149        <Loaded Value="True"/>
     150      </Unit13>
     151      <Unit14>
    183152        <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\win\tthread.inc"/>
    184153        <CursorPos X="3" Y="113"/>
    185154        <TopLine Value="97"/>
    186         <EditorIndex Value="11"/>
    187         <UsageCount Value="32"/>
    188         <Loaded Value="True"/>
    189       </Unit19>
    190       <Unit20>
    191         <Filename Value="..\..\..\..\Knihovny\Free Pascal\synapse\synapse.pas"/>
    192         <UnitName Value="synapse"/>
    193         <CursorPos X="27" Y="2"/>
    194         <TopLine Value="1"/>
    195         <UsageCount Value="1"/>
    196       </Unit20>
    197       <Unit21>
     155        <UsageCount Value="101"/>
     156      </Unit14>
     157      <Unit15>
    198158        <Filename Value="UWebServer.pas"/>
    199159        <IsPartOfProject Value="True"/>
    200160        <UnitName Value="UWebServer"/>
    201         <CursorPos X="15" Y="283"/>
    202         <TopLine Value="260"/>
    203         <EditorIndex Value="1"/>
    204         <UsageCount Value="124"/>
    205         <Loaded Value="True"/>
    206       </Unit21>
    207       <Unit22>
    208         <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\win\winsock.pp"/>
    209         <UnitName Value="winsock"/>
    210         <CursorPos X="25" Y="58"/>
    211         <TopLine Value="31"/>
    212         <UsageCount Value="5"/>
    213       </Unit22>
    214       <Unit23>
     161        <CursorPos X="1" Y="48"/>
     162        <TopLine Value="14"/>
     163        <EditorIndex Value="0"/>
     164        <UsageCount Value="262"/>
     165        <Loaded Value="True"/>
     166      </Unit15>
     167      <Unit16>
    215168        <Filename Value="ConfigSample.xml"/>
    216169        <IsPartOfProject Value="True"/>
    217         <CursorPos X="32" Y="11"/>
    218         <TopLine Value="1"/>
    219         <UsageCount Value="82"/>
     170        <CursorPos X="13" Y="8"/>
     171        <TopLine Value="1"/>
     172        <UsageCount Value="220"/>
    220173        <SyntaxHighlighter Value="XML"/>
    221       </Unit23>
    222       <Unit24>
     174      </Unit16>
     175      <Unit17>
    223176        <Filename Value="ReadMe.txt"/>
    224177        <IsPartOfProject Value="True"/>
    225178        <CursorPos X="77" Y="4"/>
    226179        <TopLine Value="1"/>
    227         <UsageCount Value="82"/>
     180        <UsageCount Value="220"/>
    228181        <SyntaxHighlighter Value="None"/>
    229       </Unit24>
    230       <Unit25>
     182      </Unit17>
     183      <Unit18>
    231184        <Filename Value="UHTTPSession.pas"/>
    232185        <UnitName Value="UHTTPSession"/>
    233186        <CursorPos X="1" Y="19"/>
    234187        <TopLine Value="1"/>
    235         <UsageCount Value="15"/>
    236       </Unit25>
    237       <Unit26>
     188        <UsageCount Value="1"/>
     189      </Unit18>
     190      <Unit19>
    238191        <Filename Value="UHTTPSessionFile.pas"/>
    239192        <IsPartOfProject Value="True"/>
     
    241194        <CursorPos X="35" Y="8"/>
    242195        <TopLine Value="1"/>
    243         <EditorIndex Value="14"/>
    244         <UsageCount Value="79"/>
    245         <Loaded Value="True"/>
    246       </Unit26>
    247       <Unit27>
     196        <EditorIndex Value="10"/>
     197        <UsageCount Value="217"/>
     198        <Loaded Value="True"/>
     199      </Unit19>
     200      <Unit20>
    248201        <Filename Value="UHTMLControls.pas"/>
    249202        <IsPartOfProject Value="True"/>
    250203        <UnitName Value="UHTMLControls"/>
    251         <CursorPos X="40" Y="60"/>
    252         <TopLine Value="33"/>
    253         <EditorIndex Value="2"/>
    254         <UsageCount Value="77"/>
    255         <Loaded Value="True"/>
    256       </Unit27>
    257       <Unit28>
     204        <CursorPos X="3" Y="51"/>
     205        <TopLine Value="35"/>
     206        <EditorIndex Value="5"/>
     207        <UsageCount Value="215"/>
     208        <Loaded Value="True"/>
     209      </Unit20>
     210      <Unit21>
    258211        <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\inc\threadh.inc"/>
    259212        <CursorPos X="26" Y="23"/>
    260213        <TopLine Value="4"/>
    261         <EditorIndex Value="5"/>
    262         <UsageCount Value="14"/>
    263         <Loaded Value="True"/>
    264       </Unit28>
    265       <Unit29>
    266         <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\win\sysosh.inc"/>
    267         <CursorPos X="3" Y="33"/>
    268         <TopLine Value="1"/>
    269         <UsageCount Value="5"/>
    270       </Unit29>
    271       <Unit30>
     214        <UsageCount Value="83"/>
     215      </Unit21>
     216      <Unit22>
    272217        <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\packages\fcl-base\src\syncobjs.pp"/>
    273218        <UnitName Value="syncobjs"/>
    274219        <CursorPos X="25" Y="138"/>
    275220        <TopLine Value="134"/>
    276         <EditorIndex Value="4"/>
    277         <UsageCount Value="32"/>
    278         <Loaded Value="True"/>
    279       </Unit30>
    280       <Unit31>
    281         <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\inc\objpash.inc"/>
    282         <CursorPos X="8" Y="170"/>
    283         <TopLine Value="153"/>
    284         <UsageCount Value="10"/>
    285       </Unit31>
    286       <Unit32>
    287         <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\win\wininc\func.inc"/>
    288         <CursorPos X="10" Y="142"/>
    289         <TopLine Value="125"/>
    290         <UsageCount Value="6"/>
    291       </Unit32>
    292       <Unit33>
    293         <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\objpas\classes\lists.inc"/>
    294         <CursorPos X="12" Y="102"/>
    295         <TopLine Value="100"/>
    296         <UsageCount Value="6"/>
    297       </Unit33>
    298       <Unit34>
     221        <UsageCount Value="101"/>
     222      </Unit22>
     223      <Unit23>
    299224        <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\packages\fcl-base\src\contnrs.pp"/>
    300225        <UnitName Value="contnrs"/>
    301226        <CursorPos X="26" Y="72"/>
    302227        <TopLine Value="64"/>
    303         <EditorIndex Value="9"/>
    304         <UsageCount Value="32"/>
    305         <Loaded Value="True"/>
    306       </Unit34>
    307       <Unit35>
     228        <UsageCount Value="101"/>
     229      </Unit23>
     230      <Unit24>
    308231        <Filename Value="UPool.pas"/>
    309232        <IsPartOfProject Value="True"/>
     
    311234        <CursorPos X="37" Y="106"/>
    312235        <TopLine Value="88"/>
    313         <EditorIndex Value="7"/>
    314         <UsageCount Value="65"/>
    315         <Loaded Value="True"/>
    316       </Unit35>
    317       <Unit36>
     236        <UsageCount Value="203"/>
     237      </Unit24>
     238      <Unit25>
    318239        <Filename Value="UResetableThread.pas"/>
    319240        <IsPartOfProject Value="True"/>
     
    321242        <CursorPos X="50" Y="72"/>
    322243        <TopLine Value="69"/>
    323         <EditorIndex Value="12"/>
    324         <UsageCount Value="64"/>
    325         <Loaded Value="True"/>
    326       </Unit36>
    327       <Unit37>
     244        <EditorIndex Value="8"/>
     245        <UsageCount Value="202"/>
     246        <Loaded Value="True"/>
     247      </Unit25>
     248      <Unit26>
    328249        <Filename Value="..\..\..\..\..\Programy\Lazarus_0.9.29\fpc\2.3.1\source\rtl\inc\thread.inc"/>
    329250        <CursorPos X="32" Y="236"/>
    330251        <TopLine Value="233"/>
    331         <EditorIndex Value="6"/>
    332         <UsageCount Value="11"/>
    333         <Loaded Value="True"/>
    334       </Unit37>
     252        <UsageCount Value="80"/>
     253      </Unit26>
     254      <Unit27>
     255        <Filename Value="UXMLClasses.pas"/>
     256        <IsPartOfProject Value="True"/>
     257        <UnitName Value="UXMLClasses"/>
     258        <CursorPos X="31" Y="185"/>
     259        <TopLine Value="155"/>
     260        <EditorIndex Value="4"/>
     261        <UsageCount Value="163"/>
     262        <Loaded Value="True"/>
     263      </Unit27>
     264      <Unit28>
     265        <Filename Value="UHTMLClasses.pas"/>
     266        <IsPartOfProject Value="True"/>
     267        <UnitName Value="UHTMLClasses"/>
     268        <UsageCount Value="163"/>
     269        <SyntaxHighlighter Value="Text"/>
     270      </Unit28>
     271      <Unit29>
     272        <Filename Value="URSS.pas"/>
     273        <IsPartOfProject Value="True"/>
     274        <UnitName Value="URSS"/>
     275        <CursorPos X="24" Y="60"/>
     276        <TopLine Value="40"/>
     277        <UsageCount Value="163"/>
     278      </Unit29>
     279      <Unit30>
     280        <Filename Value="UCustomWebServer.pas"/>
     281        <IsPartOfProject Value="True"/>
     282        <UnitName Value="UCustomWebServer"/>
     283        <CursorPos X="108" Y="160"/>
     284        <TopLine Value="142"/>
     285        <EditorIndex Value="1"/>
     286        <UsageCount Value="22"/>
     287        <Loaded Value="True"/>
     288      </Unit30>
    335289    </Units>
    336290    <JumpHistory Count="30" HistoryIndex="29">
    337291      <Position1>
    338292        <Filename Value="UWebServer.pas"/>
    339         <Caret Line="130" Column="1" TopLine="113"/>
     293        <Caret Line="137" Column="1" TopLine="120"/>
    340294      </Position1>
    341295      <Position2>
    342         <Filename Value="UWebServer.pas"/>
    343         <Caret Line="132" Column="1" TopLine="115"/>
     296        <Filename Value="USqlDatabase.pas"/>
     297        <Caret Line="174" Column="1" TopLine="157"/>
    344298      </Position2>
    345299      <Position3>
    346         <Filename Value="UWebServer.pas"/>
    347         <Caret Line="134" Column="1" TopLine="117"/>
     300        <Filename Value="USqlDatabase.pas"/>
     301        <Caret Line="176" Column="1" TopLine="159"/>
    348302      </Position3>
    349303      <Position4>
    350         <Filename Value="UWebServer.pas"/>
    351         <Caret Line="137" Column="1" TopLine="120"/>
     304        <Filename Value="USqlDatabase.pas"/>
     305        <Caret Line="177" Column="1" TopLine="160"/>
    352306      </Position4>
    353307      <Position5>
    354         <Filename Value="UWebServer.pas"/>
    355         <Caret Line="128" Column="1" TopLine="111"/>
     308        <Filename Value="USqlDatabase.pas"/>
     309        <Caret Line="179" Column="1" TopLine="162"/>
    356310      </Position5>
    357311      <Position6>
    358312        <Filename Value="UWebServer.pas"/>
    359         <Caret Line="129" Column="1" TopLine="112"/>
     313        <Caret Line="193" Column="1" TopLine="169"/>
    360314      </Position6>
    361315      <Position7>
    362         <Filename Value="UWebServer.pas"/>
    363         <Caret Line="130" Column="1" TopLine="113"/>
     316        <Filename Value="USqlDatabase.pas"/>
     317        <Caret Line="178" Column="20" TopLine="164"/>
    364318      </Position7>
    365319      <Position8>
    366320        <Filename Value="UWebServer.pas"/>
    367         <Caret Line="128" Column="1" TopLine="111"/>
     321        <Caret Line="322" Column="31" TopLine="306"/>
    368322      </Position8>
    369323      <Position9>
    370         <Filename Value="UWebServer.pas"/>
    371         <Caret Line="129" Column="1" TopLine="112"/>
     324        <Filename Value="UHTTPServer.pas"/>
     325        <Caret Line="211" Column="24" TopLine="205"/>
    372326      </Position9>
    373327      <Position10>
    374328        <Filename Value="UWebServer.pas"/>
    375         <Caret Line="130" Column="1" TopLine="113"/>
     329        <Caret Line="322" Column="31" TopLine="291"/>
    376330      </Position10>
    377331      <Position11>
    378         <Filename Value="UWebServer.pas"/>
    379         <Caret Line="132" Column="1" TopLine="115"/>
     332        <Filename Value="UHTTPServer.pas"/>
     333        <Caret Line="210" Column="1" TopLine="193"/>
    380334      </Position11>
    381335      <Position12>
    382         <Filename Value="UWebServer.pas"/>
    383         <Caret Line="134" Column="1" TopLine="117"/>
     336        <Filename Value="UHTTPServer.pas"/>
     337        <Caret Line="211" Column="1" TopLine="194"/>
    384338      </Position12>
    385339      <Position13>
    386         <Filename Value="UWebServer.pas"/>
    387         <Caret Line="137" Column="1" TopLine="120"/>
     340        <Filename Value="UHTTPServer.pas"/>
     341        <Caret Line="212" Column="1" TopLine="195"/>
    388342      </Position13>
    389343      <Position14>
    390         <Filename Value="USqlDatabase.pas"/>
    391         <Caret Line="174" Column="1" TopLine="157"/>
     344        <Filename Value="UWebServer.pas"/>
     345        <Caret Line="52" Column="54" TopLine="30"/>
    392346      </Position14>
    393347      <Position15>
    394         <Filename Value="USqlDatabase.pas"/>
    395         <Caret Line="176" Column="1" TopLine="159"/>
     348        <Filename Value="UWebServer.pas"/>
     349        <Caret Line="296" Column="27" TopLine="277"/>
    396350      </Position15>
    397351      <Position16>
    398         <Filename Value="USqlDatabase.pas"/>
    399         <Caret Line="177" Column="1" TopLine="160"/>
     352        <Filename Value="UWebServer.pas"/>
     353        <Caret Line="135" Column="23" TopLine="131"/>
    400354      </Position16>
    401355      <Position17>
    402         <Filename Value="USqlDatabase.pas"/>
    403         <Caret Line="179" Column="1" TopLine="162"/>
     356        <Filename Value="UCustomWebServer.pas"/>
     357        <Caret Line="34" Column="34" TopLine="7"/>
    404358      </Position17>
    405359      <Position18>
    406         <Filename Value="USqlDatabase.pas"/>
    407         <Caret Line="181" Column="25" TopLine="164"/>
     360        <Filename Value="UWebServer.pas"/>
     361        <Caret Line="65" Column="1" TopLine="50"/>
    408362      </Position18>
    409363      <Position19>
    410         <Filename Value="UWebServer.pas"/>
    411         <Caret Line="128" Column="1" TopLine="111"/>
     364        <Filename Value="UCustomWebServer.pas"/>
     365        <Caret Line="380" Column="13" TopLine="281"/>
    412366      </Position19>
    413367      <Position20>
    414         <Filename Value="UWebServer.pas"/>
    415         <Caret Line="129" Column="1" TopLine="112"/>
     368        <Filename Value="UCustomWebServer.pas"/>
     369        <Caret Line="34" Column="24" TopLine="17"/>
    416370      </Position20>
    417371      <Position21>
    418         <Filename Value="UWebServer.pas"/>
    419         <Caret Line="130" Column="1" TopLine="113"/>
     372        <Filename Value="UCustomWebServer.pas"/>
     373        <Caret Line="339" Column="1" TopLine="335"/>
    420374      </Position21>
    421375      <Position22>
    422376        <Filename Value="UWebServer.pas"/>
    423         <Caret Line="132" Column="1" TopLine="115"/>
     377        <Caret Line="19" Column="8" TopLine="19"/>
    424378      </Position22>
    425379      <Position23>
    426         <Filename Value="UWebServer.pas"/>
    427         <Caret Line="134" Column="1" TopLine="117"/>
     380        <Filename Value="UCustomWebServer.pas"/>
     381        <Caret Line="36" Column="5" TopLine="3"/>
    428382      </Position23>
    429383      <Position24>
    430         <Filename Value="UWebServer.pas"/>
    431         <Caret Line="137" Column="1" TopLine="120"/>
     384        <Filename Value="WoWHostingWebServer.lpr"/>
     385        <Caret Line="17" Column="21" TopLine="1"/>
    432386      </Position24>
    433387      <Position25>
    434         <Filename Value="USqlDatabase.pas"/>
    435         <Caret Line="174" Column="1" TopLine="157"/>
     388        <Filename Value="WoWHostingWebServer.lpr"/>
     389        <Caret Line="24" Column="23" TopLine="1"/>
    436390      </Position25>
    437391      <Position26>
    438         <Filename Value="USqlDatabase.pas"/>
    439         <Caret Line="176" Column="1" TopLine="159"/>
     392        <Filename Value="UCustomWebServer.pas"/>
     393        <Caret Line="160" Column="30" TopLine="136"/>
    440394      </Position26>
    441395      <Position27>
    442         <Filename Value="USqlDatabase.pas"/>
    443         <Caret Line="177" Column="1" TopLine="160"/>
     396        <Filename Value="UHTMLControls.pas"/>
     397        <Caret Line="55" Column="18" TopLine="34"/>
    444398      </Position27>
    445399      <Position28>
    446         <Filename Value="USqlDatabase.pas"/>
    447         <Caret Line="179" Column="1" TopLine="162"/>
     400        <Filename Value="UCustomWebServer.pas"/>
     401        <Caret Line="160" Column="57" TopLine="142"/>
    448402      </Position28>
    449403      <Position29>
    450         <Filename Value="UWebServer.pas"/>
    451         <Caret Line="193" Column="1" TopLine="169"/>
     404        <Filename Value="WoWHostingWebServer.lpr"/>
     405        <Caret Line="21" Column="47" TopLine="1"/>
    452406      </Position29>
    453407      <Position30>
    454         <Filename Value="USqlDatabase.pas"/>
    455         <Caret Line="178" Column="20" TopLine="164"/>
     408        <Filename Value="UHTMLControls.pas"/>
     409        <Caret Line="47" Column="18" TopLine="24"/>
    456410      </Position30>
    457411    </JumpHistory>
  • branches/DirectWeb/WoWHostingWebServer.lpr

    r88 r91  
    1010  {$ENDIF}
    1111{$ENDIF}
    12   Classes, SysUtils, UWebServer;
     12  Classes, SysUtils, UCustomWebServer;
    1313
    1414{$IFDEF WINDOWS}{$R WoWHostingWebServer.rc}{$ENDIF}
    1515
    1616var
    17   WebServer: TWebServer;
     17  WebServer: TCustomWebServer;
    1818begin
    19   WebServer := TWebServer.Create;
     19  WebServer := TCustomWebServer.Create;
    2020  with WebServer do begin
    2121    Run;
Note: See TracChangeset for help on using the changeset viewer.