Реферат: HTML и базы данных
var HTMLPath, TemplatesPath, DBAliasName,
iniName,CommonLook,CommonEnd : string;
UserStatus : Integer;
csect : TRTLCriticalSection;
procedure TWebModule1.WebModule1Create(Sender: TObject);
var
ini : TINIFile;
FN: array[0..MAX_PATH- 1] of char;
s1,s2: string;
fs : TFileStream;
bgpath, txtcol, lcol,vcol,acol: string;
begin
GetWindowsDirectory(FN, SizeOf(FN));
s1:= StrPas(fn);
GetModuleFileName(hInstance, FN, SizeOf(FN));
s2 := ExtractFileName(StrPas(fn));
if not (Char(s1[Length(s1)]) in ['/','\']) then AppendStr(s1,'/');
if Pos('.',s2)<>0 then s2 := Copy(s2,1,Pos('.',s2)-1);
iniName := s1+s2+'.ini';
ini := TINIFile.Create(iniName);
HTMLPath := ini.ReadString('Paths','HTMLPath','/test');
TemplatesPath := ini.ReadString('Paths','TemplatesPath',s1);
DBAliasName := ini.ReadString('Paths','DBAliasName','webtest');
if Assigned(WebSession) and WebSession.IsAlias(DBAliasName) then
begin
GroupQuery.DatabaseName := DBAliasName;
StoreQuery.DatabaseName := DBAliasName;
ValidateQuery.DatabaseName := DBAliasName;
end;