[P2-php-svn] [868] p2/ for version 1.8.65

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 8月 10日 (火) 12:05:48 JST


Revision: 868
          http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=868
Author:   akid
Date:     2010-08-10 12:05:48 +0900 (Tue, 10 Aug 2010)

Log Message:
-----------
p2/ for version 1.8.65

Modified Paths:
--------------
    p2/trunk/conf/conf.inc.php
    p2/trunk/conf/conf_admin.inc.php
    p2/trunk/conf/conf_hostcheck.php
    p2/trunk/conf/conf_system.inc.php
    p2/trunk/doc/ChangeLog.txt
    p2/trunk/edit_aborn_word.php
    p2/trunk/edit_conf_user.php
    p2/trunk/edit_conf_user_i.php
    p2/trunk/editpref_i.php
    p2/trunk/index.php
    p2/trunk/info_i.php
    p2/trunk/iphone/ShowThreadK.php
    p2/trunk/iphone/js/smartpopup.iPhone.js
    p2/trunk/iphone/post_form_popup.inc.php
    p2/trunk/iphone/post_options_loader_popup.inc.php
    p2/trunk/iphone/read_footer_k.inc.php
    p2/trunk/iphone/read_header_k.inc.php
    p2/trunk/iphone/sb_header_k.inc.php
    p2/trunk/iui/read.css
    p2/trunk/js/post_form.js
    p2/trunk/js/smartpopup.js
    p2/trunk/lib/BbsMap.php
    p2/trunk/lib/BrdMenu.php
    p2/trunk/lib/HostCheck.php
    p2/trunk/lib/Login.php
    p2/trunk/lib/P2Util.php
    p2/trunk/lib/Session.php
    p2/trunk/lib/SettingTxt.php
    p2/trunk/lib/ShowThread.php
    p2/trunk/lib/ShowThreadK.php
    p2/trunk/lib/ShowThreadPc.php
    p2/trunk/lib/SubjectTxt.php
    p2/trunk/lib/Thread.php
    p2/trunk/lib/ThreadList.php
    p2/trunk/lib/ThreadRead.php
    p2/trunk/lib/UA.php
    p2/trunk/lib/index.funcs.php
    p2/trunk/lib/login_first.inc.php
    p2/trunk/lib/menu.inc.php
    p2/trunk/lib/post_options_loader.inc.php
    p2/trunk/lib/read_filter_k.funcs.php
    p2/trunk/lib/read_footer.inc.php
    p2/trunk/lib/sb_header.inc.php
    p2/trunk/lib/sb_header_k.inc.php
    p2/trunk/login.php
    p2/trunk/post.php
    p2/trunk/read.php
    p2/trunk/read_filter.php
    p2/trunk/read_filter_i.php
    p2/trunk/title.php


-------------- next part --------------
Modified: p2/trunk/conf/conf.inc.php
===================================================================
--- p2/trunk/conf/conf.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/conf/conf.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -196,7 +196,8 @@
 
 // ƒƒOƒCƒ“ƒNƒ‰ƒX‚̃Cƒ“ƒXƒ^ƒ“ƒX¶¬iƒƒOƒCƒ“ƒ†[ƒU‚ªŽw’肳‚ê‚Ä‚¢‚È‚¯‚ê‚΁A‚±‚ÌŽž“_‚эƒOƒCƒ“ƒtƒH[ƒ€•\Ž¦‚Ɂj
 // i[todo]‚±‚̏ˆ—‚ðã‚ÉŽ‚Á‚čs‚«‚½‚¢‚ªAƒ†[ƒU[ƒƒOƒCƒ“‚©V‹K“o˜^‚Ç‚¤‚©‚Ì‹æ•Ê‚ª‚Å‚«‚È‚­‚È‚éB
-// login_first.inc.php‚Ìfile_exists($_conf['auth_user_file']) ‚ŐV‹K“o˜^‚©‚Ç‚¤‚©‚𔻒肵‚Ä‚¢‚é‚Ì‚ð‰ü‚ß‚é•K—v‚ª‚ ‚é)
+// login_first.inc.php ‚Ì file_exists($_conf['auth_user_file']) iP2Util::existsAuthUserData()j ‚Å
+// V‹K“o˜^‚©‚Ç‚¤‚©‚𔻒肵‚Ä‚¢‚é‚Ì‚ð‰ü‚ß‚é•K—v‚ª‚ ‚éBV‹K“o˜^—p‚̈ø”‚ð—pˆÓ‚·‚é‚Æ‚©)
 $_login = new Login;
 
 // ‚±‚̃tƒ@ƒCƒ‹“à‚ł̏ˆ—‚Í‚±‚±‚Ü‚Å
@@ -264,10 +265,13 @@
 {
     global $_conf;
     
+    ini_set('session.use_only_cookies', 0); // PHP 5.3.0‚©‚çƒfƒtƒHƒ‹ƒg‚ª"1"‚É‚È‚Á‚½
+    
     // –¼‘O‚́AƒZƒbƒVƒ‡ƒ“ƒNƒbƒL[‚ð”jŠü‚·‚é‚Æ‚«‚Ì‚½‚߂ɁAƒZƒbƒVƒ‡ƒ“—˜—p‚Ì—L–³‚ÉŠÖ‚í‚炸Ý’è‚·‚é
     session_name('PS');
 
     $cookie = session_get_cookie_params();
+    // @see Session::unSession()
     session_set_cookie_params($cookie['lifetime'], '/', P2Util::getCookieDomain(), $secure = false);
     
     // css.php ‚Í“Á•Ê‚ɃZƒbƒVƒ‡ƒ“‚©‚çŠO‚·B

Modified: p2/trunk/conf/conf_admin.inc.php
===================================================================
--- p2/trunk/conf/conf_admin.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/conf/conf_admin.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -66,7 +66,7 @@
 $_conf['dlSubjectTotalLimitTime'] = 20; // (20) subject.txt‚̃_ƒEƒ“ƒ[ƒh‚É”ï‚â‚·‡Œv§ŒÀŽžŠÔi•bj
 
 // iƒ‚ƒoƒCƒ‹•\Ž¦Žžjsubject.txt‚̃_ƒEƒ“ƒ[ƒh‚É”ï‚â‚·‡Œv§ŒÀŽžŠÔi•bj
-$_conf['dlSubjectTotalLimitTimeM'] = 8; // (8) 
+$_conf['dlSubjectTotalLimitTimeM'] = 10; // (10) 
 
 // pecl_http ‚ª—˜—p‚Å‚«‚éê‡AHttpRequestPool ‚É‚æ‚é•À—ñƒ_ƒEƒ[ƒh‚ð—LŒø‚É‚·‚éi¦PHP5ˆÈã‚̂݉j
 // ‚±‚̐ݒè‚ð—LŒø‚É‚µ‚½ê‡‚́A$_conf['dlSubjectTotalLimitTime*'] ‚̐ݒ肪–³Œø‚Æ‚È‚éB

Modified: p2/trunk/conf/conf_hostcheck.php
===================================================================
--- p2/trunk/conf/conf_hostcheck.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/conf/conf_hostcheck.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -9,26 +9,26 @@
 $GLOBALS['_HOSTCHKCONF'] = array();
 
 // ƒzƒXƒg‚²‚Ƃ̐ݒè (0:‹‘”Û; 1:‹–‰Â;)
-// $_conf['secure']['auth_host'] == 0 ‚Ì‚Æ‚«A“–‘R‚È‚ª‚ç–³ŒøB
+// $_conf['secure']['auth_host'] == 0 ‚Ì‚Æ‚«Aƒ`ƒFƒbƒN‚µ‚È‚¢B
 // $_conf['secure']['auth_host'] == 1 ‚Ì‚Æ‚«A’l‚ª1i^j‚̃zƒXƒg‚Ì‚Ý‹–‰ÂB
 // $_conf['secure']['auth_host'] == 2 ‚Ì‚Æ‚«A’l‚ª0i‹Uj‚̃zƒXƒg‚Ì‚Ý‹‘”ہB
 $GLOBALS['_HOSTCHKCONF']['host_type'] = array(
     // p2‚ª“®ì‚µ‚Ä‚¢‚éƒ}ƒVƒ“
-        'localhost' => 1,
+    'localhost' => 1,
     // ƒNƒ‰ƒXA`C‚̃vƒ‰ƒCƒx[ƒgƒAƒhƒŒƒX
-        'private'   => 1,
+    'private'   => 1,
     // iƒ‚[ƒh
-        'docomo'    => 1,
+    'docomo'    => 1,
     // ezWEB
-        'au'        => 1,
+    'au'        => 1,
     // SoftBank(Vodafone Live!)
-        'SoftBank'  => 1,
+    'SoftBank'  => 1,
     // WILLCOM(Air H")
-        'AirH'      => 1,
+    'AirH'      => 1,
     // iPhone
-        'iPhone'    => 0,
+    'iPhone'    => 0,
     // ƒ†[ƒU[Ý’è
-        'custom'    => 0,
+    'custom'    => 0,
 );
 
 // ƒAƒNƒZƒX‚ð‹–‰Â‚·‚éIPƒAƒhƒŒƒX‘шæ

Modified: p2/trunk/conf/conf_system.inc.php
===================================================================
--- p2/trunk/conf/conf_system.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/conf/conf_system.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -3,7 +3,7 @@
 // ‚±‚̃tƒ@ƒCƒ‹‚́A“Á‚É——R‚Ì–³‚¢ŒÀ‚è•ÏX‚µ‚È‚¢‚ʼnº‚³‚¢B
 // include from conf.inc.php
 
-$_conf['p2version'] = '1.8.64'; // rep2‚̃o[ƒWƒ‡ƒ“
+$_conf['p2version'] = '1.8.65'; // rep2‚̃o[ƒWƒ‡ƒ“
 
 $_conf['p2name'] = 'rep2';    // rep2‚Ì–¼‘OB
 
@@ -95,7 +95,13 @@
 // ’[––”»’è
 _checkBrowser(); // $_conf, UA::setForceMode()
 
-// b=pc ‚Í‚Ü‚¾‘S‚ẴŠƒ“ƒN‚ւ̒ljÁ‚ªŠ®—¹‚µ‚Ä‚¨‚炸A‹@”\‚µ‚Ä‚¢‚È‚¢‰ÓŠ‚ª‚ ‚éB’n“¹‚ɐ®”õ‚µ‚Ä‚¢‚«‚½‚¢B
+// b=pc ‚ÌGETŽw’è‚Í‚Ü‚¾‘S‚ẴŠƒ“ƒN‚ւ̒ljÁ‚ªŠ®—¹‚µ‚Ä‚¨‚炸A‹@”\‚µ‚Ä‚¢‚È‚¢‰ÓŠ‚ª‚ ‚éB’n“¹‚ɐ®”õ‚µ‚Ä‚¢‚«‚½‚¢B
+
+// 2010/06/09 cookie‚ÉbŽw’è‚ðƒZƒbƒg‚µ‚Ä‚Ý‚é
+if ($v = UA::getQueryValue()) {
+    P2Util::setCookie(UA::getQueryKey(), $v, 0);
+}
+
 // output_add_rewrite_var() ‚Í•Ö—˜‚¾‚ªAo—Í‚ªƒoƒbƒtƒ@‚³‚ê‚Ä‘ÌŠ´‘¬“x‚ª—Ž‚¿‚é‚Ì‚ª“ï“_BB
 // ‘ÌŠ´‘¬“x‚ð—Ž‚Æ‚³‚È‚¢—Ç‚¢•û–@‚È‚¢‚©‚ȁH
 _setOldStyleKtaiQuery(); // $_conf['ktai'] “™‚ðƒZƒbƒg
@@ -342,7 +348,11 @@
     // mb_detect_order("SJIS-win,eucJP-win,ASCII");
     mb_internal_encoding('SJIS-win');
     mb_http_output('pass');
-    mb_substitute_character(63); // •¶ŽšƒR[ƒh•ÏŠ·‚ÉŽ¸”s‚µ‚½•¶Žš‚ª "?" ‚É‚È‚é
+    if (version_compare(phpversion(), '5.3.0', 'ge')) { // ‚±‚̃o[ƒWƒ‡ƒ“Žw’è‚̓AƒoƒEƒg
+        mb_substitute_character('entity'); // BBS_UNICODE=pass
+    } else {
+        mb_substitute_character(63); // •¶ŽšƒR[ƒh•ÏŠ·‚ÉŽ¸”s‚µ‚½•¶Žš‚ª "?" ‚É‚È‚é
+    }
     //mb_substitute_character(0x3013); // ¬
 
     ini_set('default_mimetype', 'text/html');
@@ -485,13 +495,11 @@
     global $_conf;
     
     // Šî–{iPCj
-    $_conf['ktai'] = false;
-    $_conf['disable_cookie'] = false;
-
+    $_conf['ktai'] = false; // ”ñ„§
+    $_conf['use_cookies'] = true; // –¢Žg—pA”ñ„§
+    $_conf['accept_charset'] = 'Shift_JIS';
     if (UA::isSafariGroup()) {
         $_conf['accept_charset'] = 'UTF-8';
-    } else {
-        $_conf['accept_charset'] = 'Shift_JIS';
     }
 
     $mobile = &Net_UserAgent_Mobile::singleton();
@@ -502,37 +510,29 @@
     } elseif ($mobile and !$mobile->isNonMobile()) {
 
         $_conf['ktai'] = true;
-        $_conf['disable_cookie'] = false;
-        $_conf['accept_charset'] = 'Shift_JIS';
 
-        // ƒxƒ“ƒ_”»’è
-        // docomo i-Mode
         if ($mobile->isDoCoMo()) {
-            // [todo] docomo‚̐V‚µ‚¢‚Ì‚ÍCookie‚àŽg‚¦‚éc
-            $_conf['disable_cookie'] = true;
-        
-        // EZweb (au or Tu-Ka)
-        } elseif ($mobile->isEZweb()) {
-            $_conf['disable_cookie'] = false;
-        
-        // SoftBank(‹ŒVodafone Live!)
+            $_conf['use_cookies'] = false;
+            
+            // http://www.nttdocomo.co.jp/service/imode/make/content/ip/xheader/index.html
+            if (array_key_exists('HTTP_X_UE_VERSION', $_SERVER)) {
+                if ((int)$_SERVER['HTTP_X_UE_VERSION'] >= 2) {
+                    $_conf['use_cookies'] = true;
+                }
+            }
+
         } elseif ($mobile->isSoftBank()) {
             //$_conf['accesskey_for_k'] = 'DIRECTKEY';
+            /*
+            Å‹ß‚ÌSoftBank‚͑Ήž‚µ‚Ä‚¢‚é‚炵‚¢
             // WŒ^’[––‚Æ3GCŒ^’[––‚ÍCookie‚ªŽg‚¦‚é
-            if ($mobile->isTypeW() || $mobile->isType3GC()) {
-                $_conf['disable_cookie'] = false;
-            } else {
-                $_conf['disable_cookie'] = true;
+            if (!($mobile->isTypeW() || $mobile->isType3GC())) {
+                $_conf['use_cookies'] = false;
             }
-
-        // WILLCOMi‹ŒAirH"Phonej
-        } elseif ($mobile->isWillcom()) {
-            $_conf['disable_cookie'] = false;
+            */
         }
-    }
 
