6 Windows, Messages, SysUtils, Classes, {Graphics,} Controls, {Forms,}
7 ComCtrls, IniFiles, ShellAPI, Math, GikoSystem,
15 {HttpApp,} YofUtils, {URLMon,} BoardGroup, {gzip,} {Dolib,}
16 {bmRegExp,} AbonUnit, MojuUtils, Setting,
17 ExternalBoardManager, ExternalBoardPlugInMain{,}
18 {Sort,} ,GikoBayesian, HintWindow;
22 PResLinkRec = ^TResLinkRec;
28 THTMLCreate = class(TObject)
32 pURLCHARs,pURLCHARe : PChar;
33 pANCHORs, pANCHORe : PChar;
34 pCTAGLs, pCTAGLe : PChar;
35 pCTAGUs, pCTAGUe : PChar;
36 pREF_MARKSs : array[0..9] of PChar;
37 pREF_MARKSe : array[0..9] of PChar;
40 function AddBeProfileLink(AID : string; ANum: Integer):string ;
41 procedure CreateUsePluginHTML(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
42 procedure CreateUseSKINHTML(doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList);
43 procedure CreateUseCSSHTML(doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
44 procedure CreateDefaultHTML (doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
45 procedure ConvertResAnchor(PRes: PResRec);
46 procedure separateNumber(var st: String; var et: String; const Text, Separator: String);
47 function checkComma(const s : String; var j : Integer; var No : String) : boolean;
48 function addResAnchor(PAddRes: PResRec; PResLink : PResLinkRec; dat : boolean;
49 var s : String; j : Integer; const No: String) : string;
52 procedure AddAnchorTag(PRes: PResRec);
53 function LoadFromSkin(fileName: string; ThreadItem: TThreadItem; SizeByte: Integer): string;
54 function SkinedRes(const skin: string; PRes: PResRec; const No: string): string;
55 procedure ConvRes( PRes : PResRec; PResLink : PResLinkRec; DatToHTML: boolean = false); overload;
56 function ConvRes(const Body, Bbs, Key, ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue : string; DatToHTML: boolean = false): string; overload;
57 procedure CreateHTML2(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
58 procedure CreateHTML3(var html: TStringList; ThreadItem: TThreadItem; var sTitle: string);
59 //
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\82Ì
\8dì
\90¬
60 procedure SetResPopupText(Hint :TResPopup; threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
61 //
\83\8a\83\93\83N
\82Ì
\95¶
\8e\9a\97ñ
\82©
\82ç
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
\82ÌURL
\82É
\95Ï
\8a·
\82·
\82é
62 class function GetRespopupURL(AText, AThreadURL : string): string;
63 //
\8ew
\92è
\82µ
\82½
\83p
\83X
\82É
\83X
\83L
\83\93\82à
\82µ
\82
\82ÍCSS
\82Ì
\83t
\83@
\83C
\83\8b\82Ì
\83R
\83s
\81[
\82ð
\8dì
\82é
64 class procedure SkinorCSSFilesCopy(path: string);
65 //dat
\82P
\8ds
\82ð
\83\8c\83X
\82É
\95ª
\89ð
\82·
\82é
66 class procedure DivideStrLine(Line: string; PRes: PResRec);
70 HTMLCreater: THTMLCreate;
75 URL_CHAR: string = '0123456789'
76 + 'abcdefghijklmnopqrstuvwxyz'
77 + 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
78 + '#$%&()*+,-./:;=?@[]^_`{|}~!''\';
83 REF_MARK: array[0..9] of string = ('http://', 'ttp://', 'tp://',
84 'ms-help://','p://', 'https://',
85 'www.', 'ftp://','news://','rtsp://');
87 constructor THTMLCreate.Create;
91 // + 3
\82Í 'href="' ('"'
\82Â
\82«)
\82È
\82Ç
\82Ì
\83o
\83\8a\83G
\81[
\83V
\83\87\83\93\82É
\97]
\97T
\82ð
\8e\9d\82½
\82¹
\82é
\82½
\82ß
92 anchorLen := Length( ANCHOR_REF ) + 3;
93 pANCHORs := PChar(ANCHOR_REF);
94 pANCHORe := pANCHORs + Length(ANCHOR_REF);
95 pURLCHARs := PChar(URL_CHAR);
96 pURLCHARe := pURLCHARs + Length(URL_CHAR);
97 pCTAGLs := PChar(CLOSE_TAGAL);
98 pCTAGLe := pCTAGLs + 4;
99 pCTAGUs := PChar(CLOSE_TAGAU);
100 pCTAGUe := pCTAGUs + 4;
101 for j := 0 to 9 do begin
102 pREF_MARKSs[j] := PChar(REF_MARK[j]);
103 pREF_MARKSe[j] := pREF_MARKSs[j] + Length(REF_MARK[j]);
106 //
\83X
\83L
\83\93\82ð
\93Ç
\82Ý
\8d\9e\82Ý
\81A
\92l
\82ð
\92u
\8a·
\82·
\82é
107 function THTMLCreate.LoadFromSkin(
109 ThreadItem: TThreadItem;
116 Skin := TStringList.Create;
118 if FileExists( fileName ) then begin
119 Skin.LoadFromFile( fileName );
121 //
\82â
\82è
\82©
\82½
\82ª
\8bê
\82µ
\82¢
\82¯
\82Ç
\81A
\83I
\83v
\83V
\83\87\83\93\83_
\83C
\83A
\83\8d\83O
\82Ì
\83v
\83\8c\83r
\83\85\81[
\97p try
123 if ThreadItem.ParentBoard <> nil then
124 if ThreadItem.ParentBoard.ParentCategory <> nil then
125 CustomStringReplace( Skin, '<BBSNAME/>', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title);
126 CustomStringReplace( Skin, '<THREADURL/>', ThreadItem.URL);
128 CustomStringReplace( Skin, '<BOARDNAME/>', ThreadItem.ParentBoard.Title);
129 CustomStringReplace( Skin, '<BOARDURL/>', ThreadItem.ParentBoard.URL);
130 CustomStringReplace( Skin, '<THREADNAME/>', ThreadItem.Title);
131 CustomStringReplace( Skin, '<SKINPATH/>', GikoSys.Setting.CSSFileName);
132 CustomStringReplace( Skin, '<GETRESCOUNT/>', IntToStr( ThreadItem.Count - ThreadItem.NewResCount ));
133 CustomStringReplace( Skin, '<NEWRESCOUNT/>', IntToStr( ThreadItem.NewResCount ));
134 CustomStringReplace( Skin, '<ALLRESCOUNT/>', IntToStr( ThreadItem.Count ));
136 CustomStringReplace( Skin, '<NEWDATE/>',FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate));
137 CustomStringReplace( Skin, '<SIZEKB/>', IntToStr( Floor( SizeByte / 1024 ) ));
138 CustomStringReplace( Skin, '<SIZE/>', IntToStr( SizeByte ));
140 //-----
\82Æ
\82è
\82 \82¦
\82¸
\82©
\82¿
\82ã
\81`
\82µ
\82á
\8cÝ
\8a·
\97p
\81B
\83R
\83\81\83\93\83g
\83A
\83E
\83g
\82µ
\82Ä
\82à
\82æ
\82µ
141 //
\82â
\82è
\82©
\82½
\82ª
\8bê
\82µ
\82¢
\82¯
\82Ç
\81A
\83I
\83v
\83V
\83\87\83\93\83_
\83C
\83A
\83\8d\83O
\82Ì
\83v
\83\8c\83r
\83\85\81[
\97p try
142 if GikoSys.Setting.UseKatjushaType then begin
144 if ThreadItem.ParentBoard <> nil then
145 if ThreadItem.ParentBoard.ParentCategory <> nil then
146 CustomStringReplace( Skin, '&BBSNAME', ThreadItem.ParentBoard.ParentCategory.ParenTBBS.Title);
147 CustomStringReplace( Skin, '&THREADURL', ThreadItem.URL);
149 CustomStringReplace( Skin, '&BOARDNAME', ThreadItem.ParentBoard.Title);
150 CustomStringReplace( Skin, '&BOARDURL', ThreadItem.ParentBoard.URL);
151 CustomStringReplace( Skin, '&THREADNAME', ThreadItem.Title);
152 CustomStringReplace( Skin, '&SKINPATH', GikoSys.Setting.CSSFileName);
153 CustomStringReplace( Skin, '&GETRESCOUNT', IntToStr( ThreadItem.NewReceive - 1 ));
154 CustomStringReplace( Skin, '&NEWRESCOUNT', IntToStr( ThreadItem.NewResCount ));
155 CustomStringReplace( Skin, '&ALLRESCOUNT', IntToStr( ThreadItem.AllResCount ));
157 CustomStringReplace( Skin, '&NEWDATE', FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate));
158 CustomStringReplace( Skin, '&SIZEKB', IntToStr( Floor( SizeByte / 1024 ) ));
159 CustomStringReplace( Skin, '&SIZE', IntToStr( SizeByte ));
161 //-----
\82±
\82±
\82Ü
\82Å
169 //
\83\8c\83X
\82Ì
\92l
\82ð
\92u
\8a·
\82·
\82é
170 function THTMLCreate.SkinedRes(
176 FORMT_NAME = '<b>%s</b>';
177 FORMT_NUM = '<a href="menu:%s" name="%s">%s</a>';
178 FORMT_MAILNAME = '<a href="mailto:%s"><b>%s</b></a>';
180 spamminess : Extended;
181 {$IFDEF SPAM_FILTER_ENABLED}
182 wordCount : TWordCount;
185 {$IFDEF SPAM_FILTER_ENABLED}
186 wordCount := TWordCount.Create;
188 spamminess := Floor( GikoSys.SpamParse(
189 Res.FName + '<>' + Res.FMailTo + '<>' + Res.FBody, wordCount ) * 100 );
193 Result := CustomStringReplace( skin, '<SPAMMINESS/>', FloatToStr( spamminess ) );
194 Result := CustomStringReplace( Result, '<NONSPAMMINESS/>', FloatToStr( 100 - spamminess ) );
195 Result := CustomStringReplace( Result, '<MAIL/>', PRes.FMailTo);
196 Result := CustomStringReplace( Result, '<DATE/>', PRes.FDateTime);
197 Result := CustomStringReplace( Result, '<PLAINNUMBER/>', No);
198 Result := CustomStringReplace( Result, '<NAME/>',
199 Format(FORMT_NAME, [PRes.FName]));
200 Result := CustomStringReplace( Result, '<NUMBER/>',
201 Format(FORMT_NUM, [No, No, No]));
202 Result := CustomStringReplace( Result, '<MAILNAME/>',
203 Format(FORMT_MAILNAME,[PRes.FMailTo, PRes.FName]));
204 Result := CustomStringReplace( Result, '<MESSAGE/>', PRes.FBody);
206 //-----
\82©
\82¿
\82ã
\81`
\82µ
\82á
\8cÝ
\8a·
\97p
\81B
\83R
\83\81\83\93\83g
\83A
\83E
\83g
\82µ
\82Ä
\82à
\82æ
\82µ
207 if GikoSys.Setting.UseKatjushaType then begin
208 Result := CustomStringReplace( Result, '&NUMBER',
209 '<a href="menu:' + No + '" name="' + No + '">' + No + '</a>');
210 Result := CustomStringReplace( Result, '&PLAINNUMBER', No);
211 Result := CustomStringReplace( Result, '&NAME', '<b>' + PRes.FName + '</b>');
212 Result := CustomStringReplace( Result, '&MAILNAME',
213 '<a href="mailto:' + PRes.FMailTo + '"><b>' + PRes.FName + '</b></a>');
214 Result := CustomStringReplace( Result, '&MAIL', PRes.FMailTo);
215 Result := CustomStringReplace( Result, '&DATE', PRes.FDateTime);
216 Result := CustomStringReplace( Result, '&MESSAGE', PRes.FBody);
217 Result := CustomStringReplace( Result, '&SPAMMINESS', FloatToStr( spamminess ) );
218 Result := CustomStringReplace( Result, '&NONSPAMMINESS', FloatToStr( 100 - spamminess ) );
220 //-----
\82±
\82±
\82Ü
\82Å
221 {$IFDEF SPAM_FILTER_ENABLED}
228 (*************************************************************************
229 *http://
\82Ì
\95¶
\8e\9a\97ñ
\82ðanchor
\83^
\83O
\95t
\82«
\82É
\82·
\82é
\81B
230 *************************************************************************)
231 procedure THTMLCreate.AddAnchorTag(PRes: PResRec);
233 _HEAD : array[0..9] of String =
234 ('', 'h', 'ht', '', 'htt', '', 'http://', '', '', '');
249 //while True do begin
254 pe := pp + Length(s);
256 for j := 0 to 9 do begin
257 pos := AnsiStrPosEx(pp, pe, pREF_MARKSs[j], pREF_MARKSe[j]);
258 if pos <> nil then begin
260 idx := Min(tmp, idx);
261 if idx = tmp then idx2 := j; //
\82Ç
\82Ì
\83}
\81[
\83N
\82Å
\88ø
\82Á
\82©
\82©
\82Á
\82½
\82©
\82ð
\95Û
\91¶
265 if idx = MaxInt then begin
266 //
\83\8a\83\93\83N
\82ª
\96³
\82¢
\82æ
\81B
267 len := Length(PRes.FBody);
268 SetLength(PRes.FBody, Length(s) + len);
269 Move(pp^, PRes.FBody[len + 1], Length(s));
271 if (idx > anchorLen) and
272 (AnsiStrPosEx(pp + idx - 1 - anchorLen, pp + idx, pANCHORs, pANCHORe) <> nil) then begin
273 //
\8aù
\82É
\83\8a\83\93\83N
\83^
\83O
\82ª
\82Â
\82¢
\82Ä
\82¢
\82é
\82Á
\82Û
\82¢
\82Æ
\82«
\82Í
\83\80\83V
274 //</a></A>
\82ð
\92T
\82·
\81A
\8f¬
\95¶
\8e\9a\82Å
\8c©
\82Â
\82©
\82ç
\82È
\82¯
\82ê
\82Î
\91å
\95¶
\8e\9a\82Å
\8c\9f\8dõ
275 pos := AnsiStrPosEx(pp + idx, pe, pCTAGLs, pCTAGLe);
277 pos := AnsiStrPosEx(pp + idx, pe, pCTAGUs, pCTAGUe);
279 b := Length(REF_MARK[idx2])
283 len := Length(PRes.FBody);
284 SetLength(PRes.FBody, len + idx + b);
285 Move(pp^, PRes.FBody[len + 1], idx + b);
286 Delete(s, 1, idx + b);
289 len := Length(PRes.FBody);
290 SetLength(PRes.FBody, len + idx - 1);
291 Move(pp^, PRes.FBody[len + 1], idx - 1);
293 Delete(s, 1, idx - 1);
294 b := Length( s ) + 1;
296 for i := 1 to b do begin
297 //
\82P
\83o
\83C
\83g
\95¶
\8e\9a\82ÅURL
\82É
\8eg
\82¦
\82È
\82¢
\95¶
\8e\9a\82È
\82ç
298 if (AnsiStrPosEx(pURLCHARs, pURLCHARe, pp, pp + 1) = nil) then begin
299 url := Copy(s, 1, i - 1);
301 href := Format('%s%s', [_HEAD[idx2], url]);
303 := Format('%s<a href="%s" target="_blank">%s</a>', [PRes.FBody, href, url]);
306 //
\88ê
\95¶
\8e\9a\90i
\82ß
\82é
\81B
314 //
\88ø
\90\94\81AAID
\81F
\91Î
\8fÛ
\82Æ
\82È
\82é
\93ú
\95tID
\95¶
\8e\9a\97ñ
\81AANum:
\83\8c\83X
\94Ô AURL
\81F
\82»
\82Ì
\83X
\83\8c\83b
\83h
\82ÌURL
315 function THTMLCreate.AddBeProfileLink(AID : string; ANum: Integer):string ;
317 BE_MARK : string = 'BE:';
320 BNum, BMark : string;
322 p := AnsiPos(BE_MARK, AnsiUpperCase(AID));
324 BNum := Copy(AID, p, Length(AID));
325 AID := Copy(AID, 1, p - 1);
326 p := AnsiPos('-', BNum);
328 BMark := '?' + Trim(Copy(BNum, p + 1, Length(BNum)));
329 BNum := Copy(BNum, 1, p - 1);
332 Result := AID + ' <a href="' + BNum + '/' + IntToStr(ANum)
333 + '" target=_blank>' + BMark + '</a>';
337 procedure THTMLCreate.separateNumber(var st: String; var et: String; const Text:String; const Separator: String);
341 p := Pos(Separator,Text);
342 if (p > 0 ) then begin
343 st := Copy(Text, 1, p - 1);
344 et := Copy(Text, p + Length(Separator), Length(Text));
350 procedure THTMLCreate.ConvRes( PRes : PResRec; PResLink : PResLinkRec; DatToHTML: boolean = false);
354 //
\8c\9f\8dõ
\91Î
\8fÛ
\82Ì
\95¶
\8e\9a\97ñ
\8cS
355 TOKEN : array[0..5] of string = (GT+GT, GT, '
\81\84\81\84', '
\81\84', '<a ', '<A ');
370 procedure getNumberString;
372 while (j <= len) do begin
373 if (ByteType(s, j) = mbSingleByte) then begin
380 ch := ZenToHan(Copy(s, j, 2));
385 if System.Pos(ch, SN) > 0 then begin
387 end else if (ch = '-') then begin
389 if No = '' then break;
399 //s
\82É
\96{
\95¶
\82ð
\91S
\95\94\93ü
\82ê
\82é
401 //
\8c\8b\89Ê
\82ð
\83N
\83\8a\83A
405 while Length(s) > 2 do begin
406 pmin := Length(s) + 1;
408 for j := 0 to 5 do begin
409 pos := AnsiPos(TOKEN[j], s);
410 if pos <> 0 then begin
411 if pos < pmin then begin
412 //
\82Ç
\82ê
\82Å
\83q
\83b
\83g
\82µ
\82½
\82©
\95Û
\91¶
414 //
\8dÅ
\8f¬
\92l
\82ð
\8dX
\90V
420 //
\83q
\83b
\83g
\82µ
\82½
\95¶
\8e\9a\97ñ
\82Ì
\88ê
\82Â
\8eè
\91O
\82Ü
\82Å
\8c\8b\89Ê
\82É
\83R
\83s
\81[
421 PRes.FBody := PRes.FBody + Copy(s, 1, pmin - 1);
422 Delete(s, 1, pmin - 1);
425 //
\83q
\83b
\83g
\82È
\82µ
426 end else if (i = 4) or (i = 5) then begin
427 //'<a ' or '<A'
\82Å
\83q
\83b
\83g '</a>' or '</A>'
\82Ü
\82Å
\83R
\83s
\81[
428 pmin := AnsiPos('</a>' , s);
429 pos := AnsiPos('</A>' , s);
430 if (pmin <> 0) and (pos <> 0) then begin
431 if (pmin > pos) then begin
434 end else if (pos <> 0) then begin
437 rink := Copy(s, 1, pmin + 3);
438 PRes.FBody := PRes.FBody + rink;
439 Delete(s, 1, pmin + 3);
441 pmin := Length(rink);
443 for j := 0 to 3 do begin
444 pos := AnsiPos(TOKEN[j], rink);
445 if pos <> 0 then begin
446 if pos < pmin then begin
447 //
\82Ç
\82ê
\82Å
\83q
\83b
\83g
\82µ
\82½
\82©
\95Û
\91¶
449 //
\8dÅ
\8f¬
\92l
\82ð
\8dX
\90V
454 //
\83\8c\83X
\83A
\83\93\83J
\81[
\82ª
\8aÜ
\82Ü
\82ê
\82Ä
\82¢
\82½
\82ç,
\82ª
\91±
\82
\8cÀ
\82è
\83A
\83\93\83J
\81[
\82Æ
\82µ
\82Ä
\88µ
\82¤
459 cm := checkComma(s, j, No);
467 //
\8fI
\92[
\82Ü
\82Å
\8ds
\82Á
\82Ä
\82Ì
\8fI
\97¹
\82©
\83`
\83F
\83b
\83N
468 if j <= len then begin
469 if db then j := j - 2
472 addResAnchor(PRes, PResLink, DatToHTML, s, j, No);
475 cm := checkComma(s, j, No);
479 //
\89½
\82©
\82µ
\82ç
\8c©
\82Â
\82©
\82Á
\82½
\83p
\83^
\81[
\83\93
480 j := Length(TOKEN[i]) + 1;
487 //
\8fI
\92[
\82Ü
\82Å
\8ds
\82Á
\82Ä
\82Ì
\8fI
\97¹
\82©
\83`
\83F
\83b
\83N
488 if j <= len then begin
489 if db then j := j - 2
492 addResAnchor(PRes, PResLink, DatToHTML, s, j, No);
495 if Length(s) > 0 then begin
496 PRes.FBody := PRes.FBody + s;
499 function THTMLCreate.checkComma(
505 bType : TMbcsByteType;
507 bType := ByteType(s, j);
508 if ((bType = mbSingleByte) and (s[j] = ',') or
509 ((bType = mbLeadByte) and (ZenToHan(Copy(s, j ,2)) = ','))) then begin
511 if (bType = mbSingleByte) then
520 function THTMLCreate.addResAnchor(
521 PAddRes: PResRec; PResLink : PResLinkRec; dat : boolean;
522 var s : String; j : Integer; const No: String) : string;
524 FORMAT_LINK = '<a href="../test/read.cgi?bbs=%s&key=%s&st=%s&to=%s&nofirst=true" target="_blank">';
529 //
\89½
\82à
\90\94\8e\9a\82ª
\8c©
\82Â
\82©
\82ç
\82È
\82¢
\82Æ
\82«
530 if No = '' then begin
531 PAddRes.FBody := PAddRes.FBody + Copy(s, 1, j - 1);
533 separateNumber(st, et, No, '-');
535 if not dat then begin
536 PAddRes.FBody := PAddRes.FBody +
537 Format(FORMAT_LINK, [PResLink.FBbs, PResLink.FKey, st, et]);
539 PAddRes.FBody := PAddRes.FBody + Format('<a href="#%s">', [st]);
541 PAddRes.FBody := PAddRes.FBody + Copy(s, 1, j - 1) + '</a>';
546 (*************************************************************************
549 *************************************************************************)
550 function THTMLCreate.ConvRes(const Body, Bbs, Key,
551 ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue : string;
552 DatToHTML: boolean = false): string;
556 FORMAT_LINK = '<a href="../test/read.cgi?%s=%s&%s=%s&%s=%s&%s=%s&%s=%s" target="_blank">';
557 //
\8c\9f\8dõ
\91Î
\8fÛ
\82Ì
\95¶
\8e\9a\97ñ
\8cS
558 TOKEN : array[0..5] of string = (GT+GT, GT, '
\81\84\81\84', '
\81\84', '<a ', '<A ');
572 function addResAnchor(const Left :string) : string;
576 //
\8fI
\92[
\82Ü
\82Å
\8ds
\82Á
\82Ä
\82Ì
\8fI
\97¹
\82©
\83`
\83F
\83b
\83N
577 if j <= len then begin
578 if db then j := j - 2
581 //
\89½
\82à
\90\94\8e\9a\82ª
\8c©
\82Â
\82©
\82ç
\82È
\82¢
\82Æ
\82«
582 if No = '' then begin
583 Result := Left + Copy(s, 1, j - 1);
585 separateNumber(st, et, No, '-');
587 if not DatToHTML then begin
588 Result := Left + Format(FORMAT_LINK,
589 [ParamBBS, Bbs, ParamKey, Key, ParamStart, st, ParamTo, et, ParamNoFirst, ParamTrue]);
591 Result := Left + Format('<a href="#%s">', [st]);
593 Result := Result + Copy(s, 1, j - 1) + '</a>';
598 procedure getNumberString;
600 while (j <= len) do begin
601 if (ByteType(s, j) = mbSingleByte) then begin
608 ch := ZenToHan(Copy(s, j, 2));
613 if System.Pos(ch, SN) > 0 then begin
615 end else if (ch = '-') then begin
617 if No = '' then break;
626 function checkComma : boolean;
630 if ((len > 0) and (s[j] = ',')) or ((len > 1) and (ZenToHan(Copy(s, j ,2)) = ',')) then begin
632 if (ByteType(s, j) = mbSingleByte) then
642 //s
\82É
\96{
\95¶
\82ð
\91S
\95\94\93ü
\82ê
\82é
644 //
\8c\8b\89Ê
\82ð
\83N
\83\8a\83A
648 while Length(s) > 2 do begin
649 pmin := Length(s) + 1;
651 for j := 0 to 5 do begin
652 pos := AnsiPos(TOKEN[j], s);
653 if pos <> 0 then begin
654 if pos < pmin then begin
655 //
\82Ç
\82ê
\82Å
\83q
\83b
\83g
\82µ
\82½
\82©
\95Û
\91¶
657 //
\8dÅ
\8f¬
\92l
\82ð
\8dX
\90V
663 //
\83q
\83b
\83g
\82µ
\82½
\95¶
\8e\9a\97ñ
\82Ì
\88ê
\82Â
\8eè
\91O
\82Ü
\82Å
\8c\8b\89Ê
\82É
\83R
\83s
\81[
664 Result := Result + Copy(s, 1, pmin - 1);
665 Delete(s, 1, pmin - 1);
668 //
\83q
\83b
\83g
\82È
\82µ
669 end else if (i = 4) or (i = 5) then begin
670 //'<a ' or '<A'
\82Å
\83q
\83b
\83g '</a>' or '</A>'
\82Ü
\82Å
\83R
\83s
\81[
671 pmin := AnsiPos('</a>' , s);
672 pos := AnsiPos('</A>' , s);
673 if (pmin <> 0) and (pos <> 0) then begin
674 if (pmin > pos) then begin
677 end else if (pos <> 0) then begin
680 rink := Copy(s, 1, pmin + 3);
681 Result := Result + rink;
682 Delete(s, 1, pmin + 3);
684 pmin := Length(rink);
686 for j := 0 to 3 do begin
687 pos := AnsiPos(TOKEN[j], rink);
688 if pos <> 0 then begin
689 if pos < pmin then begin
690 //
\82Ç
\82ê
\82Å
\83q
\83b
\83g
\82µ
\82½
\82©
\95Û
\91¶
692 //
\8dÅ
\8f¬
\92l
\82ð
\8dX
\90V
697 //
\83\8c\83X
\83A
\83\93\83J
\81[
\82ª
\8aÜ
\82Ü
\82ê
\82Ä
\82¢
\82½
\82ç,
\82ª
\91±
\82
\8cÀ
\82è
\83A
\83\93\83J
\81[
\82Æ
\82µ
\82Ä
\88µ
\82¤
708 Result := addResAnchor(Result);
713 //
\89½
\82©
\82µ
\82ç
\8c©
\82Â
\82©
\82Á
\82½
\83p
\83^
\81[
\83\93
714 j := Length(TOKEN[i]) + 1;
721 Result := addResAnchor(Result);
724 Result := Result + s;
727 procedure THTMLCreate.ConvertResAnchor(PRes: PResRec);
729 _HEAD : string = '<a href="../';
730 _TAIL : string = ' target="_blank">';
731 _ST: string = '&st=';
732 _TO: string = '&to=';
733 _STA: string = '&START=';
734 _END: string = '&END=';
742 i := AnsiPos(_HEAD, res);
743 while i <> 0 do begin
744 PRes.FBody := PRes.FBody + Copy(res, 1, i -1);
745 Delete(res, 1, i - 1);
746 j := AnsiPos(_TAIL, res);
748 PRes.FBody := PRes.FBody + res;
751 tmp := Copy(res, 1, j - 1);
752 Delete(res, 1, j + 16);
753 if (AnsiPos(_ST, tmp) <> 0) and (AnsiPos(_TO, tmp) <> 0) then begin
754 Delete(tmp, 1, AnsiPos(_ST, tmp) + 3);
755 Delete(tmp, AnsiPos(_TO, tmp), Length(tmp));
756 PRes.FBody := PRes.FBody + '<a href="#' + tmp + '">';
757 end else if (AnsiPos(_STA, tmp) <> 0) and (AnsiPos(_END, tmp) <> 0) then begin
758 Delete(tmp, 1, AnsiPos(_STA, tmp) + 6);
759 Delete(tmp, AnsiPos(_END, tmp), Length(tmp));
760 PRes.FBody := PRes.FBody + '<a href="#' + tmp + '">';
762 k := LastDelimiter('/', tmp);
764 if AnsiPos('-', tmp) < AnsiPos('"', tmp) then
765 Delete(tmp, AnsiPos('-', tmp), Length(tmp))
767 Delete(tmp, AnsiPos('"', tmp), Length(tmp));
769 PRes.FBody := PRes.FBody + '<a href="#' + tmp + '">';
771 i := AnsiPos(_HEAD, res);
773 PRes.FBody := PRes.FBody + res;
777 //Plugin
\82ð
\97\98\97p
\82·
\82éBoard
\82Ì
\83X
\83\8c\83b
\83h
\82ÌHTML
\82ð
\8dì
\90¬
\82µ
\82Ädoc
\82É
\8f\91\82«
\8d\9e\82Þ
778 procedure THTMLCreate.CreateUsePluginHTML(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
781 NewReceiveNo: Integer;
782 boardPlugIn : TBoardPlugIn;
783 UserOptionalStyle: string;
785 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
786 boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn;
787 NewReceiveNo := ThreadItem.NewReceive;
788 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
789 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
793 doc.Write( boardPlugIn.GetHeader( DWORD( threadItem ),
794 '<style type="text/css">body {' + UserOptionalStyle + '}</style>' ));
795 doc.Write('<p id="idSearch"></p>');
797 for i := 0 to threadItem.Count - 1 do begin
798 // 1
\82Í
\95K
\82¸
\95\
\8e¦
800 //
\95\
\8e¦
\94Í
\88Í
\82ð
\8cÀ
\92è
801 case GikoSys.ResRange of
803 if ThreadItem.Kokomade > (i + 1) then
806 if NewReceiveNo > (i + 1) then
809 if (threadItem.Count - i) > GikoSys.ResRange then
814 //
\90V
\92\85\83}
\81[
\83N
815 if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin
817 if GikoSys.Setting.UseSkin then begin
818 if FileExists( GikoSys.GetSkinNewmarkFileName ) then
819 doc.Write( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ))
821 doc.Write( '<a name="new"></a>');
822 end else if GikoSys.Setting.UseCSS then begin
823 doc.Write('<a name="new"></a><div class="new">
\90V
\92\85\83\8c\83X <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>');
826 doc.Write('<a name="new"></a>');
827 doc.Write('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>
\90V
\92\85\83\8c\83X ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
831 doc.Write( '<a name="new"></a>');
836 doc.Write( boardPlugIn.GetRes( DWORD( threadItem ), i + 1 ));
838 if ThreadItem.Kokomade = (i + 1) then begin
839 //
\82±
\82±
\82Ü
\82Å
\93Ç
\82ñ
\82¾
841 if GikoSys.Setting.UseSkin then begin
842 if FileExists( GikoSys.GetSkinBookmarkFileName ) then
843 doc.Write( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ) + #13#10 )
845 doc.Write( '<a name="koko"></a>');
846 end else if GikoSys.Setting.UseCSS then begin
847 doc.Write('<a name="koko"></a><div class="koko">
\83R
\83R
\82Ü
\82Å
\93Ç
\82ñ
\82¾</div>');
850 doc.Write('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>
\83R
\83R
\82Ü
\82Å
\93Ç
\82ñ
\82¾</b></font></td></tr></table>');
854 doc.Write( '<a name="koko"></a>');
860 //
\83X
\83L
\83\93(
\83t
\83b
\83^)
861 doc.Write( boardPlugIn.GetFooter( DWORD( threadItem ), '<a name="bottom"></a>' ));
868 procedure THTMLCreate.CreateUseSKINHTML(doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList);
870 KOKO_TAG = '<a name="koko"></a>';
871 NEW_TAG = '<a name="new"></a>';
874 NewReceiveNo: Integer;
876 UserOptionalStyle: string;
881 ResLink :TResLinkRec;
883 NewReceiveNo := ThreadItem.NewReceive;
884 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
885 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
886 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
887 ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
888 ResLink.FKey := ThreadName;
892 doc.charset := 'Shift_JIS';
894 //
\83X
\83L
\83\93\82Ì
\90Ý
\92è
896 SkinHeader := LoadFromSkin( GikoSys.GetSkinHeaderFileName, ThreadItem, ThreadItem.Size);
897 if Length( UserOptionalStyle ) > 0 then
898 SkinHeader := CustomStringReplace( SkinHeader, '</head>',
899 '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>');
900 doc.Write( SkinHeader );
904 SkinNewRes := LoadFromSkin( GikoSys.GetSkinNewResFileName, ThreadItem, ThreadItem.Size);
905 SkinRes := LoadFromSkin( GikoSys.GetSkinResFileName, ThreadItem, ThreadItem.Size );
907 doc.Write('<p id="idSearch"></p>'#13#10'<a name="top"></a>');
909 for i := 0 to ReadList.Count - 1 do begin
910 // 1
\82Í
\95K
\82¸
\95\
\8e¦
912 //
\95\
\8e¦
\94Í
\88Í
\82ð
\8cÀ
\92è
913 case GikoSys.ResRange of
915 if ThreadItem.Kokomade > (i + 1) then
918 if NewReceiveNo > (i + 1) then
921 if (threadItem.Count - i) > GikoSys.ResRange then
926 //
\90V
\92\85\83}
\81[
\83N
927 if (NewReceiveNo = i + 1) or ((NewReceiveNo = 0) and (i = 0)) then begin
928 if FileExists( GikoSys.GetSkinNewmarkFileName ) then
929 doc.Write( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ))
931 doc.Write( NEW_TAG );
934 if (Trim(ReadList[i]) <> '') then begin
935 DivideStrLine(ReadList[i], @Res);
937 ConvRes(@Res, @ResLink);
938 Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
940 if NewReceiveNo <= (i + 1) then
941 //
\90V
\92\85\83\8c\83X
942 doc.Write(SkinedRes(SkinNewRes, @Res, IntToStr(i + 1)))
944 //
\92Ê
\8fí
\82Ì
\83\8c\83X
945 doc.Write(SkinedRes(SkinRes, @Res, IntToStr(i + 1)));
948 if ThreadItem.Kokomade = (i + 1) then begin
949 //
\82±
\82±
\82Ü
\82Å
\93Ç
\82ñ
\82¾
950 if FileExists( GikoSys.GetSkinBookmarkFileName ) then
951 doc.Write( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ) + #13#10 )
953 doc.Write( KOKO_TAG );
957 doc.Write('<a name="bottom"></a>');
958 //
\83X
\83L
\83\93(
\83t
\83b
\83^)
959 doc.Write( LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, ThreadItem.Size ) );
965 procedure THTMLCreate.CreateUseCSSHTML(doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
967 FORMAT_NOMAIL = '<a name="%s"></a><div class="header"><span class="no"><a href="menu:%s">%s</a></span>'
968 + '<span class="name_label">
\96¼
\91O
\81F</span> <span class="name"><b>%s</b></span>'
969 + '<span class="date_label">
\93\8a\8de
\93ú
\81F</span> <span class="date">%s</span></div>'
970 + '<div class="mes">%s</div>';
972 FORMAT_SHOWMAIL = '<a name="%s"></a><div class="header"><span class="no"><a href="menu:%s">%s</a></span>'
973 + '<span class="name_label">
\96¼
\91O
\81F </span><a class="name_mail" href="mailto:%s">'
974 + '<b>%s</b></a><span class="mail"> [%s]</span><span class="date_label">
\93\8a\8de
\93ú
\81F</span>'
975 + '<span class="date"> %s</span></div><div class="mes">%s </div>';
977 FORMAT_NOSHOW = '<a name="%s"></a><div class="header"><span class="no"><a href="menu:%s">%s</a></span>'
978 + '<span class="name_label">
\96¼
\91O
\81F </span><a class="name_mail" href="mailto:%s">'
979 + '<b>%s</b></a><span class="date_label">
\93\8a\8de
\93ú
\81F</span><span class="date"> %s</span></div>'
980 + '<div class="mes">%s </div>';
986 NewReceiveNo: Integer;
988 UserOptionalStyle: string;
990 ResLink :TResLinkRec;
994 doc.charset := 'Shift_JIS';
995 NewReceiveNo := ThreadItem.NewReceive;
996 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
997 ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
998 ResLink.FKey := ThreadName;
999 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
1000 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
1001 CSSFileName := GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName;
1002 if GikoSys.Setting.UseCSS and FileExists(CSSFileName) then begin
1004 doc.Write('<html><head>');
1005 doc.Write('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
1006 doc.Write('<title>' + sTitle + '</title>');
1007 doc.Write('<link rel="stylesheet" href="'+CSSFileName+'" type="text/css">');
1008 if Length( UserOptionalStyle ) > 0 then
1009 doc.Write('<style type="text/css">body {' + UserOptionalStyle + '}</style>');
1010 doc.Write('</head>'#13#10'<body>');
1011 doc.Write('<a name="top"></a>'#13#10'<p id="idSearch"></p>');
1012 doc.Write('<div class="title">' + sTitle + '</div>');
1013 for i := 0 to ReadList.Count - 1 do begin
1014 // 1
\82Í
\95K
\82¸
\95\
\8e¦
1015 if i <> 0 then begin
1016 //
\95\
\8e¦
\94Í
\88Í
\82ð
\8cÀ
\92è
1017 case GikoSys.ResRange of
1019 if ThreadItem.Kokomade > (i + 1) then
1022 if NewReceiveNo > (i + 1) then
1025 if (threadItem.Count - i) > GikoSys.ResRange then
1030 if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin
1031 doc.Write('<a name="new"></a><div class="new">
\90V
\92\85\83\8c\83X <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>');
1034 if (Trim(ReadList[i]) <> '') then begin
1035 No := IntToStr(i + 1);
1036 DivideStrLine(ReadList[i], @Res);
1038 ConvRes(@Res, @ResLink);
1039 Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
1040 if Res.FMailTo = '' then
1041 doc.Write(Format(FORMAT_NOMAIL, [No, No, No, Res.FName, Res.FDateTime, Res.FBody]))
1042 else if GikoSys.Setting.ShowMail then
1043 doc.Write(Format(FORMAT_SHOWMAIL, [No, No, No, Res.FMailTo, Res.FName, Res.FMailTo, Res.FDateTime, Res.FBody]))
1045 doc.Write(Format(FORMAT_NOSHOW, [No, No, No, Res.FName, Res.FDateTime, Res.FBody]));
1048 if ThreadItem.Kokomade = (i + 1) then begin
1049 doc.Write('<a name="koko"></a><div class="koko">
\83R
\83R
\82Ü
\82Å
\93Ç
\82ñ
\82¾</div>');
1054 doc.Write('<a name="bottom"></a>');
1055 doc.Write('<a name="last"></a>');
1056 doc.Write('</body></html>');
1063 procedure THTMLCreate.CreateDefaultHTML (doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
1067 NewReceiveNo: Integer;
1070 ResLink : TResLinkRec;
1074 doc.charset := 'Shift_JIS';
1075 NewReceiveNo := ThreadItem.NewReceive;
1076 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
1077 ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
1078 ResLink.FKey := ThreadName;
1079 doc.Write('<html><head>'#13#10);
1080 doc.Write('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">'#13#10);
1081 doc.Write('<title>' + sTitle + '</title></head>'#13#10);
1082 doc.Write('<body TEXT="#000000" BGCOLOR="#EFEFEF" link="#0000FF" alink="#FF0000" vlink="#660099">'#13#10);
1083 doc.Write('<a name="top"></a>'#13#10);
1084 doc.Write('<font size=+1 color="#FF0000">' + sTitle + '</font>'#13#10);
1085 doc.Write('<dl>'#13#10);
1086 doc.Write('<p id="idSearch"></p>'#13#10);
1087 for i := 0 to ReadList.Count - 1 do begin
1088 // 1
\82Í
\95K
\82¸
\95\
\8e¦
1089 if i <> 0 then begin
1090 //
\95\
\8e¦
\94Í
\88Í
\82ð
\8cÀ
\92è
1091 case GikoSys.ResRange of
1093 if ThreadItem.Kokomade > (i + 1) then
1096 if NewReceiveNo > (i + 1) then
1099 if (threadItem.Count - i) > GikoSys.ResRange then
1104 if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin
1106 doc.Write('<a name="new"></a>');
1107 doc.Write('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>
\90V
\92\85\83\8c\83X ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
1111 if (Trim(ReadList[i]) <> '') then begin
1112 No := IntToStr(i + 1);
1113 DivideStrLine(ReadList[i], @Res);
1115 ConvRes(@Res, @ResLink);
1116 Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
1117 if Res.FMailTo = '' then
1118 doc.Write('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a>
\96¼
\91O
\81F<font color="forestgreen"><b> ' + Res.FName + ' </b></font>
\93\8a\8de
\93ú
\81F <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10)
1119 else if GikoSys.Setting.ShowMail then
1120 doc.Write('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a>
\96¼
\91O
\81F<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> [' + Res.FMailTo + ']
\93\8a\8de
\93ú
\81F <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10)
1122 doc.Write('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a>
\96¼
\91O
\81F<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a>
\93\8a\8de
\93ú
\81F <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10);
1124 if ThreadItem.Kokomade = (i + 1) then begin
1126 doc.Write('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>
\83R
\83R
\82Ü
\82Å
\93Ç
\82ñ
\82¾</b></font></td></tr></table>');
1130 doc.Write('</dl>'#13#10'<a name="bottom"></a>'#13#10'</body></html>');
1136 procedure THTMLCreate.CreateHTML2(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
1138 ReadList: TStringList;
1139 CSSFileName: string;
1147 Writeln('Create HTML');
1150 if ThreadItem <> nil then begin
1151 if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
1152 CreateUsePluginHTML(doc, ThreadItem, sTitle);
1154 ShortDayNames[1] := '
\93ú'; ShortDayNames[2] := '
\8c\8e';
1155 ShortDayNames[3] := '
\89Î'; ShortDayNames[4] := '
\90\85';
1156 ShortDayNames[5] := '
\96Ø'; ShortDayNames[6] := '
\8bà';
1157 ShortDayNames[7] := '
\93y';
1159 ReadList := TStringList.Create;
1161 if ThreadItem.IsLogFile then begin
1162 ReadList.BeginUpdate;
1163 FileName := ThreadItem.GetThreadFileName;
1164 ReadList.LoadFromFile(FileName);
1166 GikoSys.FAbon.IndividualAbon(ReadList, ChangeFileExt(FileName,'.NG'));
1167 GikoSys.FAbon.Execute(ReadList); //
\82 \82Ú
\81`
\82ñ
\82µ
\82Ä
1168 GikoSys.FSelectResFilter.Execute(ReadList); //
\83\8c\83X
\82Ì
\83t
\83B
\83\8b\83^
\83\8a\83\93\83O
\82ð
\82·
\82é
1169 if ThreadItem.Title = '' then begin
1170 DivideStrLine(ReadList[0], @Res);
1171 sTitle := Res.FTitle;
1173 sTitle := ThreadItem.Title
1175 sTitle := CustomStringReplace(ThreadItem.Title, '
\81\97\81M', ',');
1177 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
1178 CSSFileName := GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName;
1179 if GikoSys.Setting.UseSkin then begin
1180 CreateUseSKINHTML(doc, ThreadItem, ReadList);
1181 end else if GikoSys.Setting.UseCSS and FileExists(CSSFileName) then begin
1182 CreateUseCSSHTML(doc, ThreadItem, ReadList, sTitle);
1184 CreateDefaultHTML(doc, ThreadItem, ReadList, sTitle);
1193 rt := GetTickCount - st;
1195 Writeln(IntToStr(rt) + ' ms');
1199 procedure THTMLCreate.CreateHTML3(var html: TStringList; ThreadItem: TThreadItem; var sTitle: string);
1203 //bufList : TStringList;
1204 ReadList: TStringList;
1205 // SaveList: TStringList;
1206 CSSFileName: string;
1210 boardPlugIn : TBoardPlugIn;
1212 UserOptionalStyle: string;
1217 ResLink : TResLinkRec;
1218 function LoadSkin( fileName: string ): string;
1220 Result := LoadFromSkin( fileName, ThreadItem, ThreadItem.Size );
1222 function ReplaceRes( skin: string ): string;
1224 Result := SkinedRes( skin, @Res, No );
1228 if ThreadItem <> nil then begin
1229 CSSFileName := GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName;
1230 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
1231 ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
1232 ResLink.FKey := ThreadName;
1235 //if ThreadItem.IsBoardPlugInAvailable then begin
1236 if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
1237 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
1238 //boardPlugIn := ThreadItem.BoardPlugIn;
1239 boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn;
1240 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
1241 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
1243 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
1245 tmp := boardPlugIn.GetHeader( DWORD( threadItem ),
1246 '<style type="text/css">body {' + UserOptionalStyle + '}</style>' );
1247 //
\90â
\91Î
\8eQ
\8fÆ
\82©
\82ç
\91\8a\91Î
\8eQ
\8fÆ
\82Ö
1248 if GikoSys.Setting.UseSkin then begin
1249 tmp1 := './' + GikoSys.Setting.CSSFileName;
1250 tmp1 := CustomStringReplace(tmp1, GikoSys.GetConfigDir, '');
1251 tmp1 := CustomStringReplace(tmp1, '\', '/');
1252 tmp := CustomStringReplace(tmp, ExtractFilePath(GikoSys.Setting.CSSFileName), tmp1);
1253 end else if GikoSys.Setting.UseCSS then begin
1254 tmp1 := './' + CSSFileName;
1255 tmp1 := CustomStringReplace(tmp1, GikoSys.GetConfigDir, '');
1256 tmp1 := CustomStringReplace(tmp1, '\', '/');
1257 tmp := CustomStringReplace(tmp, CSSFileName, tmp1);
1261 for i := 0 to threadItem.Count - 1 do begin
1264 Res.FBody := boardPlugIn.GetRes( DWORD( threadItem ), i + 1 );
1265 ConvertResAnchor(@Res);
1266 html.Append( Res.FBody );
1269 //
\83X
\83L
\83\93(
\83t
\83b
\83^)
1270 html.Append( boardPlugIn.GetFooter( DWORD( threadItem ), '<a name="bottom"></a>' ) );
1276 ShortDayNames[1] := '
\93ú'; ShortDayNames[2] := '
\8c\8e';
1277 ShortDayNames[3] := '
\89Î'; ShortDayNames[4] := '
\90\85';
1278 ShortDayNames[5] := '
\96Ø'; ShortDayNames[6] := '
\8bà';
1279 ShortDayNames[7] := '
\93y';
1280 BBSID := ThreadItem.ParentBoard.BBSID;
1281 ReadList := TStringList.Create;
1283 if ThreadItem.IsLogFile then begin
1284 FileName := ThreadItem.GetThreadFileName;
1285 ReadList.LoadFromFile(FileName);
1286 GikoSys.FAbon.IndividualAbon(ReadList, ChangeFileExt(FileName,'.NG'));
1287 GikoSys.FAbon.Execute(ReadList); //
\82 \82Ú
\81`
\82ñ
\82µ
\82Ä
1288 GikoSys.FSelectResFilter.Execute(ReadList); //
\83\8c\83X
\82Ì
\83t
\83B
\83\8b\83^
\83\8a\83\93\83O
\82ð
\82·
\82é
1289 DivideStrLine(ReadList[0], @Res);
1290 //Res.FTitle := CustomStringReplace(Res.FTitle, '
\81\97\81M', ',');
1291 sTitle := Res.FTitle;
1293 sTitle := CustomStringReplace(ThreadItem.Title, '
\81\97\81M', ',');
1296 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
1297 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
1299 if GikoSys.Setting.UseSkin then begin
1300 //
\83X
\83L
\83\93\8eg
\97p
1301 //
\83X
\83L
\83\93\82Ì
\90Ý
\92è
1303 SkinHeader := LoadSkin( GikoSys.GetSkinHeaderFileName );
1304 if Length( UserOptionalStyle ) > 0 then
1305 SkinHeader := CustomStringReplace( SkinHeader, '</head>',
1306 '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>');
1307 //
\90â
\91Î
\8eQ
\8fÆ
\82©
\82ç
\91\8a\91Î
\8eQ
\8fÆ
\82Ö
1308 tmp1 := './' + GikoSys.Setting.CSSFileName;
1309 tmp1 := CustomStringReplace(tmp1, GikoSys.GetConfigDir, '');
1310 tmp1 := CustomStringReplace(tmp1, '\', '/');
1311 SkinHeader := CustomStringReplace(SkinHeader, ExtractFilePath(GikoSys.Setting.CSSFileName), tmp1);
1312 html.Append( SkinHeader );
1316 SkinRes := LoadSkin( GikoSys.GetSkinResFileName );
1319 html.Append('<a name="top"></a>');
1320 for i := 0 to ReadList.Count - 1 do begin
1321 if (Trim(ReadList[i]) <> '') then begin
1322 No := IntToStr(i + 1);
1324 DivideStrLine(ReadList[i], @Res);
1326 ConvRes(@Res, @ResLink, true);
1327 ConvertResAnchor(@Res);
1330 html.Append( ReplaceRes( SkinRes ) );
1336 html.Append('<a name="bottom"></a>');
1337 //
\83X
\83L
\83\93(
\83t
\83b
\83^)
1339 html.Append( LoadSkin( GikoSys.GetSkinFooterFileName ) );
1342 end else if GikoSys.Setting.UseCSS and FileExists(CSSFileName) then begin
1344 //CSSFileName := GetAppDir + CSS_FILE_NAME;
1345 html.Append('<html><head>');
1346 html.Append('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
1347 html.Append('<title>' + sTitle + '</title>');
1348 //
\90â
\91Î
\8eQ
\8fÆ
\82©
\82ç
\91\8a\91Î
\8eQ
\8fÆ
\82Ö
1349 tmp1 := './' + CSSFileName;
1350 tmp1 := CustomStringReplace(tmp1, GikoSys.GetConfigDir, '');
1351 tmp1 := CustomStringReplace(tmp1, '\', '/');
1353 html.Append('<link rel="stylesheet" href="'+tmp1+'" type="text/css">');
1354 if Length( UserOptionalStyle ) > 0 then
1355 html.Append('<style type="text/css">body {' + UserOptionalStyle + '}</style>');
1356 html.Append('</head>');
1357 html.Append('<body>');
1358 html.Append('<a name="top"></a>');
1359 html.Append('<div class="title">' + sTitle + '</div>');
1360 for i := 0 to ReadList.Count - 1 do begin
1361 if (Trim(ReadList[i]) <> '') then begin
1362 No := IntToStr(i + 1);
1363 DivideStrLine(ReadList[i], @Res);
1365 ConvRes(@Res, @ResLink, true);
1366 ConvertResAnchor(@Res);
1367 if Res.FMailTo = '' then
1368 html.Append('<a name="' + No + '"></a>'
1369 + '<div class="header"><span class="no"><a href="menu:' + No + '">' + No + '</a></span> '
1370 + '<span class="name_label">
\96¼
\91O
\81F</span> '
1371 + '<span class="name"><b>' + Res.FName + '</b></span> '
1372 + '<span class="date_label">
\93\8a\8de
\93ú
\81F</span> '
1373 + '<span class="date">' + Res.FDateTime+ '</span></div>'
1374 + '<div class="mes">' + Res.FBody + ' </div>')
1375 else if GikoSys.Setting.ShowMail then
1376 html.Append('<a name="' + No + '"></a>'
1377 + '<div class="header"><span class="no"><a href="menu:' + No + '">' + No + '</a></span>'
1378 + '<span class="name_label">
\96¼
\91O
\81F </span>'
1379 + '<a class="name_mail" href="mailto:' + Res.FMailTo + '">'
1380 + '<b>' + Res.FName + '</b></a><span class="mail"> [' + Res.FMailTo + ']</span>'
1381 + '<span class="date_label">
\93\8a\8de
\93ú
\81F</span>'
1382 + '<span class="date"> ' + Res.FDateTime+ '</span></div>'
1383 + '<div class="mes">' + Res.FBody + ' </div>')
1385 html.Append('<a name="' + No + '"></a>'
1386 + '<div class="header"><span class="no"><a href="menu:' + No + '">' + No + '</a></span>'
1387 + '<span class="name_label">
\96¼
\91O
\81F </span>'
1388 + '<a class="name_mail" href="mailto:' + Res.FMailTo + '">'
1389 + '<b>' + Res.FName + '</b></a>'
1390 + '<span class="date_label">
\93\8a\8de
\93ú
\81F</span>'
1391 + '<span class="date"> ' + Res.FDateTime+ '</span></div>'
1392 + '<div class="mes">' + Res.FBody + ' </div>');
1395 html.Append('<a name="bottom"></a>');
1396 html.Append('<a name="last"></a>');
1397 html.Append('</body></html>');
1400 html.Append('<html><head>');
1401 html.Append('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
1402 html.Append('<title>' + sTitle + '</title></head>');
1403 html.Append('<body TEXT="#000000" BGCOLOR="#EFEFEF" link="#0000FF" alink="#FF0000" vlink="#660099">');
1404 html.Append('<a name="top"></a>');
1405 html.Append('<font size=+1 color="#FF0000">' + sTitle + '</font>');
1406 html.Append('<dl>');
1407 for i := 0 to ReadList.Count - 1 do begin
1408 if (Trim(ReadList[i]) <> '') then begin
1409 No := IntToStr(i + 1);
1410 DivideStrLine(ReadList[i], @Res);
1412 ConvRes(@Res, @ResLink, true);
1413 ConvertResAnchor(@Res);
1414 if Res.FMailTo = '' then
1415 html.Append('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a>
\96¼
\91O
\81F<font color="forestgreen"><b> ' + Res.FName + ' </b></font>
\93\8a\8de
\93ú
\81F ' + Res.FDateTime+ '<br><dd>' + Res.Fbody + ' <br><br><br>')
1416 else if GikoSys.Setting.ShowMail then
1417 html.Append('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a>
\96¼
\91O
\81F<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> [' + Res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime+ '<br><dd>' + Res.Fbody + ' <br><br><br>')
1419 html.Append('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a>
\96¼
\91O
\81F<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a>
\93\8a\8de
\93ú
\81F ' + Res.FDateTime+ '<br><dd>' + Res.Fbody + ' <br><br><br>');
1422 html.Append('</dl>');
1423 html.Append('<a name="bottom"></a>');
1424 html.Append('</body></html>');
1436 procedure THTMLCreate.SetResPopupText(Hint : TResPopup; threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
1448 boardPlugIn : TBoardPlugIn;
1451 if StNum > ToNum then begin
1457 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
1458 if StNum + MAX_POPUP_RES < ToNum then
1459 ToNum := StNum + MAX_POPUP_RES;
1461 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
1463 if ThreadItem <> nil then
1464 Hint.Title := ThreadItem.Title;
1466 if ThreadItem <> nil then begin
1467 //if ThreadItem.IsBoardPlugInAvailable then begin
1468 if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
1469 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
1470 //boardPlugIn := ThreadItem.BoardPlugIn;
1471 boardPlugIn := ThreadItem.ParentBoard.BoardPlugIn;
1473 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
1474 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
1475 for i := StNum to ToNum do begin
1477 //
\82±
\82±
\82Å
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\82Ìdat
\82Ì
\8c`
\8e®
\82Å
\82P
\8ds
\93Ç
\82Ý
\8d\9e\82ß
\82ê
\82Î¥¥¥
\81B
\81«
\93Ç
\82ß
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
1478 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
1479 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
1480 DivideStrLine(tmp, @Res);
1481 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
1482 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
1484 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
1485 Header := DeleteFontTag(Header);
1486 Header := CustomStringReplace(Header, '<br>', '',true);
1488 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
1489 Body := CustomStringReplace(Body, '<br>', #10,true);
1490 Body := CustomStringReplace(Body, '</a>', '',true);
1491 Body := GikoSys.DeleteLink(Body);
1492 Body := CustomStringReplace(Body, '<', '<');
1493 Body := CustomStringReplace(Body, '>', '>');
1494 Body := CustomStringReplace(Body, '"', '"');
1495 Body := CustomStringReplace(Body, '&', '&');
1496 Body := CustomStringReplace(Body, ' ', ' ');
1498 Hint.Add(Header, Body);
1502 for i := StNum to ToNum do begin
1504 FileName := ThreadItem.FilePath;
1505 tmp := GikoSys.ReadThreadFile(FileName, Line);
1506 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
1507 DivideStrLine(tmp, @Res);
1508 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
1509 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
1511 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
1513 Body := DeleteFontTag(Res.FBody);
1514 Body := CustomStringReplace(Body, '<br> ', #10,true);
1515 Body := CustomStringReplace(Body, '<br>', #10,true);
1516 Body := CustomStringReplace(Body, '</a>', '',true);
1517 Body := GikoSys.DeleteLink(Body);
1518 Body := CustomStringReplace(Body, '<', '<');
1519 Body := CustomStringReplace(Body, '>', '>');
1520 Body := CustomStringReplace(Body, '"', '"');
1521 Body := CustomStringReplace(Body, '&', '&');
1522 Body := CustomStringReplace(Body, ' ', ' ');
1523 Hint.Add(Header, Body);
1532 //
\83\8a\83\93\83N
\82Ì
\95¶
\8e\9a\97ñ
\82©
\82ç
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
\82ÌURL
\82É
\95Ï
\8a·
\82·
\82é
1533 class function THTMLCreate.GetRespopupURL(AText, AThreadURL : string): string;
1538 if Pos('about:blank..', AText) = 1 then begin
1539 wkInt := LastDelimiter( '/', AThreadURL );
1540 if Pos( '?', Copy( AThreadURL, wkInt, MaxInt ) ) = 0 then begin
1541 // Thread.URL
\82Í PATH_INFO
\93n
\82µ
1542 Result := Copy( AThreadURL, 1, LastDelimiter( '/', AThreadURL ) );
1543 wkInt := LastDelimiter( '/', AText );
1544 if Pos( '?', Copy( AText, wkInt, MaxInt ) ) = 0 then
1545 // Text
\82à PATH_INFO
\93n
\82µ
1546 Result := Result + Copy( AText, LastDelimiter( '/', AText ) + 1, MaxInt )
1548 // Text
\82Í QUERY_STRING
\93n
\82µ
1549 Result := Result + Copy( AText, LastDelimiter( '?', AText ) + 1, MaxInt );
1551 // Thread.URL
\82Í QUERY_STRING
\93n
\82µ
1552 Result := Copy( AThreadURL, 1, LastDelimiter( '?', AThreadURL ) );
1553 wkInt := LastDelimiter( '/', AText );
1554 if Pos( '?', Copy( AText, wkInt, MaxInt ) ) = 0 then begin
1555 // Text
\82Í PATH_INFO
\93n
\82µ
1556 // URL
\82É
\94Â
\82Æ
\83L
\81[
\82ª
\91«
\82ç
\82È
\82¢
\82Ì
\82Å Text
\82©
\82ç
\92¸
\91Õ
\82·
\82é
1557 wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) );
1558 wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) );
1559 Result := Copy( Result, 1, Length( Result ) - 1 ) + Copy( AText, wkInt, MaxInt );
1561 // Text
\82à QUERY_STRING
\93n
\82µ
1562 Result := Result + Copy( AText, LastDelimiter( '?', AText ) + 1, MaxInt )
1565 end else if Pos('about:blank/bbs/', AText) = 1 then begin
1566 //
\82µ
\82½
\82ç
\82ÎJBBS
\82Ì
\8ed
\95Ï
\82Ì
\8bz
\8eû
1567 AText := CustomStringReplace(AText, 'about:blank/bbs/', 'about:blank../../bbs/');
1568 Result := GetRespopupURL(AText, AThreadURL);
1574 //
\8ew
\92è
\82µ
\82½
\83p
\83X
\82É
\83X
\83L
\83\93\82à
\82µ
\82
\82ÍCSS
\82Ì
\83t
\83@
\83C
\83\8b\82Ì
\83R
\83s
\81[
\82ð
\8dì
\82é
1575 class procedure THTMLCreate.SkinorCSSFilesCopy(path: string);
1577 tmp, tmpD, tmpF: string;
1583 if GikoSys.Setting.UseSkin then begin
1584 current := ExtractFilePath(GikoSys.GetSkinDir);
1585 tmp := GikoSys.Setting.CSSFileName;
1586 end else if GikoSys.Setting.UseCSS then begin
1587 current := ExtractFilePath(GikoSys.GetStyleSheetDir);
1588 tmp := ExtractFilePath(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName);
1590 dirs := TStringList.Create;
1593 if tmp <> current then begin
1594 GikoSys.GetDirectoryList(current, '*.*', dirs, true);
1595 for i := 0 to dirs.Count - 1 do begin
1596 files := TStringList.Create;
1599 gikoSys.GetFileList(dirs[i], '*.*', files, true);
1601 tmpD := CustomStringReplace(dirs[i], GikoSys.GetConfigDir, path);
1602 if (AnsiPos(dirs[i], tmp) <> 0) and not (DirectoryExists(tmpD)) then
1603 ForceDirectories(tmpD);
1605 if(dirs[i] = tmp) and (dirs[i] <> current) then begin
1606 for j := 0 to files.Count - 1 do begin
1607 tmpF := CustomStringReplace(files[j], GikoSys.GetConfigDir, path);
1608 if not FileExists(tmpF) then begin
1609 CopyFile(PChar(files[j]), PChar(tmpF),True);
1618 tmpD := CustomStringReplace(dirs[0], GikoSys.GetConfigDir, path);
1619 if not DirectoryExists(tmpD) then
1620 ForceDirectories(tmpD);
1621 tmpF := CustomStringReplace(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName
1622 , GikoSys.GetConfigDir, path);
1623 if not FileExists(tmpF) then begin
1624 CopyFile(PChar(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName)
1625 , PChar(tmpF), True);
1632 \brief dat
\83t
\83@
\83C
\83\8b\82Ì
\88ê
\83\89\83C
\83\93\82ð
\95ª
\89ð
1633 \param Line dat
\83t
\83@
\83C
\83\8b\82ð
\8d\
\90¬
\82·
\82é 1
\8ds
1634 \return
\83\8c\83X
\8fî
\95ñ
1636 class procedure THTMLCreate.DivideStrLine(Line: string; PRes: PResRec);
1645 PRes.FType := glt2chNew;
1648 pse := pss + Length(Line);
1649 pds := PChar(delimiter);
1650 pde := pds + Length(delimiter);
1652 ppos := AnsiStrPosEx(pss, pse, pds, pde);
1653 if (ppos = nil) then begin
1654 Line := CustomStringReplace(Line, '<>', '<>');
1655 Line := CustomStringReplace(Line, ',', '<>');
1656 Line := CustomStringReplace(Line, '
\81\97\81M', ',');
1658 //Trim
\82µ
\82Ä
\82Í
\82¢
\82¯
\82È
\82¢
\8bC
\82ª
\82·
\82é
\81@by
\82à
\82¶
\82ã
1659 PRes.FName := RemoveToken(Line, delimiter);
1660 PRes.FMailTo := RemoveToken(Line, delimiter);
1661 PRes.FDateTime := RemoveToken(Line, delimiter);
1662 PRes.FBody := RemoveToken(Line, delimiter);
1663 //
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\82Æ
\82©
\82¾
\82Æ
\81A
\96{
\95¶
\82Ì
\90æ
\93ª
\82É
\82P
\82Â
\94¼
\8ap
\8bó
\94\92\82ª
\93ü
\82Á
\82Ä
\82¢
\82é
\82Ì
\82Å
\8dí
\8f\9c\82·
\82é
1664 //
\91¼
\82Ì
\8cf
\8e¦
\94Â
\82Å
\81A
\83\8c\83X
\8e©
\91Ì
\82Ì
\8bó
\94\92\82©
\82à
\82µ
\82ê
\82È
\82¢
\82¯
\82Ç
\82»
\82ê
\82Í
\92ú
\82ß
\82é
1665 PRes.FBody := TrimLeft(PRes.FBody);
1666 //
\8bó
\82¾
\82Æ
\96â
\91è
\82ª
\8bN
\82«
\82é
\82©
\82ç
\81A
\8bó
\94\92\82ð
\90Ý
\92è
\82·
\82é
1667 if PRes.FBody = '' then
1668 PRes.FBody := ' ';
1670 PRes.FTitle := RemoveToken(Line, delimiter);
1677 HTMLCreater := THTMLCreate.Create;
1680 if HTMLCreater <> nil then begin