6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 Dialogs, StdCtrls, ComCtrls, ExtCtrls, ToolWin, Menus, OleCtrls, Registry,
13 ActiveX, {HTTPApp,} YofUtils, Trip, IniFiles, StrUtils,
14 GikoSystem, GikoUtil, ImgList, Clipbrd, BoardGroup,
15 IdAntiFreezeBase, IdAntiFreeze, IdBaseComponent, IdComponent,
16 IdTCPConnection, IdTCPClient, IdHTTP, ActnList, StdActns, IdIntercept,
17 IdLogBase, IdLogDebug, IdException, DateUtils, MojuUtils, bmRegExp;
20 // TSetLayeredWindowAttributes = function(wnd: HWND; crKey: DWORD; bAlpha: BYTE; dwFlag: DWORD): Boolean; stdcall;
21 //
\8f\91\82«
\8d\9e\82Ý
\96ß
\82è
\92l
\83^
\83C
\83v
22 TGikoResultType = (grtOK, grtCookie, grtCheck, grtError);
24 TEditorForm = class(TForm)
27 PostMessage: TMenuItem;
28 SaveMessage: TMenuItem;
31 StatusBar: TStatusBar;
32 EditorPage: TPageControl;
34 PreviewTab: TTabSheet;
42 ToolBarImageList: TImageList;
43 HotToobarImageList: TImageList;
45 NameBasePanel: TPanel;
48 NameComboBox: TComboBox;
49 MailComboBox: TComboBox;
51 SendToolButton: TToolButton;
52 OutBoxToolButton: TToolButton;
53 ToolButton5: TToolButton;
54 UndoToolButton: TToolButton;
55 CutToolButton: TToolButton;
56 CopyToolButton: TToolButton;
57 PasteToolButton: TToolButton;
58 ToolButton3: TToolButton;
59 TransToolButton: TToolButton;
60 TopToolButton: TToolButton;
62 IdAntiFreeze: TIdAntiFreeze;
63 ToolButton1: TToolButton;
64 ToolButton2: TToolButton;
65 ActionList: TActionList;
79 SageCheckBox: TCheckBox;
80 IdLogDebug: TIdLogDebug;
83 KotehanCheckBox: TCheckBox;
87 SelectAllAction: TAction;
89 SelectAll1: TMenuItem;
91 QuotePasteAction: TAction;
92 QuotePasteMenuItem: TMenuItem;
94 SpaceToNBSPAction: TAction;
95 AmpToCharRefAction: TAction;
96 SpaceTabnbsp1: TMenuItem;
98 BoardInformationTab: TTabSheet;
99 BoardtopTab: TTabSheet;
100 TitlePictureBrowser: TWebBrowser;
102 BoardInformationMemo: TMemo;
103 GetSETTINGTXTAction: TAction;
104 GetheadtxtAction: TAction;
106 SETTINGTXT2: TMenuItem;
108 GetTitlePictureAction: TAction;
111 procedure EditorPageChange(Sender: TObject);
112 procedure FormCreate(Sender: TObject);
113 procedure BrowserStatusTextChange(Sender: TObject;
114 const Text: WideString);
115 procedure FormClose(Sender: TObject; var Action: TCloseAction);
116 procedure FormDestroy(Sender: TObject);
117 procedure SendActionExecute(Sender: TObject);
118 procedure SaveActionExecute(Sender: TObject);
119 procedure AbortActionExecute(Sender: TObject);
120 procedure CloseActionExecute(Sender: TObject);
121 procedure UndoActionExecute(Sender: TObject);
122 procedure CutActionExecute(Sender: TObject);
123 procedure CopyActionExecute(Sender: TObject);
124 procedure PasteActionExecute(Sender: TObject);
125 procedure SendActionUpdate(Sender: TObject);
126 procedure SaveActionUpdate(Sender: TObject);
127 procedure CloseActionUpdate(Sender: TObject);
128 procedure UndoActionUpdate(Sender: TObject);
129 procedure CutActionUpdate(Sender: TObject);
130 procedure CopyActionUpdate(Sender: TObject);
131 procedure PasteActionUpdate(Sender: TObject);
132 procedure TopActionExecute(Sender: TObject);
133 procedure TopActionUpdate(Sender: TObject);
134 procedure SageCheckBoxClick(Sender: TObject);
135 procedure MailComboBoxChange(Sender: TObject);
136 procedure TransActionExecute(Sender: TObject);
137 procedure TransActionUpdate(Sender: TObject);
138 procedure IdLogDebugReceive(ASender: TIdConnectionIntercept;
140 procedure IdLogDebugSend(ASender: TIdConnectionIntercept;
142 procedure SelectAllActionExecute(Sender: TObject);
143 procedure StatusBarResize(Sender: TObject);
144 procedure Timer1Timer(Sender: TObject);
145 procedure FormActivate(Sender: TObject);
146 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
147 procedure QuotePasteActionExecute(Sender: TObject);
148 procedure SpaceToNBSPActionExecute(Sender: TObject);
149 procedure AmpToCharRefActionExecute(Sender: TObject);
150 procedure BoardTopClick(Sender: TObject);
151 procedure GetSETTINGTXTActionExecute(Sender: TObject);
152 procedure GetheadtxtActionExecute(Sender: TObject);
153 procedure GetTitlePictureActionUpdate(Sender: TObject);
154 procedure GetTitlePictureActionExecute(Sender: TObject);
156 FThreadItem: TThreadItem;
158 FNameComboEdit: THandle;
159 FMailComboEdit: THandle;
162 FStatusCode: Integer;
163 FDebugStrReceive: string;
164 FDebugStrSend: string;
165 FSambaTime: TDateTime;
169 function RepHtml(s: string): string;
170 function Check: Boolean;
171 procedure SetNameList(sName, sMail: string);
172 // procedure Send(SendType: TGikoSendType; SPID: string; PON: string; FirstWriting: Boolean);
173 procedure Send(SPID: string; PON: string; FirstWriting: Boolean);
175 function GetActiveControlHandle: THandle;
176 // function GetSendData: string;
177 // procedure GetSendData(Source: TStringStream);
178 procedure GetSendData(Source: TStringStream);
179 procedure SaveSendFile;
180 procedure SetContent(Content: string);
181 function GetSPID(CookieLine: string): string;
182 function GetPON(CookieLine: string): string;
183 function GetResultType(ResponseText: string): TGikoResultType;
184 procedure ReadSambaTime(const AHost: string);
185 procedure WriteSambaTime(const AHost: string; ATime: TDateTime);
186 function ReadSettingTime(const AHost: string): Integer;
187 function CheckSambaTime(const AHost: string; ATime: TDateTime): Boolean;
188 procedure SetSamba24(AURL: string);
189 ///
\88ø
\97p
\95\84\82Ì
\8eæ
\93¾
190 function GetOEIndentChar : string;
191 ///
\96{
\95¶
\82Ì
\8eæ
\93¾
192 function GetBody : string;
193 //IdHttp
\82Ì
\8f\89\8aú
\89»
194 procedure InitIdHTTP(http: TIdHTTP);
195 procedure ShowBoardInformation(ABoard: TBoard; AMemo: TMemo);
196 function GetTitlePictureURL(body: TStringList; ABoard: TBoard): string;
197 procedure ShowTitlePicture();
198 function GetFusianaName(body: TStringList; ABoard: TBoard): String;
200 procedure CreateParams(var Params: TCreateParams); override;
204 procedure SetThreadItem(Item: TThreadItem);
205 procedure SetBoard(Item: TBoard);
206 property BBSID: string read FBBSID write FBBSID;
215 CAPTION_NAME_NEW: string = '
\83M
\83R
\83i
\83r
\83X
\83\8c\97§
\82Ä
\83G
\83f
\83B
\83^';
216 CAPTION_NAME_RES: string = '
\83M
\83R
\83i
\83r
\83\8c\83X
\83G
\83f
\83B
\83^';
218 //
\83G
\83f
\83B
\83b
\83g
\83E
\83B
\83\93\83h
\83E
\82ð
\89E
\89º
\82É
\82¸
\82ç
\82µ
\82Ä
\8aJ
\82
\88Ú
\93®
\97Ê
222 //DAX
\82³
\82ñ±Ø¶ÞÄ!(
\81L
\81¤
\81M)
223 READCGI_ERR = '-ERR';
224 READCGI_INCR = '-INCR';
226 READCGI_PARTIAL = '+PARTIAL';
227 READCGI_ERR_FOUND_KAKO = '-ERR
\89ß
\8b\8e\83\8d\83O
\91q
\8cÉ
\82Å
\94
\8c©';
228 READCGI_ERR_NOT_HTML = '-ERR html
\89»
\91Ò
\82¿';
229 READCGI_ERR_NOT_FOUND = '-ERR
\82»
\82ñ
\82È
\94Âor
\83X
\83\8c\83b
\83h
\82È
\82¢
\82Å
\82·
\81B';
230 READCGI_ERR_ABONE = '-ERR
\82Ç
\82±
\82©
\82Å
\82 \82Ú
\81[
\82ñ
\82ª
\82 \82Á
\82½
\82Ý
\82½
\82¢
\82Å
\82·
\81B';
231 READCGI_ERR_TIMEOUT = '-ERR
\8ew
\92è
\8e\9e\8aÔ
\82ª
\89ß
\82¬
\82Ü
\82µ
\82½
\81B';
232 READCGI_ERR_CANTUSE = '-ERR
\82à
\82¤
\81@
\82Â
\82©
\82¦
\82Ü
\82¹
\82ñ';
233 RES2CH_TRUE = '<!-- 2ch_X:true -->';
234 RES2CH_FALSE = '<!-- 2ch_X:false -->';
235 RES2CH_ERROR = '<!-- 2ch_X:error -->';
236 RES2CH_CHECK = '<!-- 2ch_X:check -->';
237 RES2CH_COOKIE = '<!-- 2ch_X:cookie -->';
240 BBS2CH_NAME: string = '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é';
241 BBS2CH_LOG_FOLDER: string = '2ch';
242 EXTERNAL_LOG_FOLDER: string = 'exboard';
244 FOLDER_INI_FILENAME: string = 'Folder.ini';
245 FOLDER_INDEX_FILENAME: string = 'Folder.idx';
246 SUBJECT_FILENAME: string = 'subject.txt';
247 PATH_DELIM: string = '\';
252 StartPos, EndPos: Integer;
257 {constructor TEditorForm.Create(AOwner: TComponent; Item: TBoard);
259 inherited Create(AOwner);
262 procedure TEditorForm.CreateParams(var Params: TCreateParams);
265 if FormStyle in [fsNormal, fsStayOnTop] then
266 if BorderStyle in [bsSingle, bsSizeable] then begin
267 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
268 Params.WndParent := 0;
272 {procedure TEditorForm.CreateParams(var Params: TCreateParams);
274 inherited CreateParams(Params);
275 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
278 procedure TEditorForm.FormCreate(Sender: TObject);
280 wp: TWindowPlacement;
285 Browser.Navigate('about:blank');
290 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\88Ê
\92u
\90Ý
\92è
291 wp.length := sizeof(wp);
292 wp.rcNormalPosition.Top := GikoSys.Setting.EditWindowTop;
293 wp.rcNormalPosition.Left := GikoSys.Setting.EditWindowLeft;
295 wp.rcNormalPosition.Bottom := GikoSys.Setting.EditWindowTop + GikoSys.Setting.EditWindowHeight;
296 wp.rcNormalPosition.Right := GikoSys.Setting.EditWindowLeft + GikoSys.Setting.EditWindowWidth;
297 wp.showCmd := SW_HIDE;
298 SetWindowPlacement(Handle, @wp);
300 if GikoSys.Setting.EditWindowMax then
301 WindowState := wsMaximized;
303 //
\83E
\83B
\83\93\83h
\83E
\82ª
\89æ
\96Ê
\8aO
\82È
\82ç
\89æ
\96Ê
\93à
\82É
\88Ú
\93®
\82·
\82é
304 if (Left + Width) > Screen.Width then
305 // Left := Screen.Width - Width;
307 if (Top + Height) > Screen.Height then
308 // Top := Screen.Height - Height;
315 //
\8c»
\8dÝ
\82Ì
\83E
\83B
\83\93\83h
\83E
\82Ì
\88Ê
\92u
\82ð
\95Û
\91¶
316 GikoSys.Setting.EditWindowTop := Top + WINDOWMOVE_V; //
\8e\9f\82É
\8aJ
\82
\83E
\83B
\83\93\83h
\83E
\82Í
317 GikoSys.Setting.EditWindowLeft := Left + WINDOWMOVE_H; //
\81@
\81@
\81@
\89E
\8eÎ
\82ß
\89º
\82É
\82¸
\82ç
\82·
318 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\95\9d\82Æ
\8d\82\82³
\82ª
\8f¬
\82³
\82·
\82¬
\82¢
\82ê
\82Î
\8c³
\82É
\96ß
\82·
319 if GikoSys.Setting.EditWindowHeight < 144 then
321 if GikoSys.Setting.EditWindowWidth < 144 then
324 EditorPage.ActivePage := EditorTab;
325 FNameComboEdit := GetWindow(NameComboBox.Handle, GW_CHILD);
326 FMailComboEdit := GetWindow(MailComboBox.Handle, GW_CHILD);
327 NameComboBox.Items.Assign(GikoSys.Setting.NameList);
328 MailComboBox.Items.Assign(GikoSys.Setting.MailList);
333 hUser32 := LoadLibrary('User32.dll');
335 TransAction.Enabled := true
337 TransAction.Enabled := false;
339 TransAction.Enabled := false;
342 FreeLibrary(hUser32);
345 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\83X
\83e
\83C
\8fó
\91Ô
346 if GikoSys.Setting.EditWindowStay then begin //
\83X
\83e
\83C
\8fó
\91Ô
347 SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
348 TopAction.Checked := true;
349 TopToolButton.Down := true;
350 end else begin //
\83X
\83e
\83C
\82µ
\82È
\82¢
351 SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
352 TopAction.Checked := false;
353 TopToolButton.Down := false;
356 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\94¼
\93§
\96¾
\8fó
\91Ô
357 if(GikoSys.Setting.EditWindowTranslucent) and (TransAction.Enabled) then begin //
\94¼
\93§
\96¾
\81i
\83g
\83\89\83\93\83X
\83\8b\81[
\83Z
\83\93\83g
\81j
\8fó
\91Ô
359 TransAction.Checked := true;
360 TransToolButton.Down := true;
361 end else begin //
\95s
\93§
\96¾
363 TransAction.Checked := false;
364 TransToolButton.Down := false;
366 //
\94¼
\93§
\96¾
\8fó
\91Ô
\82Ì
\95Û
\91¶
367 GikoSys.Setting.EditWindowTranslucent := TransAction.Checked;
369 SpaceToNBSPAction.Checked := GikoSys.Setting.SpaceToNBSP;
370 AmpToCharRefAction.Checked := GikoSys.Setting.AmpToCharRef;
372 ini := TIniFile.Create(GikoSys.Setting.GetFileName);
375 BoardtopTab.TabVisible := ini.Readbool('EditorForm', 'BoardTopTab', False);
376 BoardTop.Checked := BoardtopTab.TabVisible;
383 procedure TEditorForm.SetBoard(Item: TBoard);
386 Caption := CAPTION_NAME_NEW + ' - [' + Item.Title + ']';
387 NameComboBox.Text := FBoard.KotehanName;
388 MailComboBox.Text := FBoard.KotehanMail;
389 SageCheckBox.Checked := AnsiPos('sage', MailComboBox.Text) <> 0;
390 TitlePanel.Visible := True;
392 ShowBoardInformation(FBoard, BoardInformationMemo);
396 procedure TEditorForm.SetThreadItem(Item: TThreadItem);
399 Caption := CAPTION_NAME_RES + ' - [' + FThreadItem.Title + ']';
400 NameComboBox.Text := FThreadItem.ParentBoard.KotehanName;
401 MailComboBox.Text := FThreadItem.ParentBoard.KotehanMail;
402 SageCheckBox.Checked := AnsiPos('sage', MailComboBox.Text) <> 0;
403 TitlePanel.Visible := False;
404 SetSamba24(FThreadItem.ParentBoard.URL);
405 ShowBoardInformation(FThreadItem.ParentBoard, BoardInformationMemo);
409 function TEditorForm.GetBody : string;
415 body := BodyEdit.Text;
416 if AmpToCharRefAction.Checked then
417 // &
\82Ì
\92u
\8a·
\82Í
\88ê
\94Ô
\8dÅ
\8f\89\82É
\82â
\82é
\82±
\82Æ
418 body := CustomStringReplace( body, '&', '&' );
419 if SpaceToNBSPAction.Checked then begin
420 body := CustomStringReplace( body, #09, ' ' );
421 body := CustomStringReplace( body, ' ', ' ' );
422 body := CustomStringReplace( body, ' ', ' ' );
423 regexp := TAWKStr.Create( nil );
425 regexp.RegExp := '^ ';
426 regexp.GSub( '\ ', body );
436 procedure TEditorForm.SetFont;
438 BodyEdit.Font.Name := GikoSys.Setting.EditorFontName;
439 BodyEdit.Font.Size := GikoSys.Setting.EditorFontSize;
440 BodyEdit.Font.Color := GikoSys.Setting.EditorFontColor;
441 BodyEdit.Color := GikoSys.Setting.EditorBackColor;
444 procedure TEditorForm.Preview;
457 if FThreadItem = nil then begin
459 Title := RepHtml(TitleEdit.Text);
461 No := IntToStr(FThreadItem.Count + 1);
462 Title := RepHtml(FThreadItem.Title);
467 Namae := RepHtml(NameComboBox.Text);
468 Mail := RepHtml(MailComboBox.Text);
469 Body := RepHtml(body);
470 Body := StringReplace(Body, #13#10, '<br>', [rfReplaceAll]);
471 DateTime := FormatDateTime('yyyy/mm/dd(aaa) hh:nn', now);
473 if Trim(Namae) = '' then
474 Namae := '
\96¼
\96³
\82µ
\82³
\82ñ';
476 s := '<HTML><HEAD>' + #13#10
477 + '<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">' + #13#10
478 + '<TITLE>' + title + '</TITLE>' + #13#10
479 // + '<STYLE><!--BODY{font-size : 9pt;font-family : "
\82l
\82r
\82o
\83S
\83V
\83b
\83N";}--></STYLE>' + #13#10
481 + '<BODY text="#000000" bgcolor="#EFEFEF" link="#0000FF" alink="#FF0000" vlink="#660099">' + #13#10
482 + '<FONT COLOR="#FF0000">' + title + '</FONT>' + #13#10
484 posTrip := AnsiPos( '#', Namae );
487 tripOrigin := Copy( Namae, posTrip + 1, Length( Namae ) );
489 Copy( Namae, 1, posTrip - 1 ) + '</B>
\81\9f' +
490 get_2ch_trip( PChar( tripOrigin ) ) + '<B>';
493 s := s + '<DT>' + No + '
\81F <FONT color="forestgreen"><B>' + Namae + '</B></FONT>
\81F ' + DateTime+ '<BR><DD>' + Body + '<BR><BR><BR>' + #13#10
495 s := s + '<DT>' + No + '
\81F <A href="mailto:' + Mail + '"><B>' + Namae + '</B></A> [' + Mail + ']
\81F ' + DateTime+ '<BR><DD>' + Body + '<BR><BR><BR>' + #13#10;
496 s := s + '</BODY></HTML>';
500 function TEditorForm.RepHtml(s: string): string;
502 // s := StringReplace(s, '&', '&', [rfReplaceAll]);
503 s := StringReplace(s, '<', '<', [rfReplaceAll]);
504 s := StringReplace(s, '>', '>', [rfReplaceAll]);
505 // s := StringReplace(s, ' ', ' ', [rfReplaceAll]); //
\8ed
\97l
\95Ï
\8dX
\82É
\82æ
\82è
\8eg
\97p
\95s
\89Â
506 s := StringReplace(s, '"', '"', [rfReplaceAll]);
510 procedure TEditorForm.EditorPageChange(Sender: TObject);
512 if EditorPage.ActivePage = PreviewTab then begin
515 Browser.Navigate('about:blank');
519 procedure TEditorForm.BrowserStatusTextChange(Sender: TObject;
520 const Text: WideString);
522 if EditorPage.ActivePage = PreviewTab then begin
523 StatusBar.Panels[0].Text := Text;
525 StatusBar.Panels[0].Text := '';
529 function TEditorForm.Check: Boolean;
536 if FThreadItem = nil then
539 Board := FThreadItem.ParentBoard;
541 if (not GikoSys.Setting.UseMachineTime) and
542 ((Board.LastGetTime = 0) or
543 (Board.LastGetTime = ZERO_DATE)) then begin
544 Msg := '
\83T
\81[
\83o
\82Ì
\8e\9e\8d\8f\82ª
\95ª
\82©
\82ç
\82È
\82¢
\82½
\82ß
\81A
\91\97\90M
\8fo
\97\88\82Ü
\82¹
\82ñ'#13#10
545 + '
\83X
\83\8c\83b
\83h
\82ð
\8dX
\90V
\81i
\8eæ
\93¾
\81j
\8cã
\81A15
\95b
\91Ò
\82Á
\82Ä
\82©
\82ç
\91\97\90M
\82µ
\82Ä
\82
\82¾
\82³
\82¢';
546 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
548 end else if BodyEdit.Text = '' then begin
549 Msg := '
\96{
\95¶
\82ª
\93ü
\97Í
\82³
\82ê
\82Ä
\82¢
\82Ü
\82¹
\82ñ
\81B';
550 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
552 end else if (FBoard <> nil) and (Trim(TitleEdit.Text) = '') then begin
553 Msg := '
\83^
\83C
\83g
\83\8b\82ª
\93ü
\97Í
\82³
\82ê
\82Ä
\82¢
\82Ü
\82¹
\82ñ
\81B';
554 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
557 if (not GikoSys.Dolib.Connected) and (AnsiPos('
\81\9c', NameComboBox.Text) <> 0) then begin
558 Msg := '
\83\8d\83O
\83C
\83\93\82µ
\82Ä
\82¢
\82È
\82¢
\82Ì
\82Å
\81\9c\82Ì
\8b@
\94\
\82Í
\97\98\97p
\8fo
\97\88\82Ü
\82¹
\82ñ
\81B'#13#10
559 + '
\82±
\82Ì
\82Ü
\82Ü
\91\97\90M
\82µ
\82Ä
\82à
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
560 rc := MsgBox(Handle, Msg, '
\8am
\94F', MB_YESNO or MB_ICONQUESTION);
561 Result := (rc = IDYES);
566 procedure TEditorForm.FormClose(Sender: TObject; var Action: TCloseAction);
571 procedure TEditorForm.FormDestroy(Sender: TObject);
573 wp: TWindowPlacement;
575 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
576 wp.length := sizeof(wp);
577 GetWindowPlacement(Handle, @wp);
579 GikoSys.Setting.EditWindowTop := wp.rcNormalPosition.Top;
580 GikoSys.Setting.EditWindowLeft := wp.rcNormalPosition.Left;
581 GikoSys.Setting.EditWindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
582 GikoSys.Setting.EditWindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
583 GikoSys.Setting.EditWindowMax := WindowState = wsMaximized;
584 //GikoSys.Setting.EditWindowStay := FormStyle = fsStayOnTop; //
\83X
\83e
\83C
\8fó
\91Ô
\82Ì
\95Û
\91¶
585 GikoSys.Setting.EditWindowTranslucent := TransAction.Checked; //
\94¼
\93§
\96¾
\8fó
\91Ô
\82Ì
\95Û
\91¶
589 procedure TEditorForm.SetNameList(sName, sMail: string);
591 if Trim(sName) <> '' then begin
592 if GikoSys.Setting.NameList.IndexOf(sName) = -1 then
593 GikoSys.Setting.NameList.Insert(0, sName);
595 if Trim(sMail) <> '' then begin
596 if GikoSys.Setting.MailList.IndexOf(sMail) = -1 then
597 GikoSys.Setting.MailList.Insert(0, sMail);
601 function TEditorForm.GetActiveControlHandle: THandle;
603 if EditorPage.ActivePage = EditorTab then begin
604 if ActiveControl = NameComboBox then
605 Result := FNameComboEdit
606 else if ActiveControl = MailComboBox then
607 Result := FMailComboEdit
608 else if ActiveControl = BodyEdit then
609 Result := BodyEdit.Handle
610 else if ActiveControl = TitleEdit then
611 Result := TitleEdit.Handle
618 procedure TEditorForm.SetContent(Content: string);
622 if Browser.Document <> nil then begin
623 doc := Browser.Document;
626 doc.charset := 'Shift_JIS';
631 procedure TEditorForm.InitIdHTTP(http: TIdHTTP);
634 http.ProxyParams.BasicAuthentication := False;
635 if GikoSys.Setting.WriteProxy then begin
636 http.ProxyParams.ProxyServer := GikoSys.Setting.WriteProxyAddress;
637 http.ProxyParams.ProxyPort := GikoSys.Setting.WriteProxyPort;
638 http.ProxyParams.ProxyUsername := GikoSys.Setting.WriteProxyUserID;
639 http.ProxyParams.ProxyPassword := GikoSys.Setting.WriteProxyPassword;
640 if GikoSys.Setting.ReadProxyUserID <> '' then
641 http.ProxyParams.BasicAuthentication := True;
643 http.ProxyParams.ProxyServer := '';
644 http.ProxyParams.ProxyPort := 80;
645 http.ProxyParams.ProxyUsername := '';
646 http.ProxyParams.ProxyPassword := '';
648 Indy.Request.UserAgent := GikoSys.GetUserAgent;
649 Indy.Request.AcceptEncoding := '';
652 procedure TEditorForm.Send(SPID: string; PON: string; FirstWriting: Boolean);
654 TextStream: TStringStream;
655 Source: TStringStream;
656 ResponseText: string;
659 State: TGikoDownloadState;
660 ResultType: TGikoResultType;
665 //fusianasan
\83g
\83\89\83b
\83v by
\92è
\8aú
\95Ö
667 // SettingTxt: String;
672 SettingBody: TStringList;
677 Namae := RepHtml(NameComboBox.Text);
678 if FThreadItem = nil then
681 Board := FThreadItem.ParentBoard;
683 { Indy.Request.Clear;
684 Indy.ProxyParams.BasicAuthentication := False;
685 if GikoSys.Setting.WriteProxy then begin
686 Indy.ProxyParams.ProxyServer := GikoSys.Setting.WriteProxyAddress;
687 Indy.ProxyParams.ProxyPort := GikoSys.Setting.WriteProxyPort;
688 Indy.ProxyParams.ProxyUsername := GikoSys.Setting.WriteProxyUserID;
689 Indy.ProxyParams.ProxyPassword := GikoSys.Setting.WriteProxyPassword;
690 if GikoSys.Setting.ReadProxyUserID <> '' then
691 Indy.ProxyParams.BasicAuthentication := True;
693 Indy.ProxyParams.ProxyServer := '';
694 Indy.ProxyParams.ProxyPort := 80;
695 Indy.ProxyParams.ProxyUsername := '';
696 Indy.ProxyParams.ProxyPassword := '';
700 if FThreadItem = nil then begin
701 URL := FBoard.GetSendURL;
702 RefURL := GikoSys.UrlToServer(FBoard.URL) + 'test/bbs.cgi';
704 URL := FThreadItem.GetSendURL;
705 RefURL := FThreadItem.URL;
707 // Indy.Request.UserAgent := GikoSys.GetUserAgent;
708 Indy.Request.Referer := RefURL;
709 // Indy.Request.AcceptEncoding := '';
713 Cookie := Cookie + 'SPID=' + SPID + '; ';
715 Cookie := Cookie + 'PON=' + PON + '; ';
716 Cookie := 'Cookie: ' + Cookie + 'NAME=' + NameComboBox.Text + '; MAIL=' + MailComboBox.Text;
718 sysMenu := GetSystemMenu( Handle, false );
719 EnableMenuItem( sysMenu, SC_CLOSE, MF_GRAYED );
721 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
724 Indy.Request.CustomHeaders.Clear;
725 // Indy.Request.CacheControl := 'no-cache';
726 Indy.Request.CustomHeaders.Add('Pragma: no-cache');
727 Indy.Request.AcceptLanguage := 'ja';
728 Indy.Request.Accept := 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*';
729 Indy.Request.ContentType := 'application/x-www-form-urlencoded';
730 Indy.Request.CustomHeaders.Add(Cookie);
731 TextStream := TStringStream.Create('');
732 Source := TStringStream.Create('');
735 FDebugStrReceive := '';
738 Indy.Post(URL, Source, TextStream);
739 ResponseText := TextStream.DataString;
741 ResultType := GetResultType(ResponseText);
743 //MsgResult
\8f\89\8aú
\89»
745 //
\83t
\83V
\83A
\83i
\83g
\83\89\83b
\83v
\8cx
\8d\90(LocalMode) by
\92è
\8aú
\95Ö
746 if ((Namae = '
\8eR
\8dè
\8fÂ') or (Namae = 'fusianasan')) and (FirstWriting) then begin
749 '
\83\8a\83\82\81[
\83g
\83z
\83X
\83g
\82ð
\95\
\8e¦
\82·
\82é
\8b@
\94\
\82ª
\8eg
\82í
\82ê
\82Ä
\82¢
\82Ü
\82·' + #13#10 +
750 '
\82à
\82µ
\82à
\8aÔ
\88á
\82Á
\82Ä
\82±
\82Ì
\95û
\96@
\82Å
\83z
\83X
\83g
\82ª
\95\
\8e¦
\82³
\82ê
\82½
\82Æ
\82µ
\82Ä
\82à
\81A
\8e©
\8cÈ
\90Ó
\94C
\82È
\82Ì
\82Å
\8dí
\8f\9c\88Ë
\97\8a\82É
\82Í
\89\9e\82¶
\82Ü
\82¹
\82ñ
\81B' + #13#10#13#10 +
751 '
\90Ó
\94C
\82ð
\95\89\82¤
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ä
\8f\91\82«
\8d\9e\82Ý
\82Ü
\82·
\82©
\81H',
753 MB_YESNO or MB_ICONQUESTION);
754 if MsgResult = IDNO then begin
758 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
763 //
\83t
\83V
\83A
\83i
\83g
\83\89\83b
\83v
\8cx
\8d\90(NetworkMode) by
\92è
\8aú
\95Ö
765 SettingBody := SettingBody.Create;
766 SettingBody.LoadFromFile(tmpBoard.GetSETTINGTXTFileName);
770 Name := GetFusianaName(settingBody, tmpBoard);
771 if ( Name = 'fusianasan' ) or ( Name = '
\8eR
\8dè
\8fÂ') then begin
774 '
\82±
\82Ì
\94Â
\82Í
\96¼
\91O
\97\93\82ð
\93ü
\97Í
\82µ
\82È
\82¢
\82Æ
\83\8a\83\82\81[
\83g
\83z
\83X
\83g
\82ª
\95\
\8e¦
\82³
\82ê
\82Ü
\82·
\81B' + #13#10 +
775 '
\82à
\82µ
\82à
\8aÔ
\88á
\82Á
\82Ä
\82±
\82Ì
\95û
\96@
\82Å
\83z
\83X
\83g
\82ª
\95\
\8e¦
\82³
\82ê
\82½
\82Æ
\82µ
\82Ä
\82à
\81A
\8e©
\8cÈ
\90Ó
\94C
\82È
\82Ì
\82Å
\8dí
\8f\9c\88Ë
\97\8a\82É
\82Í
\89\9e\82¶
\82Ü
\82¹
\82ñ
\81B' + #13#10#13#10 +
776 '
\90Ó
\94C
\82ð
\95\89\82¤
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ä
\8f\91\82«
\8d\9e\82Ý
\82Ü
\82·
\82©
\81H',
778 MB_YESNO or MB_ICONQUESTION);
779 if MsgResult = IDNO then begin
783 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
789 if ResultType = grtOK then begin
790 WriteSambaTime(FHost, Now());
791 State := gdsComplete;
792 end else if ResultType = grtCookie then begin
793 //
\83\8b\81[
\83v
\96h
\8e~
794 if not FirstWriting then
795 raise Exception.Create('');
798 '
\81E
\93\8a\8de
\82³
\82ê
\82½
\93à
\97e
\82Í
\83R
\83s
\81[
\81A
\95Û
\91¶
\81A
\88ø
\97p
\81A
\93]
\8dÚ
\93\99\82³
\82ê
\82é
\8fê
\8d\87\82ª
\82 \82è
\82Ü
\82·
\81B' + #13#10 +
799 '
\81E
\93\8a\8de
\82É
\8aÖ
\82µ
\82Ä
\94
\90¶
\82·
\82é
\90Ó
\94C
\82Í
\91S
\82Ä
\93\8a\8de
\8eÒ
\82É
\8bA
\82µ
\82Ü
\82·
\81B' + #13#10#13#10 +
800 '
\91S
\90Ó
\94C
\82ð
\95\89\82¤
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ä
\8f\91\82«
\8d\9e\82Ý
\82Ü
\82·
\82©
\81H',
802 MB_YESNO or MB_ICONQUESTION);
803 if MsgResult = IDYES then begin
804 Board.SPID := GetSPID(Indy.Response.RawHeaders.Values['Set-Cookie']);
805 Board.PON := GetPON(Indy.Response.RawHeaders.Values['Set-Cookie']);
806 if (Board.SPID = '') and (Board.PON = '') then
807 raise Exception.Create('');
808 //
\82à
\82¤
\88ê
\89ñ
\82±
\82Ì
\83\81\83\
\83b
\83h
809 Send(Board.SPID, Board.PON, False);
815 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
819 end else if ResultType = grtCheck then begin
821 //
\83\8b\81[
\83v
\96h
\8e~
822 if not FirstWriting then
823 raise Exception.Create('');
827 '
\8f\91\82«
\8d\9e\82Ý
\82É
\8aÖ
\82µ
\82Ä
\82Í
\97l
\81X
\82È
\83\8d\83O
\8fî
\95ñ
\82ª
\8bL
\98^
\82³
\82ê
\82Ä
\82¢
\82Ü
\82·
\81B' + #13#10 +
828 '
\93\8a\8de
\82É
\8aÖ
\82µ
\82Ä
\94
\90¶
\82·
\82é
\90Ó
\94C
\82Í
\91S
\82Ä
\93\8a\8de
\8eÒ
\82É
\8bA
\82µ
\82Ü
\82·
\81B' + #13#10 +
829 '
\8cö
\8f\98\97Ç
\91
\82É
\94½
\82µ
\82½
\82è
\81A
\91¼
\90l
\82É
\96À
\98f
\82ð
\82©
\82¯
\82é
\8f\91\82«
\8d\9e\82Ý
\82Í
\8dT
\82¦
\82Ä
\89º
\82³
\82¢
\81B' + #13#10 +
830 '
\93\8a\8de
\82³
\82ê
\82½
\93à
\97e
\82Í
\83R
\83s
\81[
\81E
\95Û
\91¶
\81E
\88ø
\97p
\81E
\93]
\8dÚ
\93\99\82³
\82ê
\82é
\8fê
\8d\87\82ª
\82 \82è
\82Ü
\82·
\81B' + #13#10 +
832 '
\91S
\90Ó
\94C
\82ð
\95\89\82¤
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ä
\8f\91\82«
\8d\9e\82Ý
\82Ü
\82·
\82©
\81H',
834 MB_YESNO or MB_ICONQUESTION);
836 if MsgResult = IDYES then begin
837 Board.SPID := GetSPID(Indy.Response.RawHeaders.Values['Set-Cookie']);
838 Board.PON := GetPON(Indy.Response.RawHeaders.Values['Set-Cookie']);
839 if (Board.SPID = '') and (Board.PON = '') then
840 raise Exception.Create('');
841 Send(Board.SPID, Board.PON, False);
844 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
852 WriteSambaTime(FHost, Now());
854 raise Exception.Create('');
858 on E: EIdConnectException do begin
860 ResponseText := '<html><body>'
861 + '<div>
\90Ú
\91±
\82ª
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½<br>'
862 + '
\89ñ
\90ü
\82â
\83v
\83\8d\83L
\83V
\82Ì
\8fó
\91Ô
\82ð
\92²
\82×
\82Ä
\82
\82¾
\82³
\82¢<br></div>'
863 + '<br><br><div>' + E.Message + '</div>'
866 on E: Exception do begin
869 FDebugStrReceive := AnsiReplaceText(FDebugStrReceive, '<', '<');
870 FDebugStrReceive := AnsiReplaceText(FDebugStrReceive, '>', '>');
871 FDebugStrSend := AnsiReplaceText(FDebugStrSend, '<', '<');
872 FDebugStrSend := AnsiReplaceText(FDebugStrSend, '>', '>');
874 ResponseText := '<html><body>' + TextStream.DataString;
875 ResponseText := AnsiReplaceText(ResponseText, '</body>', '');
876 ResponseText := AnsiReplaceText(ResponseText, '</html>', '');
877 ResponseText := ResponseText + '<hr><div align="left"><pre>';
878 ResponseText := ResponseText + '<b>
\82±
\82±
\82©
\82ç
\83M
\83R
\83i
\83r
\82Ì
\8fî
\95ñ</b>'#13#10;
879 ResponseText := ResponseText + #13#10'
\81\9c\91\97\90M'#13#10;
880 ResponseText := ResponseText + FDebugStrSend;
881 ResponseText := ResponseText + #13#10'
\81\9c\8eó
\90M'#13#10;
882 ResponseText := ResponseText + FDebugStrReceive;
883 ResponseText := ResponseText + '</pre></div></body></html>';
886 FStatusCode := Indy.ResponseCode;
892 //sysMenu := GetSystemMenu( Handle, true );
893 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
897 //
\94ñ
\8cö
\8e®
\83M
\83R
\83i
\83r
\94Â
\82È
\82Ç
\82Ì
\83X
\83N
\83\8a\83v
\83g
\97p
898 //ResponceCode
\82ª302Found
\82Å
\8f\91\82«
\8d\9e\82Ý
\8a®
\97¹
899 if FStatusCode = 302 then begin
900 GikoForm.PlaySound('ResEnd');
902 if FThreadItem = nil then
903 GikoForm.AddMessageList(FBoard.Title + ' [
\90V
\83X
\83\8c\91\97\90M
\8fI
\97¹]', nil, gmiOK)
905 GikoForm.AddMessageList(FThreadItem.Title + ' [
\83\8c\83X
\91\97\90M
\8fI
\97¹]', nil, gmiOK);
909 if State = gdsComplete then begin
910 GikoForm.PlaySound('ResEnd');
912 if FThreadItem = nil then
913 GikoForm.AddMessageList(FBoard.Title + ' [
\90V
\83X
\83\8c\91\97\90M
\8fI
\97¹]', nil, gmiOK)
915 GikoForm.AddMessageList(FThreadItem.Title + ' [
\83\8c\83X
\91\97\90M
\8fI
\97¹]', nil, gmiOK);
917 end else if State = gdsError then begin
918 if FThreadItem = nil then
919 GikoForm.AddMessageList(FBoard.Title + ' [
\90V
\83X
\83\8c\91\97\90M
\8e¸
\94s]', nil, gmiNG)
921 GikoForm.AddMessageList(FThreadItem.Title + ' [
\83\8c\83X
\91\97\90M
\8e¸
\94s]', nil, gmiNG);
922 EditorPage.ActivePage := PreviewTab;
923 SetContent(ResponseText);
924 end else if State = gdsAbort then begin
925 GikoForm.AddMessageList(FThreadItem.Title + ' [
\92\86\92f]', nil, gmiSAD);
929 function TEditorForm.GetResultType(ResponseText: string): TGikoResultType;
931 if AnsiPos('
\8f\91\82«
\82±
\82Ý
\82ª
\8fI
\82í
\82è
\82Ü
\82µ
\82½', ResponseText) <> 0 then
933 else if (AnsiPos('
\83N
\83b
\83L
\81[
\82ª
\82È
\82¢
\82©
\8aú
\8cÀ
\90Ø
\82ê
\82Å
\82·', ResponseText) > 0) or
934 (AnsiPos('<title>
\83N
\83b
\83L
\81[
\8am
\94F
\81I</title>', ResponseText) > 0) or
935 (AnsiPos('<title>
\81¡
\83N
\83b
\83L
\81[
\8am
\94F
\81I
\81¡</title>', ResponseText) > 0) or
936 //(AnsiPos('
\83N
\83b
\83L
\81[
\8am
\94F', ResponseText) > 0) or
937 (AnsiPos(RES2CH_COOKIE, ResponseText) > 0) then
939 else if (AnsiPos('<font size=+2 color=#FF0000>
\8f\91\82«
\8d\9e\82Ý
\83`
\83F
\83b
\83N
\81I </font>', ResponseText) > 0) or
940 (AnsiPos('<title>
\81¡
\8f\91\82«
\8d\9e\82Ý
\8am
\94F
\82µ
\82Ü
\82·
\81¡</title>', ResponseText) > 0) or
941 (AnsiPos('<title>
\93\8a\8de
\8am
\94F</title>', ResponseText) > 0) or
942 (AnsiPos('<b>
\8f\91\82«
\82±
\82Ý
\8am
\94F</b>', ResponseText) > 0) or
943 (AnsiPos('="../test/subbbs.cgi">', ResponseText) > 0) or
944 (AnsiPos(RES2CH_FALSE, ResponseText) > 0) then
951 procedure TEditorForm.GetSendData(Source: TStringStream);
960 if FThreadItem = nil then
963 Board := FThreadItem.ParentBoard;
965 if GikoSys.Setting.UseMachineTime then begin
966 if GikoSys.Setting.TimeAdjust then
967 Adjust := Gikosys.Setting.TimeAdjustSec
969 Adjust := GikoSys.Setting.TimeAdjustSec * -1;
970 SendTime := GikoSys.DateTimeToInt(Now) - (9 * 60 * 60) + Adjust
972 if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then
973 SendTime := GikoSys.DateTimeToInt(Now)
975 SendTime := GikoSys.DateTimeToInt(Board.LastGetTime);
980 SessionID := GikoSys.Dolib.SessionID;
981 if SessionID <> '' then
982 s := 'sid=' + HttpEncode(SessionID) + '&'
986 + 'FROM=' + HttpEncode(NameComboBox.Text) + '&'
987 + 'mail=' + HttpEncode(MailComboBox.Text) + '&'
988 + 'MESSAGE=' + HttpEncode(body) + '&'
989 + 'bbs=' + Board.BBSID + '&'
990 + 'time=' + IntToStr(SendTime) + '&';
991 if FThreadItem = nil then begin
992 s := s + 'subject=' + HttpEncode(TitleEdit.Text) + '&';
993 s := s + 'submit=' + HttpEncode('
\91S
\90Ó
\94C
\82ð
\95\89\82¤
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ä
\8f\91\82«
\8d\9e\82Þ') + #13#10;
995 s := s + 'key=' + ChangeFileExt(FThreadItem.FileName, '') + '&';
996 s := s + 'submit=' + HttpEncode('
\8f\91\82«
\8d\9e\82Þ') + #13#10;
998 Source.WriteString(s);
1001 procedure TEditorForm.SaveSendFile;
1006 ini := TMemIniFile.Create(GikoSys.GetSentFileName);
1008 sDate := IntToStr(GikoSys.DateTimeToInt(Now));
1010 ini.WriteString(sDate, 'Name', NameComboBox.Text);
1011 ini.WriteString(sDate, 'EMail', MailComboBox.Text);
1012 ini.WriteString(sDate, 'Body', HttpEncode(BodyEdit.Text));
1013 ini.WriteInteger(sDate, 'Status', FStatusCode);
1014 ini.WriteDateTime(sDate, 'Date', Now);
1015 if FThreadItem = nil then begin
1016 ini.WriteString(sDate, 'Title', TitleEdit.Text);
1017 ini.WriteString(sDate, 'BBS', FBoard.BBSID);
1018 ini.WriteInteger(sDate, 'NewThread', 1);
1020 ini.WriteString(sDate, 'Title', FThreadItem.Title);
1021 ini.WriteString(sDate, 'BBS', FThreadItem.ParentBoard.BBSID);
1022 ini.WriteString(sDate, 'Key', ChangeFileExt(FThreadItem.FileName, ''));
1031 procedure TEditorForm.SendActionExecute(Sender: TObject);
1035 state : TGikoDownloadState;
1042 SendAction.Enabled := False;
1043 Application.ProcessMessages;
1044 if not Check then Exit;
1046 if FThreadItem = nil then
1049 Board := FThreadItem.ParentBoard;
1051 if FThreadItem = nil then begin
1052 rc := GikoUtil.MsgBox(Handle,
1053 '
\81u' + Board.Title + '
\81v
\94Â
\82É
\90V
\82µ
\82¢
\83X
\83\8c\83b
\83h
\97§
\82Ä
\82Ü
\82·'#13#10#13#10
1054 + '
\81E
\94Â
\82Ì
\83\8b\81[
\83\8b\82ð
\8eç
\82Á
\82½
\8f\91\82«
\8d\9e\82Ý
\82Å
\82 \82é
\82±
\82Æ
\82ð
\8am
\94F
\82µ
\82Ü
\82µ
\82½
\82©
\81H'#13#10
1055 + '
\81E
\91¼
\82É
\93¯
\82¶
\82æ
\82¤
\82È
\83X
\83\8c\83b
\83h
\82ª
\96³
\82©
\82Á
\82½
\82±
\82Æ
\82ð
\8am
\94F
\82µ
\82Ü
\82µ
\82½
\82©
\81H'#13#10#13#10
1056 + '
\81u
\82Í
\82¢
\81v
\82ð
\89\9f\82·
\82Æ
\91\97\90M
\82µ
\82Ü
\82·',
1058 MB_ICONQUESTION or MB_YESNO);
1059 if rc <> ID_YES then
1063 SetNameList(NameComboBox.Text, MailComboBox.Text);
1064 if KotehanCheckBox.Checked then begin
1065 Board.KotehanName := NameComboBox.Text;
1066 Board.KotehanMail := MailComboBox.Text;
1069 if Board.IsBoardPlugInAvailable then begin
1072 if FThreadItem = nil then begin
1073 //
\83X
\83\8c\97§
\82Ä
1074 state := TGikoDownloadState( Board.BoardPlugIn.CreateThread(
1075 DWORD( Board ), TitleEdit.Text, NameComboBox.Text, MailComboBox.Text, body ) );
1077 if state = gdsComplete then begin
1078 GikoForm.PlaySound('ResEnd');
1080 GikoForm.AddMessageList(FBoard.Title + ' [
\90V
\83X
\83\8c\91\97\90M
\8fI
\97¹]', nil, gmiOK);
1083 end else if State = gdsError then begin
1084 GikoForm.AddMessageList(FBoard.Title + ' [
\90V
\83X
\83\8c\91\97\90M
\8e¸
\94s]', nil, gmiNG);
1085 end else if State = gdsAbort then begin
1086 GikoForm.AddMessageList(FThreadItem.Title + ' [
\92\86\92f]', nil, gmiSAD);
1090 state := TGikoDownloadState( FThreadItem.BoardPlugIn.WriteThread(
1091 DWORD( FThreadItem ), NameComboBox.Text, MailComboBox.Text, body ) );
1093 if state = gdsComplete then begin
1094 GikoForm.PlaySound('ResEnd');
1096 GikoForm.AddMessageList(FThreadItem.Title + ' [
\83\8c\83X
\91\97\90M
\8fI
\97¹]', nil, gmiOK);
1099 end else if State = gdsError then begin
1100 GikoForm.AddMessageList(FThreadItem.Title + ' [
\83\8c\83X
\91\97\90M
\8e¸
\94s]', nil, gmiNG);
1101 end else if State = gdsAbort then begin
1102 GikoForm.AddMessageList(FThreadItem.Title + ' [
\92\86\92f]', nil, gmiSAD);
1106 if not Timer1.Enabled then
1107 Send(Board.SPID, Board.PON, True)
1109 if not CheckSambaTime(FHost, Now()) then begin
1110 rc := GikoUtil.MsgBox(Handle,
1111 'Samba24
\82Ì
\8bK
\92è
\92l
\96¢
\96\9e\82Ì
\95b
\90\94\82µ
\82©
\8co
\89ß
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ
\81B'#13#10
1112 + '
\91\97\90M
\82ð
\92\86\8e~
\82µ
\82Ü
\82·
\82©
\81H' + #13#10
1113 + '(
\81u
\82¢
\82¢
\82¦
\81v
\82¾
\82Æ
\91\97\90M
\82µ
\82Ü
\82·)', 'Samba24
\8cx
\8d\90',
1114 MB_YESNO or MB_ICONQUESTION);
1115 if rc = IDYES then begin
1120 Send(Board.SPID, Board.PON, True);
1125 if Timer1.Enabled then
1126 ReadSambaTime(FHost);
1130 procedure TEditorForm.SaveActionExecute(Sender: TObject);
1135 procedure TEditorForm.CloseActionExecute(Sender: TObject);
1140 procedure TEditorForm.UndoActionExecute(Sender: TObject);
1142 SendMessage(GetActiveControlHandle, WM_UNDO, 0, 0);
1145 procedure TEditorForm.CutActionExecute(Sender: TObject);
1147 SendMessage(GetActiveControlHandle, WM_CUT, 0, 0);
1150 procedure TEditorForm.CopyActionExecute(Sender: TObject);
1152 SendMessage(GetActiveControlHandle, WM_COPY, 0, 0);
1155 procedure TEditorForm.PasteActionExecute(Sender: TObject);
1157 SendMessage(GetActiveControlHandle, WM_PASTE, 0, 0);
1160 procedure TEditorForm.SelectAllActionExecute(Sender: TObject);
1162 SendMessage(GetActiveControlHandle, EM_SETSEL, 0, GetWindowTextLength(GetActiveControlHandle));
1165 procedure TEditorForm.TopActionExecute(Sender: TObject); //
\83E
\83B
\83\93\83h
\83E
\8dÅ
\91O
\96Ê(Stay)
\83{
\83^
\83\93\82Ì
\8f\88\97\9d
1167 if not (fsShowing in Self.FormState) then begin
1168 if TopAction.Checked then begin //
\83X
\83e
\83C
\8fó
\91Ô
\82É
\90Ý
\92è
1169 SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
1170 GikoSys.Setting.EditWindowStay := true;
1171 end else begin //
\83X
\83e
\83C
\8fó
\91Ô
\89ð
\8f\9c
1172 SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
1173 GikoSys.Setting.EditWindowStay := false;
1175 //
\83X
\83e
\83C
\8fó
\91Ô
\82Ì
\95Û
\91¶
1176 //GikoSys.Setting.EditWindowStay := FormStyle = fsStayOnTop;
1180 procedure TEditorForm.AbortActionExecute(Sender: TObject);
1185 procedure TEditorForm.SendActionUpdate(Sender: TObject);
1187 SendAction.Enabled := not FWork;
1190 procedure TEditorForm.SaveActionUpdate(Sender: TObject);
1192 SaveAction.Enabled := False;
1195 procedure TEditorForm.CloseActionUpdate(Sender: TObject);
1197 CloseAction.Enabled := not FWork;
1200 procedure TEditorForm.UndoActionUpdate(Sender: TObject);
1202 UndoAction.Enabled := (GetActiveControlHandle <> 0)
1203 and (SendMessage(GetActiveControlHandle, EM_CANUNDO, 0, 0) <> 0)
1207 procedure TEditorForm.CutActionUpdate(Sender: TObject);
1209 Selection: TSelection;
1212 AHandle := GetActiveControlHandle;
1213 SendMessage(AHandle, EM_GETSEL, Longint(@Selection.StartPos), Longint(@Selection.EndPos));
1214 CutAction.Enabled := (AHandle <> 0)
1215 and ((Selection.EndPos - Selection.StartPos) <> 0)
1219 procedure TEditorForm.CopyActionUpdate(Sender: TObject);
1221 Selection: TSelection;
1224 AHandle := GetActiveControlHandle;
1225 SendMessage(AHandle, EM_GETSEL, Longint(@Selection.StartPos), Longint(@Selection.EndPos));
1226 CopyAction.Enabled := (AHandle <> 0)
1227 and ((Selection.EndPos - Selection.StartPos) <> 0)
1231 procedure TEditorForm.PasteActionUpdate(Sender: TObject);
1233 PasteAction.Enabled := (GetActiveControlHandle <> 0)
1234 and (Clipboard.HasFormat(CF_TEXT))
1238 procedure TEditorForm.TopActionUpdate(Sender: TObject);
1240 TopAction.Enabled := not FWork;
1243 procedure TEditorForm.SageCheckBoxClick(Sender: TObject);
1245 if SageCheckBox.Checked then begin
1246 if AnsiPos('sage', MailComboBox.Text) = 0 then
1247 MailComboBox.Text := 'sage' + MailComboBox.Text;
1249 if AnsiPos('sage', MailComboBox.Text) <> 0 then
1250 MailComboBox.Text := StringReplace(MailComboBox.Text, 'sage', '', [rfReplaceAll]);
1254 procedure TEditorForm.MailComboBoxChange(Sender: TObject);
1256 if AnsiPos('sage', MailComboBox.Text) = 0 then
1257 SageCheckBox.Checked := False
1259 SageCheckBox.Checked := True;
1263 function TEditorForm.GetSPID(CookieLine: string): string;
1271 s := Trim(GikoSys.GetTokenIndex(CookieLine, ';', i));
1275 if Pos('SPID=', s) = 1 then begin
1276 Result := Trim(Copy(s, 6, Length(s)));
1284 function TEditorForm.GetPON(CookieLine: string): string;
1292 s := Trim(GikoSys.GetTokenIndex(CookieLine, ';', i));
1296 if Pos('PON=', s) = 1 then begin
1297 Result := Trim(Copy(s, 5, Length(s)));
1305 procedure TEditorForm.IdLogDebugReceive(ASender: TIdConnectionIntercept;
1308 StringStream: TStringStream;
1310 StringStream := TStringStream.Create('');
1312 StringStream.CopyFrom(AStream, AStream.Size);
1313 FDebugStrReceive := FDebugStrReceive + StringStream.DataString;
1319 procedure TEditorForm.IdLogDebugSend(ASender: TIdConnectionIntercept;
1322 StringStream: TStringStream;
1324 StringStream := TStringStream.Create('');
1326 StringStream.CopyFrom(AStream, AStream.Size);
1327 FDebugStrSend := FDebugStrSend + StringStream.DataString;
1333 procedure TEditorForm.TransActionExecute(Sender: TObject);
1335 AlphaBlend := TransAction.Checked;
1336 //
\94¼
\93§
\96¾
\8fó
\91Ô
\82Ì
\95Û
\91¶
1337 GikoSys.Setting.EditWindowTranslucent := TransAction.Checked;
1340 procedure TEditorForm.TransActionUpdate(Sender: TObject);
1342 TransAction.Enabled := not FWork;
1344 //StatusBar
\82ÌPanels[0]
\82Ì
\95\9d\82ð
\89Â
\95Ï
\81B
\8ec
\82è
\82ð
\8cÅ
\92è
\82É
\82·
\82é
1345 procedure TEditorForm.StatusBarResize(Sender: TObject);
1347 StatusBar.Panels[0].Width := StatusBar.Width
1348 - StatusBar.Panels[1].Width - StatusBar.Panels[2].Width;
1352 procedure TEditorForm.Timer1Timer(Sender: TObject);
1354 if FSambaTime = ZERO_DATE then
1355 StatusBar.Panels[1].Text := '
\8f\89\8f\91'
1357 FNow := IncMilliSecond(FNow, 500);
1358 StatusBar.Panels[1].Text := Format('%8.0f
\95b
\8co
\89ß', [SecondSpan(FNow, FSambaTime)]);
1362 //Samba.ini
\82Ì
\8f\91\82«
\8d\9e\82Ý
\8e\9e\8aÔ
\82ð
\93Ç
\82Ý
\8d\9e\82Þ
1363 procedure TEditorForm.ReadSambaTime(const AHost: string);
1368 Timer1.Enabled := false; //
\8co
\89ß
\95b
\90\94\95\
\8e¦Timer
\82ðOff
\82É
\82·
\82é
\81i
\82±
\82ê
\82ªON
\82Ì
\82Æ
\82«Samba24
\91Î
\8dôOn
\81j
1369 FNow := Now(); //
\8c»
\8dÝ
\8e\9e\8aÔ
\82ð
\8eæ
\93¾
\81iTimer
\95\
\8e¦
\97p
\82Å
\81ACheck
\82·
\82é
\82Æ
\82«
\82Í
\8dÄ
\82ÑNow()
\82ð
\8cÄ
\82Ô
\81j
1370 Timer1.Enabled := true; //
\8co
\89ß
\95b
\90\94\95\
\8e¦Timer
\82ðOn
\82É
\82·
\82é
\81i
\82±
\82ê
\82ªON
\82Ì
\82Æ
\82«Samba24
\91Î
\8dôOn
\81j
1371 ini := TMemIniFile.Create(GikoSys.GetSambaFileName);
1373 //
\95¶
\8e\9a\97ñ
\82Å
\93Ç
\82Ý
\8eæ
\82Á
\82Ä
\81A
\95Ï
\8a·
\8aÖ
\90\94\82ÅTDateTime
\82Ö
1374 tmp := ini.ReadString('Send', AHost, DateTimeToStr(ZERO_DATE));
1375 FSambaTime := ConvertDateTimeString(tmp);
1380 //Samba.ini
\82É
\8dÅ
\8fI
\8f\91\82«
\8d\9e\82Ý
\8e\9e\8aÔ
\82ð
\8f\91\82«
\8d\9e\82Þ
1381 procedure TEditorForm.WriteSambaTime(const AHost: string; ATime: TDateTime);
1385 ini := TMemIniFile.Create(GikoSys.GetSambaFileName);
1387 ini.WriteDateTime('Send', AHost, ATime);
1393 //
\8dÅ
\8fI
\8f\91\82«
\8d\9e\82Ý
\8e\9e\8aÔ
\82Æ
\8c»
\8dÝ
\8e\9e\82ð
\94ä
\8ar
\82·
\82é
\81i
\90^
\81F
\8bK
\92è
\92l
\88È
\8fã
\81@
\8bU
\81F
\8bK
\92è
\92l
\96¢
\96\9e\81j
1394 function TEditorForm.CheckSambaTime(const AHost: string; ATime: TDateTime): Boolean;
1397 SettingTime: Integer;
1399 SettingTime := ReadSettingTime(AHost);
1400 ReadSambaTime(AHost);
1401 pastsec := SecondSpan(ATime, FSambaTime);
1402 if pastsec > SettingTime then
1407 //AHost
\81i
\8eI
\96¼
\81j
\82ÌSamba
\82Ì
\8bK
\92è
\92l
\82ð
\93Ç
\82Ý
\8d\9e\82Þ
1408 function TEditorForm.ReadSettingTime(const AHost: string): Integer;
1412 ini := TMemIniFile.Create(GikoSys.GetSambaFileName);
1414 Result := ini.ReadInteger('Setting', AHost, 0);
1415 //
\8bK
\92è
\92l
\82ª
\82O
\82Ì
\82Æ
\82«
\81A
\82à
\82µ
\82
\82Í
\90Ý
\92è
\82³
\82ê
\82Ä
\82¢
\82È
\82¢
\82Æ
\82«
\82Í
\81A
\83t
\83@
\83C
\83\8b\82É
\8f\91\82«
\82½
\82·
\81B
1416 if Result = 0 then begin
1417 ini.WriteInteger('Setting', AHost, 0);
1424 //Form
\82ªActive
\82É
\82È
\82Á
\82½
\82ç
\8dÅ
\8fI
\8f\91\82«
\8d\9e\82Ý
\8e\9e\8aÔ
\82ð
\93Ç
\82Ý
\8d\9e\82Þ
1425 procedure TEditorForm.FormActivate(Sender: TObject);
1427 if ( Timer1.Enabled ) and ( FThreadItem <> nil )then
1428 ReadSambaTime(FHost);
1430 //Samba24
\91Î
\8dô
\82ð
\8eg
\82¤
\82©
\82Ç
\82¤
\82©
\8c\88\82ß
\82é
\8aÖ
\90\94
1431 //ReadSambaTime
\82ð
\8cÄ
\82Ñ
\8fo
\82·
\82ÆTimer
\82ªOn
\82É
\82È
\82é
1432 procedure TEditorForm.SetSamba24(AURL: string);
1434 Protocol, Host, Path, Document, Port, Bookmark : string;
1436 //Samba24
\91Î
\8dô
\82ð
\82µ
\82È
\82¢
\82È
\82ç
\8fI
\97¹
1437 if not GikoSys.Setting.UseSamba then
1439 //Host
\82ÌURL
\82É'.2ch.'
\82©'.bbspink.'
\82ª
\8aÜ
\82Ü
\82ê
\82Ä
\82¢
\82½
\82çSamba24
\91Î
\8dô
\82ð
\82·
\82é
1440 GikoSys.ParseURI( AURL, Protocol,Host, Path, Document, Port, Bookmark );
1441 if GikoSys.Is2chHost(Host) then begin
1442 Host := Copy(Host, 1, AnsiPos('.', Host) - 1);
1443 FHost := Host; //FHost=
\8eI
\96¼
1444 ReadSambaTime(FHost); //
\88È
\91O
\82Ì
\8f\91\82«
\8d\9e\82Ý
\8e\9e\8aÔ
\82ð
\93Ç
\82Ý
\8d\9e\82Þ
1445 //StatusBar
\82É
\82±
\82Ì
\8eI
\82Ì
\8bK
\92è
\92l
\82ð
\95\
\8e¦
\82·
\82é
1446 StatusBar.Panels[2].Text := 'Samba24
\8bK
\92è
\92l' + IntToStr(ReadSettingTime(FHost));
1449 procedure TEditorForm.FormCloseQuery(Sender: TObject;
1450 var CanClose: Boolean);
1452 CanClose := not FWork;
1455 function TEditorForm.GetOEIndentChar : string;
1458 Identities : string;
1461 DEFAULT_CHAR = '> ';
1462 OE_MAIL_PATH = '\Software\Microsoft\Outlook Express\5.0\Mail';
1463 INDENT_CHAR = 'Indent Char';
1466 Result := DEFAULT_CHAR;
1467 regKey := TRegistry.Create;
1470 regKey.RootKey := HKEY_CURRENT_USER;
1471 if not regKey.OpenKey( 'Identities', False ) then
1473 Identities := regKey.ReadString( 'Default User ID' );
1474 if Identities = '' then
1476 if not regKey.OpenKey( Identities + OE_MAIL_PATH, False ) then
1478 IndentChar := regKey.ReadInteger( INDENT_CHAR );
1479 Result := Char( IndentChar ) + ' ';
1488 procedure TEditorForm.QuotePasteActionExecute(Sender: TObject);
1495 quote := GetOEIndentChar;
1496 s := TStringList.Create;
1498 s.Text := Clipboard.AsText;
1500 for i := s.Count - 1 downto 0 do
1501 s[ i ] := quote + s[ i ];
1503 BodyEdit.SelText := s.Text;
1510 procedure TEditorForm.SpaceToNBSPActionExecute(Sender: TObject);
1512 GikoSys.Setting.SpaceToNBSP := SpaceToNBSPAction.Checked;
1513 if EditorPage.ActivePage = PreviewTab then
1517 procedure TEditorForm.AmpToCharRefActionExecute(Sender: TObject);
1519 GikoSys.Setting.AmpToCharRef := AmpToCharRefAction.Checked;
1520 if EditorPage.ActivePage = PreviewTab then
1524 procedure TEditorForm.BoardTopClick(Sender: TObject);
1528 ini := TIniFile.Create(GikoSys.Setting.GetFileName);
1530 BoardtopTab.TabVisible := BoardTop.Checked;
1531 ini.WriteBool('EditorForm', 'BoardTopTab', BoardtopTab.TabVisible);
1538 procedure TEditorForm.GetSETTINGTXTActionExecute(Sender: TObject);
1540 URL, RefURL: string;
1541 settingBody: TStringList;
1545 if FThreadItem = nil then
1548 tmpBoard := FThreadItem.ParentBoard;
1550 if tmpBoard = nil then Exit;
1552 RefURL := tmpBoard.URL;
1553 if RefURL[Length(RefURL)] <> '/' then
1554 URL := RefURL + '/' + 'SETTING.TXT'
1556 URL := RefURL + 'SETTING.TXT';
1558 Indy.Request.LastModified := tmpBoard.SETTINGTXTTime;
1559 Indy.Request.Referer := RefURL;
1560 Screen.Cursor := crHourGlass;
1561 settingBody := TStringList.Create;
1563 StatusBar.Panels[0].Text := 'SETTING.TXT
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86';
1564 settingBody.Text := Indy.Get(URL);
1565 if( Indy.ResponseCode = 200 ) then begin
1566 settingBody.SaveToFile(tmpBoard.GetSETTINGTXTFileName);
1567 tmpBoard.SETTINGTXTTime := Indy.Response.LastModified;
1568 tmpBoard.IsSETTINGTXT := true;
1569 tmpBoard.TitlePictureURL := GetTitlePictureURL(settingBody, tmpBoard);
1570 tmpBoard.Modified := true;
1573 StatusBar.Panels[0].Text := 'SETTING.TXT (' + IntToStr(Indy.ResponseCode) + ')';
1575 Screen.Cursor := crDefault;
1577 ShowBoardInformation(tmpBoard, BoardInformationMemo);
1580 procedure TEditorForm.GetheadtxtActionExecute(Sender: TObject);
1582 URL, RefURL: string;
1583 settingBody: TStringList;
1587 if FThreadItem = nil then
1590 tmpBoard := FThreadItem.ParentBoard;
1592 if tmpBoard = nil then Exit;
1594 RefURL := tmpBoard.URL;
1595 if RefURL[Length(RefURL)] <> '/' then
1596 URL := RefURL + '/' + 'head.txt'
1598 URL := RefURL + 'head.txt';
1600 Indy.Request.LastModified := tmpBoard.HEADTXTTime;
1601 Indy.Request.Referer := RefURL;
1602 Screen.Cursor := crHourGlass;
1603 settingBody := TStringList.Create;
1605 StatusBar.Panels[0].Text := 'head.txt
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86';
1606 settingBody.Text := Indy.Get(URL);
1607 if( Indy.ResponseCode = 200 ) then begin
1608 settingBody.SaveToFile(tmpBoard.GETHEADTXTFileName);
1609 tmpBoard.HEADTXTTime := Indy.Response.LastModified;
1610 tmpBoard.IsHEADTXT := true;
1611 tmpBoard.Modified := true;
1614 StatusBar.Panels[0].Text := 'head.txt (' + IntToStr(Indy.ResponseCode) + ')';
1616 Screen.Cursor := crDefault;
1618 ShowBoardInformation(tmpBoard, BoardInformationMemo);
1621 procedure TEditorForm.ShowBoardInformation(ABoard: TBoard; AMemo: TMemo);
1626 AMemo.Lines.Add('[head.txt]');
1627 if ABoard.IsHEADTXT then begin
1628 if FileExists(ABoard.GETHEADTXTFileName) then begin
1629 AMemo.Lines.Add(DateTimeToStr(ABoard.HEADTXTTime) + '
\8dX
\90V');
1630 body := TStringList.Create;
1632 body.LoadFromFile(ABoard.GETHEADTXTFileName);
1633 CustomStringReplace(body, '<br>', '', true);
1634 AMemo.Lines.AddStrings(body);
1639 ABoard.IsHEADTXT := false;
1640 ABoard.HEADTXTTime := ZERO_DATE;
1641 AMemo.Lines.Add('Local
\82É
\95Û
\91¶
\82³
\82ê
\82½head.txt
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ');
1642 AMemo.Lines.Add('
\83\81\83j
\83\85\81[
\82æ
\82è
\8dÄ
\8eæ
\93¾
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B');
1645 AMemo.Lines.Add('head.txt
\82ð
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ
\81B');
1646 AMemo.Lines.Add('
\83\81\83j
\83\85\81[
\82æ
\82è
\8eæ
\93¾
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B');
1649 AMemo.Lines.Add(#13#10 + '[SETTING.TXT]');
1650 if ABoard.IsSETTINGTXT then begin
1651 if FileExists(ABoard.GetSETTINGTXTFileName) then begin
1652 AMemo.Lines.Add(DateTimeToStr(ABoard.SETTINGTXTTime) + '
\8dX
\90V');
1653 body := TStringList.Create;
1655 body.LoadFromFile(ABoard.GetSETTINGTXTFileName);
1656 AMemo.Lines.AddStrings(body);
1661 ABoard.IsSETTINGTXT := false;
1662 ABoard.SETTINGTXTTime := ZERO_DATE;
1663 AMemo.Lines.Add('Local
\82É
\95Û
\91¶
\82³
\82ê
\82½SETTING.TXT
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ');
1664 AMemo.Lines.Add('
\83\81\83j
\83\85\81[
\82æ
\82è
\8dÄ
\8eæ
\93¾
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B');
1667 AMemo.Lines.Add('SETTING.TXT
\82ð
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ
\81B');
1668 AMemo.Lines.Add('
\83\81\83j
\83\85\81[
\82æ
\82è
\8eæ
\93¾
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B');
1671 function TEditorForm.GetTitlePictureURL(body: TStringList; ABoard: TBoard): string;
1672 //BBS_TITLE_PICTURE=
1679 for i := 0 to body.Count - 1 do begin
1680 if (AnsiPos('BBS_TITLE_PICTURE=', body[i]) > 0) or
1681 (AnsiPos('BBS_FIGUREHEAD=', body[i]) > 0) then begin
1683 Delete(tmp, 1, AnsiPos('=', tmp));
1684 if AnsiPos('../', tmp) > 0 then begin
1685 CustomStringReplace(tmp, '../', GikoSys.UrlToServer(ABoard.URL));
1693 procedure TEditorForm.GetTitlePictureActionUpdate(Sender: TObject);
1695 if FThreadItem = nil then
1696 GetTitlePictureAction.Enabled := FBoard.IsSETTINGTXT
1698 GetTitlePictureAction.Enabled := FThreadItem.ParentBoard.IsSETTINGTXT;
1702 procedure TEditorForm.GetTitlePictureActionExecute(Sender: TObject);
1704 memStream: TMemoryStream;
1708 memStream := TMemoryStream.Create;
1710 if FThreadItem = nil then
1713 tmpBoard := FThreadItem.ParentBoard;
1715 Indy.Request.Referer := tmpBoard.URL;
1716 if tmpBoard.TitlePictureURL <> '' then begin
1717 StatusBar.Panels[0].Text := '
\94ÂTOP
\89æ
\91\9c\83_
\83E
\83\93\83\8d\81[
\83h
\92\86';
1718 Screen.Cursor := crHourGlass;
1719 Indy.Get(tmpBoard.TitlePictureURL, memStream);
1720 if Indy.ResponseCode = 200 then begin
1721 memStream.SaveToFile(tmpBoard.GetTitlePictureFileName);
1723 tmpBoard.Modified := true;
1727 Screen.Cursor := crDefault;
1728 StatusBar.Panels[0].Text := '
\94ÂTOP
\89æ
\91\9c (' + IntToStr(Indy.ResponseCode) + ')';
1733 procedure TEditorForm.ShowTitlePicture();
1737 if FThreadItem = nil then
1740 tmpBoard := FThreadItem.ParentBoard;
1742 if FileExists(tmpBoard.GetTitlePictureFileName) then begin
1743 TitlePictureBrowser.Navigate(tmpBoard.GetTitlePictureFileName);
1745 TitlePictureBrowser.Navigate('about:blank');
1749 function TEditorForm.GetFusianaName(body: TStringList; ABoard: TBoard): String;
1754 for i := 0 to body.Count - 1 do begin
1755 if (AnsiPos('BBS_NONAME_NAME=', body[i]) > 0) then begin
1757 Delete(tmp, 1, AnsiPos('=', tmp));