Changeset 54


Ignore:
Timestamp:
Jul 20, 2011, 11:52:31 PM (13 years ago)
Author:
george
Message:
  • Upraveno: Přesunuty další části z UMainModule do třídy UWebApp valíku CoolWeb.
Location:
trunk
Files:
2 added
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/CGI.lpi

    r53 r54  
    5757        <EditorIndex Value="0"/>
    5858        <WindowIndex Value="0"/>
    59         <TopLine Value="5"/>
    60         <CursorPos X="7" Y="34"/>
     59        <TopLine Value="4"/>
     60        <CursorPos X="1" Y="19"/>
    6161        <UsageCount Value="203"/>
    6262        <Loaded Value="True"/>
     
    493493      <Unit50>
    494494        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericList.inc"/>
    495         <WindowIndex Value="0"/>
    496         <TopLine Value="14"/>
    497         <CursorPos X="1" Y="29"/>
     495        <EditorIndex Value="4"/>
     496        <WindowIndex Value="0"/>
     497        <TopLine Value="29"/>
     498        <CursorPos X="15" Y="46"/>
    498499        <UsageCount Value="178"/>
     500        <Loaded Value="True"/>
    499501      </Unit50>
    500502      <Unit51>
     
    569571        <TopLine Value="71"/>
    570572        <CursorPos X="40" Y="12"/>
    571         <UsageCount Value="51"/>
     573        <UsageCount Value="53"/>
    572574        <DefaultSyntaxHighlighter Value="Delphi"/>
    573575      </Unit59>
     
    592594        <UnitName Value="UHTTPServer"/>
    593595        <WindowIndex Value="0"/>
    594         <TopLine Value="82"/>
    595         <CursorPos X="15" Y="98"/>
     596        <TopLine Value="180"/>
     597        <CursorPos X="3" Y="182"/>
    596598        <UsageCount Value="14"/>
    597599      </Unit62>
     
    599601        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UHTTPServerCGI.pas"/>
    600602        <UnitName Value="UHTTPServerCGI"/>
    601         <EditorIndex Value="5"/>
     603        <EditorIndex Value="3"/>
    602604        <WindowIndex Value="0"/>
    603605        <TopLine Value="65"/>
    604         <CursorPos X="23" Y="85"/>
    605         <UsageCount Value="10"/>
     606        <CursorPos X="1" Y="86"/>
     607        <UsageCount Value="11"/>
    606608        <Loaded Value="True"/>
    607609      </Unit63>
     
    639641      <Unit68>
    640642        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericListObject.inc"/>
    641         <WindowIndex Value="0"/>
    642         <TopLine Value="2"/>
    643         <CursorPos X="14" Y="19"/>
     643        <EditorIndex Value="2"/>
     644        <WindowIndex Value="0"/>
     645        <TopLine Value="61"/>
     646        <CursorPos X="23" Y="61"/>
    644647        <UsageCount Value="11"/>
     648        <Loaded Value="True"/>
    645649      </Unit68>
    646650      <Unit69>
     
    707711        <ResourceBaseClass Value="DataModule"/>
    708712        <UnitName Value="UMainModule"/>
    709         <EditorIndex Value="4"/>
    710         <WindowIndex Value="0"/>
    711         <TopLine Value="9"/>
    712         <CursorPos X="18" Y="30"/>
    713         <UsageCount Value="33"/>
     713        <IsVisibleTab Value="True"/>
     714        <EditorIndex Value="1"/>
     715        <WindowIndex Value="0"/>
     716        <TopLine Value="57"/>
     717        <CursorPos X="44" Y="74"/>
     718        <UsageCount Value="35"/>
    714719        <Loaded Value="True"/>
    715720        <LoadedDesigner Value="True"/>
     
    770775        <UnitName Value="UWebPage"/>
    771776        <WindowIndex Value="0"/>
    772         <TopLine Value="1"/>
    773         <CursorPos X="25" Y="15"/>
     777        <TopLine Value="4"/>
     778        <CursorPos X="14" Y="21"/>
    774779        <UsageCount Value="14"/>
    775780      </Unit83>
     
    788793        <UnitName Value="UPagesModule"/>
    789794        <WindowIndex Value="0"/>
    790         <TopLine Value="12"/>
    791         <CursorPos X="43" Y="26"/>
     795        <TopLine Value="48"/>
     796        <CursorPos X="13" Y="342"/>
    792797        <UsageCount Value="30"/>
    793798        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    812817        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/LazIDEReg.pas"/>
    813818        <UnitName Value="LazIDEReg"/>
    814         <EditorIndex Value="7"/>
    815         <WindowIndex Value="0"/>
    816         <TopLine Value="1"/>
    817         <CursorPos X="64" Y="8"/>
     819        <WindowIndex Value="0"/>
     820        <TopLine Value="1"/>
     821        <CursorPos X="79" Y="4"/>
    818822        <UsageCount Value="13"/>
    819         <Loaded Value="True"/>
    820823      </Unit88>
    821824      <Unit89>
     
    861864        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
    862865        <UnitName Value="UWebApp"/>
    863         <IsVisibleTab Value="True"/>
    864         <EditorIndex Value="3"/>
    865         <WindowIndex Value="0"/>
    866         <TopLine Value="21"/>
    867         <CursorPos X="18" Y="43"/>
    868         <UsageCount Value="13"/>
     866        <EditorIndex Value="6"/>
     867        <WindowIndex Value="0"/>
     868        <TopLine Value="57"/>
     869        <CursorPos X="1" Y="75"/>
     870        <UsageCount Value="14"/>
    869871        <Loaded Value="True"/>
    870872      </Unit94>
     
    872874        <Filename Value="/usr/share/fpcsrc/2.4.2/packages/fcl-base/src/custapp.pp"/>
    873875        <UnitName Value="CustApp"/>
    874         <EditorIndex Value="1"/>
    875         <WindowIndex Value="0"/>
    876         <TopLine Value="34"/>
    877         <CursorPos X="15" Y="51"/>
     876        <WindowIndex Value="0"/>
     877        <TopLine Value="19"/>
     878        <CursorPos X="3" Y="26"/>
    878879        <UsageCount Value="13"/>
    879         <Loaded Value="True"/>
    880880      </Unit95>
    881881      <Unit96>
     
    908908        <UnitName Value="UContactPage"/>
    909909        <WindowIndex Value="0"/>
    910         <TopLine Value="1"/>
    911         <CursorPos X="68" Y="5"/>
    912         <UsageCount Value="24"/>
     910        <TopLine Value="17"/>
     911        <CursorPos X="1" Y="47"/>
     912        <UsageCount Value="26"/>
    913913        <DefaultSyntaxHighlighter Value="Delphi"/>
    914914      </Unit99>
     
    920920        <UnitName Value="UInternetPage"/>
    921921        <WindowIndex Value="0"/>
    922         <TopLine Value="20"/>
    923         <CursorPos X="28" Y="30"/>
    924         <UsageCount Value="21"/>
     922        <TopLine Value="26"/>
     923        <CursorPos X="1" Y="57"/>
     924        <UsageCount Value="23"/>
    925925        <DefaultSyntaxHighlighter Value="Delphi"/>
    926926      </Unit100>
     
    932932        <UnitName Value="UHostingPage"/>
    933933        <WindowIndex Value="0"/>
    934         <TopLine Value="20"/>
    935         <CursorPos X="15" Y="31"/>
    936         <UsageCount Value="21"/>
     934        <TopLine Value="66"/>
     935        <CursorPos X="1" Y="97"/>
     936        <UsageCount Value="23"/>
    937937        <DefaultSyntaxHighlighter Value="Delphi"/>
    938938      </Unit101>
     
    944944        <UnitName Value="UHistoryPage"/>
    945945        <WindowIndex Value="0"/>
    946         <TopLine Value="9"/>
    947         <CursorPos X="21" Y="30"/>
    948         <UsageCount Value="20"/>
     946        <TopLine Value="26"/>
     947        <CursorPos X="1" Y="57"/>
     948        <UsageCount Value="22"/>
    949949        <DefaultSyntaxHighlighter Value="Delphi"/>
    950950      </Unit102>
     
    956956        <UnitName Value="UDocumentsPage"/>
    957957        <WindowIndex Value="0"/>
    958         <TopLine Value="23"/>
    959         <CursorPos X="21" Y="30"/>
    960         <UsageCount Value="20"/>
     958        <TopLine Value="24"/>
     959        <CursorPos X="1" Y="55"/>
     960        <UsageCount Value="22"/>
    961961        <DefaultSyntaxHighlighter Value="Delphi"/>
    962962      </Unit103>
     
    968968        <UnitName Value="UVoIPPage"/>
    969969        <WindowIndex Value="0"/>
    970         <TopLine Value="1"/>
    971         <CursorPos X="67" Y="8"/>
    972         <UsageCount Value="20"/>
     970        <TopLine Value="34"/>
     971        <CursorPos X="1" Y="65"/>
     972        <UsageCount Value="22"/>
    973973        <DefaultSyntaxHighlighter Value="Delphi"/>
    974974      </Unit104>
     
    979979        <ResourceBaseClass Value="DataModule"/>
    980980        <UnitName Value="UPlansPage"/>
    981         <WindowIndex Value="0"/>
    982         <TopLine Value="2"/>
    983         <CursorPos X="81" Y="8"/>
    984         <UsageCount Value="20"/>
     981        <EditorIndex Value="5"/>
     982        <WindowIndex Value="0"/>
     983        <TopLine Value="28"/>
     984        <CursorPos X="23" Y="40"/>
     985        <UsageCount Value="22"/>
     986        <Loaded Value="True"/>
    985987        <DefaultSyntaxHighlighter Value="Delphi"/>
    986988      </Unit105>
     
    992994        <UnitName Value="ULinksPage"/>
    993995        <WindowIndex Value="0"/>
    994         <TopLine Value="1"/>
    995         <CursorPos X="67" Y="8"/>
    996         <UsageCount Value="20"/>
     996        <TopLine Value="36"/>
     997        <CursorPos X="1" Y="67"/>
     998        <UsageCount Value="22"/>
    997999        <DefaultSyntaxHighlighter Value="Delphi"/>
    9981000      </Unit106>
     
    10051007        <WindowIndex Value="0"/>
    10061008        <TopLine Value="8"/>
    1007         <CursorPos X="14" Y="30"/>
    1008         <UsageCount Value="20"/>
     1009        <CursorPos X="1" Y="39"/>
     1010        <UsageCount Value="22"/>
    10091011        <DefaultSyntaxHighlighter Value="Delphi"/>
    10101012      </Unit107>
     
    10161018        <UnitName Value="UWebCamPage"/>
    10171019        <WindowIndex Value="0"/>
    1018         <TopLine Value="17"/>
    1019         <CursorPos X="21" Y="30"/>
    1020         <UsageCount Value="20"/>
     1020        <TopLine Value="47"/>
     1021        <CursorPos X="1" Y="78"/>
     1022        <UsageCount Value="22"/>
    10211023        <DefaultSyntaxHighlighter Value="Delphi"/>
    10221024      </Unit108>
     
    10281030        <UnitName Value="UUserControlPage"/>
    10291031        <WindowIndex Value="0"/>
    1030         <TopLine Value="1"/>
    1031         <CursorPos X="14" Y="9"/>
    1032         <UsageCount Value="20"/>
     1032        <TopLine Value="38"/>
     1033        <CursorPos X="1" Y="68"/>
     1034        <UsageCount Value="22"/>
    10331035        <DefaultSyntaxHighlighter Value="Delphi"/>
    10341036      </Unit109>
     
    10411043        <WindowIndex Value="0"/>
    10421044        <TopLine Value="15"/>
    1043         <CursorPos X="21" Y="30"/>
    1044         <UsageCount Value="20"/>
     1045        <CursorPos X="1" Y="46"/>
     1046        <UsageCount Value="22"/>
    10451047        <DefaultSyntaxHighlighter Value="Delphi"/>
    10461048      </Unit110>
     
    10511053        <ResourceBaseClass Value="DataModule"/>
    10521054        <UnitName Value="UAboutPage"/>
    1053         <EditorIndex Value="2"/>
    1054         <WindowIndex Value="0"/>
    1055         <TopLine Value="34"/>
    1056         <CursorPos X="37" Y="43"/>
    1057         <UsageCount Value="20"/>
    1058         <Loaded Value="True"/>
    1059         <LoadedDesigner Value="True"/>
     1055        <WindowIndex Value="0"/>
     1056        <TopLine Value="54"/>
     1057        <CursorPos X="1" Y="83"/>
     1058        <UsageCount Value="22"/>
    10601059        <DefaultSyntaxHighlighter Value="Delphi"/>
    10611060      </Unit111>
    10621061      <Unit112>
    10631062        <Filename Value="Pages/UAboutPage.lfm"/>
    1064         <EditorIndex Value="6"/>
    1065         <WindowIndex Value="0"/>
    1066         <TopLine Value="1"/>
    1067         <CursorPos X="50" Y="4"/>
     1063        <WindowIndex Value="0"/>
     1064        <TopLine Value="1"/>
     1065        <CursorPos X="1" Y="1"/>
    10681066        <ExtraEditorCount Value="1"/>
    10691067        <ExtraEditor1>
    10701068          <WindowIndex Value="0"/>
    10711069          <TopLine Value="1"/>
    1072           <CursorPos X="1" Y="1"/>
     1070          <CursorPos X="50" Y="4"/>
    10731071        </ExtraEditor1>
    10741072        <UsageCount Value="10"/>
    1075         <Loaded Value="True"/>
    10761073        <DefaultSyntaxHighlighter Value="LFM"/>
    10771074      </Unit112>
     
    10951092        <Filename Value="../../../lazarus/components/daemon/reglazdaemon.pp"/>
    10961093        <UnitName Value="RegLazDaemon"/>
    1097         <EditorIndex Value="8"/>
    1098         <WindowIndex Value="0"/>
    1099         <TopLine Value="61"/>
     1094        <WindowIndex Value="0"/>
     1095        <TopLine Value="23"/>
    11001096        <CursorPos X="37" Y="23"/>
    11011097        <UsageCount Value="10"/>
    1102         <Loaded Value="True"/>
    11031098      </Unit115>
    11041099    </Units>
    1105     <JumpHistory Count="24" HistoryIndex="23">
     1100    <JumpHistory Count="30" HistoryIndex="29">
    11061101      <Position1>
    1107         <Filename Value="CGI.lpr"/>
    1108         <Caret Line="23" Column="28" TopLine="3"/>
     1102        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1103        <Caret Line="97" Column="1" TopLine="79"/>
    11091104      </Position1>
    11101105      <Position2>
    1111         <Filename Value="CGI.lpr"/>
    1112         <Caret Line="11" Column="25" TopLine="3"/>
     1106        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1107        <Caret Line="98" Column="1" TopLine="79"/>
    11131108      </Position2>
    11141109      <Position3>
    1115         <Filename Value="CGI.lpr"/>
    1116         <Caret Line="26" Column="33" TopLine="4"/>
     1110        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1111        <Caret Line="99" Column="1" TopLine="79"/>
    11171112      </Position3>
    11181113      <Position4>
    1119         <Filename Value="CGI.lpr"/>
    1120         <Caret Line="11" Column="42" TopLine="4"/>
     1114        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1115        <Caret Line="100" Column="1" TopLine="79"/>
    11211116      </Position4>
    11221117      <Position5>
    1123         <Filename Value="CGI.lpr"/>
    1124         <Caret Line="28" Column="29" TopLine="4"/>
     1118        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1119        <Caret Line="102" Column="1" TopLine="79"/>
    11251120      </Position5>
    11261121      <Position6>
    1127         <Filename Value="CGI.lpr"/>
    1128         <Caret Line="11" Column="55" TopLine="4"/>
     1122        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1123        <Caret Line="104" Column="1" TopLine="79"/>
    11291124      </Position6>
    11301125      <Position7>
    1131         <Filename Value="CGI.lpr"/>
    1132         <Caret Line="28" Column="34" TopLine="4"/>
     1126        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1127        <Caret Line="105" Column="1" TopLine="79"/>
    11331128      </Position7>
    11341129      <Position8>
    1135         <Filename Value="CGI.lpr"/>
    1136         <Caret Line="11" Column="73" TopLine="4"/>
     1130        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1131        <Caret Line="106" Column="1" TopLine="79"/>
    11371132      </Position8>
    11381133      <Position9>
    1139         <Filename Value="CGI.lpr"/>
    1140         <Caret Line="31" Column="30" TopLine="4"/>
     1134        <Filename Value="Modules/UMainModule.pas"/>
     1135        <Caret Line="75" Column="11" TopLine="60"/>
    11411136      </Position9>
    11421137      <Position10>
    1143         <Filename Value="CGI.lpr"/>
    1144         <Caret Line="12" Column="15" TopLine="4"/>
     1138        <Filename Value="Modules/UMainModule.pas"/>
     1139        <Caret Line="199" Column="75" TopLine="197"/>
    11451140      </Position10>
    11461141      <Position11>
    1147         <Filename Value="Pages/UAboutPage.pas"/>
    1148         <Caret Line="1" Column="1" TopLine="1"/>
     1142        <Filename Value="Modules/UMainModule.pas"/>
     1143        <Caret Line="74" Column="37" TopLine="57"/>
    11491144      </Position11>
    11501145      <Position12>
    1151         <Filename Value="CGI.lpr"/>
    1152         <Caret Line="33" Column="28" TopLine="5"/>
     1146        <Filename Value="Modules/UMainModule.pas"/>
     1147        <Caret Line="75" Column="12" TopLine="57"/>
    11531148      </Position12>
    11541149      <Position13>
    1155         <Filename Value="Pages/UAboutPage.pas"/>
    1156         <Caret Line="14" Column="27" TopLine="1"/>
     1150        <Filename Value="Modules/UMainModule.pas"/>
     1151        <Caret Line="74" Column="37" TopLine="57"/>
    11571152      </Position13>
    11581153      <Position14>
    1159         <Filename Value="Pages/UAboutPage.pas"/>
    1160         <Caret Line="85" Column="15" TopLine="52"/>
     1154        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1155        <Caret Line="73" Column="32" TopLine="57"/>
    11611156      </Position14>
    11621157      <Position15>
    1163         <Filename Value="../../PascalClassLibrary/Network/CoolWeb/LazIDEReg.pas"/>
    1164         <Caret Line="137" Column="5" TopLine="104"/>
     1158        <Filename Value="Modules/UMainModule.pas"/>
     1159        <Caret Line="199" Column="1" TopLine="183"/>
    11651160      </Position15>
    11661161      <Position16>
    1167         <Filename Value="../../PascalClassLibrary/Network/CoolWeb/LazIDEReg.pas"/>
    1168         <Caret Line="52" Column="53" TopLine="41"/>
     1162        <Filename Value="Modules/UMainModule.pas"/>
     1163        <Caret Line="200" Column="1" TopLine="183"/>
    11691164      </Position16>
    11701165      <Position17>
    1171         <Filename Value="Pages/UAboutPage.pas"/>
    1172         <Caret Line="71" Column="19" TopLine="53"/>
     1166        <Filename Value="Modules/UMainModule.pas"/>
     1167        <Caret Line="72" Column="42" TopLine="58"/>
    11731168      </Position17>
    11741169      <Position18>
    1175         <Filename Value="CGI.lpr"/>
    1176         <Caret Line="34" Column="6" TopLine="5"/>
     1170        <Filename Value="Modules/UMainModule.pas"/>
     1171        <Caret Line="74" Column="1" TopLine="58"/>
    11771172      </Position18>
    11781173      <Position19>
    1179         <Filename Value="CGI.lpr"/>
    1180         <Caret Line="17" Column="23" TopLine="5"/>
     1174        <Filename Value="Modules/UMainModule.pas"/>
     1175        <Caret Line="75" Column="1" TopLine="58"/>
    11811176      </Position19>
    11821177      <Position20>
    1183         <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
    1184         <Caret Line="18" Column="26" TopLine="1"/>
     1178        <Filename Value="Modules/UMainModule.pas"/>
     1179        <Caret Line="199" Column="1" TopLine="182"/>
    11851180      </Position20>
    11861181      <Position21>
    11871182        <Filename Value="Modules/UMainModule.pas"/>
    1188         <Caret Line="72" Column="40" TopLine="55"/>
     1183        <Caret Line="200" Column="1" TopLine="182"/>
    11891184      </Position21>
    11901185      <Position22>
    11911186        <Filename Value="Modules/UMainModule.pas"/>
    1192         <Caret Line="33" Column="15" TopLine="16"/>
     1187        <Caret Line="74" Column="1" TopLine="57"/>
    11931188      </Position22>
    11941189      <Position23>
    11951190        <Filename Value="Modules/UMainModule.pas"/>
    1196         <Caret Line="290" Column="27" TopLine="265"/>
     1191        <Caret Line="199" Column="1" TopLine="182"/>
    11971192      </Position23>
    11981193      <Position24>
    1199         <Filename Value="CGI.lpr"/>
    1200         <Caret Line="34" Column="7" TopLine="5"/>
     1194        <Filename Value="Modules/UMainModule.pas"/>
     1195        <Caret Line="200" Column="1" TopLine="182"/>
    12011196      </Position24>
     1197      <Position25>
     1198        <Filename Value="Modules/UMainModule.pas"/>
     1199        <Caret Line="74" Column="1" TopLine="57"/>
     1200      </Position25>
     1201      <Position26>
     1202        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UHTTPServerCGI.pas"/>
     1203        <Caret Line="86" Column="1" TopLine="65"/>
     1204      </Position26>
     1205      <Position27>
     1206        <Filename Value="../../PascalClassLibrary/Network/CoolWeb/WebServer/UWebApp.pas"/>
     1207        <Caret Line="75" Column="1" TopLine="57"/>
     1208      </Position27>
     1209      <Position28>
     1210        <Filename Value="Modules/UMainModule.pas"/>
     1211        <Caret Line="75" Column="12" TopLine="57"/>
     1212      </Position28>
     1213      <Position29>
     1214        <Filename Value="Modules/UMainModule.pas"/>
     1215        <Caret Line="199" Column="50" TopLine="197"/>
     1216      </Position29>
     1217      <Position30>
     1218        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericListObject.inc"/>
     1219        <Caret Line="20" Column="14" TopLine="3"/>
     1220      </Position30>
    12021221    </JumpHistory>
    12031222  </ProjectOptions>
     
    12421261  </CompilerOptions>
    12431262  <Debugging>
    1244     <BreakPoints Count="1">
     1263    <BreakPoints Count="2">
    12451264      <Item1>
    12461265        <Kind Value="bpkSource"/>
     
    12481267        <Line Value="91"/>
    12491268      </Item1>
     1269      <Item2>
     1270        <Kind Value="bpkSource"/>
     1271        <Source Value="Modules/UMainModule.pas"/>
     1272        <Line Value="199"/>
     1273      </Item2>
    12501274    </BreakPoints>
    12511275  </Debugging>
  • trunk/CGI.lpr

    r53 r54  
    55uses
    66  UCore, USqlDatabase, SysUtils, Contnrs,
    7   UContactPage, UUser, UHTTPSessionMySQL, UHTTPSessionFile, UPagesModule,
     7  UContactPage, UUser, UHTTPSessionMySQL, UHTTPSessionFile,
    88  UCommon, UHTTPServer, UHTTPServerTCP, UHTTPServerCGI, UTCPServer, UPool,
    99  UMemoryStreamEx, UMIMEType, UPageList, Interfaces, UMainModule, UWebApp,
     
    1212  UNetworkPage, UAboutPage;
    1313
    14 var
    15   Application: TWebApp;
    1614begin
    17   Application := TWebApp.Create(nil);
    1815  with Application do
    1916  try
    2017    Initialize;
     18    MainModule := TMainModule.Create(nil);
     19    MainModule.Run;
    2120    RegisterPage(TInternetPage, InternetPage, 'internet');
    2221    RegisterPage(THostingPage, HostingPage, 'hosting');
     
    3433    Run;
    3534  finally
    36     Free;
     35    MainModule.Free;
    3736  end;
    3837end.
  • trunk/Modules/UMainModule.lfm

    r53 r54  
    55  VerticalOffset = 205
    66  Width = 431
    7   object HTTPServer: THTTPServerCGI
    8     ShowExceptions = False
    9     DocumentRoot = './'
    10     SessionStorage = HTTPSessionStorageMySQL1
    11     OnRequest = HTTPServerRequest
    12     left = 81
    13     top = 32
    14   end
    157  object HTTPSessionStorageMySQL1: THTTPSessionStorageMySQL
    168    Database = Database
  • trunk/Modules/UMainModule.lrs

    r53 r54  
    33LazarusResources.Add('TMainModule','FORMDATA',[
    44  'TPF0'#11'TMainModule'#10'MainModule'#14'OldCreateOrder'#8#6'Height'#3#22#1#16
    5   +'HorizontalOffset'#3#162#1#14'VerticalOffset'#3#205#0#5'Width'#3#175#1#0#14
    6   +'THTTPServerCGI'#10'HTTPServer'#14'ShowExceptions'#8#12'DocumentRoot'#6#2'./'
    7   +#14'SessionStorage'#7#24'HTTPSessionStorageMySQL1'#9'OnRequest'#7#17'HTTPSer'
    8   +'verRequest'#4'left'#2'Q'#3'top'#2' '#0#0#24'THTTPSessionStorageMySQL'#24'HT'
    9   +'TPSessionStorageMySQL1'#8'Database'#7#8'Database'#7'Timeout'#3'0*'#19'Sessi'
    10   +'onIdCookieName'#6#9'SessionId'#4'left'#3'8'#1#3'top'#2#31#0#0#12'TSqlDataba'
    11   +'se'#8'Database'#9'Connected'#8#8'Encoding'#6#4'utf8'#4'left'#2'Q'#3'top'#2
    12   +'V'#0#0#0
     5  +'HorizontalOffset'#3#162#1#14'VerticalOffset'#3#205#0#5'Width'#3#175#1#0#24
     6  +'THTTPSessionStorageMySQL'#24'HTTPSessionStorageMySQL1'#8'Database'#7#8'Data'
     7  +'base'#7'Timeout'#3'0*'#19'SessionIdCookieName'#6#9'SessionId'#4'left'#3'8'#1
     8  +#3'top'#2#31#0#0#12'TSqlDatabase'#8'Database'#9'Connected'#8#8'Encoding'#6#4
     9  +'utf8'#4'left'#2'Q'#3'top'#2'V'#0#0#0
    1310]);
  • trunk/Modules/UMainModule.pas

    r53 r54  
    77uses
    88  Classes, SysUtils, FileUtil, LResources, UHTTPServerCGI, UHTTPSessionMySQL,
    9   UHTTPServer, USqlDatabase, UConfig, DateUtils, UWebPage,
     9  UHTTPServer, USqlDatabase, UConfig, DateUtils, UWebPage, UWebApp,
    1010  UXmlClasses, UHtmlClasses, UCore, UHTTPServerTCP,
    1111  UHTTPSessionFile, UUser, SpecializedList;
    1212
    1313type
    14   TMainModule = class;
    15 
    16   TRegistredPage = class
    17     Name: string;
    18     Page: TWebPage;
    19   end;
    20 
    21   { TRegistredPageList }
    22 
    23   TRegistredPageList = class(TListObject)
    24     function FindByName(Name: string): TRegistredPage;
    25   end;
    26 
    2714  { TMainModule }
    2815
    2916  TMainModule = class(TDataModule)
    30     HTTPServer: THTTPServerCGI;
    3117    HTTPSessionStorageMySQL1: THTTPSessionStorageMySQL;
    3218    Database: TSqlDatabase;
    33     procedure HTTPServerRequest(HandlerData: THTTPHandlerData);
    3419  private
    3520    procedure Footer;
     
    4934    Keywords: string;
    5035    HtmlDocument: THtmlDocument;
    51     Pages: TRegistredPageList;
    5236    PageName: string;
    5337    ModuleName: string;
     
    5539    User: TWebUser;
    5640    UserOnline: TWebOnlineUser;
     41    procedure GeneratePage(HandlerData: THTTPHandlerData; Page: TWebPage);
    5742    procedure Run;
    5843    constructor Create(AOwner: TComponent); override;
    5944    destructor Destroy; override;
    60     procedure RegisterPage(Name: string; Page: TWebPage);
    6145  end;
    6246
     
    6448  MainModule: TMainModule;
    6549
    66  resourcestring
    67   SPageNotFound = 'Page not found';
    68 
    6950
    7051implementation
    7152
    72 { TRegistredPageList }
    73 
    74 function TRegistredPageList.FindByName(Name: string): TRegistredPage;
    75 var
    76   I: Integer;
    77 begin
    78   I := 0;
    79   while (I < Count) and (TRegistredPage(Items[I]).Name <> Name) do Inc(I);
    80   if I < Count then Result := TRegistredPage(Items[I])
    81     else Result := nil;
    82 end;
    83 
    8453{ TMainModule }
    8554
    86 procedure TMainModule.HTTPServerRequest(HandlerData: THTTPHandlerData);
     55procedure TMainModule.GeneratePage(HandlerData: THTTPHandlerData; Page: TWebPage);
    8756var
    8857  I: Integer;
    8958  TitleTag: THtmlString;
    90   Page: TRegistredPage;
    9159begin
    9260  User.HandlerData := HandlerData;
     
    10371    HtmlDocument.Scripts.Add(NavigationLink('/Style/' + Style + '/jquery.js'));
    10472
    105     Request.QueryParts.Count := 2;
    106     Request.QueryParts[0] := 'uzivatel';
    107     Request.QueryParts[1] := 'prihlaseni';
    108 
    109     if Request.QueryParts.Count > 0 then PageName := Request.QueryParts[0]
    110       else PageName := '';
    111     Page := Pages.FindByName(PageName);
    112     if Assigned(Page) then begin
    11373      TitleTag := THtmlString.Create;
    114       HtmlDocument.Body.SubItems.Add(TitleTag);
     74      HtmlDocument.Body.SubItems.Insert(0, TitleTag);
    11575      TopMenu;
    116       Page.Page.OnProduce(HandlerData);
    117       HtmlDocument.Title := Page.Page.Caption;
     76      //Page.Page.OnProduce(HandlerData);
     77      HtmlDocument.Title := Page.Caption;
    11878      TitleTag.Text := '<div class="TitlePanel"><span class="GlobalTitle">' + GlobalTitle +
    11979        '</span> - ' + HtmlDocument.Title + '</div>';
     
    12686        Free;
    12787      end;
    128     end else Response.Stream.WriteString(SPageNotFound);
    129   end;
    130 end;
    131 
    132 procedure TMainModule.RegisterPage(Name: string; Page: TWebPage);
    133 var
    134   NewRegistredPage: TRegistredPage;
    135 begin
    136   NewRegistredPage := TRegistredPage.Create;
    137   NewRegistredPage.Name := Name;
    138   NewRegistredPage.Page := Page;
    139   Pages.Add(NewRegistredPage);
    140 end;
    141 
     88  end;
     89end;
    14290
    14391procedure TMainModule.InitDatabase;
     
    163111begin
    164112  inherited;
    165   Pages := TRegistredPageList.Create;
    166113  HtmlDocument := THtmlDocument.Create;
    167114  User := TWebUser.Create;
     
    174121begin
    175122  HtmlDocument.Free;
    176   Pages.Free;
    177123  User.Free;
    178124  UserOnline.Free;
     
    251197procedure TMainModule.TopMenu;
    252198begin
    253   with THtmlString(HtmlDocument.Body.SubItems.AddNew(THtmlString.Create)) do begin
     199  with THtmlString(HtmlDocument.Body.SubItems.InsertNew(1, THtmlString.Create)) do begin
    254200    Text := '<div class="Navigation">';
    255201    // Visitor
     
    286232begin
    287233  InitDatabase;
    288   MainModule.HTTPServer.ShowExceptions := Config.ShowException;
     234  Application.HTTPServer.ShowExceptions := Config.ShowException;
    289235  //Database.Query('SELECT * FROM ssss');
    290   MainModule.HTTPServer.Run;
    291236end;
    292237
Note: See TracChangeset for help on using the changeset viewer.