• R/O
  • HTTP
  • SSH
  • HTTPS

gikonavi: Commit


Commit MetaInfo

Revision1650028eb47c68aeda224503e4d833b48fddaaa5 (tree)
Time2008-09-15 15:45:45
Authorcvs2git <cvs2git>
Commitercvs2git

Log Message

This commit was manufactured by cvs2svn to create tag 'v1_59_1_765'.

Change Summary

Incremental Difference

--- a/Editor.pas
+++ b/Editor.pas
@@ -249,6 +249,8 @@ type
249249 function LFusianaGet(const s: String): Boolean;
250250 // Cookieの取得
251251 procedure GetCookie(Rawtext: String; ABoard: TBoard);
252+ // hiddenデータ取得
253+ procedure GetHiddenParameter(Rawtext: String; ABoard: TBoard);
252254 //! 入力アシストのポップアップメニューのクリックイベント
253255 procedure InputAssistMenuClick(Sender: TObject);
254256 //! TMemoのカーソル位置に文字列挿入
@@ -832,7 +834,10 @@ begin
832834
833835 if MsgResult = IDYES then begin
834836 GetCookie(Indy.Response.RawHeaders.Text, Board);
835-
837+ if (Board.Is2ch) then begin
838+ GetHiddenParameter(ResponseText, Board);
839+ end;
840+
836841 if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then
837842 raise Exception.Create('');
838843
@@ -860,6 +865,9 @@ begin
860865
861866 if MsgResult = IDYES then begin
862867 GetCookie(Indy.Response.RawHeaders.Text, Board);
868+ if (Board.Is2ch) then begin
869+ GetHiddenParameter(ResponseText, Board);
870+ end;
863871
864872 if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then
865873 raise Exception.Create('');
@@ -1898,7 +1906,90 @@ begin
18981906 end;
18991907 end;
19001908 end;
1909+//! hiddenデータ取得
1910+procedure TEditorForm.GetHiddenParameter(Rawtext: String; ABoard: TBoard);
1911+const
1912+ INPUT_MARK = '<input type=hidden' ; // 大文字小文字ばらばらなことに注意
1913+ VALUE_MARK = 'value=' ; // 大文字小文字ばらばらなことに注意
1914+ NAME_MARK = 'name=' ; // 大文字小文字ばらばらなことに注意
1915+ IGNORE_NAMES : array[0..6] of String =
1916+ ('subject', 'from', 'mail', 'message', 'bbs', 'time', 'key');
1917+var
1918+ tmp, line, name, value, lname : String;
1919+ pos, pose, i : Integer;
1920+begin
1921+ tmp := AnsiLowerCase(Rawtext);
1922+ pos := AnsiPos(INPUT_MARK, tmp);
1923+ while (pos > 0 ) do begin
1924+ tmp := Copy(Rawtext, pos + Length(INPUT_MARK), Length(tmp));
1925+ Delete(Rawtext, 1, pos+ Length(INPUT_MARK) - 1);
1926+ pose := AnsiPos('>', tmp);
1927+ // name=xxx value=yyy が切り出される
1928+ line := Copy(tmp, 1, pose - 1);
1929+ name := '';
1930+ value := '';
1931+ pos := AnsiPos(NAME_MARK, tmp);
1932+ if (pos > 0) then begin
1933+ name := Copy(Rawtext, pos + Length(NAME_MARK), Length(line));
1934+ //半角"で始まっているか
1935+ if AnsiPos('"', name) = 1 then begin
1936+ // 半角"までをコピー
1937+ Delete(name, 1, 1);
1938+ pose := AnsiPos('"', name);
1939+ if (pose > 0) then begin
1940+ Delete(name, pose, Length(name));
1941+ end else begin
1942+ pose := AnsiPos(' ', name);
1943+ if (pose > 0) then begin
1944+ Delete(name, pose, Length(name));
1945+ end;
1946+ end;
1947+ end else begin
1948+ pose := AnsiPos(' ', name);
1949+ if (pose > 0) then begin
1950+ Delete(name, pose, Length(name));
1951+ end;
1952+ end;
1953+ end;
1954+ lname := AnsiLowerCase(name);
1955+ for i := 0 to Length(IGNORE_NAMES) do begin
1956+ if lname = IGNORE_NAMES[i] then begin
1957+ name := '';
1958+ break;
1959+ end;
1960+ end;
1961+ pos := AnsiPos(VALUE_MARK, tmp);
1962+ if (name <> '') and (pos > 0) then begin
1963+ value := Copy(Rawtext, pos + Length(VALUE_MARK), Length(line));
1964+ //半角"で始まっているか
1965+ if AnsiPos('"', value) = 1 then begin
1966+ // 半角"までをコピー
1967+ Delete(value, 1, 1);
1968+ pose := AnsiPos('"', value);
1969+ if (pose > 0) then begin
1970+ Delete(value, pose, Length(value));
1971+ end else begin
1972+ pose := AnsiPos(' ', value);
1973+ if (pose > 0) then begin
1974+ Delete(value, pose, Length(value));
1975+ end;
1976+ end;
1977+ end else begin
1978+ pose := AnsiPos(' ', value);
1979+ if (pose > 0) then begin
1980+ Delete(value, pose, Length(name));
1981+ end;
1982+ end;
1983+ end;
1984+ if (name <> '') then begin
1985+ ABoard.Cookie := ABoard.Cookie + name + '=' + value + '; ';
19011986
1987+ end;
1988+ Delete(tmp, 1, Length(line));
1989+ Delete(Rawtext, 1, Length(line));
1990+ pos := AnsiPos(INPUT_MARK, tmp);
1991+ end;
1992+end;
19021993
19031994 //! サンバ更新のアクションのUpdateイベント 簡単のためタイマーと同じにしておく
19041995 procedure TEditorForm.UpdateSambaActionUpdate(Sender: TObject);
@@ -2341,8 +2432,7 @@ begin
23412432 Result := Result + 'MDMD=' + GikoSys.Setting.BeCode + '; '
23422433 + 'DMDM=' + GikoSys.Setting.BeUserID + '; ';
23432434 end;
2344-
2345- end;
2435+ end;
23462436
23472437 Result := 'Cookie: ' + Result + 'NAME=' + NameComboBox.Text + '; MAIL=' + MailComboBox.Text;
23482438
--- a/GikoSystem.pas
+++ b/GikoSystem.pas
@@ -264,7 +264,7 @@ const
264264 ZERO_DATE: Integer = 25569;
265265 BETA_VERSION_NAME_E = 'beta';
266266 BETA_VERSION_NAME_J = 'バタ';
267- BETA_VERSION = 58;
267+ BETA_VERSION = 59;
268268 BETA_VERSION_BUILD = ''; //!< debug版など
269269 APP_NAME = 'gikoNavi';
270270 BE_PHP_URL = 'http://be.2ch.net/test/p.php?i=';
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -1,4 +1,4 @@
1-■ギコナビ Version1.00 バタ58 Readme.txt
1+■ギコナビ Version1.00 バタ59 Readme.txt
22
33
44 ------------------------------
@@ -108,6 +108,9 @@ LICENSE
108108 ------------------------------
109109 履歴
110110 ------------------------------
111+2008/XX/XX
112+ Version バタ59
113+
111114 2008/09/20
112115 Version バタ58
113116 プレビューのURLから登録してある外部アプリを起動する機能を追加
Show on old repository browser