| 73 |
er: string; |
er: string; |
| 74 |
foo: string; |
foo: string; |
| 75 |
function footer(const path: string): string; |
function footer(const path: string): string; |
| 76 |
function regist(var com: string): integer; |
procedure regist(var com: string); |
| 77 |
end; |
end; |
| 78 |
|
|
| 79 |
var |
var |
| 87 |
|
|
| 88 |
procedure TWebModule1.DataSetPageProducer2HTMLTag(Sender: TObject; Tag: TTag; |
procedure TWebModule1.DataSetPageProducer2HTMLTag(Sender: TObject; Tag: TTag; |
| 89 |
const TagString: string; TagParams: TStrings; var ReplaceText: string); |
const TagString: string; TagParams: TStrings; var ReplaceText: string); |
| 90 |
|
var |
| 91 |
|
s: TURLEncoding; |
| 92 |
begin |
begin |
| 93 |
ReplaceText := FDTable1.FieldByName(TagString).AsString; |
ReplaceText := FDTable1.FieldByName(TagString).AsString; |
| 94 |
|
if TagString = 'com' then |
| 95 |
|
regist(ReplaceText); |
| 96 |
end; |
end; |
| 97 |
|
|
| 98 |
function TWebModule1.footer(const path: string): string; |
function TWebModule1.footer(const path: string): string; |
| 244 |
ReplaceText := 'checked="checked"'; |
ReplaceText := 'checked="checked"'; |
| 245 |
end; |
end; |
| 246 |
|
|
| 247 |
function TWebModule1.regist(var com: string): integer; |
procedure TWebModule1.regist(var com: string); |
| 248 |
var |
var |
| 249 |
i: integer; |
i: integer; |
| 250 |
begin |
begin |
|
result := 1; |
|
| 251 |
i := 1; |
i := 1; |
| 252 |
while True do |
while True do |
| 253 |
begin |
begin |
| 257 |
Delete(com, i, Length(#$D#$A)); |
Delete(com, i, Length(#$D#$A)); |
| 258 |
Insert('<br>', com, i); |
Insert('<br>', com, i); |
| 259 |
inc(i, 4); |
inc(i, 4); |
|
inc(result); |
|
| 260 |
end; |
end; |
| 261 |
end; |
end; |
| 262 |
|
|
| 408 |
no, line: integer; |
no, line: integer; |
| 409 |
i: integer; |
i: integer; |
| 410 |
s: TResourceStream; |
s: TResourceStream; |
| 411 |
|
t: TURLEncoding; |
| 412 |
begin |
begin |
| 413 |
with Request.ContentFields do |
with Request.ContentFields do |
| 414 |
begin |
begin |
| 426 |
if com = '' then |
if com = '' then |
| 427 |
er := '本文がありません.'#$D#$A |
er := '本文がありません.'#$D#$A |
| 428 |
else |
else |
| 429 |
line := regist(com); |
for i := 1 to Length(com) do |
| 430 |
|
if Copy(com, i, i + 2) = #$D#$A then |
| 431 |
|
inc(line); |
| 432 |
for i := 0 to words.count - 1 do |
for i := 0 to words.count - 1 do |
| 433 |
if ContainsText(AnsiString(com), AnsiString(words[i])) = True then |
if ContainsText(AnsiString(com), AnsiString(words[i])) = True then |
| 434 |
begin |
begin |
| 456 |
end; |
end; |
| 457 |
Exit; |
Exit; |
| 458 |
end; |
end; |
| 459 |
FDTable1.AppendRecord([na, no, DateTimeToStr(Now), sub, com, pass, line]); |
t := TURLEncoding.Create; |
| 460 |
|
try |
| 461 |
|
FDTable1.AppendRecord([na, no, DateTimeToStr(Now), sub, |
| 462 |
|
ReplaceText(ReplaceText(com, '<', t.Encode('<')), '>', t.Encode('>')), |
| 463 |
|
pass, line]); |
| 464 |
|
finally |
| 465 |
|
t.Free; |
| 466 |
|
end; |
| 467 |
with Response.Cookies.Add do |
with Response.Cookies.Add do |
| 468 |
begin |
begin |
| 469 |
path := '/'; |
path := '/'; |