Active = True
IndexFieldNames = 'DBNUM'
Connection = FDConnection1
- UpdateOptions.UpdateTableName = 'DBNAME'
- TableName = 'DBNAME'
+ UpdateOptions.UpdateTableName = 'dbname'
+ TableName = 'dbname'
Left = 32
Top = 88
object FDTable1DBNUM: TIntegerField
Connection = FDConnection1
FetchOptions.AssignedValues = [evLiveWindowParanoic]
FetchOptions.LiveWindowParanoic = True
- UpdateOptions.UpdateTableName = 'ARTICLE'
- TableName = 'ARTICLE'
+ UpdateOptions.UpdateTableName = 'article'
+ TableName = 'article'
Left = 96
Top = 88
object FDTable2DBNUM: TIntegerField
object FDTable3: TFDTable
Active = True
Connection = FDConnection1
- UpdateOptions.UpdateTableName = 'SETTING'
- TableName = 'SETTING'
+ UpdateOptions.UpdateTableName = 'setting'
+ TableName = 'setting'
Left = 160
Top = 88
object FDTable3TITLE: TWideStringField
object FDTable4: TFDTable
Active = True
Connection = FDConnection1
- UpdateOptions.UpdateTableName = 'REQ'
- TableName = 'REQ'
+ UpdateOptions.UpdateTableName = 'req'
+ TableName = 'req'
Left = 224
Top = 88
object FDTable4ID: TIntegerField
Active = True
IndexFieldNames = 'ID'
Connection = FDConnection1
- UpdateOptions.UpdateTableName = 'IMAGES'
- TableName = 'IMAGES'
+ UpdateOptions.UpdateTableName = 'images'
+ TableName = 'images'
Left = 224
Top = 144
object FDTable5ID: TIntegerField
object FDQuery1: TFDQuery
Connection = FDConnection1
SQL.Strings = (
- 'select "database", title, name, date from'
- ' dbname inner join article on dbname.dbnum = article.dbnum'
+ 'select dbnum,number,title,date from article'
' where number = 1 order by date;')
Left = 160
Top = 144
const TagString: string; TagParams: TStrings; var ReplaceText: string);
begin
if TagString = 'pr' then
- ReplaceText:=promotion
- else if (TagString = 'mente') and (DataModule1.FDTable3.FieldByName('mente')
- .AsBoolean = true) then
+ ReplaceText := promotion
+ else if (TagString = 'mente') and
+ (DataModule1.FDTable3.FieldByName('mente').AsBoolean = true) then
ReplaceText := 'checked'
else if TagString = 'password' then
ReplaceText := Request.CookieFields.Values['user'];
const TagString: string; TagParams: TStrings; var ReplaceText: string);
begin
if TagString = 'pr' then
- ReplaceText:=promotion;
+ ReplaceText := promotion;
end;
procedure TTWebModule1.indexHTMLTag(Sender: TObject; Tag: TTag;
const TagString: string; TagParams: TStrings; var ReplaceText: string);
begin
if TagString = 'pr' then
- ReplaceText:=promotion;
+ ReplaceText := promotion;
end;
procedure TTWebModule1.masterHTMLTag(Sender: TObject; Tag: TTag;
const TagString: string; TagParams: TStrings; var ReplaceText: string);
begin
if TagString = 'pr' then
- Replacetext:=promotion
+ ReplaceText := promotion
else if TagString = 'request' then
with DataModule1.FDTable4 do
begin
begin
if TagString = 'pr' then
- ReplaceText:=promotion
+ ReplaceText := promotion
else if (Request.MethodType = mtPost) and (TagString = 'items') then
begin
if Request.ContentFields.Values['type'] = 'OR' then
begin
if TagString = 'count' then
begin
- DataModule1.FDTable1.Locate('database',
- DataModule1.FDQuery1.FieldByName('database').AsString);
+ DataModule1.FDTable1.Locate('dbnum',
+ DataModule1.FDQuery1.FieldByName('dbnum').AsInteger);
ReplaceText := DataModule1.FDTable2.RecordCount.ToString;
- end;
+ end
+ else if TagString = 'database' then
+ ReplaceText := DataModule1.FDTable1.Lookup('dbnum',
+ DataModule1.FDQuery1.FieldByName('dbnum').AsInteger, 'database');
end;
procedure TTWebModule1.titleHTMLTag(Sender: TObject; Tag: TTag;
const TagString: string; TagParams: TStrings; var ReplaceText: string);
begin
if TagString = 'pr' then
- ReplaceText:=promotion
+ ReplaceText := promotion
else if TagString = 'js' then
ReplaceText := detail(TagString, TagParams.Values['id'])
- else
+ else if TagString = 'main' then
with DataModule1.FDQuery1 do
begin
Open;
Name := 'user';
Value := Request.ContentFields.Values['password'];
Expires := Now + 14;
- // Secure := true;
+ Secure := true;
end;
i := DataModule1.FDTable1.Lookup('database',
Request.ContentFields.Values['record'], 'dbnum');