-    // iPhoneŽw’è
-    if (UA::isIPhoneGroup()) {
+    } elseif (UA::isIPhoneGroup()) {
         $_conf['ktai'] = true;
         UA::setForceMode(UA::getMobileQuery());
 

Modified: p2/trunk/doc/ChangeLog.txt
===================================================================
--- p2/trunk/doc/ChangeLog.txt	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/doc/ChangeLog.txt	2010-08-10 03:05:48 UTC (rev 868)
@@ -1,3 +1,28 @@
+2010/08/10
+	* rep2 version 1.8.65
+
+	[C³] Android‚ÌUA”»’菈—‚ðC³‚µ‚½B
+	[C³] ƒXƒŒˆê——‚ÌŒŸõ‚ŁAðŒ‚Ɂu‚·‚ׂāv‚ð‘I‘ð‚·‚é‚ƃqƒbƒg‚µ‚È‚©‚Á‚½‚Ì‚ðC³‚µ‚½B
+	[C³] ƒƒOƒAƒEƒg‘€ì‚ŁAƒZƒbƒVƒ‡ƒ“ƒNƒbƒL[‚ª”jŠü‚³‚ê‚È‚¢‚±‚Æ‚ª‚ ‚Á‚½‚Ì‚ðC³‚µ‚½B
+	[C³] iPhoneƒ‚[ƒh‚Å[—š—ð‚©‚ç‚ÍŠO‚·]‚ªŒø‚©‚È‚©‚Á‚½‚Ì‚ðC³‚µ‚½B
+	[C³] iPhone‚̏‘‚«ž‚Ý—“•\Ž¦Žž‚ɁA–¼‘O—“‚ª‰B‚ê‚Ä‚µ‚Ü‚Á‚Ä‚¢‚邱‚Æ‚ª‚ ‚Á‚½‚Ì‚ðC³‚µ‚½B
+	[C³] iPhone‚̏î•ñƒƒbƒZ[ƒW•\Ž¦‚ª•ö‚ê‚é‰ÓŠ‚ª‚ ‚Á‚½‚Ì‚ðC³‚µ‚½B(editpref_i.php)
+	[C³] http://www.google.co.jp/search?q=http://qb5.2ch.net/test/read.cgi/operate/1273524771/ ‚̂悤‚ÈŠO•”URL‚ª2ch‚̃XƒŒƒbƒh‚Æ‚µ‚Ä“à•”ƒŠƒ“ƒN‚³‚ê‚È‚¢‚悤‚ɏC³‚µ‚½B
+	[‹@”\’ljÁ] iPhone‚̃ŒƒX”ԍ†ƒ|ƒbƒvƒAƒbƒv‚©‚çA u“¯‚¶–¼‘Ovu‹tŽQÆv‚ð‘I‘ð‚Å‚«‚é‚悤‚É‚µ‚½B 
+	[‹@”\’ljÁ] Œg‘сAiPhone‚́u”“à‚̃XƒŒƒ^ƒCŒŸõv‚ÅðŒŽw’肪‚Å‚«‚é‚悤‚É‚µ‚½B
+	[‰ü—Ç] iPhone‚̃ƒOíœ‚ðajax‚É‚µ‚½B
+	[‰ü—Ç] docomo‚Å‚àiƒ‚[ƒhƒuƒ‰ƒEƒU2.0‚ŃNƒbƒL[‚ªŽg‚¦‚éê‡‚́AURL‚ÉSID‚ðŠÜ‚Ü‚È‚¢‚悤‚É‚µ‚½B
+	[•ÏX] ”ˆړ]‚̃}ƒbƒsƒ“ƒOŽQÆƒƒjƒ…[‚ð http://menu.70.kg/bbsmenu.html ‚ɕύX‚µ‚½B
+	[•ÏX] iPad‚̃fƒtƒHƒ‹ƒg‚Ì•\Ž¦ƒ‚[ƒh‚ðiPhone—p‚É‚µ‚½B
+	[•ÏX] ƒXƒŒˆê——‚Å‚ÌŒŸõðŒ‚̃fƒtƒHƒ‹ƒg‚ðOR‚©‚çAND‚ɕύX‚µ‚½B
+	[•ÏX] Œg‘Ñ•\Ž¦ŽžAsubject.txt‚̃_ƒEƒ“ƒ[ƒh‚É”ï‚â‚·‡Œv§ŒÀŽžŠÔÝ’è‚̃fƒtƒHƒ‹ƒg’l‚ð10•b‚©‚ç8•b‚ɕύX‚µ‚½Biconf_admin.inc.php $_conf['dlSubjectTotalLimitTimeM'] j
+	[XV] ƒNƒbƒL[‚ª—LŒø‚ȏꍇAURLˆø”‚Éb=pc‚ÅPC—p•\Ž¦‚ðŽw’è‰Â”\‚É‚µ‚½B
+	[XV] ”ˆړ]‚ðŽ©“®’ÇÕ‚ðŒŸo‚·‚鎞A SETTING.TXT‚Ì‘¶Ý‚ðŠm”F‚·‚é‚悤‚É‚µ‚½B 
+	[XV] ŒÃ‚¢”‚©‚ç“Še‚µ‚½Žž‚ɁA‘ž‚ݐ¬Œ÷‚̃ƒbƒZ[ƒW‚ª•\Ž¦‚³‚ê‚Ä‚µ‚Ü‚í‚È‚¢‚悤‚É‚µ‚½B
+	[XV] 2ch‚ÌBBS_UNICODE=pass‚ɑΉž‚µ‚½B
+	[XV] Œg‘Ñ‚ÌIPƒAƒhƒŒƒX‘шæ‚ðXV‚µ‚½
+	[XV] ƒŠƒTƒCƒY‰Â”\ƒ|ƒbƒvƒAƒbƒv‚ŁAFirefox‚̏ꍇAƒŠƒNƒGƒXƒg‚ª2‚”ò‚ñ‚Å‚¢‚½‚Ì‚ð‰ñ”ð‚·‚é‚悤‚É‚µ‚½Bijs/htmlpopup.jsj
+
 2010/04/13
 	* rep2 version 1.8.64
 

Modified: p2/trunk/edit_aborn_word.php
===================================================================
--- p2/trunk/edit_aborn_word.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/edit_aborn_word.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -290,7 +290,7 @@
 } else {
     echo "V‹K“o˜^<br>\n";
     $row_format = <<<EOP
-<input type="text" name="nga[%1\$d][word]" value="%2\$s"><br>
+椣爪:<input type="text" name="nga[%1\$d][word]" value="%2\$s"><br>
 ”Â:<input type="text" size="5" name="nga[%1\$d][bbs]" value="%7\$s">
 准晴:<input type="text" size="5" name="nga[%1\$d][tt]" value="%8\$s"><br>
 <input type="checkbox" name="nga[%1\$d][ic]" value="1"%3\$s>i
@@ -303,6 +303,7 @@
 printf($row_format, -1, '', '', '', '', 0, '', '', '--');
 
 echo $htm['form_submit'];
+?><br><?php
 
 if (!empty($formdata)) {
     foreach ($formdata as $k => $v) {
@@ -319,6 +320,7 @@
         );
     }
     echo $htm['form_submit'];
+    ?><br><?php
 }
 
 // PC‚È‚ç

Modified: p2/trunk/edit_conf_user.php
===================================================================
--- p2/trunk/edit_conf_user.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/edit_conf_user.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -172,9 +172,9 @@
 
 //echo getEditConfHtml('first_page', '‰E‰º•”•ª‚ɍŏ‰‚É•\Ž¦‚³‚ê‚éƒy[ƒWBƒIƒ“ƒ‰ƒCƒ“URL‚à‰ÂB');
 echo getEditConfHtml('brdfile_online', 
-    '”ƒŠƒXƒg‚ÌŽw’èiƒIƒ“ƒ‰ƒCƒ“URLj<br>
-    ”ƒŠƒXƒg‚ðƒIƒ“ƒ‰ƒCƒ“URL‚©‚玩“®‚œǂݍž‚ށB
-    Žw’èæ‚Í menu.html Œ`Ž®A2channel.brd Œ`Ž®‚Ì‚Ç‚¿‚ç‚Å‚à‚æ‚¢B
+    '”ƒƒjƒ…[‚ÌŽw’èiURLj<br>
+    ”ƒƒjƒ…[‚ðURL‚©‚玩“®‚œǂݍž‚ށB
+    Žw’èæ‚Í menu.html Œ`Ž®A2channel.brd Œ`Ž®‚Ì‚Ç‚¿‚ç‚Å‚àOKB
     <!-- •K—v‚È‚¯‚ê‚΁A‹ó”’‚ɁB --><br>
 
     2chŠî–{ <a href="http://menu.2ch.net/bbsmenu.html" target="_blank">http://menu.2ch.net/bbsmenu.html</a><br>

Modified: p2/trunk/edit_conf_user_i.php
===================================================================
--- p2/trunk/edit_conf_user_i.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/edit_conf_user_i.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -139,9 +139,9 @@
 
 //echo getEditConfHtml('first_page', '‰E‰º•”•ª‚ɍŏ‰‚É•\Ž¦‚³‚ê‚éƒy[ƒWBƒIƒ“ƒ‰ƒCƒ“URL‚à‰ÂB');
 echo getEditConfHtml('brdfile_online', 
-    '”ƒŠƒXƒg‚ÌŽw’èiƒIƒ“ƒ‰ƒCƒ“URLj<br>
-    ”ƒŠƒXƒg‚ðƒIƒ“ƒ‰ƒCƒ“URL‚©‚玩“®‚œǂݍž‚ށB
-    Žw’èæ‚Í menu.html Œ`Ž®A2channel.brd Œ`Ž®‚Ì‚Ç‚¿‚ç‚Å‚à‚æ‚¢B
+    '”ƒƒjƒ…[‚ÌŽw’èiURLj<br>
+    ”ƒƒjƒ…[‚ðURL‚©‚玩“®‚œǂݍž‚ށB
+    Žw’èæ‚Í menu.html Œ`Ž®A2channel.brd Œ`Ž®‚Ì‚Ç‚¿‚ç‚Å‚àOKB
     <!-- •K—v‚È‚¯‚ê‚΁A‹ó”’‚ɁB --><br>
 
     2chŠî–{ <a href="http://menu.2ch.net/bbsmenu.html" target="_blank">http://menu.2ch.net/bbsmenu.html</a><br>

Modified: p2/trunk/editpref_i.php
===================================================================
--- p2/trunk/editpref_i.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/editpref_i.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -113,8 +113,6 @@
 <body<?php echo P2View::getBodyAttrK(); ?><?php echo $parent_reload; ?>>
 <?php
 
-P2Util::printInfoHtml();
-
 $aborn_res_txt  = $_conf['pref_dir'] . '/p2_aborn_res.txt';
 $aborn_name_txt = $_conf['pref_dir'] . '/p2_aborn_name.txt';
 $aborn_mail_txt = $_conf['pref_dir'] . '/p2_aborn_mail.txt';
@@ -132,8 +130,8 @@
 <a id="backButton" class="button" href="<?php eh($index_uri); ?>">TOP</a>
 </div>
 <?php
+P2Util::printInfoHtml();
 
-
 // {{{ iPhone—p•\Ž¦ NG/±ÎÞÝÜ°ÄÞ
 
 $ng_name_txt_bn = basename($ng_name_txt);

Modified: p2/trunk/index.php
===================================================================
--- p2/trunk/index.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/index.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -38,6 +38,16 @@
     // }}}
     // {{{ PC—p HTMLƒvƒŠƒ“ƒg
 
+    $menu_uri = UriUtil::buildQueryUri($_conf['menu_php'],
+        array(UA::getQueryKey() => UA::getQueryValue())
+    );
+    $title_uri = UriUtil::buildQueryUri($title_page,
+        array(UA::getQueryKey() => UA::getQueryValue())
+    );
+    $read_uri = UriUtil::buildQueryUri($read_page,
+        array(UA::getQueryKey() => UA::getQueryValue())
+    );
+    
     P2Util::headerNoCache();
     ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
@@ -55,14 +65,14 @@
 		<?php if (!$_conf['pane_mode']) { ?><?php eh($_conf['frame_menu_width']); ?>,*
 		<?php } else { ?><?php eh($_conf['frame_menu_width']); ?>,<?php eh($_conf['frame_subject_width']); ?>,<?php eh($_conf['frame_read_width']); ?><?php } ?>
 	" frameborder="1" border="1">
-		<frame src="<?php eh($_conf['menu_php']); ?>" name="menu" scrolling="auto">
+		<frame src="<?php eh($menu_uri); ?>" name="menu" scrolling="auto">
 	<?php } ?>
 
 		<?php if (!$_conf['pane_mode']) { ?>
 		<frameset id="fsright" name="fsright" rows="<?php eh($_conf['frame_subject_width']); ?>,<?php eh($_conf['frame_read_width']); ?>" frameborder="1" border="2">
 		<?php } ?>
-			<frame id="subject" name="subject" src="<?php eh($title_page); ?>" scrolling="auto">
-			<frame id="read" name="read" src="<?php eh($read_page); ?>" scrolling="auto">
+			<frame id="subject" name="subject" src="<?php eh($title_uri); ?>" scrolling="auto">
+			<frame id="read" name="read" src="<?php eh($read_uri); ?>" scrolling="auto">
 		<?php if (!$_conf['pane_mode']) { ?>
 		</frameset>
 		<?php } ?>

Modified: p2/trunk/info_i.php
===================================================================
--- p2/trunk/info_i.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/info_i.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -62,7 +62,7 @@
 // }}}
 // {{{ —š—ðíœ
 
-if (!empty($_GET['offrec'])) {
+if (!empty($_GET['offrecent'])) {
     $r1 = offRecent($host, $bbs, $key);
     $r2 = offResHist($host, $bbs, $key);
     if (($r1 === false) or ($r2 === false)) {

Modified: p2/trunk/iphone/ShowThreadK.php
===================================================================
--- p2/trunk/iphone/ShowThreadK.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/iphone/ShowThreadK.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -78,10 +78,7 @@
                 echo $this->transRes($this->thread->datlines[0], 1);
                 $GLOBALS['_shown_resnum']++;
                 
-                if ($this->thread->resrange_readnum < $i) {
-                    $this->thread->resrange_readnum = $i;
-                }
-                
+                $this->thread->resrange_readnum = 1;
             }
         }
         
@@ -1236,7 +1233,7 @@
 
         // ŠO•”” read.cgi Œ`Ž® http://ex14.vip2ch.com/test/read.cgi/operate/1161701941/ 
         // 2009/09/15 V‚Ü‚¿BBS‚ÌbbsŒ`Ž®‚à‚à‚±‚±‚É“ü‚ê‚Æ‚±‚© http://www.machi.to/bbs/read.cgi/tawara/1180236579/137 
-        if (preg_match('{http://([^/]+)/(?:test|bbs)/read\\.cgi/(\\w+)/(\\d+)/?([^/]+)?}', $url, $matches)) {
+        if (preg_match('{^http://([^/]+)/(?:test|bbs)/read\\.cgi/(\\w+)/(\\d+)/?([^/]+)?}', $url, $matches)) {
             $host = $matches[1];
             $bbs  = $matches[2];
             $key  = $matches[3];

Modified: p2/trunk/iphone/js/smartpopup.iPhone.js
===================================================================
--- p2/trunk/iphone/js/smartpopup.iPhone.js	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/iphone/js/smartpopup.iPhone.js	2010-08-10 03:05:48 UTC (rev 868)
@@ -70,17 +70,16 @@
 		document.writeln("<a href=\"javascript:void(0);\"" + makeOnPopUp(thread_id+"_fl", true) + ">ƒtƒBƒ‹ƒ^•\Ž¦</a>");
 	}
 	*/
-	
-/* iPhone –¢Š®¬‚Ȃ̂ňꎞ“I‚É‚Í‚¸‚µ‚Ä‚Ü‚·
+
+// iphone‚±‚ê‚ɃŒƒX
+	document.writeln('<span id="' + thread_id + '_iphone_res"></span>');
+	document.writeln('<span id="' + thread_id + '_iphone_quoteres"></span>');
+
 	// “¯‚¶–¼‘O‚ðƒtƒBƒ‹ƒ^•\Ž¦
 	document.writeln('<a id="' + thread_id + '_same_name" href="#" target="' + spmTarget + '">“¯‚¶–¼‘O</a>');
 	
 	// ‹tŽQÆ
 	document.writeln('<a id="' + thread_id + '_ref_res" href="' + getSpmFilterUrl(aThread, 'rres', 'on') + '&b=i" target="' + spmTarget + '">‹tŽQÆ</a>');
-	*/
-// iphone‚±‚ê‚ɃŒƒX
-	document.writeln('<span id="' + thread_id + '_iphone_res"></span>');
-	document.writeln('<span id="' + thread_id + '_iphone_quoteres"></span>');
 
 	document.writeln("</div>");
 
@@ -308,9 +307,11 @@
 // @return  string
 function getSpmFilterUrl(aThread, field, match)
 {
-	var url = "read_filter_k.php?bbs=" + aThread.bbs + "&key=" + aThread.key + "&host=" + aThread.host;
+	// 2010/08/05 read_filter_i.php ‚Å‚È‚­ read.php ‚ւ̃Šƒ“ƒN‚É‚µ‚½B
+	var url = "?bbs=" + aThread.bbs + "&key=" + aThread.key + "&host=" + aThread.host;
 	url += "&rescount=" + aThread.rc + "&ttitle_en=" + aThread.ttitle_en + "&resnum=" + spmResNum;
-	url += "&ls=all&field=" + field + "&method=just&match=" + match + "&offline=1";
+	url += "&ls=all&field=" + field + "&method=just&match=" + match + "&offline=1"
+	url += "&popup_filter=1";
 	return url;
 }
 

Modified: p2/trunk/iphone/post_form_popup.inc.php
===================================================================
--- p2/trunk/iphone/post_form_popup.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/iphone/post_form_popup.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -23,6 +23,7 @@
 
 // •¶ŽšƒR[ƒh”»’è—p•¶Žš—ñ‚ðæ“ª‚ÉŽdž‚Þ‚±‚Æ‚Åmb_convert_variables()‚ÌŽ©“®”»’è‚ð•‚¯‚é
 
+// <fieldset>‚Íorder-top‚ª’´c’·
 $htm['post_form'] = <<<EOP
 <form class="dialog_write" id="writeForm" method="POST" action="{$_conf['post_php']}" accept-charset="{$_conf['accept_charset']}">
     <input type="hidden" name="detect_hint" value="ž">
@@ -30,6 +31,7 @@
 <!--    <h5>{$htm['resform_ttitle']}</h5>
     {$htm['subject']}
 -->
+<div id="writeFormCloseBtn" style="display:none;margin:0;"><img src="iui/icon_close.png" onClick="popUpFootbarFormIPhone(0, 1)"></div>
 <label>Name:</label>
 <input id="FROM" name="FROM" type="text" value="{$hs['FROM']}"{$name_size_at}>
 {$htm['maru_kakiko']}

Modified: p2/trunk/iphone/post_options_loader_popup.inc.php
===================================================================
--- p2/trunk/iphone/post_options_loader_popup.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/iphone/post_options_loader_popup.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -47,7 +47,7 @@
 
 // willcom
 // ’ʏí‚ÍPC—pÝ’è‚ɏ€‚¶‚邪AŒg‘Ñ—pÝ’肪ƒZƒbƒg‚³‚ê‚Ä‚¢‚ê‚΁A‚»‚¿‚ç‚ɏ€‚¶‚éB
-} elseif($mobile->isWillcom()) {
+} elseif($mobile && $mobile->isWillcom()) {
     if ($_conf['k_post_msg_cols']) {
         $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
     } else {

Modified: p2/trunk/iphone/read_footer_k.inc.php
===================================================================
--- p2/trunk/iphone/read_footer_k.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/iphone/read_footer_k.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -66,6 +66,9 @@
     }
     
     $index_uri = UriUtil::buildQueryUri('index.php', array(UA::getQueryKey() => UA::getQueryValue()));
+
+    $goto_select_ht = _csrangeform(isset($GLOBALS['word']) ? $last_hit_resnum : $aThread->resrange['to'], $aThread)
+     . $goto_select_ht . '</form>';
     ?>
 <?php echo $toolbar_back_board_ht; ?>
 <div class="footform">
@@ -78,16 +81,17 @@
 		<li class="home"><a href="<?php eh($index_uri); ?>">TOP</a></li>
 		<?php echo $read_navi_previous_tab_ht; ?> 
 		<?php echo $new_btm_ht; ?>
-		<li class="res" id="writeId" title="off"><a onclick="popUpFootbarFormIPhone(1);all.item('footbar02').style.visibility='hidden';">‘‚«ž‚Ý</a></li>
-		<li class="other"><a onclick="all.item('footbar02').style.visibility='visible';popUpFootbarFormIPhone(0, 1);popUpFootbarFormIPhone(1, 1);">‚»‚Ì‘¼</a></li>
+		<li class="res" id="writeId" title="off"><a onclick="popUpFootbarFormIPhone(1); all.item('footbar02').style.visibility='hidden';">‘‚«ž‚Ý</a></li>
+		<li class="other"><a onclick="all.item('footbar02').style.visibility='visible'; popUpFootbarFormIPhone(0, 1);popUpFootbarFormIPhone(1, 1);">‚»‚Ì‘¼</a></li>
 		<?php echo $read_navi_next_btm_tab_ht; ?>
 		</ul>
 	</div>
 </div>
+<?php // footbar02 ‚ÍfootbarEtc‚Æ‚©‚É–¼Ì•ÏX‚µ‚½‚¢‹C•ª ?>
 <div id="footbar02" class="dialog_other">
 <filedset>
 <ul>
-	<li class="whiteButton" id="serchId" title="off" onclick="popUpFootbarFormIPhone(0);all.item('footbar02').style.visibility='hidden'">ƒtƒBƒ‹ƒ^ŒŸõ</li>
+	<li class="whiteButton" id="serchId" title="off" onclick="popUpFootbarFormIPhone(0); all.item('footbar02').style.visibility='hidden'">ƒtƒBƒ‹ƒ^ŒŸõ</li>
 	<?php echo $toolbar_right_ht; ?> 
 	<li class="grayButton" onclick="all.item('footbar02').style.visibility='hidden'">ƒLƒƒƒ“ƒZƒ‹</li>
 </ul>

Modified: p2/trunk/iphone/read_header_k.inc.php
===================================================================
--- p2/trunk/iphone/read_header_k.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/iphone/read_header_k.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -64,13 +64,14 @@
 $pointer_header_at = ' id="header" name="header"';
 
 // ƒŒƒX”͈̓ZƒŒƒNƒgƒtƒH[ƒ€
-$goto_select_ht = _csrangeform(isset($GLOBALS['word']) ? $last_hit_resnum : $aThread->resrange['to'], $aThread);
+//$goto_select_ht = _csrangeform(isset($GLOBALS['word']) ? $last_hit_resnum : $aThread->resrange['to'], $aThread);
+$goto_select_ht = '';
 
 //----------------------------------------------
 // $htm['read_navi_range'] -- 1- 101- 201-
 
 $htm['read_navi_range'] = '';
-//$htm['read_navi_range'] .= $goto_select_ht;
+
 //080726@ƒtƒbƒ^‚Ɉړ®‚³‚¹‚Ü‚·
 /*
 for ($i = 1; $i <= $aThread->rescount; $i = $i + $rnum_range) {
@@ -209,7 +210,7 @@
     $read_navi_next_isInvisible ? hs($next_st) . $rnum_range : hs($st) . $rnum_range,
     $read_navi_next_isInvisible ? ' disabled' : ''
 );
-$goto_select_ht .= '</form>';
+//$goto_select_ht .= '</form>';
 
 //----------------------------------------------
 // $read_footer_navi_new_ht  ‘±‚«‚ð“Ç‚Þ V’…ƒŒƒX‚Ì•\Ž¦
@@ -290,8 +291,6 @@
 //!empty($_GET['nocache']) and P2Util::headerNoCache();
 P2View::printDoctypeTag();
 
-$onload_script .= "checkSage();"; // ‘‚«ž‚݃tƒH[ƒ€‚Ìsage‚Ƀ`ƒFƒbƒN‚ð“ü‚ê‚é
-
 ?>
 <html>
 <head>
@@ -302,6 +301,7 @@
 	<script type="text/javascript" src="iphone/js/respopup.iPhone.js?v=20090429"></script>
 	<script type="text/javascript" src="iphone/js/setfavjs.js?v=20090428"></script>
 	<script type="text/javascript" src="js/post_form.js?v=20090724"></script>
+	<script type="text/javascript" src="js/delelog.js?v=20100127"></script>
 	<script type="text/javascript"> 
 	<!-- 
 	// iPhone‚ÌURL•ÒW•”•ª‚ð•\Ž¦‚µ‚È‚¢‚悤ƒXƒNƒ[ƒ‹‚·‚é
@@ -309,15 +309,6 @@
 		setTimeout(scrollTo, 100, 0, 1); 
 	}
 
-	// ƒy[ƒW“ǂݍž‚ÝŠ®—¹ŽžƒR[ƒ‹ƒoƒbƒNŠÖ”
-	gIsPageLoaded = false;
-	addLoadEvent(function() {	// basic.js‚̃ƒ\ƒbƒh
-		// ƒy[ƒWƒ[ƒhŠ®—¹ƒtƒ‰ƒO(true‚¶‚á‚È‚¢‚Æ‚¨‹C‚É“ü‚è•ÏXjavascript‚ª“®‚©‚È‚¢)
-		gIsPageLoaded = true;
-		// ƒy[ƒW“ǂݍž‚ÝŠ®—¹Žž‚ÉŽÀs‚·‚éƒXƒNƒŠƒvƒgŒQ
-		<?php echo $onload_script; ?>
-	});
-
 	// ƒŒƒX”͈͂̃tƒH[ƒ€‚Ì“à—e‚ðƒŠƒZƒbƒg‚µ‚Ä‚©‚çƒy[ƒWˆÚs‚·‚郁ƒ\ƒbƒh
 	var onArreyt = 2;
 	function formReset() {
@@ -345,13 +336,16 @@
 
 
 //iPhone SMP
-$onload_script = "";
+$onload_script = '';
 
+/*
 if ($_conf['bottom_res_form']) {
     ?><script type="text/javascript" src="js/post_form.js?v=20090724"></script>
 <?php
-    $onload_script .= "checkSage();";
+    $onload_script .= "checkSage();"; // ‘‚«ž‚݃tƒH[ƒ€‚Ìsage‚Ƀ`ƒFƒbƒN‚ð“ü‚ê‚é
 }
+*/
+$onload_script .= 'checkSage();';
 
 if (empty($_GET['onlyone'])) {
     $onload_script .= "setWinTitle();";
@@ -365,8 +359,9 @@
 <!--
 gFade = {$fade};
 gExistWord = {$existWord};
+// ƒy[ƒWƒ[ƒhŠ®—¹ƒtƒ‰ƒO(true‚¶‚á‚È‚¢‚Æ‚¨‹C‚É“ü‚è•ÏXjavascript‚ª“®‚©‚È‚¢H)
 gIsPageLoaded = false;
-addLoadEvent(function() {
+addLoadEvent(function() { // basic.js‚̃ƒ\ƒbƒh
 	gIsPageLoaded = true;
 	{$onload_script}
 });
@@ -391,31 +386,17 @@
 <body{$body_at} >\n
 EOP;
 
-P2Util::printInfoHtml();
-
-// ƒXƒŒ‚ª”ƒT[ƒo‚É‚È‚¯‚ê‚Î
-if ($aThread->diedat) { 
-
-    $motothre_atag = P2View::tagA($motothre_url, hs($moto_thre_st));
-    
-    echo $diedat_msg_ht = _getGetDatErrorMsgHtml($aThread);
-    echo "<p>$motothre_atag</p>";
-    
-    // Šù“¾ƒŒƒX‚ª‚È‚¯‚ê‚΃c[ƒ‹ƒo[•\Ž¦
-    if (!$aThread->rescount) {
-        echo "<p>{$toolbar_right_ht}</p>";
-    }
-}
-
-
-if (($aThread->rescount or !empty($_GET['onlyone']) && !$aThread->diedat) and empty($_GET['renzokupop'])) {
-
+if (
+    ($aThread->rescount or !empty($_GET['onlyone']) && !$aThread->diedat)
+    and empty($_GET['renzokupop'])
+) {
     echo <<<EOP
 <div class="toolbar">
 {$htm['read_navi_range']}
 EOP;
 
     // ‚¨‹C‚ɃXƒŒ‚ɒljÁ/ŠO‚·
+	$sid_q = (defined('SID') && strlen(SID)) ? '&amp;' . hs(SID) : '';
 	echo "<span class=\"setfav\" style=\"white-space: nowrap;\"><a class=\"favbutton\" href=\"info_i.php?host={$aThread->host}{$bbs_q}{$key_q}{$ttitle_en_q}{$setfav_q}{$sid_q}\" target=\"info\" onClick=\"return setFavJs('host={$aThread->host}{$bbs_q}{$key_q}{$ttitle_en_q}{$sid_q}', '{$favvalue}', {$STYLE['info_pop_size']}, 'read', this);\" accesskey=\"f\" title=\"{$favtitle}\">{$favmark}</a></span>";
 
 	echo <<< EOP
@@ -430,6 +411,22 @@
 */
 }
 
+P2Util::printInfoHtml();
+
+// ƒXƒŒ‚ª”ƒT[ƒo‚É‚È‚¯‚ê‚Î
+if ($aThread->diedat) { 
+
+    $motothre_atag = P2View::tagA($motothre_url, hs($moto_thre_st));
+    
+    echo $diedat_msg_ht = _getGetDatErrorMsgHtml($aThread);
+    echo "<p>$motothre_atag</p>";
+    
+    // Šù“¾ƒŒƒX‚ª‚È‚¯‚ê‚΁A‚±‚±‚Ńc[ƒ‹ƒo[•\Ž¦
+    if (!$aThread->rescount) {
+        echo "<p>{$toolbar_right_ht}</p>";
+    }
+}
+
 //echo "<hr>";
 /*
 ?><h3><font color="<?php eh($STYLE['read_k_thread_title_color']); ?>"><?php eh($aThread->ttitle); ?></font></h3><?php
@@ -570,7 +567,7 @@
  */
 function _getToolbarRightHtml($aThread, $ttitle_en, $info_st, $dele_st, $moto_thre_st)
 {
-    global $_conf, $motothre_url;
+    global $_conf, $motothre_url, $STYLE;
     
     $thread_qs = array(
         'host' => $aThread->host,
@@ -595,7 +592,8 @@
         ),
         hs('ƒXƒŒî•ñ/—ÞŽ—')
     );
-    
+
+    /*
     $dele_atag     = P2View::tagA(
         UriUtil::buildQueryUri(
             'info_i.php',
@@ -608,7 +606,35 @@
         ),
         hs($dele_st)
     );
+    */
     
+    $sid_qs = array();
+    if (defined('SID') && strlen(SID)) {
+        $sid_qs[session_name()] = session_id();
+    }
+    
+    $info_qs = array_merge($thread_qs, $b_qs, array('ttitle_en' => $ttitle_en));
+    $dele_url = UriUtil::buildQueryUri('info_i.php', array_merge($info_qs, array('dele' => '1')));
+
+    $deleLogJs_query = UriUtil::buildQuery(array_merge($info_qs, $sid_qs));
+    $deleLogJs_query_es = str_replace("'", "\\'", $deleLogJs_query);
+
+    $dele_atag = P2View::tagA(
+        $dele_url,
+        hs($dele_st),
+        array(
+            /*
+            'accesskey' => $_conf['pc_accesskey']['dele'],
+            'title'     => sprintf(
+                "ƒƒO‚ðíœ‚·‚éBŽ©“®‚Łu‚¨‹C‚ɃXƒŒvu“a“°v‚©‚ç‚àŠO‚ê‚Ü‚·BiƒAƒNƒZƒXƒL[[%s]j",
+                $_conf['pc_accesskey']['dele']
+            ),
+            'target'    => 'info',
+            */
+            'onclick'   => "return !deleLog('{$deleLogJs_query_es}', {$STYLE['info_pop_size']}, '', this);"
+        )
+    );
+
     return $toolbar_right_ht = <<<EOTOOLBAR
 	<li class="whiteButton">$info_atag</li>
 	<li class="whiteButton">$dele_atag</li>

Modified: p2/trunk/iphone/sb_header_k.inc.php
===================================================================
--- p2/trunk/iphone/sb_header_k.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/iphone/sb_header_k.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -87,6 +87,20 @@
 EOP;
 
 // ƒtƒBƒ‹ƒ^ŒŸõ
+if ($_conf['enable_exfilter'] == 2) {
+    $selected_method = array('and' => '', 'or' => '', 'just' => '', 'regex' => '', 'similar' => '');
+    $selected_method[($sb_filter['method'])] = ' selected';
+
+    $sb_form_method_ht = <<<EOP
+			<select id="method" name="method">
+				<option value="and"{$selected_method['and']}>‚·‚ׂÄ</option>
+				<option value="or"{$selected_method['or']}>‚¢‚¸‚ê‚©</option>
+				<option value="just"{$selected_method['just']}>‚»‚Ì‚Ü‚Ü</option>
+				<option value="regex"{$selected_method['regex']}>³‹K•\Œ»</option>
+				<option value="similar"{$selected_method['similar']}>Ž©‘R•¶</option>
+			</select>\n
+EOP;
+}
 $word_hs = htmlspecialchars($word, ENT_QUOTES);
 if (!$aThreadList->spmode) {
     $filter_form_ht = <<<EOP
@@ -94,7 +108,7 @@
     <div id="usage" class="panel"><filedset>
 <form method="GET" action="subject_i.php" accept-charset="{$_conf['accept_charset']}">
     {$sb_form_hidden_ht}
-    <input type="text" id="word" name="word" value="{$word_hs}" size="12">
+    <input type="text" id="word" name="word" value="{$word_hs}" size="11">$sb_form_method_ht
     <input type="submit" name="submit_kensaku" value="ŒŸõ">
 </form>\n
 </filedset></div>\n

Modified: p2/trunk/iui/read.css
===================================================================
--- p2/trunk/iui/read.css	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/iui/read.css	2010-08-10 03:05:48 UTC (rev 868)
@@ -322,7 +322,7 @@
 hr {
 	margin:1px;
 	border:none;
-	border-top:1px solid  #999;
+	border-top:1px solid #e0e0e0;
 	height:1px;
 }
 
@@ -465,7 +465,7 @@
 }
 
 .dialog_write > fieldset > input[type="text"], textarea {
-	padding: 6px 6px 6px 50px;
+	padding: 6px 6px 6px 54px;
 	font-size:16px;
 }
 

Modified: p2/trunk/js/post_form.js
===================================================================
--- p2/trunk/js/post_form.js	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/js/post_form.js	2010-08-10 03:05:48 UTC (rev 868)
@@ -414,27 +414,40 @@
 
 // iPhone ƒtƒbƒ^[‚̃ŒƒXƒtƒBƒ‹ƒ^[•\Ž¦ƒtƒH[ƒ€‚̃|ƒbƒvƒAƒbƒv‚ð•\Ž¦‚·‚郁ƒ\ƒbƒh
 // Edit 080727 by 240
-function popUpFootbarFormIPhone(arrayNum, resetFlag) {
+function popUpFootbarFormIPhone(arrayIdx, resetFlag) {
 	var formStyles = new Array(2);
-	var liElement = new Array(2);
+	var liElement  = new Array(2);
+    
 	formStyles[0] = document.getElementById('searchForm').style;
 	formStyles[1] = document.getElementById('writeForm').style;
 	liElement[0]  = document.getElementById('serchId');
 	liElement[1]  = document.getElementById('writeId');
 
 	for (var i = 0; i < 2; i++) {
-		if (i != arrayNum)
+		if (i != arrayIdx) {
 			liElement[i].setAttribute('title', 'off');
+		}
 		liElement[i].style.backgroundPositionY = '0';
 		formStyles[i].display = 'none';
 	}
-	if (liElement[arrayNum].getAttribute('title') == 'on' || resetFlag) {
-		liElement[arrayNum].setAttribute('title', 'off');
+	if (liElement[arrayIdx].getAttribute('title') == 'on' || resetFlag) {
+		liElement[arrayIdx].setAttribute('title', 'off');
 		return;
 	}
+    
+	liElement[arrayIdx].setAttribute('title', 'on');
+	liElement[arrayIdx].style.backgroundPositionY = '-50px'; // Œõ‚点‚é
+	//formStyles[arrayIdx].top = (document.height - 480).toString(); + "px"
 
-	liElement[arrayNum].setAttribute('title', 'on');
-	liElement[arrayNum].style.backgroundPositionY = '-50px';
-//			formStyles[arrayNum].top = (document.height - 480).toString(); + "px"
-	formStyles[arrayNum].display = 'block';
+    // body‚ª’Z‚¢Žž‚à–¼‘O—“‚ª‰B‚ê‚È‚¢‚悤‚É
+    var footbar01Elem = document.getElementById('footbar01');
+    if (footbar01Elem.offsetTop < 280) { // ‚¾‚¢‚½‚¢‚Ì’l
+        formStyles[arrayIdx].top = 14; // ‚à‚Á‚Æ‚¢‚¢Žw’è•û–@‚ª‚ ‚é‚悤‚È‹C‚ª‚·‚é
+        var writeFormCloseBtnElem = document.getElementById('writeFormCloseBtn');
+        writeFormCloseBtnElem.style.display = 'block';
+    }
+    
+	formStyles[arrayIdx].display = 'block';
+    
+	return true;
 }

Modified: p2/trunk/js/smartpopup.js
===================================================================
--- p2/trunk/js/smartpopup.js	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/js/smartpopup.js	2010-08-10 03:05:48 UTC (rev 868)
@@ -292,9 +292,12 @@
 // @return  string
 function getSpmFilterUrl(aThread, field, match)
 {
-	var url = "read_filter.php?bbs=" + aThread.bbs + "&key=" + aThread.key + "&host=" + aThread.host;
+	// [check] 2010/08/05 SID‚à—v‚é‚̂ł́H
+	// 2010/08/05 read_filter.php ‚ð’Ê‚³‚È‚¢‚悤‚É‚µ‚½Bpopup_filter‚Å”»•ÊB
+	var url = "?bbs=" + aThread.bbs + "&key=" + aThread.key + "&host=" + aThread.host;
 	url += "&rescount=" + aThread.rc + "&ttitle_en=" + aThread.ttitle_en + "&resnum=" + spmResNum;
-	url += "&ls=all&field=" + field + "&method=just&match=" + match + "&offline=1";
+	url += "&ls=all&field=" + field + "&method=just&match=" + match + "&offline=1"
+	url += "&popup_filter=1";
 	return url;
 }
 

Modified: p2/trunk/lib/BbsMap.php
===================================================================
--- p2/trunk/lib/BbsMap.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/BbsMap.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -20,7 +20,7 @@
      * @access  public
      * @static
      */
-    function getCurrentHost($host, $bbs, $autosync = true)
+    function getCurrentHost($host, $bbs, $autosync = false)
     {
         static $synced = false;
 
@@ -30,6 +30,8 @@
         }
         $type = BbsMap::_detectHostType($host);
 
+        // 2010/06/15 ƒƒ‚: ”ˆړ]‚ÍSETTING.TXT‚Ì—L–³‚Å”»’f‚·‚é‚悤‚ɁA‚炵‚¢
+        
         // ƒ`ƒFƒbƒN
         if (isset($map[$type]) && isset($map[$type][$bbs])) {
             $new_host = $map[$type][$bbs]['host'];
@@ -297,7 +299,8 @@
 
         // {{{ Ý’è
 
-        $bbsmenu_url = 'http://menu.2ch.net/bbsmenu.html';
+        //$bbsmenu_url = 'http://menu.2ch.net/bbsmenu.html';
+        $bbsmenu_url = 'http://menu.70.kg/bbsmenu.html';
         $map_cache_path = $_conf['cache_dir'] . '/host_bbs_map.txt';
         $map_cache_lifetime = 600; // TTL‚͏­‚µ’Z‚ß‚É
         $errfmt = '<p>rep2 error: BbsMap: %s - %s ‚ðƒ_ƒEƒ“ƒ[ƒh‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B</p>';

Modified: p2/trunk/lib/BrdMenu.php
===================================================================
--- p2/trunk/lib/BrdMenu.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/BrdMenu.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -83,7 +83,9 @@
                 // htmlŒ`Ž®‚Ȃ珜ŠOURL‚ðŠO‚·
                 if ($this->format == 'html') {
                     foreach ($not_bbs_list as $not_a_bbs) {
-                        if ($not_a_bbs == $matches[1]) { continue 2; }
+                        if ($not_a_bbs == $matches[1]) {
+                            continue 2;
+                        }
                     }
                 }
                 $aBrdMenuIta = new BrdMenuIta;

Modified: p2/trunk/lib/HostCheck.php
===================================================================
--- p2/trunk/lib/HostCheck.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/HostCheck.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -449,7 +449,7 @@
 
         $regHost = '/^proxy[0-9a-f]\d\d\.docomo\.ne\.jp$/';
         
-        // @update 2010/01/24
+        // @update 2010/07/04
         $bands = array(
             '210.153.84.0/24',
             '210.136.161.0/24',
@@ -459,6 +459,12 @@
             '202.229.176.0/24',
             '202.229.177.0/24',
             '202.229.178.0/24',
+            '202.229.179.0/24',
+            '111.89.188.0/24',
+            '111.89.189.0/24',
+            '111.89.190.0/24',
+            '111.89.191.0/24',
+            
             '210.153.87.0/24', // WEBƒAƒNƒZƒXŽžiƒtƒ‹ƒuƒ‰ƒEƒUj
         );
         return HostCheck::isAddrInBand($addr, $bands, $regHost);
@@ -938,9 +944,11 @@
         }
         
         // http://qb5.2ch.net/test/read.cgi/operate/1183341095/504
+        // http://ibis.ne.jp/support/browserIP.jsp
         $bands = array(
-            '219.117.203.9', // ƒVƒXƒeƒ€ˆÚs‚ªŠ®—¹‚·‚ê‚Η˜—p‚µ‚È‚­‚È‚é‚炵‚¢
-            '59.106.52.16/29'
+            //'219.117.203.9', // ƒVƒXƒeƒ€ˆÚs‚ªŠ®—¹‚·‚ê‚Η˜—p‚µ‚È‚­‚È‚é‚炵‚¢
+            //'59.106.52.16/29',
+            '59.106.88.0/24'
         );
         return HostCheck::isAddrInBand($addr, $bands);
     }

Modified: p2/trunk/lib/Login.php
===================================================================
--- p2/trunk/lib/Login.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/Login.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -98,16 +98,21 @@
         } elseif (isset($_REQUEST['user']) and $this->validLoginId($_REQUEST['user'])) {
             $login_user = $_REQUEST['user'];
 
-        // Cookie‚ÅŽw’è
-        } elseif (isset($_COOKIE['cid']) and (false !== $user = Login::getUserFromCid($_COOKIE['cid']))) {
-            if ($this->validLoginId($user)) {
-                $login_user = $user;
-            }
-
         // Session‚ÅŽw’è
         } elseif (isset($_SESSION['login_user']) and $this->validLoginId($_SESSION['login_user'])) {
             $login_user = $_SESSION['login_user'];
         
+        // Cookie‚ÅŽw’è
+        } elseif (isset($_COOKIE['cid'])) {
+            if (false !== $user = Login::getUserFromCid($_COOKIE['cid'])) {
+                if ($this->validLoginId($user)) {
+                    $login_user = $user;
+                }
+            }
+            if (is_null($login_user)) {
+                $this->clearCookieAuth(); // cid
+            }
+
         /*
         // Basic”FØ‚ÅŽw’è
         } elseif (isset($_REQUEST['basic']) and !empty($_REQUEST['basic'])) {
@@ -224,9 +229,9 @@
     {
         global $_conf;
         
-        if (@include($_conf['auth_user_file'])) {
+        if ($data = P2Util::loadAuthUserData()) {
             // ƒ†[ƒUî•ñ‚ª‚È‚©‚Á‚½‚çAƒtƒ@ƒCƒ‹‚ðŽÌ‚Ä‚Ä”²‚¯‚é
-            if (empty($rec_login_user_u) || empty($rec_login_pass_x)) {
+            if (empty($data['rec_login_user_u']) || empty($data['rec_login_pass_x'])) {
                 unlink($_conf['auth_user_file']);
             }
         }
@@ -247,11 +252,10 @@
         $this->cleanInvalidAuthUserFile();
         
         // ”FØƒ†[ƒUÝ’èiƒtƒ@ƒCƒ‹j‚ð“ǂݍž‚Ý‚Å‚«‚½‚ç
-        if (file_exists($_conf['auth_user_file'])) {
-            include $_conf['auth_user_file'];
+        if ($data = P2Util::loadAuthUserData()) {
 
             // ƒ†[ƒU–¼‚ªˆá‚Á‚½‚çA”FØŽ¸”s‚Å”²‚¯‚é
-            if ($this->user_u != $rec_login_user_u) {
+            if ($this->user_u != $data['rec_login_user_u']) {
                 P2Util::pushInfoHtml('<p class="infomsg">p2 error: ƒƒOƒCƒ“ƒGƒ‰[</p>');
                 
                 // ƒƒOƒCƒ“Ž¸”sƒƒO‚ð‹L˜^‚·‚é
@@ -264,9 +268,9 @@
             }
             
             // ƒpƒXƒ[ƒhÝ’肪‚ ‚ê‚΁AƒZƒbƒg‚·‚é
-            if (isset($rec_login_pass_x) && strlen($rec_login_pass_x)) {
+            if (isset($data['rec_login_pass_x']) && strlen($data['rec_login_pass_x'])) {
                 // $this->pass_x ‚ðƒZƒbƒg‚·‚é
-                $this->setPassX($rec_login_pass_x);
+                $this->setPassX($data['rec_login_pass_x']);
             }
         }
         
@@ -868,7 +872,7 @@
         $dec = md5_decrypt($cid, Login::getMd5CryptPassForCid());
         
         $user = $time = $md5_utpx = null;
-        list($user, $time, $md5_utpx) = split(':', $dec, 3);
+        list($user, $time, $md5_utpx) = preg_split('/:/', $dec, 3);
         if (!strlen($user) || !$time || !$md5_utpx) {
             return false;
         }

Modified: p2/trunk/lib/P2Util.php
===================================================================
--- p2/trunk/lib/P2Util.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/P2Util.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -39,6 +39,55 @@
     // }}}
     
     /**
+     * @return  boolean
+     */
+    function existsAuthUserData()
+    {
+        global $_conf;
+        
+        if (!isset($_conf['auth_user_file'])) {
+            trigger_error('no set $_conf[auth_user_file]', E_USER_WARNING);
+            return false;
+        }
+        
+        return file_exists($_conf['auth_user_file']);
+    }
+    
+    /**
+     * @return  array|null
+     */
+    function loadAuthUserData()
+    {
+        global $_conf;
+        
+        if (!file_exists($_conf['auth_user_file'])) {
+            return null;
+        }
+        // $_conf['auth_user_file'] ‚ðPHPƒtƒ@ƒCƒ‹‚Å•Û‘¶‚·‚é‚Ì‚ÍŽ~‚ß‚½‚¢‚Æ‚±‚ëB
+        
+        include $_conf['auth_user_file']; // $rec_login_user_u, $rec_login_pass_x
+        if (isset($rec_login_user_u)) {
+            $data['rec_login_user_u'] = $rec_login_user_u;
+        }
+        if (isset($rec_login_pass_x)) {
+            $data['rec_login_pass_x'] = $rec_login_pass_x;
+        }
+        return $data;
+        
+        /*
+        $lines = file($_conf['auth_user_file']);
+        $r = array();
+        foreach ($lines as $l) {
+            // $rec_login_pass_x = '{$pass_x}';
+            if (preg_match('/^\\s*\\$(\\w+)\\s*=\\s*\'([^\']+)\'\\s*;/', $l, $m)) {
+                $r["$m[1]"] = $m[2];
+            }
+        }
+        return $r;
+        */
+    }
+    
+    /**
      * @access  public
      * @return  string
      */
@@ -680,6 +729,7 @@
     
     /**
      * ƒ_ƒEƒ“ƒ[ƒhURL‚©‚çƒLƒƒƒbƒVƒ…ƒtƒ@ƒCƒ‹ƒpƒX‚ð•Ô‚·
+     * [todo]url‚Ì––”ö‚ªƒfƒBƒŒƒNƒgƒŠ‚̏ꍇ‚̑΍ô
      *
      * @access  public
      * @return  string|false

Modified: p2/trunk/lib/Session.php
===================================================================
--- p2/trunk/lib/Session.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/Session.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -107,7 +107,7 @@
         if (
             !ini_get('session.use_trans_sid')
             and session_id() && !isset($_COOKIE[$session_name])
-            || !empty($_conf['disable_cookie'])
+            //|| !empty($_conf['disable_cookie'])
         ) {
             $r = output_add_rewrite_var($session_name, session_id());
         }
@@ -248,9 +248,8 @@
         // ÅIƒAƒNƒZƒXŽžŠÔ‚©‚çAˆê’莞ŠÔˆÈã‚ªŒo‰ß‚µ‚Ä‚¢‚ê‚ÎExpire
         if ($_SESSION[$this->sess_array]['actime'] + $this->_expire_minutes * 60 < time()) {
             return false;
-        } else {
-            return true;
         }
+        return true;
     }
     
     /**
@@ -263,9 +262,8 @@
     {
         if ($_SESSION[$this->sess_array]['version'] == $GLOBALS['_SecureSession_version_id']) {
             return true;
-        } else {
-            return false;
         }
+        return false;
     }
     
     /**
@@ -352,7 +350,7 @@
         $session_name = session_name();
         if (isset($_COOKIE[$session_name])) {
            //setcookie($session_name, '', time() - 42000);
-           P2Util::unsetCookie($session_name);
+           P2Util::unsetCookie($session_name, '/');
            unset($_COOKIE[$session_name]);
         }
         

Modified: p2/trunk/lib/SettingTxt.php
===================================================================
--- p2/trunk/lib/SettingTxt.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/SettingTxt.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -122,6 +122,8 @@
         } else {
             $code = $req->getResponseCode();
 
+            /*
+            // SETTING.TXT ‚ª‘¶Ý‚µ‚Ä‚¢‚éê‡‚́A”ˆړ]‚Í‚³‚ê‚Ä‚¢‚È‚¢‚Æ”»’f‚·‚é
             if ($code == 302) {
                 // ƒzƒXƒg‚̈ړ]‚ð’ǐÕ
                 require_once P2_LIB_DIR . '/BbsMap.php';
@@ -131,7 +133,8 @@
                     return $aNewSettingTxt->downloadSettingTxt();
                 }
             }
-
+            */
+            
             if (!($code == 200 || $code == 206 || $code == 304)) {
                 //var_dump($req->getResponseHeader());
                 $error_msg = $code;
@@ -284,6 +287,32 @@
         return $setting_array;
     }
 
+    /**
+     * @static
+     * @access  public 
+     * @return  integer|null|Ž¸”s‚̉½‚©H
+     */
+    function get2chSettingTxtResponseCode($host, $bbs)
+    {
+        global $_conf;
+        
+        if (!P2Util::isHost2chs($host)) {
+            return null;
+        }
+        
+        $subject_url = 'http://' . $host . '/' . $bbs . '/SETTING.TXT';
+        $params = array();
+        $params['timeout'] = $_conf['fsockopen_time_limit'];
+        if ($_conf['proxy_use']) {
+            $params['proxy_host'] = $_conf['proxy_host'];
+            $params['proxy_port'] = $_conf['proxy_port'];
+        }
+        require_once 'HTTP/Request.php';
+        $hr = new HTTP_Request($subject_url, $params);
+        $hr->setMethod(HTTP_REQUEST_METHOD_HEAD);
+        $hr->sendRequest();
+        return $hr->getResponseCode();
+    }
 }
 
 // }}}

Modified: p2/trunk/lib/ShowThread.php
===================================================================
--- p2/trunk/lib/ShowThread.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/ShowThread.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -433,6 +433,7 @@
     
     /**
      * ‹tŽQÆ‚ðThread‚ɃZƒbƒg‚·‚é
+     * id‚­‚È‚é‚Ì‚Å—˜—p‚µ‚Ä‚¢‚È‚¢j
      *
      * @access  private
      * @return  void

Modified: p2/trunk/lib/ShowThreadK.php
===================================================================
--- p2/trunk/lib/ShowThreadK.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/ShowThreadK.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -70,10 +70,7 @@
                 echo $this->transRes($this->thread->datlines[0], 1);
                 $GLOBALS['_shown_resnum']++;
                 
-                if ($this->thread->resrange_readnum < $i) {
-                    $this->thread->resrange_readnum = $i;
-                }
-                
+                $this->thread->resrange_readnum = 1;
             }
         }
         
@@ -975,7 +972,7 @@
 
         // ŠO•”” read.cgi Œ`Ž® http://ex14.vip2ch.com/test/read.cgi/operate/1161701941/ 
         // 2009/09/15 V‚Ü‚¿BBS‚ÌbbsŒ`Ž®‚à‚à‚±‚±‚É“ü‚ê‚Æ‚±‚© http://www.machi.to/bbs/read.cgi/tawara/1180236579/137 
-        if (preg_match('{http://([^/]+)/(?:test|bbs)/read\\.cgi/(\\w+)/(\\d+)/?([^/]+)?}', $url, $matches)) {
+        if (preg_match('{^http://([^/]+)/(?:test|bbs)/read\\.cgi/(\\w+)/(\\d+)/?([^/]+)?}', $url, $matches)) {
             $host = $matches[1];
             $bbs  = $matches[2];
             $key  = $matches[3];

Modified: p2/trunk/lib/ShowThreadPc.php
===================================================================
--- p2/trunk/lib/ShowThreadPc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/ShowThreadPc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -1303,7 +1303,7 @@
 
         // ŠO•”” read.cgi Œ`Ž® http://ex14.vip2ch.com/test/read.cgi/operate/1161701941/ 
         // 2009/09/15 V‚Ü‚¿BBS‚ÌbbsŒ`Ž®‚à‚à‚±‚±‚É“ü‚ê‚Æ‚±‚© http://www.machi.to/bbs/read.cgi/tawara/1180236579/137 
-        if (preg_match('{http://([^/]+)/(?:test|bbs)/read\\.cgi/(\\w+)/(\\d+)/?([^/]+)?}', $url, $matches)) {
+        if (preg_match('{^http://([^/]+)/(?:test|bbs)/read\\.cgi/(\\w+)/(\\d+)/?([^/]+)?}', $url, $matches)) {
             $host = $matches[1];
             $bbs  = $matches[2];
             $key  = $matches[3];

Modified: p2/trunk/lib/SubjectTxt.php
===================================================================
--- p2/trunk/lib/SubjectTxt.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/SubjectTxt.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -12,9 +12,9 @@
 {
     var $host;
     var $bbs;
-    var $subject_url;
-    var $subject_file;
-    var $subject_lines;
+    var $subject_url;  // @access private
+    var $subject_file; // @access private
+    var $subject_lines; // @access public
     
     // 2006/02/27 aki eaccelerator, apc ‚Í”ñ„§
     var $storage; // file, eaccelerator(eAccelerator shm), apc
@@ -36,8 +36,8 @@
             $this->storage = 'file';
         }
         
-        $this->setSubjectFile($this->host, $this->bbs);
-        $this->setSubjectUrl($this->host, $this->bbs);
+        $this->subject_file = $this->getSubjectFile($this->host, $this->bbs);
+        $this->subject_url = $this->getSubjectUrl($this->host, $this->bbs);
         
         // subject.txt‚ðƒ_ƒEƒ“ƒ[ƒh•ƒZƒbƒg‚·‚é
         $this->dlAndSetSubject();
@@ -45,18 +45,18 @@
     
     /**
      * @access  private
-     * @return  void
+     * @return  string
      */
-    function setSubjectFile($host, $bbs)
+    function getSubjectFile($host, $bbs)
     {
-        $this->subject_file = P2Util::datDirOfHostBbs($host, $bbs) . 'subject.txt';
+        return P2Util::datDirOfHostBbs($host, $bbs) . 'subject.txt';
     }
     
     /**
      * @access  private
-     * @return  void
+     * @return  string
      */
-    function setSubjectUrl($host, $bbs)
+    function getSubjectUrl($host, $bbs)
     {
         //$subject_url = 'http://' . $host . '/' . $bbs . '/subject.txt';
         $subject_url = sprintf(
@@ -67,9 +67,7 @@
         );
         
         // ‚µ‚½‚ç‚΂ÌlivedoorˆÚ“]‚ɑΉžB“Ǎžæ‚ðlivedoor‚Æ‚·‚éB
-        $subject_url = P2Util::adjustHostJbbsShitaraba($subject_url);
-        
-        $this->subject_url = $subject_url;
+        return $subject_url = P2Util::adjustHostJbbsShitaraba($subject_url);
     }
     
     /**
@@ -137,7 +135,7 @@
                     // •À—ñƒ_ƒEƒ“ƒ[ƒhÏ‚̏ꍇ‚à”²‚¯‚é
                     } elseif (!empty($GLOBALS['expack.subject.multi-threaded-download.done'])) {
                         return null;
-                        
+                    
                     // V‹KƒXƒŒ—§‚ÄŽžˆÈŠO‚ŁAƒLƒƒƒbƒVƒ…‚ªV‘N‚ȏꍇ‚à”²‚¯‚é
                     } elseif (empty($_POST['newthread']) and $this->isSubjectTxtFresh()) {
                         return null;
@@ -175,7 +173,17 @@
                 // ƒzƒXƒg‚̈ړ]‚ð’ǐÕ
                 require_once P2_LIB_DIR . '/BbsMap.php';
                 $new_host = BbsMap::getCurrentHost($this->host, $this->bbs);
-                if ($new_host != $this->host) {
+                require_once P2_LIB_DIR . '/SettingTxt.php';
+                if (
+                    $new_host != $this->host
+                    // SETTING.TXT‚Ì—L–³‚Ŕˆړ]‚ðŠm”F
+                    and !in_array(
+                        SettingTxt::get2chSettingTxtResponseCode($this->host, $this->bbs),
+                        array(200, null), true
+                    )
+                    and 200 === SettingTxt::get2chSettingTxtResponseCode($new_host, $this->bbs)
+                ) {
+                    BbsMap::getCurrentHost($this->host, $this->bbs, true); // autosync
                     $aNewSubjectTxt = new SubjectTxt($new_host, $this->bbs);
                     return $aNewSubjectTxt->downloadSubject();
                 }

Modified: p2/trunk/lib/Thread.php
===================================================================
--- p2/trunk/lib/Thread.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/Thread.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -642,19 +642,21 @@
         $ttitle_urlen = rawurlencode($ttitle_en);
         $nbxdom = $this->spmObjName . "_numbox.style";
         $nbxar = array("fs"=>"", "fc"=>"", "bc"=>"", "bi"=>"");
+        $nbxdom_fs = '';
         if ($STYLE['respop_fontsize']) {
             $nbxdom_fs = "{$nbxdom}.fontSize = \"{$STYLE['respop_fontsize']}\";";
         }
+        $nbxdom_c = '';
         if ($STYLE['respop_color']) {
             $nbxdom_c = "{$nbxdom}.color = \"{$STYLE['respop_color']}\";";
         }
+        $nbxdom_bc = '';
         if ($STYLE['respop_bgcolor']) {
             $nbxdom_bc = "{$nbxdom}.backgroundColor = \"{$STYLE['respop_bgcolor']}\";";
         }
+        $nbxdom_bi = '';
         if ($STYLE['respop_background']) {
             $nbxdom_bi = "{$nbxdom}.backgroundImage = \"" . str_replace("\"", "'", $STYLE['respop_background']) . "\";";
-        } else {
-            $nbxdom_bi = '';
         }
 
         if ($_conf['flex_spm_target'] == "" || $_conf['flex_spm_target'] == "read") {

Modified: p2/trunk/lib/ThreadList.php
===================================================================
--- p2/trunk/lib/ThreadList.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/ThreadList.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -28,9 +28,10 @@
     {
         global $_conf;
         
+        $han = (UA::isK() && !UA::isIPhoneGroup()) ? true : false;
         if ($spmode == "recent") {
             $this->spmode = $spmode;
-            $this->ptitle = $_conf['ktai'] ? "Å‹ß“Ç‚ñ‚¾½Ú" : "Å‹ß“Ç‚ñ‚¾ƒXƒŒ";
+            $this->ptitle = $han ? "Å‹ß“Ç‚ñ‚¾½Ú" : "Å‹ß“Ç‚ñ‚¾ƒXƒŒ";
             
         } elseif ($spmode == "res_hist") {
             $this->spmode = $spmode;
@@ -38,11 +39,11 @@
             
         } elseif ($spmode == "fav") {
             $this->spmode = $spmode;
-            $this->ptitle = $_conf['ktai'] ? "‚¨‹C‚ɽÚ" : "‚¨‹C‚ɃXƒŒ";
+            $this->ptitle = $han ? "‚¨‹C‚ɽÚ" : "‚¨‹C‚ɃXƒŒ";
             
         } elseif ($spmode == "taborn") {
             $this->spmode = $spmode;
-            $this->ptitle = $_conf['ktai'] ? "$this->itaj (±ÎÞÝ’†)" : "$this->itaj (‚ ‚ځ[‚ñ’†)";
+            $this->ptitle = $han ? "$this->itaj (±ÎÞÝ’†)" : "$this->itaj (‚ ‚ځ[‚ñ’†)";
             
         } elseif ($spmode == "soko") {
             $this->spmode = $spmode;
@@ -50,11 +51,11 @@
             
         } elseif ($spmode == "palace") {
             $this->spmode = $spmode;
-            $this->ptitle = $_conf['ktai'] ? "½Ú‚Ì“a“°" : "ƒXƒŒ‚Ì“a“°";
+            $this->ptitle = $han ? "½Ú‚Ì“a“°" : "ƒXƒŒ‚Ì“a“°";
             
         } elseif ($spmode == "news") {
             $this->spmode = $spmode;
-            $this->ptitle = $_conf['ktai'] ? "Æ­°½Áª¯¸" : "ƒjƒ…[ƒXƒ`ƒFƒbƒN";
+            $this->ptitle = $han ? "Æ­°½Áª¯¸" : "ƒjƒ…[ƒXƒ`ƒFƒbƒN";
         
         } else {
             trigger_error(__FUNCTION__, E_USER_WARNING);

Modified: p2/trunk/lib/ThreadRead.php
===================================================================
--- p2/trunk/lib/ThreadRead.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/ThreadRead.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -300,17 +300,27 @@
         $code = $h['code'];
         
         // 206 Partial Content
-        if ($code == "200" || $code == "206") {
+        if ($code == '200' || $code == '206') {
             // OKB‰½‚à‚µ‚È‚¢
         
         // Found
-        } elseif ($code == "302") {
+        } elseif ($code == '302') {
         
-            // ƒzƒXƒg‚̈ړ]‚ð’ǐÕ
+            // ”ˆړ]‚ðŽ©“®’ǐÕ
             require_once P2_LIB_DIR . '/BbsMap.php';
             $new_host = BbsMap::getCurrentHost($this->host, $this->bbs);
-            if ($new_host != $this->host) {
+            require_once P2_LIB_DIR . '/SettingTxt.php';
+            if (
+                $new_host != $this->host
+                // SETTING.TXT‚Ì—L–³‚Ŕˆړ]‚ðŠm”F
+                and !in_array(
+                    SettingTxt::get2chSettingTxtResponseCode($this->host, $this->bbs),
+                    array(200, null), true
+                )
+                and 200 === SettingTxt::get2chSettingTxtResponseCode($new_host, $this->bbs)
+            ) {
                 fclose($fp);
+                BbsMap::getCurrentHost($this->host, $this->bbs, true); // autosync
                 $this->old_host = $this->host;
                 $this->host = $new_host;
                 return $this->downloadDat2ch($from_bytes);
@@ -1703,7 +1713,7 @@
     {
         global $_conf;
 
-        $diedat_msg = '<p><b>p2 info - ”ƒT[ƒo‚©‚çÅV‚̃XƒŒƒbƒhî•ñ‚ðŽæ“¾‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B</b>';
+        $diedat_msg = '<p><b>p2 info - ”ƒT[ƒo‚©‚çÅV‚Ìdat‚ðŽæ“¾‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B</b>';
         $diedat_msg .= '</p>';
 
         return $diedat_msg;

Modified: p2/trunk/lib/UA.php
===================================================================
--- p2/trunk/lib/UA.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/UA.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -47,6 +47,7 @@
      */
     function isPC($ua = null)
     {
+        // Œ»óAƒ‚ƒoƒCƒ‹ˆÈŠO‘S‚āAb=XX‚Å‚àtrue‚É‚È‚Á‚Ä‚µ‚Ü‚¤
         return !UA::isMobile($ua);
     }
     
@@ -174,8 +175,13 @@
 
         // iPod touch
         // Mozilla/5.0 (iPod; U; CPU like Mac OS X; ja-jp) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A110a Safari/419.3
-        if (preg_match('/(iPhone|iPod)/', $ua) || UA::isAndroidWebKit($ua)) {
+        if (preg_match('/(iPhone|iPod)/', $ua)) {// || UA::isAndroidWebKit($ua)) {
             $isiPhoneGroup = true;
+            
+        // iPad 2010/5/29
+        // Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; ja-jp) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10
+        } elseif (preg_match('/(iPad)/', $ua)) {
+            $isiPhoneGroup = true;
         }
 
         // UA‚̈ø”‚ª–³Žw’è‚È‚çAƒLƒƒƒbƒVƒ…•Û‘¶
@@ -248,10 +254,18 @@
             }
         }
         
+        $value = null;
+        if (isset($_POST[$key])) {
+            $value = $_POST[$key];
+        } elseif (isset($_GET[$key])) {
+            $value = $_GET[$key];
+        } elseif (isset($_COOKIE[$key])) {
+            $value = $_COOKIE[$key];
+        }
         $r = null;
-        if (isset($_REQUEST[$key])) {
-            if (preg_match('/^\\w+$/', $_REQUEST[$key])) {
-                $r = $_REQUEST[$key];
+        if ($value) {
+            if (preg_match('/^\\w+$/', $value)) {
+                $r = $value;
             }
         }
         return $r;
@@ -374,7 +388,7 @@
     }
     
     /**
-     * UA‚ªDoCoMo‚È‚çtrue‚ð•Ô‚·
+     * UA‚ªdocomo‚È‚çtrue‚ð•Ô‚·
      *
      * @static
      * @access  public
@@ -390,6 +404,22 @@
     }
     
     /**
+     * UA‚ªEZweb(au)‚È‚çtrue‚ð•Ô‚·
+     *
+     * @static
+     * @access  public
+     * @param   string   $ua  UA‚ðŽw’è‚·‚é‚È‚ç
+     * @return  boolean
+     */
+    function isEZweb($ua = null)
+    {
+        if ($nuam = &UA::getNet_UserAgent_Mobile($ua)) {
+            return $nuam->isEZweb();
+        }
+        return false;
+    }
+    
+    /**
      * UA‚ªNetFrontiŒg‘сAPDAAPSPj‚È‚çtrue‚ð•Ô‚·
      *
      * @static

Modified: p2/trunk/lib/index.funcs.php
===================================================================
--- p2/trunk/lib/index.funcs.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/index.funcs.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -54,7 +54,7 @@
     );
     
     // Œg‘тȂ甼Šp‚É•ÏŠ·
-    if (UA::isK()) {
+    if (UA::isK() && !UA::isIPhoneGroup()) {
         foreach ($indexMenuKIni as $k => $v) {
             $indexMenuKIni[$k][1] = mb_convert_kana($indexMenuKIni[$k][1], 'rnsk');
         }

Modified: p2/trunk/lib/login_first.inc.php
===================================================================
--- p2/trunk/lib/login_first.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/login_first.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -102,7 +102,7 @@
     }
     $REQUEST_URI_hs = hs($ruri);
     
-    if (!empty($GLOBALS['brazil']) or file_exists($_conf['auth_user_file'])) {
+    if (!empty($GLOBALS['brazil']) or P2Util::existsAuthUserData()) {
         $submit_ht = '<input type="submit" name="submit_userlogin" value="ƒ†[ƒUƒƒOƒCƒ“">';
     } else {
         $submit_ht = '<input type="submit" name="submit_newuser" value="V‹K“o˜^">';
@@ -129,7 +129,7 @@
     
     if (
         $isAllowedNewUser
-        and !file_exists($_conf['auth_user_file']) && !$_login_failed_flag
+        and !P2Util::existsAuthUserData() && !$_login_failed_flag
         and !empty($_POST['submit_newuser']) && $post['form_login_id'] && $post['form_login_pass']
     ) {
         // {{{ “ü—̓Gƒ‰[‚ðƒ`ƒFƒbƒNA”»’è

Modified: p2/trunk/lib/menu.inc.php
===================================================================
--- p2/trunk/lib/menu.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/menu.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -68,9 +68,7 @@
 P2Util::printInfoHtml();
 
 if (!empty($sidebar)) {
-    ?>
-<p><a href="index.php?sidebar=1" target="_content">p2 - 2ƒyƒCƒ“•\Ž¦</a></p>
-<?php
+    ?><p><a href="index.php?sidebar=1" target="_content">p2 - 2ƒyƒCƒ“•\Ž¦</a></p><?php
 }
 
 if ($_conf['enable_menu_new']) {
@@ -79,9 +77,7 @@
         'XV',
         array('target' => '_self')
     );
-    echo <<<EOP
-$reloaded_time <span style="white-space:nowrap;">[$shownew_atag]</span>
-EOP;
+    ?><?php eh($reloaded_time); ?> <span style="white-space:nowrap;">[<?php echo $shownew_atag; ?>]</span><?php
 }
 
 // ‚¨‹C‚ɔ‚ðHTML•\Ž¦‚·‚é
@@ -106,8 +102,6 @@
     }
     
     // Å‹ß“Ç‚ñ‚¾ƒXƒŒ
-    
-    // ƒ_ƒEƒ“ƒ[ƒh
     if ($_conf['expack.use_pecl_http'] == 1) {
         P2HttpRequestPool::fetchSubjectTxt($_conf['recent_file']);
     }
@@ -115,50 +109,74 @@
     ob_flush(); flush();
     
     // ‚¨‹C‚ɃXƒŒ
-    
-    // ƒ_ƒEƒ“ƒ[ƒh
     if ($_conf['expack.use_pecl_http'] == 1) {
         P2HttpRequestPool::fetchSubjectTxt($_conf['favlist_file']);
     }
-    // V’…”‚ð‰Šú‰»Žæ“¾
-    list($matome_i, $shinchaku_num) = _initMenuNewSp('fav');
-    $id = 'sp' . $matome_i;
-    echo <<<EOP
-    @<a href="{$_conf['subject_php']}?spmode=fav&amp;norefresh=1" onClick="chMenuColor('{$id}');" accesskey="{$_conf['pc_accesskey']['setfav']}">‚¨‹C‚ɃXƒŒ</a> (<a href="{$_conf['read_new_php']}?spmode=fav" target="read" id="un{$id}" onClick="chUnColor('{$id}');"{$class_newres_num}>{$shinchaku_num}</a>)<br>
-EOP;
+    ?>@<?php echo _getFavNewLinkHtml();?><br><?php
     ob_flush(); flush();
 
     // ‘ž—š—ð
-
-    // ƒ_ƒEƒ“ƒ[ƒh
     if ($_conf['expack.use_pecl_http'] == 1) {
         P2HttpRequestPool::fetchSubjectTxt($_conf['res_hist_idx']);
     }
-    
-    // V’…”‚ð‰Šú‰»Žæ“¾
-    list($matome_i, $shinchaku_num) = _initMenuNewSp('res_hist');
-    $id = 'sp' . $matome_i;
-    echo <<<EOP
-    @<a href="{$_conf['subject_php']}?spmode=res_hist&amp;norefresh=1" onClick="chMenuColor('{$id}');">‘ž—š—ð</a> <a href="read_res_hist.php" target="read">ƒƒO</a> (<a href="{$_conf['read_new_php']}?spmode=res_hist" target="read" id="un{$id}" onClick="chUnColor('{$id}');"{$class_newres_num}>{$shinchaku_num}</a>)<br>
-EOP;
+    ?>@<?php echo _getResHistNewLinkHtml();?><br><?php
     ob_flush(); flush();
 
 // V’…”‚ð•\Ž¦‚µ‚È‚¢ê‡
 } else {
-    echo <<<EOP
-    @<a href="{$_conf['subject_php']}?spmode=recent&amp;norefresh=1" accesskey="{$_conf['pc_accesskey']['recent']}">Å‹ß“Ç‚ñ‚¾ƒXƒŒ</a><br>
-    @<a href="{$_conf['subject_php']}?spmode=fav&amp;norefresh=1" accesskey="{$_conf['pc_accesskey']['setfav']}">‚¨‹C‚ɃXƒŒ</a><br>
-    @<a href="{$_conf['subject_php']}?spmode=res_hist&amp;norefresh=1">‘ž—š—ð</a> (<a href="./read_res_hist.php" target="read">ƒƒO</a>)<br>
-EOP;
+    $recent_atag = P2View::tagA(
+        UriUtil::buildQueryUri($_conf['subject_php'],
+            array(
+                'spmode' => 'recent',
+                'norefresh' => '1',
+                UA::getQueryKey() => UA::getQueryValue()
+            )
+        ),
+        hs('Å‹ß“Ç‚ñ‚¾ƒXƒŒ'),
+        array('accesskey' => $_conf['pc_accesskey']['recent'])
+    );
+    $fav_atag = P2View::tagA(
+        UriUtil::buildQueryUri($_conf['subject_php'],
+            array(
+                'spmode' => 'fav',
+                'norefresh' => '1',
+                UA::getQueryKey() => UA::getQueryValue()
+            )
+        ),
+        hs('‚¨‹C‚ɃXƒŒ'),
+        array('accesskey' => $_conf['pc_accesskey']['setfav'])
+    );
+    $res_hist_atag = P2View::tagA(
+        UriUtil::buildQueryUri($_conf['subject_php'],
+            array(
+                'spmode' => 'res_hist',
+                'norefresh' => '1',
+                UA::getQueryKey() => UA::getQueryValue()
+            )
+        ),
+        hs('‘ž—š—ð')
+    );
+    $read_res_hist_atag = P2View::tagA(
+        UriUtil::buildQueryUri('./read_res_hist.php',
+            array(
+                UA::getQueryKey() => UA::getQueryValue()
+            )
+        ),
+        hs('ƒƒO'),
+        array('target' => 'read')
+    );
+    printf('@%s<br>@%s<br>@%s (%s)<br>',
+        $recent_atag, $fav_atag, $res_hist_atag, $read_res_hist_atag
+    );
 }
 
 ?>
-    @<a href="<?php eh($_conf['subject_php']); ?>?spmode=palace&amp;norefresh=1" title="DAT—Ž‚¿‚µ‚½ƒXƒŒ—p‚Ì‚¨‹C‚É“ü‚è">ƒXƒŒ‚Ì“a“°</a><br>
-    @<a href="setting.php">ƒƒOƒCƒ“ŠÇ—</a><br>
-    @<a href="<?php eh($_conf['editpref_php']) ?>">Ý’èŠÇ—</a><br>
-    @<a href="http://find.2ch.net/" target="_blank" title="find.2ch.net">2chŒŸõ</a>
-    </div>
+@<a href="<?php eh($_conf['subject_php']); ?>?spmode=palace&amp;norefresh=1" title="DAT—Ž‚¿‚µ‚½ƒXƒŒ—p‚Ì‚¨‹C‚É“ü‚è">ƒXƒŒ‚Ì“a“°</a><br>
+@<a href="setting.php">ƒƒOƒCƒ“ŠÇ—</a><br>
+@<a href="<?php eh($_conf['editpref_php']) ?>">Ý’èŠÇ—</a><br>
+@<a href="http://find.2ch.net/" target="_blank" title="find.2ch.net">2chŒŸõ</a>
 </div>
+</div>
 <?php
 
 //==============================================================
@@ -211,11 +229,11 @@
 // ”ÂŒŸõƒtƒH[ƒ€‚ðHTML•\Ž¦
 ?>
 <form method="GET" action="<?php eh($_SERVER['SCRIPT_NAME']); ?>" accept-charset="<?php eh($_conf['accept_charset']); ?>" target="_self">
-    <input type="hidden" name="detect_hint" value="ž">
-    <p>
-        <input type="text" id="word" name="word" value="<?php eh($word); ?>" size="14">
-        <input type="submit" name="submit" value="”ÂŒŸõ">
-    </p>
+	<input type="hidden" name="detect_hint" value="ž">
+	<p>
+		<input type="text" id="word" name="word" value="<?php eh($word); ?>" size="14">
+		<input type="submit" name="submit" value="”ÂŒŸõ">
+	</p>
 </form>
 <?php
 
@@ -261,7 +279,6 @@
 function _initMenuNewSp($spmode_in)
 {
     global $_conf, $STYLE;
-    global $class_newres_num;
     static $matome_i_ = 1;
     
     $matome_i_++;
@@ -272,12 +289,6 @@
     
     include './subject_new.php';    // $shinchaku_num, $_newthre_num ‚ªƒZƒbƒg‚³‚ê‚é
     
-    if ($shinchaku_num > 0) {
-        $class_newres_num = ' class="newres_num"';
-    } else {
-        $class_newres_num = ' class="newres_num_zero"';
-    }
-    
     return array($matome_i_, $shinchaku_num);
 }
 
@@ -297,7 +308,8 @@
             $_conf['subject_php'],
             array(
                 'spmode' => 'recent',
-                'norefresh' => '1'
+                'norefresh' => '1',
+                UA::getQueryKey() => UA::getQueryValue()
             )
         ),
         'Å‹ß“Ç‚ñ‚¾ƒXƒŒ',
@@ -307,28 +319,112 @@
         )
     );
 
-    $recent_new_attrs = array(
-        'id'      => "un$id",
-        'onClick' => "chUnColor('$id');",
-        'target'  => 'read'
-    );
-    
-    if ($shinchaku_num > 0) {
-        $recent_new_attrs['class'] = 'newres_num';
-    } else {
-        $recent_new_attrs['class'] = 'newres_num_zero';
-    }
-    
     $recent_new_atag = P2View::tagA(
         UriUtil::buildQueryUri($_conf['read_new_php'], array('spmode' => 'recent')),
         hs($shinchaku_num),
-        $recent_new_attrs
+        array(
+            'id'      => "un$id",
+            'onClick' => "chUnColor('$id');",
+            'target'  => 'read',
+            'class'   => $shinchaku_num ? 'newres_num' : 'newres_num_zero'
+        )
     );
     
     return "$recent_atag ($recent_new_atag)";
 }
 
 /**
+ * @return  string  HTML
+ */
+function _getFavNewLinkHtml()
+{
+    global $_conf;
+    
+    list($matome_i, $shinchaku_num) = _initMenuNewSp('fav'); // V’…”‚ð‰Šú‰»Žæ“¾
+    
+    $id = 'sp' . $matome_i;
+    
+    $fav_atag = P2View::tagA(
+        UriUtil::buildQueryUri($_conf['subject_php'],
+            array(
+                'spmode' => 'fav',
+                'norefresh' => '1',
+                UA::getQueryKey() => UA::getQueryValue()
+            )
+        ),
+        hs('‚¨‹C‚ɃXƒŒ'),
+        array('onClick' => "chMenuColor('{$id}');", 'accesskey' => $_conf['pc_accesskey']['setfav'])
+    );
+    
+    $fav_shinchaku_atag = P2View::tagA(
+        UriUtil::buildQueryUri($_conf['read_new_php'],
+            array(
+                'spmode' => 'fav',
+                UA::getQueryKey() => UA::getQueryValue()
+            )
+        ),
+        hs($shinchaku_num),
+        array(
+            'target' => 'read',
+            'id' => "un{$id}",
+            'onClick' => "chUnColor('{$id}');",
+            'class' => $shinchaku_num ? 'newres_num' : 'newres_num_zero'
+        )
+    );
+    return "$fav_atag ($fav_shinchaku_atag)";
+}
+
+/**
+ * @return  string  HTML
+ */
+function _getResHistNewLinkHtml()
+{
+    global $_conf;
+    
+    list($matome_i, $shinchaku_num) = _initMenuNewSp('res_hist'); // V’…”‚ð‰Šú‰»Žæ“¾
+    
+    $id = 'sp' . $matome_i;
+    
+    $res_hist_atag = P2View::tagA(
+        UriUtil::buildQueryUri($_conf['subject_php'],
+            array(
+                'spmode' => 'res_hist',
+                'norefresh' => '1',
+                UA::getQueryKey() => UA::getQueryValue()
+            )
+        ),
+        hs('‘ž—š—ð'),
+        array('onClick' => "chMenuColor('{$id}');")
+    );
+    $read_res_hist_atag = P2View::tagA(
+        UriUtil::buildQueryUri('read_res_hist.php',
+            array(
+                UA::getQueryKey() => UA::getQueryValue()
+            )
+        ),
+        hs('ƒƒO'),
+        array('target' => 'read')
+    );
+    
+    $res_hist_shinchaku_atag = P2View::tagA(
+        UriUtil::buildQueryUri($_conf['read_new_php'],
+            array(
+                'spmode' => 'res_hist',
+                UA::getQueryKey() => UA::getQueryValue()
+            )
+        ),
+        hs($shinchaku_num),
+        array(
+            'target' => 'read',
+            'id' => "un{$id}",
+            'onClick' => "chUnColor('{$id}');",
+            'class' => $shinchaku_num ? 'newres_num' : 'newres_num_zero'
+        )
+    );
+    return "$res_hist_atag $read_res_hist_atag ($res_hist_shinchaku_atag)";
+}
+
+/**
  * Ž©“®XV meta refreshƒ^ƒO
  *
  * @return  void

Modified: p2/trunk/lib/post_options_loader.inc.php
===================================================================
--- p2/trunk/lib/post_options_loader.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/post_options_loader.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -49,7 +49,7 @@
 
 // willcom
 // ’ʏí‚ÍPC—pÝ’è‚ɏ€‚¶‚邪AŒg‘Ñ—pÝ’肪ƒZƒbƒg‚³‚ê‚Ä‚¢‚ê‚΁A‚»‚¿‚ç‚ɏ€‚¶‚éB
-} elseif($mobile->isWillcom()) {
+} elseif($mobile && $mobile->isWillcom()) {
     if ($_conf['k_post_msg_cols']) {
         $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
     } else {

Modified: p2/trunk/lib/read_filter_k.funcs.php
===================================================================
--- p2/trunk/lib/read_filter_k.funcs.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/read_filter_k.funcs.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -46,6 +46,8 @@
 
     // }}}
 
+    $read_navi_previous_btm_ht = '';
+    
     if ($filter_page > 1) {
         $qs = array_merge(
             $filter_qs,
@@ -61,6 +63,8 @@
         );
     }
 
+    $read_navi_next_btm_ht = '';
+    
     if ($_filter_range['to'] < $_filter_hits) {
         $qs = array_merge(
             $filter_qs,

Modified: p2/trunk/lib/read_footer.inc.php
===================================================================
--- p2/trunk/lib/read_footer.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/read_footer.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -153,27 +153,27 @@
     echo <<<EOP
 <hr>
 <table id="footer" class="toolbar" width="100%" style="padding:0px 10px 0px 0px;">
-    <tr>
-        <td align="left">
-            {$q_ichi_ht}
-            $all_atag 
-            {$read_navi_previous_ht} 
-            {$read_navi_next_ht} 
-            $latest_atag
-            {$goto_ht}
-            | {$read_footer_navi_new_ht}
-            | {$dores_html}
-            {$spd_ht}
-            {$datsize_ht}
-        </td>
-        <td align="right">
-            {$p2frame_ht}
-            {$toolbar_right_ht}
-        </td>
-        <td align="right">
-            <a href="#header" title="ƒy[ƒWã•”‚ÖˆÚ“®">£</a>
-        </td>
-    </tr>
+	<tr>
+		<td align="left">
+			{$q_ichi_ht}
+			$all_atag 
+			{$read_navi_previous_ht} 
+			{$read_navi_next_ht} 
+			$latest_atag
+			{$goto_ht}
+			| {$read_footer_navi_new_ht}
+			| {$dores_html}
+			{$spd_ht}
+			{$datsize_ht}
+		</td>
+		<td align="right">
+			{$p2frame_ht}
+			{$toolbar_right_ht}
+		</td>
+		<td align="right">
+			<a href="#header" title="ƒy[ƒWã•”‚ÖˆÚ“®">£</a>
+		</td>
+	</tr>
 </table>
 {$res_form_html_pb}
 EOP;

Modified: p2/trunk/lib/sb_header.inc.php
===================================================================
--- p2/trunk/lib/sb_header.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/sb_header.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -105,8 +105,8 @@
     
     $sb_form_method_ht = <<<EOP
 			<select id="method" name="method">
+				<option value="and"{$selected_method['and']}>‚·‚ׂÄ</option>
 				<option value="or"{$selected_method['or']}>‚¢‚¸‚ê‚©</option>
-				<option value="and"{$selected_method['and']}>‚·‚ׂÄ</option>
 				<option value="just"{$selected_method['just']}>‚»‚Ì‚Ü‚Ü</option>
 				<option value="regex"{$selected_method['regex']}>³‹K•\Œ»</option>
 				<option value="similar"{$selected_method['similar']}>Ž©‘R•¶</option>

Modified: p2/trunk/lib/sb_header_k.inc.php
===================================================================
--- p2/trunk/lib/sb_header_k.inc.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/lib/sb_header_k.inc.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -85,6 +85,20 @@
 EOP;
 
 // ƒtƒBƒ‹ƒ^ŒŸõƒtƒH[ƒ€HTML
+if ($_conf['enable_exfilter'] == 2) {
+    $selected_method = array('and' => '', 'or' => '', 'just' => '', 'regex' => '', 'similar' => '');
+    $selected_method[($sb_filter['method'])] = ' selected';
+
+    $sb_form_method_ht = <<<EOP
+			<select id="method" name="method">
+				<option value="and"{$selected_method['and']}>‚·‚ׂÄ</option>
+				<option value="or"{$selected_method['or']}>‚¢‚¸‚ê‚©</option>
+				<option value="just"{$selected_method['just']}>‚»‚Ì‚Ü‚Ü</option>
+				<option value="regex"{$selected_method['regex']}>³‹K•\Œ»</option>
+				<option value="similar"{$selected_method['similar']}>Ž©‘R•¶</option>
+			</select>\n
+EOP;
+}
 $word_hs = htmlspecialchars($word, ENT_QUOTES);
 $filter_form_ht = '';
 if (
@@ -95,7 +109,7 @@
     $filter_form_ht = <<<EOP
 <form method="GET" action="{$_conf['subject_php']}" accept-charset="{$_conf['accept_charset']}">
     {$sb_form_hidden_ht}
-    <input type="text" id="word" name="word" value="{$word_hs}" size="12">
+    <input type="text" id="word" name="word" value="{$word_hs}" size="11">$sb_form_method_ht
     <input type="submit" name="submit_kensaku" value="ŒŸõ">
 </form>\n
 EOP;

Modified: p2/trunk/login.php
===================================================================
--- p2/trunk/login.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/login.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -222,7 +222,7 @@
 <body{$p_htm['body_onload']}{$body_at}>
 EOP;
 
-if (!$_conf['ktai']) {
+if (UA::isPC()) {
     ?>
 <p id="pan_menu"><a href="setting.php">ƒƒOƒCƒ“ŠÇ—</a> &gt; <?php eh($p_str['ptitle']); ?></p>
 <?php
@@ -239,7 +239,7 @@
 
 <?php
 // ”FØƒ†[ƒU“o˜^ƒtƒH[ƒ€
-if ($_conf['ktai']) {
+if (UA::isK()) {
     echo $hr;
 }
 ?>

Modified: p2/trunk/post.php
===================================================================
--- p2/trunk/post.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/post.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -685,10 +685,14 @@
     }
     
     // be.2ch ”FØƒNƒbƒL[
+    if (isset($_POST['MDMD']) && isset($_POST['DMDM'])) {
+        // ŠO•”ƒc[ƒ‹(p2proxy)—p
+        $cookies_to_send .= sprintf(' MDMD=%s;', $_POST['MDMD']);
+        $cookies_to_send .= sprintf(' DMDM=%s;', $_POST['DMDM']);
     // be”‚ł͎©“®Be‘‚«ž‚Ý‚ðŽŽ‚Ý‚é
-    if (P2Util::isBbsBe2chNet($host, $bbs) || !empty($_REQUEST['submit_beres'])) {
-        $cookies_to_send .= ' MDMD=' . $_conf['be_2ch_code'] . ';';    // be.2ch.net‚Ì”FØƒR[ƒh(ƒpƒXƒ[ƒh‚Å‚Í‚È‚¢)
-        $cookies_to_send .= ' DMDM=' . $_conf['be_2ch_mail'] . ';';    // be.2ch.net‚Ì“o˜^ƒ[ƒ‹ƒAƒhƒŒƒX
+    } elseif (P2Util::isBbsBe2chNet($host, $bbs) || !empty($_REQUEST['submit_beres'])) {
+        $cookies_to_send .= sprintf(' MDMD=%s;', $_conf['be_2ch_code']); // be.2ch.net‚Ì”FØƒR[ƒh
+        $cookies_to_send .= sprintf(' DMDM=%s;', $_conf['be_2ch_mail']); // be.2ch.net‚Ì“o˜^ƒ[ƒ‹ƒAƒhƒŒƒX
     }
     
     !$cookies_to_send and $cookies_to_send = ' ;';
@@ -792,7 +796,12 @@
             }
 
         // “]‘—‚͏‘‚«ž‚ݐ¬Œ÷‚Æ”»’f
-        } elseif (preg_match("/^Location: /", $l, $matches)) {
+        } elseif (
+            preg_match("/^Location: /", $l, $matches)
+            // ”ˆړ]Œã‚¾‚Æ‚±‚¤‚È‚é‚Ý‚½‚¢ ¨ http://www2.2ch.net/live.htmli‚à‚¤‚¸‚Á‚Ɛl‘吙j
+            // i‚±‚̃Gƒ‰[Ú×‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚½•û‚ªeØ‚¾‚ªj
+            and !preg_match('{\\.2ch\\.net/live\\.html}', $l, $matches)
+        ) {
             $post_seikou = true;
         }
         if ($l == "\r\n") {

Modified: p2/trunk/read.php
===================================================================
--- p2/trunk/read.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/read.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -86,6 +86,9 @@
 
 // $GLOBALS['word'] ‚È‚Ç‚ÌŒŸõŒê‚ÌŽæ‚舵‚¢‚ª‚Ç‚³‚­‚³‚Ȃ̂́A‚Å‚«‚ê‚ΐ®—‚µ‚½‚¢‚Æ‚±‚ë...
 $GLOBALS['word'] = geti($_POST['word'], geti($_GET['word']));
+if (!strlen($GLOBALS['word']) && geti($_GET['popup_filter'])) {
+    $GLOBALS['word'] = _getFilterWordResNum($host, $bbs, $key, geti($_GET['resnum']), $GLOBALS['res_filter']['field']);
+}
 $GLOBALS['word_fm'] = null;
 
 if (strlen($GLOBALS['word'])) {
@@ -135,7 +138,7 @@
 
     // ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ê‚Ä‚¢‚½‚È‚çAƒtƒ@ƒCƒ‹‚ɐݒè‚ð•Û‘¶
     if (isset($_REQUEST['submit_filter'])) { // !isset($_REQUEST['idpopup'])
-        if (empty($GLOBALS['popup_filter'])) {
+        if (empty($_GET['popup_filter'])) {
             FileCtl::make_datafile($cachefile, $_conf['p2_perm']);
             if (false === file_put_contents($cachefile, serialize($GLOBALS['res_filter']), LOCK_EX)) {
                 die("Error: cannot write file.");
@@ -555,6 +558,52 @@
 }
 
 /**
+ * ‘ΏۃŒƒX”ԍ†‚̑ΏۃtƒB[ƒ‹ƒh‚©‚çAŒŸõƒ[ƒh‚ðŽæ“¾‚·‚é
+ * i$GLOBALS['res_filter']['field'], $GLOBALS['res_filter']['method']‚ð‘‚«Š·‚¦‚éê‡‚ ‚èj
+ *
+ * @return  string  ŒŸõƒ[ƒh
+ */
+function _getFilterWordResNum($host, $bbs, $key, $resnum, $field)
+{
+    $word = null;
+    
+    $aThread = new ThreadRead;
+    $aThread->setThreadPathInfo($host, $bbs, $key);
+    $aThread->readDat();
+    $resar = $aThread->explodeDatLine($aThread->datlines[$resnum - 1]);
+    $resar = array_map('trim', $resar);
+    $resar = array_map('strip_tags', $resar);
+    
+    switch ($field) {
+        case 'name':
+            $word = $resar[0];
+            break;
+        case 'mail':
+            $word = $resar[1];
+            break;
+        case 'date':
+            $word = preg_replace("/^(.*)ID:([0-9a-zA-Z\/\.\+]+)(.*)$/", "\\1 \\3", $resar[2]);
+            $word = preg_replace("/^.*(\d{2,4}\/\d{1,2}\/\d{1,2}).*$/", "\\1", $word);
+            break;
+        case 'id':
+            $word = preg_replace("/^.*ID:([0-9a-zA-Z\/\.\+]+).*$/", "\\1", $resar[2]);
+            break;
+        case 'rres':
+            $GLOBALS['res_filter']['field']  = 'msg';
+            $GLOBALS['res_filter']['method'] = 'regex';
+            //$word = '>' . $resnum . '[^\d]'; // [^\d-]
+            //$word = "(&gt;|„|&lt;|ƒ|j|r|t|â){1,2}\s*\.?(\d+,)*" . $resnum . "\D";
+            require_once P2_LIB_DIR . '/ShowThread.php';
+            // mb_eregi()‚Í\d‚Å‘SŠp”Žš‚É‚à”½‰ž‚·‚éiStrCtlj
+            $word = ShowThread::getAnchorRegex(
+                '%prefix%(.+%delimiter%)?' . $resnum . '(?!\\d|%range_delimiter%)'
+            );
+    
+    }
+    return $word;
+}
+
+/**
  * Å‹ß“Ç‚ñ‚¾ƒXƒŒ‚É‹L˜^‚·‚é
  *
  * @param   array  $data_ar

Modified: p2/trunk/read_filter.php
===================================================================
--- p2/trunk/read_filter.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/read_filter.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -1,8 +1,8 @@
 <?php
 // p2 - ƒXƒŒƒbƒh•\Ž¦ƒ‰ƒbƒp[
-// ƒ‰ƒbƒp[Œ`Ž®‚Å‚Í‚È‚­•’ÊŒ`Ž®‚Ɉڂµ‚½‚¢
+// 2010/08/05 ‚±‚̃XƒNƒŠƒvƒg‚ÍŽg‚킸‚ɁAread.php‚Å‚»‚̂܂܏ˆ—‚·‚é‚悤‚É‚µ‚½Bpopup_filter‚Å”»•ÊB
 
-define('P2_READ_FILTER_WRAPPER', 1);
+//define('P2_READ_FILTER_WRAPPER', 1); // ‚±‚̒萔‚ÍŽg‚í‚È‚¢
 
 require_once './conf/conf.inc.php';
 require_once P2_LIB_DIR . '/Thread.php';
@@ -21,24 +21,50 @@
 $resnum     = geti($_GET['resnum']);
 $field      = geti($_GET['field']);
 
-$itaj = P2Util::getItaName($host, $bbs);
-if (!$itaj) { $itaj = $bbs; }
-$ttitle_name = base64_decode($ttitle_en);
-$GLOBALS['popup_filter'] = 1;
+//$itaj = P2Util::getItaName($host, $bbs);
+//if (!$itaj) { $itaj = $bbs; }
+//$ttitle_name = base64_decode($ttitle_en);
 
+$_GET['popup_filter'] = 1;
 
 // ‘ΏۃŒƒX‚̑ΏۃtƒB[ƒ‹ƒh‚©‚çAŒŸõƒ[ƒh‚ðŽæ“¾‚·‚é
 $_GET['word'] = _getReadFilterWord($host, $bbs, $key, $resnum, $field);
 
 // read.php‚ɏˆ—‚ð“n‚·
 include $_conf['read_php'];
+//header('Location: ' . _getReadLocationUri());
 
 
-
 //===========================================================================
 // ŠÖ”i‚±‚̃tƒ@ƒCƒ‹“à‚Å‚Ì‚Ý—˜—pj
 //===========================================================================
 /**
+ * @return  string
+ */
+function _getReadLocationUri()
+{
+    global $_conf;
+    
+    // «ˆø”‚Í‚±‚ꂾ‚¯‚Å‚Í‘«‚è‚Ä‚¢‚È‚¢
+    $qs = array(
+        'host'         => geti($_GET['host']),
+        'bbs'          => geti($_GET['bbs']),
+        'key'          => geti($_GET['key']),
+        'rc'           => geti($_GET['rc']),
+        'ttitle_en'    => geti($_GET['ttitle_en']),
+        'resnum'       => geti($_GET['resnum']),
+        'field'        => geti($_GET['field']),
+        'word'         => geti($_GET['word']),
+        'popup_filter' => geti($_GET['popup_filter']),
+        UA::getQueryKey()   => UA::getQueryValue()
+    );
+    if (defined('SID') && strlen(SID)) {
+        $qs[session_name()] = session_id();
+    }
+    return UriUtil::buildQueryUri($_conf['read_php'], $qs);
+}
+
+/**
  * ‘ΏۃŒƒX‚̑ΏۃtƒB[ƒ‹ƒh‚©‚çAŒŸõƒ[ƒh‚ðŽæ“¾‚·‚é
  *
  * @return  string  ŒŸõƒ[ƒh
@@ -74,9 +100,10 @@
             //$word = '>' . $resnum . '[^\d]'; // [^\d-]
             //$word = "(&gt;|„|&lt;|ƒ|j|r|t|â){1,2}\s*\.?(\d+,)*" . $resnum . "\D";
             require_once P2_LIB_DIR . '/ShowThread.php';
+            // mb_eregi()‚Í\d‚Å‘SŠp”Žš‚É‚à”½‰ž‚·‚éiStrCtlj
             $word = ShowThread::getAnchorRegex(
                 '%prefix%(.+%delimiter%)?' . $resnum . '(?!\\d|%range_delimiter%)'
-            );
+            );    
     }
     return $word;
 }

Modified: p2/trunk/read_filter_i.php
===================================================================
--- p2/trunk/read_filter_i.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/read_filter_i.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -4,28 +4,47 @@
 
 // p2 - Œg‘єŃŒƒXƒtƒBƒ‹ƒ^ƒŠƒ“ƒO
 
+// 2010/08/05 ‚±‚̃XƒNƒŠƒvƒg‚Í—˜—p‚µ‚Ä‚¢‚È‚¢B
+
 require_once './conf/conf.inc.php';
+require_once P2_LIB_DIR . '/Thread.php';
+require_once P2_LIB_DIR . '/ThreadRead.php';
 
 require_once P2_LIB_DIR . '/P2Validate.php';
 
 
 $_login->authorize(); // ƒ†[ƒU”FØ
 
-// {{{ ƒXƒŒƒbƒhî•ñ
 
 $host = geti($_GET['host']);
 $bbs  = geti($_GET['bbs']);
 $key  = geti($_GET['key']);
-$ttitle_hc = P2Util::htmlEntityDecodeLite(base64_decode(geti($_GET['ttitle_en'])));
+$resnum     = geti($_GET['resnum']);
+$field      = geti($_GET['field']);
+
+$ttitle_en  = geti($_GET['ttitle_en']);
+
+// ‘ΏۃŒƒX‚̑ΏۃtƒB[ƒ‹ƒh‚©‚çAŒŸõƒ[ƒh‚ðŽæ“¾‚·‚é
+$_GET['word'] = _getReadFilterWord($host, $bbs, $key, $resnum, $field);
+
+if (!empty($_GET['popup_filter'])) {
+    // read.php‚ɏˆ—‚ð“n‚·
+    include $_conf['read_php'];
+    exit;
+}
+
+
+$ttitle_name = base64_decode($ttitle_en);
+$ttitle_hc = P2Util::htmlEntityDecodeLite($ttitle_name);
 $ttitle_back_ht = isset($_SERVER['HTTP_REFERER'])
     ? '<a href="' . hs($_SERVER['HTTP_REFERER']) . '" title="–ß‚é">' . hs($ttitle_hc) . '</a>'
     : hs($ttitle_hc);
 
+
 if (P2Validate::host($host) || P2Validate::bbs($bbs) || P2Validate::key($key)) {
     p2die('•s³‚Ȉø”‚Å‚·');
 }
 
-// }}}
 // {{{ ‘O‰ñƒtƒBƒ‹ƒ^’l“ǂݍž‚Ý
 
 $cachefile = $_conf['pref_dir'] . '/p2_res_filter.txt';
@@ -119,6 +138,55 @@
 </html>
 <?php
 
+
+//===========================================================================
+// ŠÖ”i‚±‚̃tƒ@ƒCƒ‹“à‚Å‚Ì‚Ý—˜—pj
+//===========================================================================
+/**
+ * ‘ΏۃŒƒX‚̑ΏۃtƒB[ƒ‹ƒh‚©‚çAŒŸõƒ[ƒh‚ðŽæ“¾‚·‚é
+ *
+ * @return  string  ŒŸõƒ[ƒh
+ */
+function _getReadFilterWord($host, $bbs, $key, $resnum, $field)
+{
+    $word = null;
+    
+    $aThread = new ThreadRead;
+    $aThread->setThreadPathInfo($host, $bbs, $key);
+    $aThread->readDat();
+    $resar = $aThread->explodeDatLine($aThread->datlines[$resnum - 1]);
+    $resar = array_map('trim', $resar);
+    $resar = array_map('strip_tags', $resar);
+    
+    switch ($field) {
+        case 'name':
+            $word = $resar[0];
+            break;
+        case 'mail':
+            $word = $resar[1];
+            break;
+        case 'date':
+            $word = preg_replace("/^(.*)ID:([0-9a-zA-Z\/\.\+]+)(.*)$/", "\\1 \\3", $resar[2]);
+            $word = preg_replace("/^.*(\d{2,4}\/\d{1,2}\/\d{1,2}).*$/", "\\1", $word);
+            break;
+        case 'id':
+            $word = preg_replace("/^.*ID:([0-9a-zA-Z\/\.\+]+).*$/", "\\1", $resar[2]);
+            break;
+        case 'rres':
+            $_GET['field']  = 'msg';
+            $_GET['method'] = 'regex';
+            //$word = '>' . $resnum . '[^\d]'; // [^\d-]
+            //$word = "(&gt;|„|&lt;|ƒ|j|r|t|â){1,2}\s*\.?(\d+,)*" . $resnum . "\D";
+            require_once P2_LIB_DIR . '/ShowThread.php';
+            // mb_eregi()‚Í\d‚Å‘SŠp”Žš‚É‚à”½‰ž‚·‚éiStrCtlj
+            $word = ShowThread::getAnchorRegex(
+                '%prefix%(.+%delimiter%)?' . $resnum . '(?!\\d|%range_delimiter%)'
+            );
+    
+    }
+    return $word;
+}
+
 /*
  * Local Variables:
  * mode: php

Modified: p2/trunk/title.php
===================================================================
--- p2/trunk/title.php	2010-07-27 22:58:29 UTC (rev 867)
+++ p2/trunk/title.php	2010-08-10 03:05:48 UTC (rev 868)
@@ -55,9 +55,28 @@
 $htm['auth_user'] = "<p>ƒƒOƒCƒ“ƒ†[ƒU: {$_login->user_u} - " . date("Y/m/d (D) G:i") . '</p>' . "\n";
 
 // iŒg‘сjƒƒOƒCƒ“—pURL
-$url = rtrim(dirname(UriUtil::getMyUri()), '/') . '/' . '?user=' . $_login->user_u . '&b=k';
-$htm['ktai_url'] = '<p>Œg‘уƒOƒCƒ“—pURL <a href="' . hs($url) . '" target="_blank">' . hs($url) . '</a></p>' . "\n";
+$ktai_uri_atag = P2View::tagA(
+    UriUtil::buildQueryUri(rtrim(dirname(UriUtil::getMyUri()), '/') . '/',
+        array(
+            'user' => $_login->user_u,
+            UA::getQueryKey() => UA::getMobileQuery()
+        )
+    ),
+    null,
+    array('target' => '_blank')
+);
 
+// iPhone—pURL
+$iphone_uri_atag = P2View::tagA(
+    UriUtil::buildQueryUri(rtrim(dirname(UriUtil::getMyUri()), '/') . '/',
+        array(
+            UA::getQueryKey() => UA::getIPhoneGroupQuery()
+        )
+    ),
+    null,
+    array('target' => '_blank')
+);
+
 // ‘O‰ñ‚̃ƒOƒCƒ“î•ñ
 if ($_conf['login_log_rec'] && $_conf['last_login_log_show']) {
     if (false !== $log = P2Util::getLastAccessLog($_conf['login_log_file'])) {
@@ -117,7 +136,10 @@
 	</td></tr></table>
 
 	<?php echo $htm['auth_user']; ?>
-	<?php echo $htm['ktai_url']; ?>
+	<p>
+	Œg‘уƒOƒCƒ“—pURL <?php echo $ktai_uri_atag; ?><br>
+	iPhoneƒƒOƒCƒ“—pURL <?php echo $iphone_uri_atag; ?>
+	</p>
 	<?php echo $htm['last_login']; ?>
 </div>
 </body></html>



P2-php-svn メーリングリストの案内
Back to archive index