[P2-php-svn] [783] rep2 version 1.8.60

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2010年 1月 16日 (土) 04:28:32 JST


Revision: 783
          http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=783
Author:   akid
Date:     2010-01-16 04:28:32 +0900 (Sat, 16 Jan 2010)

Log Message:
-----------
rep2 version 1.8.60
conf.inc.phpから分離して、conf_system.inc.phpを新たに追加した。
他、細かな更新。

Modified Paths:
--------------
    p2/trunk/conf/conf.inc.php
    p2/trunk/conf/conf_user_def.inc.php
    p2/trunk/conf/conf_user_style.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/iphone/read_footer_k.inc.php
    p2/trunk/iphone/sb_footer_k.inc.php
    p2/trunk/iphone/sb_header_k.inc.php
    p2/trunk/iui/iuix.css
    p2/trunk/js/post_form.js
    p2/trunk/lib/Login.php
    p2/trunk/lib/P2Util.php
    p2/trunk/lib/P2View.php
    p2/trunk/lib/login_first.inc.php
    p2/trunk/post.php
    p2/trunk/read_new_i.php
    p2/trunk/setting.php

Added Paths:
-----------
    p2/trunk/conf/conf_system.inc.php


-------------- next part --------------
Modified: p2/trunk/conf/conf.inc.php
===================================================================
--- p2/trunk/conf/conf.inc.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/conf/conf.inc.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -4,108 +4,18 @@
 
     ‚±‚̃tƒ@ƒCƒ‹‚̓VƒXƒeƒ€“à•”Ý’è—p‚Å‚·B“Á‚É——R‚Ì–³‚¢ŒÀ‚è•ÏX‚µ‚È‚¢‚ʼnº‚³‚¢B
     ƒ†[ƒUÝ’è‚́Aƒuƒ‰ƒEƒUã‚©‚çuƒ†[ƒUÝ’è•ÒWv‚ŕύX‰Â”\‚Å‚·B
-    ŠÇ—ŽÒŒü‚¯Ý’è‚Í conf/conf_admin.inc.php ‚𒼐ڏ‘‚«Š·‚¦‚ĉº‚³‚¢B
+    ŠÇ—ŽÒŒü‚¯Ý’è‚̓tƒ@ƒCƒ‹ conf/conf_admin.inc.php ‚𒼐ڏ‘‚«Š·‚¦‚ĉº‚³‚¢B
 */
 
-$_conf['p2version'] = '1.8.59'; // rep2‚̃o[ƒWƒ‡ƒ“
 
-$_conf['p2name'] = 'rep2';    // rep2‚Ì–¼‘OB
-
-$_conf['p2uaname'] = 'r e p 2';  // UA—p‚Ìrep2‚Ì–¼‘O
-
-//======================================================================
-// Šî–{Ý’菈—
-//======================================================================
-// ƒGƒ‰[o—͐ݒè
-_setErrorReporting(); // error_reporting()
-
-// {{{ Šî–{•Ï”
-
-$_conf['p2web_url']             = 'http://akid.s17.xrea.com/';
-$_conf['p2ime_url']             = 'http://akid.s17.xrea.com/p2ime.phtml';
-$_conf['favrank_url']           = 'http://akid.s17.xrea.com/favrank/favrank.php';
-$_conf['menu_php']              = 'menu.php';
-$_conf['subject_php']           = 'subject.php'; // subject_i.php
-$_conf['read_php']              = 'read.php';
-$_conf['read_new_php']          = 'read_new.php';
-$_conf['read_new_k_php']        = 'read_new_k.php';
-$_conf['post_php']              = 'post.php';
-$_conf['cookie_file_name']      = 'p2_cookie.txt';
-$_conf['menu_k_php']            = 'menu_k.php'; // menu_i.php
-$_conf['editpref_php']          = 'editpref.php'; // editpref_i.php
-
-// info.php ‚ÍJavaScriptƒtƒ@ƒCƒ‹’†‚ɏ‘‚©‚ê‚Ä‚¢‚é‚Ì‚ª“ï
-
-// }}}
-
-// ƒfƒoƒbƒO—p•Ï”‚ðÝ’è
-_setDebug(); // void  $GLOBALS['debug'], $GLOBALS['profiler']
-
-// PHP‚Ì“®ìŠÂ‹«‚ðŠm”F
-_checkPHPInstalled(); // void|die
-
-// PHP‚̊‹«Ý’è
-_setPHPEnvironments();
-
-// p2‚̃fƒBƒŒƒNƒgƒŠƒpƒX’萔‚ðÝ’è‚·‚é
-_setP2DirConstants(); // P2_LIB_DIR “™
-
-require_once P2_LIB_DIR . '/global.funcs.php';
-
-// ŒŸõƒpƒX‚ðƒZƒbƒg
-_iniSetIncludePath(); // void
-
-// PEARƒ‰ƒCƒuƒ‰ƒŠ‚ð“ǂݍž‚Þ
-_includePears(); // void|die
-
-// PEAR::PHP_Compat‚ÅPHP5ŒÝŠ·‚̊֐”‚ð“ǂݍž‚Þ
-_loadPHPCompat();
-
-require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'P2Util.php';
-require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'DataPhp.php';
-require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'Session.php';
-require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'Login.php';
-require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'UA.php';
-require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'P2View.php';
-
-// }}}
-
-// ƒtƒH[ƒ€‚©‚ç‚Ì“ü—́iPOST, GETj‚ðˆêŠ‡‚Å•¶ŽšƒR[ƒh•ÏŠ·•ƒTƒjƒ^ƒCƒY
-_convertEncodingAndSanitizePostGet();
-
-// ŠÇ—ŽÒ—pÝ’è‚ð“ǂݍž‚Ý
-if (!include_once './conf/conf_admin.inc.php') {
-    P2Util::printSimpleHtml("p2 error: ŠÇ—ŽÒ—pÝ’èƒtƒ@ƒCƒ‹‚ð“ǂݍž‚ß‚Ü‚¹‚ñ‚Å‚µ‚½B");
-    die;
+// ƒVƒXƒeƒ€Ý’è‚ð“ǂݍž‚Ý
+if (!include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'conf_system.inc.php') {
+    die("p2 error: ŠÇ—ŽÒ—pÝ’èƒtƒ@ƒCƒ‹‚ð“ǂݍž‚ß‚Ü‚¹‚ñ‚Å‚µ‚½B");
 }
 
-ini_set('default_socket_timeout', $_conf['fsockopen_time_limit']);
+// ˆÈ‰ºAƒ†[ƒU‘Ώۂ̐ݒè
+//iconf_user.inc.php‚ðì‚Á‚Ä‚Ü‚Æ‚ß‚½‚¢‚ªAÌŽg‚Á‚Ä‚¢‚½ƒtƒ@ƒCƒ‹–¼‚Æ‚©‚Ô‚é‚Ì‚Å–À‚Á‚Ä‚¢‚éj
 
-// ŠÇ——p•Û‘¶ƒfƒBƒŒƒNƒgƒŠ (ƒp[ƒ~ƒbƒVƒ‡ƒ“‚Í707)
-$_conf['admin_dir'] = $_conf['data_dir'] . '/admin';
-
-// cache •Û‘¶ƒfƒBƒŒƒNƒgƒŠ (ƒp[ƒ~ƒbƒVƒ‡ƒ“‚Í707)
-$_conf['cache_dir'] = $_conf['data_dir'] . '/cache'; // 2005/6/29 $_conf['pref_dir'] . '/p2_cache' ‚æ‚è•ÏX
-
-// ƒeƒ“ƒ|ƒ‰ƒŠƒfƒBƒŒƒNƒgƒŠ (ƒp[ƒ~ƒbƒVƒ‡ƒ“‚Í707)
-$_conf['tmp_dir'] = $_conf['data_dir'] . '/tmp';
-
-$_conf['accesskey_for_k'] = 'accesskey';
-
-// ’[––”»’è
-_checkBrowser(); // $_conf, UA::setForceMode()
-
-// b=pc ‚Í‚Ü‚¾‘S‚ẴŠƒ“ƒN‚ւ̒ljÁ‚ªŠ®—¹‚µ‚Ä‚¨‚炸A‹@”\‚µ‚Ä‚¢‚È‚¢‰ÓŠ‚ª‚ ‚éB’n“¹‚ɐ®”õ‚µ‚Ä‚¢‚«‚½‚¢B
-// output_add_rewrite_var() ‚Í•Ö—˜‚¾‚ªAo—Í‚ªƒoƒbƒtƒ@‚³‚ê‚Ä‘ÌŠ´‘¬“x‚ª—Ž‚¿‚é‚Ì‚ª“ï“_BB
-// ‘ÌŠ´‘¬“x‚ð—Ž‚Æ‚³‚È‚¢—Ç‚¢•û–@‚È‚¢‚©‚ȁH
-_setOldStyleKtaiQuery(); // $_conf['ktai'] “™‚ðƒZƒbƒg
-
-// $_conf['expack.use_pecl_http'] ‚Ì’²®
-_adjustConfUsePeclHttp(); // UA::isK()
-
-//======================================================================
-// [todo]ƒVƒXƒeƒ€Ý’è•”•ª‚ƃ†[ƒU‚ÉŠÖ‚í‚é•”•ª‚̐ݒè‚̓tƒ@ƒCƒ‹•ª—£‚µ‚½‚¢
-
 // {{{ ƒ†[ƒUÝ’è “Çž
 
 // ƒfƒtƒHƒ‹ƒgÝ’èiconf_user_def.inc.phpj‚ð“ǂݍž‚Þ
@@ -218,12 +128,14 @@
 //======================================================================
 // •Ï”Ý’è
 //======================================================================
+$_conf['cookie_dir']            = $_conf['pref_dir'] . '/p2_cookie'; // cookie •Û‘¶ƒfƒBƒŒƒNƒgƒŠ
+
 // Å‹ß“Ç‚ñ‚¾ƒXƒŒ
 $_conf['recent_file']           = $_conf['pref_dir'] . '/p2_recent.idx';
 // ŒÝŠ·—p
-$_conf['recent_idx'] = $_conf['recent_file'];
+$_conf['recent_idx']            = $_conf['recent_file'];
 
-$_conf['res_hist_idx']      = $_conf['pref_dir'] . '/p2_res_hist.idx';      // ‘‚«ž‚݃ƒO (idx)
+$_conf['res_hist_idx']          = $_conf['pref_dir'] . '/p2_res_hist.idx';      // ‘‚«ž‚݃ƒO (idx)
 
 // ‘‚«ž‚݃ƒOƒtƒ@ƒCƒ‹idatj
 $_conf['p2_res_hist_dat']       = $_conf['pref_dir'] . '/p2_res_hist.dat';
@@ -234,8 +146,6 @@
 // ‘‚«ž‚݃ƒOƒtƒ@ƒCƒ‹idatj ƒZƒLƒ…ƒŠƒeƒB’Ê•ñ—p
 $_conf['p2_res_hist_dat_secu']  = $_conf['pref_dir'] . '/p2_res_hist.secu.cgi';
 
-$_conf['cookie_dir']            = $_conf['pref_dir'] . '/p2_cookie'; // cookie •Û‘¶ƒfƒBƒŒƒNƒgƒŠ
-
 $_conf['favlist_file']          = $_conf['pref_dir'] . '/p2_favlist.idx';
 // ŒÝŠ·—p
 $_conf['favlist_idx'] = $_conf['favlist_file'];
@@ -285,6 +195,8 @@
 $_p2session = _startSession();
 
 // ƒƒ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 = new Login;
 
 // ‚±‚̃tƒ@ƒCƒ‹“à‚ł̏ˆ—‚Í‚±‚±‚Ü‚Å
@@ -295,348 +207,8 @@
 //=============================================================================
 
 /**
- * Ä‹A“I‚Éstripslashes‚ð‚©‚¯‚é
- * GET/POST/COOKIE•Ï”—p‚Ȃ̂ŃIƒuƒWƒFƒNƒg‚̃vƒƒpƒeƒB‚ɂ͑Ήž‚µ‚È‚¢
- * (ExUtil)
- *
- * @return  array|string
- */
-function stripslashesR($var, $r = 0)
-{
-    $rlimit = 10;
-    if (is_array($var) && $r < $rlimit) {
-        foreach ($var as $key => $value) {
-            $var[$key] = stripslashesR($value, ++$r);
-        }
-    } elseif (is_string($var)) {
-        $var = stripslashes($var);
-    }
-    return $var;
-}
-
-/**
- * Ä‹A“I‚Ƀkƒ‹•¶Žš‚ðíœ‚·‚é
- * mbstring‚Å•ÏŠ·ƒe[ƒuƒ‹‚É‚È‚¢(?)ŠOŽš‚ð•ÏŠ·‚·‚é‚Æ
- * NULL(0x00)‚É‚È‚Á‚Ä‚µ‚Ü‚¤‚±‚Æ‚ª‚ ‚é‚̂ŏÁ‹Ž‚·‚é
- * (ExUtil)
- *
- * @return  array|string
- */
-function nullfilterR($var, $r = 0)
-{
-    $rlimit = 10;
-    if (is_array($var) && $r < $rlimit) {
-        foreach ($var as $key => $value) {
-            $var[$key] = nullfilterR($value, ++$r);
-        }
-    } elseif (is_string($var)) {
-        $var = str_replace(chr(0), '', $var);
-    }
-    return $var;
-}
-
-/**
- * ƒƒ‚ƒŠ‚ÌŽg—p—Ê‚ð•\Ž¦‚·‚é
- *
  * @return  void
  */
-function printMemoryUsage()
-{
-    $kb = memory_get_usage() / 1024;
-    $kb = number_format($kb, 2, '.', '');
-    
-    echo 'Memory Usage: ' . $kb . 'KB';
-}
-
-/**
- * ƒGƒ‰[o—͐ݒèBerror_reporting()
- * iNOTICE‚͍팸’†‚¾‚ªA‚Ü‚¾Žc‚Á‚Ä‚¢‚é‚ÆŽv‚¤j
- *
- * @return  void
- */
-function _setErrorReporting()
-{
-    $except = E_NOTICE;
-    if (defined('E_STRICT')) {
-        $except = $except | E_STRICT;
-    }
-    if (defined('E_DEPRECATED')) {
-        $except = $except | E_DEPRECATED;
-    }
-    error_reporting(E_ALL & ~$except);
-}
-
-/**
- * ƒƒ‚ƒŠ§ŒÀ’l‚̉ºŒÀÝ’è(M)
- * Ý’è’l‚ªŽw’è’l–¢–ž‚È‚çŽw’è’l‚Ɉø‚«ã‚°‚Đݒ肷‚é
- *
- * @return  void
- */
-function _setMemoryLimit($least_memory_limit_m = 32)
-{
-    if (preg_match('/^(\\d+)M$/', ini_get('memory_limit'), $m)) {
-        if ($m[1] < $least_memory_limit_m) {
-            ini_set('memory_limit', $least_memory_limit_m . 'M');
-        }
-    }
-}
-
-/**
- * ƒXƒNƒŠƒvƒg‚ÌŽÀsŽžŠÔ§ŒÀ‚̉ºŒÀÝ’è(•b)
- * Ý’è’l‚ªŽw’è•b–¢–ž‚È‚çŽw’è•b‚Ɉø‚«ã‚°‚Đݒ肷‚é
- *
- * @return  void
- */
-function _setTimeLimit($least_time_limit = 60)
-{
-    if ($t = ini_get('max_execution_time') and 0 < $t && $t < $least_time_limit) {
-        if (!ini_get('safe_mode')) {
-            set_time_limit($least_time_limit);
-        }
-    }
-}
-
-/**
- * @return  void  $GLOBALS['debug'], $GLOBALS['profiler']
- */
-function _setDebug($debug = null)
-{
-    if (is_null($debug)) {
-        $GLOBALS['debug'] = isset($_GET['debug']) ? intval($_GET['debug']) : 0;
-    } else {
-        $GLOBALS['debug'] = $debug;
-    }
-    if ($GLOBALS['debug']) {
-        require_once 'Benchmark/Profiler.php';
-        $GLOBALS['profiler'] = new Benchmark_Profiler(true);
-        
-        // 2007/08/03 Benchmark_Profiler 1.2.7 ‚Å _Benchmark_Profiler ‚ÌPEARŽ®ƒfƒXƒgƒ‰ƒNƒ^‚ª‚È‚­‚È‚Á‚āA
-        // close() ‚ÌŽè“®ƒƒ\ƒbƒh‚É‚È‚Á‚½H‚̂ŁAŽè“®‚Å“o˜^‚µ‚Ä‚Ý‚éB‚È‚ñ‚©•Ï‚È‹C‚ª‚·‚邯‚ǁB
-        if (!method_exists($GLOBALS['profiler'], '_Benchmark_Profiler') && method_exists($GLOBALS['profiler'], 'close')) {
-            register_shutdown_function(array($GLOBALS['profiler'], 'close'));
-        }
-
-        // printMemoryUsage();
-        register_shutdown_function('printMemoryUsage');
-    }
-}
-
-/**
- * •¶ŽšƒR[ƒh‚ÌŽw’è
- *
- * @return  void
- */
-function _setEncodings()
-{
-    // mb_detect_order("SJIS-win,eucJP-win,ASCII");
-    mb_internal_encoding('SJIS-win');
-    mb_http_output('pass');
-    mb_substitute_character(63); // •¶ŽšƒR[ƒh•ÏŠ·‚ÉŽ¸”s‚µ‚½•¶Žš‚ª "?" ‚É‚È‚é
-    //mb_substitute_character(0x3013); // ¬
-
-    ini_set('default_mimetype', 'text/html');
-    ini_set('default_charset', 'Shift_JIS');
-
-    if (function_exists('mb_ereg_replace')) {
-        define('P2_MBREGEX_AVAILABLE', 1);
-        @mb_regex_encoding('SJIS-win');
-    } else {
-        define('P2_MBREGEX_AVAILABLE', 0);
-    }
-}
-
-/**
- * ŒŸõƒpƒX‚ðƒZƒbƒg‚·‚é
- * P2_PEAR_HACK_DIR, P2_PEAR_DIR
- *
- * @return  void
- */
-function _iniSetIncludePath()
-{
-    $include_path = '.';
-    if (is_dir(P2_PEAR_HACK_DIR)) {
-        $include_path .= PATH_SEPARATOR . realpath(P2_PEAR_HACK_DIR);
-    }
-    $include_path .= PATH_SEPARATOR . ini_get('include_path');
-    if (is_dir(P2_PEAR_DIR)) {
-        $include_path .= PATH_SEPARATOR . realpath(P2_PEAR_DIR);
-    }
-    //$include_path .= PATH_SEPARATOR . realpath(P2_LIB_DIR);
-    ini_set('include_path', $include_path);
-}
-
-/**
- * PHP‚Ì“®ìŠÂ‹«‚ðŠm”F
- *
- * @return  void|die
- */
-function _checkPHPInstalled()
-{
-    $errmsgs = array();
-    if (version_compare(phpversion(), '4.3.0', 'lt')) {
-        $errmsgs[] = 'PHP‚̃o[ƒWƒ‡ƒ“‚ª4.3.0–¢–ž‚Å‚ÍŽg‚¦‚Ü‚¹‚ñB';
-    }
-    if (ini_get('safe_mode')) {
-        $errmsgs[] = 'ƒZ[ƒtƒ‚[ƒh‚Å“®ì‚·‚éPHP‚Å‚ÍŽg‚¦‚Ü‚¹‚ñB';
-    }
-    if (!extension_loaded('mbstring')) {
-        $errmsgs[] = 'PHP‚̃Cƒ“ƒXƒg[ƒ‹‚ª•s\•ª‚Å‚·BPHP‚ÌmbstringŠg’£ƒ‚ƒWƒ…[ƒ‹‚ªƒ[ƒh‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB';
-    }
-    if ($errmsgs) {
-        $errmsgHtmls = array_map('htmlspecialchars', $errmsgs);
-        die(sprintf(
-            '<html><body><h3>p2 install error</h3><p>%s</p></body></html>',
-            implode('<br>', $errmsgHtmls)
-        ));
-    }
-}
-
-/**
- * PHP‚̊‹«Ý’è
- *
- * @return  void
- */
-function _setPHPEnvironments()
-{
-    // ƒ^ƒCƒ€ƒ][ƒ“‚ðƒZƒbƒg
-    _setTimezone();
-
-    // ƒƒ‚ƒŠ§ŒÀ’l‚̉ºŒÀÝ’è(M)
-    // Ý’è’l‚ªŽw’è’l–¢–ž‚È‚çŽw’è’l‚Ɉø‚«ã‚°‚Đݒ肷‚é
-    _setMemoryLimit(32);
-
-    // ƒXƒNƒŠƒvƒg‚ÌŽÀsŽžŠÔ§ŒÀ‚̉ºŒÀÝ’è(•b)
-    // Ý’è’l‚ªŽw’è•b–¢–ž‚È‚çŽw’è•b‚Ɉø‚«ã‚°‚Đݒ肷‚é
-    _setTimeLimit(60);
-
-    // Ž©“®ƒtƒ‰ƒbƒVƒ…‚ðƒIƒt‚É‚·‚é
-    ob_implicit_flush(0);
-
-    // ƒNƒ‰ƒCƒAƒ“ƒg‚©‚çÚ‘±‚ðØ‚ç‚ê‚Ä‚àˆ—‚𑱍s‚·‚é
-    // ignore_user_abort(1);
-
-    // session.trans_sid—LŒøŽž ‚â output_add_rewrite_var(), http_build_query() “™‚Ő¶¬E•ÏX‚³‚ê‚é
-    // URL‚ÌGETƒpƒ‰ƒ[ƒ^‹æØ‚蕶Žš(—ñ)‚ð"&amp;"‚É‚·‚éBiƒfƒtƒHƒ‹ƒg‚Í"&"j
-    ini_set('arg_separator.output', '&amp;');
-
-    // ƒŠƒNƒGƒXƒgID‚ðÝ’è
-    define('P2_REQUEST_ID', substr($_SERVER['REQUEST_METHOD'], 0, 1) . md5(serialize($_REQUEST)));
-
-    // OS•Ê‚̒萔‚ð•âŠ®ƒZƒbƒg‚·‚éBPATH_SEPARATOR, DIRECTORY_SEPARATOR
-    _setOSDefine();
-
-    // •¶ŽšƒR[ƒh‚ÌŽw’è
-    _setEncodings();
-}
-
-/**
- * p2‚̃fƒBƒŒƒNƒgƒŠƒpƒX’萔‚ðÝ’è‚·‚é
- *
- * @return  void
- */
-function _setP2DirConstants()
-{
-    define('P2_CONF_DIR', dirname(__FILE__)); // __DIR__ @php-5.3
-
-    define('P2_BASE_DIR', dirname(P2_CONF_DIR));
-
-    // Šî–{“I‚È‹@”\‚ð’ñ‹Ÿ‚·‚郉ƒCƒuƒ‰ƒŠ
-    define('P2_LIB_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'lib');
-
-    // ‚¨‚Ü‚¯“I‚È‹@”\‚ð’ñ‹Ÿ‚·‚郉ƒCƒuƒ‰ƒŠ
-    define('P2EX_LIB_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'expack');
-
-    // ƒXƒ^ƒCƒ‹ƒV[ƒg
-    define('P2_STYLE_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'style');
-
-    // ƒXƒLƒ“
-    define('P2_SKIN_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'skin');
-
-    // PEARƒCƒ“ƒXƒg[ƒ‹ƒfƒBƒŒƒNƒgƒŠAŒŸõƒpƒX‚ɒljÁ‚³‚ê‚é
-    define('P2_PEAR_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'includes');
-
-    // PEAR‚ðƒnƒbƒN‚µ‚½ƒtƒ@ƒCƒ‹—pƒfƒBƒŒƒNƒgƒŠA’ʏí‚ÌPEAR‚æ‚è—Dæ“I‚ÉŒŸõƒpƒX‚ɒljÁ‚³‚ê‚é
-    // Cache/Container/db.php(PEAR::Cache)‚ªMySQL”›‚肾‚Á‚½‚̂ŁA”Ä—p“I‚É‚µ‚½‚à‚Ì‚ð’u‚¢‚Ä‚¢‚é
-    define('P2_PEAR_HACK_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'pear_hack');
-}
-
-/**
- * @return  void
- */
-function _setTimezone()
-{
-    if (function_exists('date_default_timezone_set')) { 
-        date_default_timezone_set('Asia/Tokyo'); 
-    } else { 
-        @putenv('TZ=JST-9'); 
-    }
-}
-
-/**
- * PEARƒ‰ƒCƒuƒ‰ƒŠ‚ð“ǂݍž‚Þ
- *
- * @return  void|die
- */
-function _includePears()
-{
-    global $_conf;
-    
-    $requiredPears = array(
-        'File/Util.php'             => 'File',
-        'Net/UserAgent/Mobile.php'  => 'Net_UserAgent_Mobile',
-        'PHP/Compat.php'            => 'PHP_Compat',
-        'HTTP/Request.php'          => 'HTTP_Request'
-    );
-    foreach ($requiredPears as $pear_file => $pear_pkg) {
-        if (!include_once($pear_file)) {
-            $url = 'http://akid.s17.xrea.com/p2puki/pukiwiki.php?PEAR%A4%CE%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB';
-            $url_t = $_conf['p2ime_url'] . '?enc=1&url=' . rawurlencode($url);
-            die(sprintf(
-                '<html><body>
-                <h3>p2 install error: PEAR ‚́u%sv‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ</h3>
-                <p><a href="%s" target="_blank">p2Wiki: PEAR‚̃Cƒ“ƒXƒg[ƒ‹</a></p>
-                </body></html>',
-                hs($pear_pkg), hs($url_t)
-            ));
-        }
-    }
-}
-
-/**
- * @return  void
- */
-function _loadPHPCompat()
-{
-    if (version_compare(phpversion(), '5.0.0', '<')) {
-        PHP_Compat::loadFunction('file_put_contents');
-        //PHP_Compat::loadFunction('clone');
-        PHP_Compat::loadFunction('scandir');
-        //PHP_Compat::loadFunction('http_build_query'); // ‘æ3ˆø”‚ɑΉž‚·‚é‚Ü‚Å‚ÍŽg‚¦‚È‚¢
-        //PHP_Compat::loadFunction('array_walk_recursive');
-    }
-}
-
-/**
- * OS•Ê‚̒萔‚ð•âŠ®ƒZƒbƒg‚·‚é
- *
- * @return  void
- */
-function _setOSDefine()
-{
-    // OS”»’è
-    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
-        // Windows
-        defined('PATH_SEPARATOR') or define('PATH_SEPARATOR', ';');
-        defined('DIRECTORY_SEPARATOR') or define('DIRECTORY_SEPARATOR', '\\');
-    } else {
-        defined('PATH_SEPARATOR') or define('PATH_SEPARATOR', ':');
-        defined('DIRECTORY_SEPARATOR') or define('DIRECTORY_SEPARATOR', '/');
-    }
-}
-
-/**
- * @return  void
- */
 function _setStyle()
 {
     global $_conf, $STYLE, $MYSTYLE;
@@ -669,30 +241,6 @@
 }
 
 /**
- * ƒtƒH[ƒ€‚©‚ç‚Ì“ü—Í‚ðˆêŠ‡‚ŃNƒH[ƒgœ‹Ž••¶ŽšƒR[ƒh•ÏŠ·
- * ƒtƒH[ƒ€‚Ìaccept-encoding‘®«‚ðUTF-8(SafariŒn) or Shift_JIS(‚»‚Ì‘¼)‚É‚µA
- * ‚³‚ç‚Éhidden—v‘f‚Å”ü“ûƒe[ƒuƒ‹‚Ì•¶Žš‚ðŽdž‚Þ‚±‚ƂŌ딻’è‚ðŒ¸‚ç‚·
- * •ÏŠ·Œ³Œó•â‚ÉeucJP-win‚ª‚ ‚é‚Ì‚ÍHTTP“ü—Í‚Ì•¶ŽšƒR[ƒh‚ªEUC‚ÉŽ©“®•ÏŠ·‚³‚ê‚éƒT[ƒo‚Ì‚½‚ß
- */
-function _convertEncodingAndSanitizePostGet()
-{
-    if (!empty($_POST)) {
-        if (get_magic_quotes_gpc()) {
-            $_POST = array_map('stripslashesR', $_POST);
-        }
-        mb_convert_variables('SJIS-win', 'UTF-8,eucJP-win,SJIS-win', $_POST);
-        $_POST = array_map('nullfilterR', $_POST);
-    }
-    if (!empty($_GET)) {
-        if (get_magic_quotes_gpc()) {
-            $_GET = array_map('stripslashesR', $_GET);
-        }
-        mb_convert_variables('SJIS-win', 'UTF-8,eucJP-win,SJIS-win', $_GET);
-        $_GET = array_map('nullfilterR', $_GET);
-    }
-}
-
-/**
  * 2006-02-27 ‹ŒŒ`Ž®ƒtƒ@ƒCƒ‹‚ª‚ ‚ê‚Εϊ·‚µ‚ăRƒs[
  *
  * @return  void
@@ -710,144 +258,6 @@
 }
 
 /**
- * ’[––”»’è
- *
- * @return  void
- */
-function _checkBrowser()
-{
-    global $_conf;
-    
-    // Šî–{iPCj
-    $_conf['ktai'] = false;
-    $_conf['disable_cookie'] = false;
-
-    if (UA::isSafariGroup()) {
-        $_conf['accept_charset'] = 'UTF-8';
-    } else {
-        $_conf['accept_charset'] = 'Shift_JIS';
-    }
-
-    $mobile = &Net_UserAgent_Mobile::singleton();
-    if (PEAR::isError($mobile)) {
-        trigger_error($mobile->toString(), E_USER_WARNING);
-
-    // UA‚ªŒg‘Ñ‚È‚ç
-    } 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!)
-        } elseif ($mobile->isSoftBank()) {
-            //$_conf['accesskey_for_k'] = 'DIRECTKEY';
-            // WŒ^’[––‚Æ3GCŒ^’[––‚ÍCookie‚ªŽg‚¦‚é
-            if ($mobile->isTypeW() || $mobile->isType3GC()) {
-                $_conf['disable_cookie'] = false;
-            } else {
-                $_conf['disable_cookie'] = true;
-            }
-
-        // WILLCOMi‹ŒAirH"Phonej
-        } elseif ($mobile->isWillcom()) {
-            $_conf['disable_cookie'] = false;
-        }
-    }
-
-    // iPhoneŽw’è
-    if (UA::isIPhoneGroup()) {
-        $_conf['ktai'] = true;
-        UA::setForceMode(UA::getMobileQuery());
-
-        define('P2_IPHONE_LIB_DIR', './iphone');
-
-        $_conf['subject_php']    = 'subject_i.php';
-        $_conf['read_new_k_php'] = 'read_new_i.php';
-        $_conf['menu_k_php']     = 'menu_i.php';
-        $_conf['editpref_php']   = 'editpref_i.php';
-    }
-}
-
-/**
- * ‹ŒƒXƒ^ƒCƒ‹‚ÌŒg‘уrƒ…[•Ï” $_conf['ktai'] “™‚ðƒZƒbƒg
- *
- * @return  void
- */
-function _setOldStyleKtaiQuery()
-{
-    global $_conf;
-    
-    $b = UA::getQueryKey();
-
-    // ?k=1‚Í‹ŒŽd—lB?b=k‚ªV‚µ‚¢B
-    // Œã•ûŒÝŠ·—p‘[’u
-    if (!empty($_GET['k']) || !empty($_POST['k'])) {
-        $_REQUEST[$b] = $_GET[$b] = 'k';
-    }
-
-    // $_conf[$b]i$_conf['b']j ‚àŽg‚í‚È‚¢‚悤‚É‚µ‚āAUA::getQueryValue()‚ð—˜—p‚·‚é•ûŒüB
-    $_conf[$b] = UA::getQueryValue();
-
-    // $_conf['ktai'] ‚ÍŽg‚í‚È‚¢•ûŒüB
-    // UA::isK(), UA::isPC() ‚ð—˜—p‚·‚éB
-
-    // ‹­§PCƒrƒ…[Žw’èib=pcj
-    if (UA::isPCByQuery()) {
-        $_conf['ktai'] = false;
-
-    // ‹­§Œg‘уrƒ…[Žw’èib=kj
-    } elseif (UA::isMobileByQuery()) {
-        $_conf['ktai'] = true;
-    }
-
-    // «k_at_a, k_at_q, k_input_ht ‚ÍŽg‚í‚È‚¢•ûŒüB
-    // UA::getQueryKey(), UA::getQueryValue(), P2View::getInputHiddenKTag() ‚ð—˜—p‚·‚éB
-    $_conf['k_at_a'] = '';
-    $_conf['k_at_q'] = '';
-    $_conf['k_input_ht'] = '';
-    if ($_conf[$b]) {
-        //output_add_rewrite_var($b, htmlspecialchars($_conf[$b], ENT_QUOTES));
-
-        $b_hs = hs($_conf[$b]);
-        $_conf['k_at_a'] = "&amp;{$b}={$b_hs}";
-        $_conf['k_at_q'] = "?{$b}={$b_hs}";
-        $_conf['k_input_ht'] = P2View::getInputHiddenKTag();
-    }
-}
-
-/**
- * $_conf['expack.use_pecl_http'] ‚Ì’²®
- *
- * @return  void
- */
-function _adjustConfUsePeclHttp()
-{
-    global $_conf;
-    
-    if (
-        version_compare(phpversion(), '5.0.0', '<')
-        or $_conf['expack.use_pecl_http'] && !extension_loaded('http')
-    ) {
-        //if (!($_conf['expack.use_pecl_http'] == 2 && $_conf['expack.dl_pecl_http'])) {
-            $_conf['expack.use_pecl_http'] = 0;
-        //}
-    } elseif ($_conf['expack.use_pecl_http'] == 3 && UA::isK()) {
-        $_conf['expack.use_pecl_http'] = 1;
-    }
-}
-
-/**
  * @return  Session|null|die
  */
 function _startSession()
@@ -897,11 +307,9 @@
 
         return new Session;
     }
-    
     return null;
 }
 
-
 /*
  * Local Variables:
  * mode: php

Added: p2/trunk/conf/conf_system.inc.php
===================================================================
--- p2/trunk/conf/conf_system.inc.php	                        (rev 0)
+++ p2/trunk/conf/conf_system.inc.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -0,0 +1,610 @@
+<?php
+// p2 ƒVƒXƒeƒ€Ý’è
+// ‚±‚̃tƒ@ƒCƒ‹‚́A“Á‚É——R‚Ì–³‚¢ŒÀ‚è•ÏX‚µ‚È‚¢‚ʼnº‚³‚¢B
+// include from conf.inc.php
+
+$_conf['p2version'] = '1.8.60'; // rep2‚̃o[ƒWƒ‡ƒ“
+
+$_conf['p2name'] = 'rep2';    // rep2‚Ì–¼‘OB
+
+$_conf['p2uaname'] = 'r e p 2';  // UA—p‚Ìrep2‚Ì–¼‘O
+
+//======================================================================
+// Šî–{Ý’菈—
+//======================================================================
+// ƒGƒ‰[o—͐ݒè
+_setErrorReporting(); // error_reporting()
+
+// {{{ Šî–{•Ï”
+
+$_conf['p2web_url']             = 'http://akid.s17.xrea.com/';
+$_conf['p2ime_url']             = 'http://akid.s17.xrea.com/p2ime.phtml';
+$_conf['favrank_url']           = 'http://akid.s17.xrea.com/favrank/favrank.php';
+$_conf['menu_php']              = 'menu.php';
+$_conf['subject_php']           = 'subject.php'; // subject_i.php
+$_conf['read_php']              = 'read.php';
+$_conf['read_new_php']          = 'read_new.php';
+$_conf['read_new_k_php']        = 'read_new_k.php';
+$_conf['post_php']              = 'post.php';
+$_conf['cookie_file_name']      = 'p2_cookie.txt';
+$_conf['menu_k_php']            = 'menu_k.php'; // menu_i.php
+$_conf['editpref_php']          = 'editpref.php'; // editpref_i.php
+
+// info.php ‚ÍJavaScriptƒtƒ@ƒCƒ‹’†‚ɏ‘‚©‚ê‚Ä‚¢‚é‚Ì‚ª“ï
+
+// }}}
+
+// ƒfƒoƒbƒO—p•Ï”‚ðÝ’è
+_setDebug(); // void  $GLOBALS['debug'], $GLOBALS['profiler']
+
+// PHP‚Ì“®ìŠÂ‹«‚ðŠm”F
+_checkPHPInstalled(); // void|die
+
+// PHP‚̊‹«Ý’è
+_setPHPEnvironments();
+
+// p2‚̃fƒBƒŒƒNƒgƒŠƒpƒX’萔‚ðÝ’è‚·‚é
+_setP2DirConstants(); // P2_LIB_DIR “™
+
+require_once P2_LIB_DIR . '/global.funcs.php';
+
+// ŒŸõƒpƒX‚ðƒZƒbƒg
+_iniSetIncludePath(); // void
+
+// PEARƒ‰ƒCƒuƒ‰ƒŠ‚ð“ǂݍž‚Þ
+_includePears(); // void|die
+
+// PEAR::PHP_Compat‚ÅPHP5ŒÝŠ·‚̊֐”‚ð“ǂݍž‚Þ
+_loadPHPCompat();
+
+require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'P2Util.php';
+require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'DataPhp.php';
+require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'Session.php';
+require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'Login.php';
+require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'UA.php';
+require_once P2_LIB_DIR . DIRECTORY_SEPARATOR . 'P2View.php';
+
+// }}}
+
+// ƒtƒH[ƒ€‚©‚ç‚Ì“ü—́iPOST, GETj‚ðˆêŠ‡‚Å•¶ŽšƒR[ƒh•ÏŠ·•ƒTƒjƒ^ƒCƒY
+_convertEncodingAndSanitizePostGet();
+
+// ŠÇ—ŽÒ—pÝ’è‚ð“ǂݍž‚Ý
+if (!include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'conf_admin.inc.php') {
+    P2Util::printSimpleHtml("p2 error: ŠÇ—ŽÒ—pÝ’èƒtƒ@ƒCƒ‹‚ð“ǂݍž‚ß‚Ü‚¹‚ñ‚Å‚µ‚½B");
+    die;
+}
+
+ini_set('default_socket_timeout', $_conf['fsockopen_time_limit']);
+
+// ŠÇ——p•Û‘¶ƒfƒBƒŒƒNƒgƒŠ (ƒp[ƒ~ƒbƒVƒ‡ƒ“‚Í707)
+$_conf['admin_dir'] = $_conf['data_dir'] . '/admin';
+
+// cache •Û‘¶ƒfƒBƒŒƒNƒgƒŠ (ƒp[ƒ~ƒbƒVƒ‡ƒ“‚Í707)
+$_conf['cache_dir'] = $_conf['data_dir'] . '/cache'; // 2005/6/29 $_conf['pref_dir'] . '/p2_cache' ‚æ‚è•ÏX
+
+// ƒeƒ“ƒ|ƒ‰ƒŠƒfƒBƒŒƒNƒgƒŠ (ƒp[ƒ~ƒbƒVƒ‡ƒ“‚Í707)
+$_conf['tmp_dir'] = $_conf['data_dir'] . '/tmp';
+
+$_conf['accesskey_for_k'] = 'accesskey';
+
+// ’[––”»’è
+_checkBrowser(); // $_conf, UA::setForceMode()
+
+// b=pc ‚Í‚Ü‚¾‘S‚ẴŠƒ“ƒN‚ւ̒ljÁ‚ªŠ®—¹‚µ‚Ä‚¨‚炸A‹@”\‚µ‚Ä‚¢‚È‚¢‰ÓŠ‚ª‚ ‚éB’n“¹‚ɐ®”õ‚µ‚Ä‚¢‚«‚½‚¢B
+// output_add_rewrite_var() ‚Í•Ö—˜‚¾‚ªAo—Í‚ªƒoƒbƒtƒ@‚³‚ê‚Ä‘ÌŠ´‘¬“x‚ª—Ž‚¿‚é‚Ì‚ª“ï“_BB
+// ‘ÌŠ´‘¬“x‚ð—Ž‚Æ‚³‚È‚¢—Ç‚¢•û–@‚È‚¢‚©‚ȁH
+_setOldStyleKtaiQuery(); // $_conf['ktai'] “™‚ðƒZƒbƒg
+
+// $_conf['expack.use_pecl_http'] ‚Ì’²®
+_adjustConfUsePeclHttp(); // UA::isK()
+
+
+// ‚±‚̃tƒ@ƒCƒ‹“à‚ł̏ˆ—‚Í‚±‚±‚Ü‚Å
+
+
+//=============================================================================
+// ŠÖ”i‚±‚̃tƒ@ƒCƒ‹“à‚Å‚Ì‚Ý—˜—pj
+//=============================================================================
+
+/**
+ * Ä‹A“I‚Éstripslashes‚ð‚©‚¯‚é
+ * GET/POST/COOKIE•Ï”—p‚Ȃ̂ŃIƒuƒWƒFƒNƒg‚̃vƒƒpƒeƒB‚ɂ͑Ήž‚µ‚È‚¢
+ * (ExUtil)
+ *
+ * @return  array|string
+ */
+function stripslashesR($var, $r = 0)
+{
+    $rlimit = 10;
+    if (is_array($var) && $r < $rlimit) {
+        foreach ($var as $key => $value) {
+            $var[$key] = stripslashesR($value, ++$r);
+        }
+    } elseif (is_string($var)) {
+        $var = stripslashes($var);
+    }
+    return $var;
+}
+
+/**
+ * Ä‹A“I‚Ƀkƒ‹•¶Žš‚ðíœ‚·‚é
+ * mbstring‚Å•ÏŠ·ƒe[ƒuƒ‹‚É‚È‚¢(?)ŠOŽš‚ð•ÏŠ·‚·‚é‚Æ
+ * NULL(0x00)‚É‚È‚Á‚Ä‚µ‚Ü‚¤‚±‚Æ‚ª‚ ‚é‚̂ŏÁ‹Ž‚·‚é
+ * (ExUtil)
+ *
+ * @return  array|string
+ */
+function nullfilterR($var, $r = 0)
+{
+    $rlimit = 10;
+    if (is_array($var) && $r < $rlimit) {
+        foreach ($var as $key => $value) {
+            $var[$key] = nullfilterR($value, ++$r);
+        }
+    } elseif (is_string($var)) {
+        $var = str_replace(chr(0), '', $var);
+    }
+    return $var;
+}
+
+/**
+ * ƒƒ‚ƒŠ‚ÌŽg—p—Ê‚ð•\Ž¦‚·‚é
+ *
+ * @return  void
+ */
+function printMemoryUsage()
+{
+    $kb = memory_get_usage() / 1024;
+    $kb = number_format($kb, 2, '.', '');
+    
+    echo 'Memory Usage: ' . $kb . 'KB';
+}
+
+/**
+ * ƒGƒ‰[o—͐ݒèBerror_reporting()
+ * iNOTICE‚͍팸’†‚¾‚ªA‚Ü‚¾Žc‚Á‚Ä‚¢‚é‚ÆŽv‚¤j
+ *
+ * @return  void
+ */
+function _setErrorReporting()
+{
+    $except = E_NOTICE;
+    if (defined('E_STRICT')) {
+        $except = $except | E_STRICT;
+    }
+    if (defined('E_DEPRECATED')) {
+        $except = $except | E_DEPRECATED;
+    }
+    error_reporting(E_ALL & ~$except);
+}
+
+/**
+ * @return  void  $GLOBALS['debug'], $GLOBALS['profiler']
+ */
+function _setDebug($debug = null)
+{
+    if (is_null($debug)) {
+        $GLOBALS['debug'] = isset($_GET['debug']) ? intval($_GET['debug']) : 0;
+    } else {
+        $GLOBALS['debug'] = $debug;
+    }
+    if ($GLOBALS['debug']) {
+        require_once 'Benchmark/Profiler.php';
+        $GLOBALS['profiler'] = new Benchmark_Profiler(true);
+        
+        // 2007/08/03 Benchmark_Profiler 1.2.7 ‚Å _Benchmark_Profiler ‚ÌPEARŽ®ƒfƒXƒgƒ‰ƒNƒ^‚ª‚È‚­‚È‚Á‚āA
+        // close() ‚ÌŽè“®ƒƒ\ƒbƒh‚É‚È‚Á‚½H‚̂ŁAŽè“®‚Å“o˜^‚µ‚Ä‚Ý‚éB‚È‚ñ‚©•Ï‚È‹C‚ª‚·‚邯‚ǁB
+        if (!method_exists($GLOBALS['profiler'], '_Benchmark_Profiler') && method_exists($GLOBALS['profiler'], 'close')) {
+            register_shutdown_function(array($GLOBALS['profiler'], 'close'));
+        }
+
+        // printMemoryUsage();
+        register_shutdown_function('printMemoryUsage');
+    }
+}
+
+/**
+ * PHP‚Ì“®ìŠÂ‹«‚ðŠm”F
+ *
+ * @return  void|die
+ */
+function _checkPHPInstalled()
+{
+    $errmsgs = array();
+    if (version_compare(phpversion(), '4.3.0', 'lt')) {
+        $errmsgs[] = 'PHP‚̃o[ƒWƒ‡ƒ“‚ª4.3.0–¢–ž‚Å‚ÍŽg‚¦‚Ü‚¹‚ñB';
+    }
+    if (ini_get('safe_mode')) {
+        $errmsgs[] = 'ƒZ[ƒtƒ‚[ƒh‚Å“®ì‚·‚éPHP‚Å‚ÍŽg‚¦‚Ü‚¹‚ñB';
+    }
+    if (!extension_loaded('mbstring')) {
+        $errmsgs[] = 'PHP‚̃Cƒ“ƒXƒg[ƒ‹‚ª•s\•ª‚Å‚·BPHP‚ÌmbstringŠg’£ƒ‚ƒWƒ…[ƒ‹‚ªƒ[ƒh‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB';
+    }
+    if ($errmsgs) {
+        $errmsgHtmls = array_map('htmlspecialchars', $errmsgs);
+        die(sprintf(
+            '<html><body><h3>p2 install error</h3><p>%s</p></body></html>',
+            implode('<br>', $errmsgHtmls)
+        ));
+    }
+}
+
+/**
+ * PHP‚̊‹«Ý’è
+ *
+ * @return  void
+ */
+function _setPHPEnvironments()
+{
+    // ƒ^ƒCƒ€ƒ][ƒ“‚ðƒZƒbƒg
+    _setTimezone();
+
+    // ƒƒ‚ƒŠ§ŒÀ’l‚̉ºŒÀÝ’è(M)
+    // Ý’è’l‚ªŽw’è’l–¢–ž‚È‚çŽw’è’l‚Ɉø‚«ã‚°‚Đݒ肷‚é
+    _setMemoryLimit(32);
+
+    // ƒXƒNƒŠƒvƒg‚ÌŽÀsŽžŠÔ§ŒÀ‚̉ºŒÀÝ’è(•b)
+    // Ý’è’l‚ªŽw’è•b–¢–ž‚È‚çŽw’è•b‚Ɉø‚«ã‚°‚Đݒ肷‚é
+    _setTimeLimit(60);
+
+    // Ž©“®ƒtƒ‰ƒbƒVƒ…‚ðƒIƒt‚É‚·‚é
+    ob_implicit_flush(0);
+
+    // ƒNƒ‰ƒCƒAƒ“ƒg‚©‚çÚ‘±‚ðØ‚ç‚ê‚Ä‚àˆ—‚𑱍s‚·‚é
+    // ignore_user_abort(1);
+
+    // session.trans_sid—LŒøŽž ‚â output_add_rewrite_var(), http_build_query() “™‚Ő¶¬E•ÏX‚³‚ê‚é
+    // URL‚ÌGETƒpƒ‰ƒ[ƒ^‹æØ‚蕶Žš(—ñ)‚ð"&amp;"‚É‚·‚éBiƒfƒtƒHƒ‹ƒg‚Í"&"j
+    ini_set('arg_separator.output', '&amp;');
+
+    // ƒŠƒNƒGƒXƒgID‚ðÝ’è
+    define('P2_REQUEST_ID', substr($_SERVER['REQUEST_METHOD'], 0, 1) . md5(serialize($_REQUEST)));
+
+    // OS•Ê‚̒萔‚ð•âŠ®ƒZƒbƒg‚·‚éBPATH_SEPARATOR, DIRECTORY_SEPARATOR
+    _setOSDefine();
+
+    // •¶ŽšƒR[ƒh‚ÌŽw’è
+    _setEncodings();
+}
+
+/**
+ * @return  void
+ */
+function _setTimezone()
+{
+    if (function_exists('date_default_timezone_set')) { 
+        date_default_timezone_set('Asia/Tokyo'); 
+    } else { 
+        @putenv('TZ=JST-9'); 
+    }
+}
+
+/**
+ * ƒƒ‚ƒŠ§ŒÀ’l‚̉ºŒÀÝ’è(M)
+ * Ý’è’l‚ªŽw’è’l–¢–ž‚È‚çŽw’è’l‚Ɉø‚«ã‚°‚Đݒ肷‚é
+ *
+ * @return  void
+ */
+function _setMemoryLimit($least_memory_limit_m = 32)
+{
+    if (preg_match('/^(\\d+)M$/', ini_get('memory_limit'), $m)) {
+        if ($m[1] < $least_memory_limit_m) {
+            ini_set('memory_limit', $least_memory_limit_m . 'M');
+        }
+    }
+}
+
+/**
+ * ƒXƒNƒŠƒvƒg‚ÌŽÀsŽžŠÔ§ŒÀ‚̉ºŒÀÝ’è(•b)
+ * Ý’è’l‚ªŽw’è•b–¢–ž‚È‚çŽw’è•b‚Ɉø‚«ã‚°‚Đݒ肷‚é
+ *
+ * @return  void
+ */
+function _setTimeLimit($least_time_limit = 60)
+{
+    if ($t = ini_get('max_execution_time') and 0 < $t && $t < $least_time_limit) {
+        if (!ini_get('safe_mode')) {
+            set_time_limit($least_time_limit);
+        }
+    }
+}
+
+/**
+ * OS•Ê‚̒萔‚ð•âŠ®ƒZƒbƒg‚·‚é
+ *
+ * @return  void
+ */
+function _setOSDefine()
+{
+    // OS”»’è
+    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+        // Windows
+        defined('PATH_SEPARATOR') or define('PATH_SEPARATOR', ';');
+        defined('DIRECTORY_SEPARATOR') or define('DIRECTORY_SEPARATOR', '\\');
+    } else {
+        defined('PATH_SEPARATOR') or define('PATH_SEPARATOR', ':');
+        defined('DIRECTORY_SEPARATOR') or define('DIRECTORY_SEPARATOR', '/');
+    }
+}
+
+/**
+ * •¶ŽšƒR[ƒh‚ÌŽw’è
+ *
+ * @return  void
+ */
+function _setEncodings()
+{
+    // mb_detect_order("SJIS-win,eucJP-win,ASCII");
+    mb_internal_encoding('SJIS-win');
+    mb_http_output('pass');
+    mb_substitute_character(63); // •¶ŽšƒR[ƒh•ÏŠ·‚ÉŽ¸”s‚µ‚½•¶Žš‚ª "?" ‚É‚È‚é
+    //mb_substitute_character(0x3013); // ¬
+
+    ini_set('default_mimetype', 'text/html');
+    ini_set('default_charset', 'Shift_JIS');
+
+    if (function_exists('mb_ereg_replace')) {
+        define('P2_MBREGEX_AVAILABLE', 1);
+        @mb_regex_encoding('SJIS-win');
+    } else {
+        define('P2_MBREGEX_AVAILABLE', 0);
+    }
+}
+
+/**
+ * p2‚̃fƒBƒŒƒNƒgƒŠƒpƒX’萔‚ðÝ’è‚·‚é
+ *
+ * @return  void
+ */
+function _setP2DirConstants()
+{
+    define('P2_CONF_DIR', dirname(__FILE__)); // __DIR__ @php-5.3
+
+    define('P2_BASE_DIR', dirname(P2_CONF_DIR));
+
+    // Šî–{“I‚È‹@”\‚ð’ñ‹Ÿ‚·‚郉ƒCƒuƒ‰ƒŠ
+    define('P2_LIB_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'lib');
+
+    // ‚¨‚Ü‚¯“I‚È‹@”\‚ð’ñ‹Ÿ‚·‚郉ƒCƒuƒ‰ƒŠ
+    define('P2EX_LIB_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'expack');
+
+    // ƒXƒ^ƒCƒ‹ƒV[ƒg
+    define('P2_STYLE_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'style');
+
+    // ƒXƒLƒ“
+    define('P2_SKIN_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'skin');
+
+    // PEARƒCƒ“ƒXƒg[ƒ‹ƒfƒBƒŒƒNƒgƒŠAŒŸõƒpƒX‚ɒljÁ‚³‚ê‚é
+    define('P2_PEAR_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'includes');
+
+    // PEAR‚ðƒnƒbƒN‚µ‚½ƒtƒ@ƒCƒ‹—pƒfƒBƒŒƒNƒgƒŠA’ʏí‚ÌPEAR‚æ‚è—Dæ“I‚ÉŒŸõƒpƒX‚ɒljÁ‚³‚ê‚é
+    // Cache/Container/db.php(PEAR::Cache)‚ªMySQL”›‚肾‚Á‚½‚̂ŁA”Ä—p“I‚É‚µ‚½‚à‚Ì‚ð’u‚¢‚Ä‚¢‚é
+    define('P2_PEAR_HACK_DIR', P2_BASE_DIR . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'pear_hack');
+}
+
+/**
+ * ŒŸõƒpƒX‚ðƒZƒbƒg‚·‚é
+ * P2_PEAR_HACK_DIR, P2_PEAR_DIR
+ *
+ * @return  void
+ */
+function _iniSetIncludePath()
+{
+    $include_path = '.';
+    if (is_dir(P2_PEAR_HACK_DIR)) {
+        $include_path .= PATH_SEPARATOR . realpath(P2_PEAR_HACK_DIR);
+    }
+    $include_path .= PATH_SEPARATOR . ini_get('include_path');
+    if (is_dir(P2_PEAR_DIR)) {
+        $include_path .= PATH_SEPARATOR . realpath(P2_PEAR_DIR);
+    }
+    //$include_path .= PATH_SEPARATOR . realpath(P2_LIB_DIR);
+    ini_set('include_path', $include_path);
+}
+
+/**
+ * PEARƒ‰ƒCƒuƒ‰ƒŠ‚ð“ǂݍž‚Þ
+ *
+ * @return  void|die
+ */
+function _includePears()
+{
+    global $_conf;
+    
+    $requiredPears = array(
+        'File/Util.php'             => 'File',
+        'Net/UserAgent/Mobile.php'  => 'Net_UserAgent_Mobile',
+        'PHP/Compat.php'            => 'PHP_Compat',
+        'HTTP/Request.php'          => 'HTTP_Request'
+    );
+    foreach ($requiredPears as $pear_file => $pear_pkg) {
+        if (!include_once($pear_file)) {
+            $url = 'http://akid.s17.xrea.com/p2puki/pukiwiki.php?PEAR%A4%CE%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB';
+            $url_t = $_conf['p2ime_url'] . '?enc=1&url=' . rawurlencode($url);
+            die(sprintf(
+                '<html><body>
+                <h3>p2 install error: PEAR ‚́u%sv‚ªƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ</h3>
+                <p><a href="%s" target="_blank">p2Wiki: PEAR‚̃Cƒ“ƒXƒg[ƒ‹</a></p>
+                </body></html>',
+                hs($pear_pkg), hs($url_t)
+            ));
+        }
+    }
+}
+
+/**
+ * @return  void
+ */
+function _loadPHPCompat()
+{
+    if (version_compare(phpversion(), '5.0.0', '<')) {
+        PHP_Compat::loadFunction('file_put_contents');
+        //PHP_Compat::loadFunction('clone');
+        PHP_Compat::loadFunction('scandir');
+        //PHP_Compat::loadFunction('http_build_query'); // ‘æ3ˆø”‚ɑΉž‚·‚é‚Ü‚Å‚ÍŽg‚¦‚È‚¢
+        //PHP_Compat::loadFunction('array_walk_recursive');
+    }
+}
+
+/**
+ * ƒtƒH[ƒ€‚©‚ç‚Ì“ü—Í‚ðˆêŠ‡‚ŃNƒH[ƒgœ‹Ž••¶ŽšƒR[ƒh•ÏŠ·
+ * ƒtƒH[ƒ€‚Ìaccept-encoding‘®«‚ðUTF-8(SafariŒn) or Shift_JIS(‚»‚Ì‘¼)‚É‚µA
+ * ‚³‚ç‚Éhidden—v‘f‚Å”ü“ûƒe[ƒuƒ‹‚Ì•¶Žš‚ðŽdž‚Þ‚±‚ƂŌ딻’è‚ðŒ¸‚ç‚·
+ * •ÏŠ·Œ³Œó•â‚ÉeucJP-win‚ª‚ ‚é‚Ì‚ÍHTTP“ü—Í‚Ì•¶ŽšƒR[ƒh‚ªEUC‚ÉŽ©“®•ÏŠ·‚³‚ê‚éƒT[ƒo‚Ì‚½‚ß
+ */
+function _convertEncodingAndSanitizePostGet()
+{
+    if (!empty($_POST)) {
+        if (get_magic_quotes_gpc()) {
+            $_POST = array_map('stripslashesR', $_POST);
+        }
+        mb_convert_variables('SJIS-win', 'UTF-8,eucJP-win,SJIS-win', $_POST);
+        $_POST = array_map('nullfilterR', $_POST);
+    }
+    if (!empty($_GET)) {
+        if (get_magic_quotes_gpc()) {
+            $_GET = array_map('stripslashesR', $_GET);
+        }
+        mb_convert_variables('SJIS-win', 'UTF-8,eucJP-win,SJIS-win', $_GET);
+        $_GET = array_map('nullfilterR', $_GET);
+    }
+}
+
+/**
+ * ’[––”»’è
+ *
+ * @return  void
+ */
+function _checkBrowser()
+{
+    global $_conf;
+    
+    // Šî–{iPCj
+    $_conf['ktai'] = false;
+    $_conf['disable_cookie'] = false;
+
+    if (UA::isSafariGroup()) {
+        $_conf['accept_charset'] = 'UTF-8';
+    } else {
+        $_conf['accept_charset'] = 'Shift_JIS';
+    }
+
+    $mobile = &Net_UserAgent_Mobile::singleton();
+    if (PEAR::isError($mobile)) {
+        trigger_error($mobile->toString(), E_USER_WARNING);
+
+    // UA‚ªŒg‘Ñ‚È‚ç
+    } 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!)
+        } elseif ($mobile->isSoftBank()) {
+            //$_conf['accesskey_for_k'] = 'DIRECTKEY';
+            // WŒ^’[––‚Æ3GCŒ^’[––‚ÍCookie‚ªŽg‚¦‚é
+            if ($mobile->isTypeW() || $mobile->isType3GC()) {
+                $_conf['disable_cookie'] = false;
+            } else {
+                $_conf['disable_cookie'] = true;
+            }
+
+        // WILLCOMi‹ŒAirH"Phonej
+        } elseif ($mobile->isWillcom()) {
+            $_conf['disable_cookie'] = false;
+        }
+    }
+
+    // iPhoneŽw’è
+    if (UA::isIPhoneGroup()) {
+        $_conf['ktai'] = true;
+        UA::setForceMode(UA::getMobileQuery());
+
+        define('P2_IPHONE_LIB_DIR', './iphone');
+
+        $_conf['subject_php']    = 'subject_i.php';
+        $_conf['read_new_k_php'] = 'read_new_i.php';
+        $_conf['menu_k_php']     = 'menu_i.php';
+        $_conf['editpref_php']   = 'editpref_i.php';
+    }
+}
+
+/**
+ * ‹ŒƒXƒ^ƒCƒ‹‚ÌŒg‘уrƒ…[•Ï” $_conf['ktai'] “™‚ðƒZƒbƒg
+ *
+ * @return  void
+ */
+function _setOldStyleKtaiQuery()
+{
+    global $_conf;
+    
+    $b = UA::getQueryKey();
+
+    // ?k=1‚Í‹ŒŽd—lB?b=k‚ªV‚µ‚¢B
+    // Œã•ûŒÝŠ·—p‘[’u
+    if (!empty($_GET['k']) || !empty($_POST['k'])) {
+        $_REQUEST[$b] = $_GET[$b] = 'k';
+    }
+
+    // $_conf[$b]i$_conf['b']j ‚àŽg‚í‚È‚¢‚悤‚É‚µ‚āAUA::getQueryValue()‚ð—˜—p‚·‚é•ûŒüB
+    $_conf[$b] = UA::getQueryValue();
+
+    // $_conf['ktai'] ‚ÍŽg‚í‚È‚¢•ûŒüB
+    // UA::isK(), UA::isPC() ‚ð—˜—p‚·‚éB
+
+    // ‹­§PCƒrƒ…[Žw’èib=pcj
+    if (UA::isPCByQuery()) {
+        $_conf['ktai'] = false;
+
+    // ‹­§Œg‘уrƒ…[Žw’èib=kj
+    } elseif (UA::isMobileByQuery()) {
+        $_conf['ktai'] = true;
+    }
+
+    // «k_at_a, k_at_q, k_input_ht ‚ÍŽg‚í‚È‚¢•ûŒüB
+    // UA::getQueryKey(), UA::getQueryValue(), P2View::getInputHiddenKTag() ‚ð—˜—p‚·‚éB
+    $_conf['k_at_a'] = '';
+    $_conf['k_at_q'] = '';
+    $_conf['k_input_ht'] = '';
+    if ($_conf[$b]) {
+        //output_add_rewrite_var($b, htmlspecialchars($_conf[$b], ENT_QUOTES));
+
+        $b_hs = hs($_conf[$b]);
+        $_conf['k_at_a'] = "&amp;{$b}={$b_hs}";
+        $_conf['k_at_q'] = "?{$b}={$b_hs}";
+        $_conf['k_input_ht'] = P2View::getInputHiddenKTag();
+    }
+}
+
+/**
+ * $_conf['expack.use_pecl_http'] ‚Ì’²®
+ *
+ * @return  void
+ */
+function _adjustConfUsePeclHttp()
+{
+    global $_conf;
+    
+    if (
+        version_compare(phpversion(), '5.0.0', '<')
+        or $_conf['expack.use_pecl_http'] && !extension_loaded('http')
+    ) {
+        //if (!($_conf['expack.use_pecl_http'] == 2 && $_conf['expack.dl_pecl_http'])) {
+            $_conf['expack.use_pecl_http'] = 0;
+        //}
+    } elseif ($_conf['expack.use_pecl_http'] == 3 && UA::isK()) {
+        $_conf['expack.use_pecl_http'] = 1;
+    }
+}

Modified: p2/trunk/conf/conf_user_def.inc.php
===================================================================
--- p2/trunk/conf/conf_user_def.inc.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/conf/conf_user_def.inc.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -4,7 +4,8 @@
     
     ‚±‚̃tƒ@ƒCƒ‹‚̓fƒtƒHƒ‹ƒg’l‚̐ݒè‚Ȃ̂ŁA“Á‚ɕύX‚·‚é•K—v‚Í‚ ‚è‚Ü‚¹‚ñ
 
-    $conf_user_def ‚ÍŒ‹‹Çglobal•Ï”‚Æ‚µ‚Ä—˜—p‚µ‚Ä‚µ‚Ü‚Á‚Ä‚¢‚é
+    $conf_user_def, $conf_user_rules, $conf_user_sel ‚̐ݒè
+    i$conf_user_def ‚ÍŒ‹‹Çglobal•Ï”‚Æ‚µ‚Ä—˜—p‚µ‚Ä‚µ‚Ü‚Á‚Ä‚¢‚éj
 */
 
 // {{{ ¡be.2ch.netƒAƒJƒEƒ“ƒg
@@ -308,7 +309,7 @@
 $conf_user_def['res_write_rec'] = 1; // (1)
 $conf_user_sel['res_write_rec'] = array('1' => '‚·‚é', '0' => '‚µ‚È‚¢');
 
-// ŠO•”URLƒWƒƒƒ“ƒv‚·‚éÛ‚É’Ê‚·ƒQ[ƒgB
+// ŠO•”URLƒWƒƒƒ“ƒv‚·‚éÛ‚É’Ê‚·ƒNƒbƒVƒ‡ƒ“ƒy[ƒW
 $conf_user_def['through_ime'] = "p2pm"; // ("p2pm") 
 $conf_user_sel['through_ime'] = array(
     '' => '’¼Ú', 'p2' => 'p2 ime(Ž©“®“]‘—)', 'p2m' => 'p2 ime(Žè“®“]‘—)', 'p2pm' => 'p2 ime(p‚Ì‚ÝŽè“®“]‘—)', '2ch' => '2ch ime'

Modified: p2/trunk/conf/conf_user_style.inc.php
===================================================================
--- p2/trunk/conf/conf_user_style.inc.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/conf/conf_user_style.inc.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -6,6 +6,7 @@
     Ý’è‚Í style/*_css.inc ‚ƘA“®
     
     ‚±‚̃tƒ@ƒCƒ‹“à‚ł̐ݒè‚́A‚¨D‚݂ɉž‚¶‚ĕύX‚µ‚Ä‚­‚¾‚³‚¢
+    iPhone‚̃XƒŒ•\Ž¦‚̐ݒè‚́Aiui/read.css‚𒼐ڕҏW
 */
 
 // _setStyle()

Modified: p2/trunk/doc/ChangeLog.txt
===================================================================
--- p2/trunk/doc/ChangeLog.txt	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/doc/ChangeLog.txt	2010-01-15 19:28:32 UTC (rev 783)
@@ -1,13 +1,25 @@
+2010/01/16
+	* rep2 version 1.8.60
+
+	[C³] PC•\Ž¦‚̃^ƒCƒgƒ‹ƒy[ƒW‚É‹LÚ‚ÌŒg‘уƒOƒCƒ“—pURL‚Éuserˆø”‚ª”²‚¯‚Ä‚¢‚½‚̂𒼂µ‚½B
+	[C³] iPhoneƒ‚[ƒh‚̐ݒèŠÇ—‚Å•\‹Lƒ~ƒX‚ª‚ ‚Á‚½‚Ì‚ðC³‚µ‚½B
+	iNG:ƒ[ƒ‹ ¨ NG:ƒƒbƒZ[ƒWj
+	[C³] u>ŽÊv‚ŃXƒŒƒbƒhURL‚ª‚¨‚©‚µ‚­‚È‚Á‚Ä‚¢‚½‚Ì‚ðC³‚µ‚½B
+	[‰ü—Ç] b=i‚ŃŠƒ“ƒNæURL‚ªŒÅ’肳‚ê‚Ä‚¢‚½‰ÓŠ‚ðAŒÅ’肵‚È‚¢‚悤‚É‚µ‚½B
+	[XV] WILLCOM‚ÌIPƒAƒhƒŒƒX‘шæ‚ðXV‚µ‚½B
+	[“à•”XV] “¯«PEAR‚ÌHTTP_Request‚ðXV‚µ‚½B(1.4.4)
+	[“à•”XV] conf.inc.php‚©‚番—£‚µ‚āAconf_system.inc.php‚ðV‚½‚ɒljÁ‚µ‚½B
+
 2009/09/17
 	* rep2 version 1.8.59
 
-        [C³] iPhone‚Å‚¨‹C‚ɔ‚̕ҏW‚ð‚µ‚æ‚¤‚Æ‚·‚é‚ƁAƒGƒ‰[‚ªo‚é‚Ì‚ðC³‚µ‚½B
-        [‰ü—Ç] DAT—e—Ê‚ª500KB‚ð‰z‚¦‚éê‡‚́AƒXƒŒ•\Ž¦‰º•”‚Å‹­’²•\Ž¦‚·‚é‚悤‚É‚µ‚½B
-        [‰ü—Ç] read.cgi‚̃XƒŒ•\Ž¦‚ªread.htmliJavaScriptj‚É‚È‚Á‚Ä‚¢‚鎞‚̉ߋŽƒƒOŽæ“¾‚É‚à‘Ήž‚µ‚½B
-        [‰ü—Ç] ‚Ü‚¿BBS‚ÌŠO•”ƒŠƒ“ƒNƒWƒƒƒ“ƒvƒy[ƒWihttp://machi.to/bbs/link.cgi?URL=j‚ðƒXƒLƒbƒv‚·‚é‚悤‚É‚µ‚½B
-        [‰ü—Ç] ‚Ü‚¿BBS‚ÌPATH_INFOŒ`Ž®URL‚Ì“à•”ƒŠƒ“ƒN‚ɑΉž‚µ‚½B
-        [•ÏX] ƒXƒŒˆê——‚́uBirthdayv‚ðuƒXƒŒ—§‚Ä“úv‚Æ•\‹L•ÏX‚µ‚½B 
-        [•ÏX] Ý’è•ÒW‚ŁAuƒ\[ƒgv‚Æ‚¢‚¤Œ¾—t‚ÍŽg‚킸‚Ɂu•À‚я‡v‚Æ•\‹L•ÏX‚µ‚½B
+	[C³] iPhone‚Å‚¨‹C‚ɔ‚̕ҏW‚ð‚µ‚æ‚¤‚Æ‚·‚é‚ƁAƒGƒ‰[‚Æ‚È‚é‚Ì‚ðC³‚µ‚½B
+	[‰ü—Ç] DAT—e—Ê‚ª500KB‚ð‰z‚¦‚éê‡‚́AƒXƒŒ•\Ž¦‰º•”‚Å‹­’²•\Ž¦‚·‚é‚悤‚É‚µ‚½B
+	[‰ü—Ç] read.cgi‚̃XƒŒ•\Ž¦‚ªread.htmliJavaScriptj‚É‚È‚Á‚Ä‚¢‚鎞‚̉ߋŽƒƒOŽæ“¾‚É‚à‘Ήž‚µ‚½B
+	[‰ü—Ç] ‚Ü‚¿BBS‚ÌŠO•”ƒŠƒ“ƒNƒWƒƒƒ“ƒvƒy[ƒWihttp://machi.to/bbs/link.cgi?URL=j‚ðƒXƒLƒbƒv‚·‚é‚悤‚É‚µ‚½B
+	[‰ü—Ç] ‚Ü‚¿BBS‚ÌPATH_INFOŒ`Ž®URL‚Ì“à•”ƒŠƒ“ƒN‚ɑΉž‚µ‚½B
+	[•ÏX] ƒXƒŒˆê——‚́uBirthdayv‚ðuƒXƒŒ—§‚Ä“úv‚Æ•\‹L•ÏX‚µ‚½B 
+	[•ÏX] Ý’è•ÒW‚ŁAuƒ\[ƒgv‚Æ‚¢‚¤Œ¾—t‚ÍŽg‚킸‚Ɂu•À‚я‡v‚Æ•\‹L•ÏX‚µ‚½B
 
 2009/07/31
 	* rep2 version 1.8.58

Modified: p2/trunk/edit_aborn_word.php
===================================================================
--- p2/trunk/edit_aborn_word.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/edit_aborn_word.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -332,12 +332,13 @@
 <?php
 
 // Œg‘Ñ‚È‚ç
-if ($_conf['ktai']) {
-    $hr = P2View::getHrHtmlK();
-    echo <<<EOP
-$hr
-<a {$_conf['accesskey_for_k']}="{$_conf['k_accesskey']['up']}" href="{$_conf['editpref_php']}{$_conf['k_at_q']}">{$_conf['k_accesskey']['up']}.Ý’è•ÒW</a>
-EOP;
+if (UA::isK()) {
+    echo P2View::getHrHtmlK();
+    echo P2View::tagA(
+        P2Util::buildQueryUri($_conf['editpref_php'], array(UA::getQueryKey() => UA::getQueryValue())),
+        hs(sprintf('%s.Ý’è•ÒW', $_conf['k_accesskey']['up'])),
+        array($_conf['accesskey_for_k'] => $_conf['k_accesskey']['up'])
+    );
     echo P2View::getBackToIndexKATag();
 }
 

Modified: p2/trunk/edit_conf_user.php
===================================================================
--- p2/trunk/edit_conf_user.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/edit_conf_user.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -47,7 +47,7 @@
             }
             
         // “Á•Ê‚ȍ€–ځiedit_conf_user.php ˆÈŠO‚Å‚àÝ’肳‚ꂤ‚é‚à‚Ì‚Í”jŠü‚¹‚¸‚É‚»‚Ì‚Ü‚ÜŽc‚·j
-        // ƒL[‚É–½–¼‹K‘¥iprefixj‚ð‚‚¯‚½•û‚ª‚¢‚¢‚©‚à ¨ ƒL[–¼•ÏX‚Ì•K—v‚ª‚ ‚é‚Ì‚Å‹p‰º
+        // ƒL[‚É–½–¼‹K‘¥iprefixj‚ð‚‚¯‚½•û‚ª‚¢‚¢‚©‚à ¨ ƒL[–¼•ÏX‚Ì•K—v‚ª‚ ‚é‚̂łЂƂ܂¸•Û—¯
         } elseif (in_array($k, array('k_use_aas', 'maru_kakiko', 'index_menu_k', 'index_menu_k_from1'))) {
             $conf_save[$k] = $_conf[$k];
         }
@@ -269,7 +269,7 @@
 echo getEditConfHtml('rct_rec_num', 'Å‹ß“Ç‚ñ‚¾ƒXƒŒ‚Ì‹L˜^”');
 echo getEditConfHtml('res_hist_rec_num', '‘‚«ž‚Ý—š—ð‚Ì‹L˜^”');
 echo getEditConfHtml('res_write_rec', '‘‚«ž‚Ý“à—eƒƒO‚ð‹L˜^');
-echo getEditConfHtml('through_ime', 'ŠO•”URLƒWƒƒƒ“ƒv‚·‚éÛ‚É’Ê‚·ƒQ[ƒg');
+echo getEditConfHtml('through_ime', 'ŠO•”URLƒWƒƒƒ“ƒv‚·‚éÛ‚É’Ê‚·ƒNƒbƒVƒ‡ƒ“ƒy[ƒW');
 echo getEditConfHtml('join_favrank', '<a href="http://akid.s17.xrea.com/favrank/favrank.html" target="_blank">‚¨‹C‚ɃXƒŒ‹¤—L</a>‚ÉŽQ‰Á');
 echo getEditConfHtml('enable_menu_new', '”ƒƒjƒ…[‚ɐV’…”‚ð•\Ž¦');
 echo getEditConfHtml('menu_refresh_time', '”ƒƒjƒ…[•”•ª‚ÌŽ©“®XVŠÔŠu (•ªŽw’èB0‚Ȃ玩“®XV‚µ‚È‚¢B)');

Modified: p2/trunk/edit_conf_user_i.php
===================================================================
--- p2/trunk/edit_conf_user_i.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/edit_conf_user_i.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -234,7 +234,7 @@
 echo getEditConfHtml('rct_rec_num', 'Å‹ß“Ç‚ñ‚¾ƒXƒŒ‚Ì‹L˜^”');
 echo getEditConfHtml('res_hist_rec_num', '‘‚«ž‚Ý—š—ð‚Ì‹L˜^”');
 echo getEditConfHtml('res_write_rec', '‘‚«ž‚Ý“à—eƒƒO‚ð‹L˜^');
-echo getEditConfHtml('through_ime', 'ŠO•”URLƒWƒƒƒ“ƒv‚·‚éÛ‚É’Ê‚·ƒQ[ƒg');
+echo getEditConfHtml('through_ime', 'ŠO•”URLƒWƒƒƒ“ƒv‚·‚éÛ‚É’Ê‚·ƒNƒbƒVƒ‡ƒ“ƒy[ƒW');
 echo getEditConfHtml('join_favrank', '<a href="http://akid.s17.xrea.com/favrank/favrank.html" target="_blank">‚¨‹C‚ɃXƒŒ‹¤—L</a>‚ÉŽQ‰Á');
 echo getEditConfHtml('enable_menu_new', '”ƒƒjƒ…[‚ɐV’…”‚ð•\Ž¦');
 echo getEditConfHtml('menu_refresh_time', '”ƒƒjƒ…[•”•ª‚ÌŽ©“®XVŠÔŠu (•ªŽw’èB0‚Ȃ玩“®XV‚µ‚È‚¢B)');

Modified: p2/trunk/iphone/read_footer_k.inc.php
===================================================================
--- p2/trunk/iphone/read_footer_k.inc.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/iphone/read_footer_k.inc.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -140,7 +140,7 @@
         echo "<p>$motothre_atag</p>";
     }
 }
-//echo "<hr>" . $_conf['k_to_index_ht'] . "\n";
+//echo "<hr>" . P2View::getBackToIndexKATag() . "\n";
 /*
 080726 ƒtƒbƒ^•ÏX‚Ì‚½‚ߍ폜‚µ‚½‚à‚Ì
 <ul><li class="group">{$hs['read_range']}</li></ul>

Modified: p2/trunk/iphone/sb_footer_k.inc.php
===================================================================
--- p2/trunk/iphone/sb_footer_k.inc.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/iphone/sb_footer_k.inc.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -119,7 +119,13 @@
 echo "</p>";
 echo '<p>'. $htm['change_sort'] . '</p>';
 //echo "<hr>";
-echo "<p><a {$_conf['accesskey_for_k']}=\"0\" href=\"index.php{$_conf['k_at_q']}\">TOP</a></p>";
+printf('<p>%s</p>',
+    P2View::tagA(
+        P2Util::buildQueryUri('index.php', array(UA::getQueryKey() => UA::getQueryValue())),
+        hs('TOP'),
+        array($_conf['accesskey_for_k'] => '0')
+    )
+);
 echo '</body></html>';
 */
 /*

Modified: p2/trunk/iphone/sb_header_k.inc.php
===================================================================
--- p2/trunk/iphone/sb_header_k.inc.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/iphone/sb_header_k.inc.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -25,7 +25,7 @@
     
 // ‘‚«ž‚Ý—š—ð
 } elseif ($aThreadList->spmode == 'res_hist') {
-    $ptitle_url = "./read_res_hist.php{$_conf['k_at_q']}";
+    $ptitle_url = P2Util::buildQueryUri('read_res_hist.php', array(UA::getQueryKey() => UA::getQueryValue()));
     
 // ’Êí ”Â
 } elseif (!$aThreadList->spmode) {

Modified: p2/trunk/iui/iuix.css
===================================================================
--- p2/trunk/iui/iuix.css	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/iui/iuix.css	2010-01-15 19:28:32 UTC (rev 783)
@@ -1,3 +1,5 @@
+/* 2010/01/14 aki ‚±‚̃tƒ@ƒCƒ‹‚Íp2‚Å‚ÍŽg‚Á‚Ä‚¢‚È‚¢‚Ý‚½‚¢ */
+
 body{
 margin:0;
 font-family:Helvetica;

Modified: p2/trunk/js/post_form.js
===================================================================
--- p2/trunk/js/post_form.js	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/js/post_form.js	2010-01-15 19:28:32 UTC (rev 783)
@@ -43,12 +43,12 @@
 	
 	val = escape(val);
 
-	ex = new Date();
+	var ex = new Date();
 	ex = new Date(ex.getTime() + (1000 * sec));
-	y = ex.getYear(); if (y < 1900) y += 1900;
-	hms = ex.getHours() + ":" + ex.getMinutes() + ":" + ex.getSeconds();
-	p = String(ex).split(" ");
-	ex = p[0] + ", " + p[2] + "-" + p[1] + "-" + y + " " + hms + " GMT;";
+	var y = ex.getYear(); if (y < 1900) y += 1900;
+	var hms = ex.getHours() + ":" + ex.getMinutes() + ":" + ex.getSeconds();
+	var p = String(ex).split(" ");
+	var ex = p[0] + ", " + p[2] + "-" + p[1] + "-" + y + " " + hms + " GMT;";
 	document.cookie = cn + "=" + val +"; expires=" + ex;
 }
 

Modified: p2/trunk/lib/Login.php
===================================================================
--- p2/trunk/lib/Login.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/lib/Login.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -191,7 +191,7 @@
             // indexƒy[ƒW‚É“]‘—
             $url = rtrim(dirname(P2Util::getMyUrl()), '/') . '/'; // . $user_u_q;
             
-            header('Location: '.$url);
+            header('Location: ' . $url);
             exit;
         }
         
@@ -397,6 +397,7 @@
 
                 // ƒƒOƒCƒ“ƒƒO‚ð‹L˜^‚·‚é
                 $this->logLoginSuccess();
+
                 if (isset($_p2session)) {
                     $_p2session->regenerateId();
                     $_p2session->updateSecure();
@@ -690,6 +691,7 @@
         global $_conf;
 
         $pass_x = sha1($pass);
+
         $auth_user_cont = <<<EOP
 <?php
 \$rec_login_user_u = '{$user_u}';
@@ -776,7 +778,7 @@
         $_COOKIE = array();
         
         return $r;
-     }
+    }
 
     /**
      * CID‚ðcookie‚ɃZƒbƒg‚·‚é
@@ -917,7 +919,6 @@
         $time     = $ar[1];
         $md5_utpx = $ar[2];
         
-        
         return ($md5_utpx == md5($this->user_u . ':' . $time . ':' . $this->pass_x));
     }
     

Modified: p2/trunk/lib/P2Util.php
===================================================================
--- p2/trunk/lib/P2Util.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/lib/P2Util.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -117,21 +117,23 @@
         // k1 ‚ÌŽw’è‚Å k1[k2] ‚͏Á‚¦‚È‚¢‚̂ŁA‚±‚̃ƒ\ƒbƒh‚őΉž‚µ‚Ä‚¢‚éB
         
         // $key‚ª”z—ñ‚Æ‚µ‚ÄŽw’肳‚ê‚Ä‚¢‚½‚È‚ç
-        $ckey = null; // $_COOKIE—p‚̃L[
+        $cakey = null; // $_COOKIE—p‚̃L[
         if (preg_match('/\]$/', $key)) {
             // Å‰‚̃L[‚ð[]‚ň͂Þ
-            $ckey = preg_replace('/^([^\[]+)/', '[$1]', $key);
+            $cakey = preg_replace('/^([^\[]+)/', '[$1]', $key);
             // []‚̃L[‚ð''‚ň͂Þ
-            $ckey = preg_replace('/\[([^\[\]]+)\]/', "['$1']", $ckey);
-            //var_dump($ckey);
+            $cakey = preg_replace('/\[([^\[\]]+)\]/', "['$1']", $cakey);
+            //var_dump($cakey);
         }
         
         // ‘ΏÛCookie’l‚ª”z—ñ‚Å‚ ‚ê‚΍ċAˆ—‚ðs‚¤
         $cArray = null;
-        if ($ckey) {
-            eval("isset(\$_COOKIE{$ckey}) && is_array(\$_COOKIE{$ckey}) and \$cArray = \$_COOKIE{$ckey};");
+        if ($cakey) {
+            eval("isset(\$_COOKIE{$cakey}) && is_array(\$_COOKIE{$cakey}) and \$cArray = \$_COOKIE{$cakey};");
         } else {
-            isset($_COOKIE[$key]) && is_array($_COOKIE[$key]) and $cArray = $_COOKIE[$key];
+            if (isset($_COOKIE[$key]) && is_array($_COOKIE[$key])) {
+                $cArray = $_COOKIE[$key];
+            }
         }
         if (is_array($cArray)) {
             foreach ($cArray as $k => $v) {
@@ -143,8 +145,8 @@
         }
         
         if (is_array($cArray) or setcookie("$key", '', time() - 3600, $path, $domain)) {
-            if ($ckey) {
-                eval("unset(\$_COOKIE{$ckey});");
+            if ($cakey) {
+                eval("unset(\$_COOKIE{$cakey});");
             } else {
                 unset($_COOKIE[$key]);
             }
@@ -1573,9 +1575,9 @@
             return false;
         }
         
-        $rec_login2chID = NULL;
-        $login2chPW = NULL;
-        $rec_autoLogin2ch = NULL;
+        $rec_login2chID   = null;
+        $login2chPW       = null;
+        $rec_autoLogin2ch = null;
         
         include $_conf['idpw2ch_php'];
 

Modified: p2/trunk/lib/P2View.php
===================================================================
--- p2/trunk/lib/P2View.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/lib/P2View.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -5,7 +5,7 @@
 class P2View
 {
     /**
-     * 2008/09/28 $_conf['k_to_index_ht'] を廃止して、こちらを利用
+     * 2008/09/28 $_conf['k_to_index_ht'] を廃止して、こちらを利用する
      *
      * @static
      * @access  public

Modified: p2/trunk/lib/login_first.inc.php
===================================================================
--- p2/trunk/lib/login_first.inc.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/lib/login_first.inc.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -289,7 +289,7 @@
         echo $login_form_ht;
         if (empty($GLOBALS['brazil']) and !(HostCheck::isAddrLocal() || HostCheck::isAddrPrivate())) {
         ?><p>
-	<font style="font-size:9pt" color="gray">¦ƒvƒ‰ƒCƒx[ƒg—˜—p‚Ì‚½‚߂̃VƒXƒeƒ€‚Å‚·B<br>
+	<font size="-1" color="gray">¦‚±‚̃y[ƒW‚̓vƒ‰ƒCƒx[ƒg—˜—p‚Ì‚½‚߂̃VƒXƒeƒ€‚Å‚·B<br>
 	•”ŠOŽÒ‚É‚æ‚郍ƒOƒCƒ“ŽŽs‚́A<br>
 	•s³ƒAƒNƒZƒX‚Æ‚µ‚Ä‹L˜^‚³‚ê‚Ü‚·B<br>
 	‚±‚̃y[ƒW‚ւ̃AƒNƒZƒXURL‚𕔊OŽÒ‚ª<br>

Modified: p2/trunk/post.php
===================================================================
--- p2/trunk/post.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/post.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -832,6 +832,8 @@
         
         // ƒNƒbƒL[‚̏‘‚«ž‚ÝŽ©“®•Û‘¶‚ðÁ‹Ž‚·‚é
         if (isset($_COOKIE['post_msg'])) {
+            P2Util::unsetCookie('post_msg');
+            // ƒhƒƒCƒ“Žw’è‚È‚µ‚à“ü‚ê‚Ä‚¨‚±
             setcookie('post_msg', '', time() - 3600);
         }
         

Modified: p2/trunk/read_new_i.php
===================================================================
--- p2/trunk/read_new_i.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/read_new_i.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -588,7 +588,7 @@
 EOP;
 }
 //{$sb_ht_btm}‚Ì
-//echo '<hr>' . $_conf['k_to_index_ht'] . "\n";
+//echo '<hr>' . P2View::getBackToIndexKATag() . "\n";
 //iphone 080801
 ?>
  </ul>

Modified: p2/trunk/setting.php
===================================================================
--- p2/trunk/setting.php	2010-01-15 19:27:58 UTC (rev 782)
+++ p2/trunk/setting.php	2010-01-15 19:28:32 UTC (rev 783)
@@ -29,6 +29,9 @@
     $logout_st      = 'ƒƒOƒAƒEƒg';
 }
 
+$login_uri = P2Util::buildQueryUri('login.php', array(UA::getQueryKey() => UA::getQueryValue()));
+$login2ch_uri = P2Util::buildQueryUri('login2ch.php', array(UA::getQueryKey() => UA::getQueryValue()));
+
 $body_onload = '';
 if (UA::isPC()) {
     $body_onload = ' onLoad="setWinTitle();"';
@@ -72,9 +75,9 @@
 
 ?><ul id="setting_menu">
 	<li>
-		<a href="login.php<?php eh($_conf['k_at_q']); ?>">rep2ƒƒOƒCƒ“ŠÇ—</a>
+		<a href="<?php eh($login_uri); ?>">rep2ƒƒOƒCƒ“ŠÇ—</a>
 	</li>
-	<li><a href="login2ch.php<?php eh($_conf['k_at_q']); ?>">2chƒƒOƒCƒ“ŠÇ—</a>i‚¢‚í‚ä‚遜j</li>
+	<li><a href="<?php eh($login2ch_uri); ?>">2chƒƒOƒCƒ“ŠÇ—</a>i‚¢‚í‚ä‚遜j</li>
 </ul>
 
 [<a href="./index.php?logout=1" target="_parent">rep2‚©‚ç<?php eh($logout_st); ?>‚·‚é</a>]



P2-php-svn メーリングリストの案内
Zurück zum Archiv-Index