Footer.Strings = (
'<input type=submit value='#21066#38500#12377#12427'><input type=submit value='#12522#12475#12483#12488'>'
'</form>'
- '<p style=text-align:center><a href=/index?db=<#database>>'#25147#12427'</a>')
+ '')
Header.Strings = (
'<form action=/admindel method=post>')
MaxRows = 30
end
object footer: TDataSetPageProducer
HTMLDoc.Strings = (
- '<p style=text-align:center>[ <#link> ] <#recent>'
- '')
+ '<p style=text-align:center>[ <#link> ] <#recent>')
DataSet = DataModule1.FDTable1
OnHTMLTag = footerHTMLTag
Left = 112
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
s: string;
- i, max: Integer;
+ i: Integer;
begin
+ admin.MaxRows := DataModule1.FDTable3.FieldByName('count').AsInteger;
s := TNetEncoding.URL.Decode(Request.QueryFields.Values['db']);
DataModule1.FDTable1.Locate('database', s, []);
s := Request.QueryFields.Values['num'];
- max := DataModule1.FDTable3.FieldByName('count').AsInteger;
- index.Tag := -1;
- if s <> '' then
+ i := StrToIntDef(s, -1);
+ pages(DataModule1.FDTable2.RecordCount, i);
+ index.Tag := i;
+ s := '/admin';
+ footer.Tag := Integer(@s);
+ i := footer.HTMLDoc.Add
+ ('<p style=text-align:center><a href=/index?db=<#database>>\96ß\82é</a>');
+ if admin.Tag = 0 then
begin
- index.Tag := s.ToInteger;
- DataModule1.FDTable2.RecNo := (index.Tag - 1) * max - 1;
+ admin.footer.Insert(3, footer.Content);
+ admin.Tag := 1;
end
else
- with DataModule1.FDTable2 do
- RecNo := 1 + RecordCount - RecordCount mod max;
- s := '/admin';
- footer.Tag := Integer(@s);
- if admin.Tag = -1 then
begin
- ss := TStringList.Create;
- try
- ss.Assign(admin.footer);
- ss.Insert(2, footer.HTMLDoc.Text);
- admin.footer.Text := footer.ContentFromString(ss.Text);
- finally
- ss.Free;
- end;
+ admin.footer.Delete(3);
+ admin.footer.Insert(3, footer.Content);
end;
- i := DataModule1.FDTable2.RecNo;
- admin.Tag := i;
- pages(max, i);
- index.Tag := i;
+ footer.HTMLDoc.Delete(i);
Response.ContentType := 'text/html;charset=utf-8';
Response.Content := admin.Content;
end;
DataModule1.FDTable3.AppendRecord
(['\82Æ\82é\82Ë\81`\82Ç\8d\86', '<p style=font-color:gray>\82Æ\82é\82Ë\81`\82Ç\8d\86</p>', false, a, 30]);
end;
- admin.Tag := -1;
end;
end.