svnno****@sourc*****
svnno****@sourc*****
2010年 1月 27日 (水) 17:56:29 JST
Revision: 818 http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=818 Author: rsk Date: 2010-01-27 17:56:29 +0900 (Wed, 27 Jan 2010) Log Message: ----------- expack: - ã¿ã¤ãã«ãã¼ã¸ã®æºå¸¯/iPhoneç¨URLã®æ¨ªã«ããã¯ãã¼ã¯ã¬ããã表示ããããã«ããã - E_NOTICEåæ¸ä¸ã Modified Paths: -------------- p2ex/trunk/lib/P2Util.php p2ex/trunk/lib/post_form_options.inc.php p2ex/trunk/menu_k.php p2ex/trunk/post.php p2ex/trunk/post_form.php p2ex/trunk/title.php Added Paths: ----------- p2ex/trunk/style/title_css.inc -------------- next part -------------- Modified: p2ex/trunk/lib/P2Util.php =================================================================== --- p2ex/trunk/lib/P2Util.php 2010-01-27 02:26:56 UTC (rev 817) +++ p2ex/trunk/lib/P2Util.php 2010-01-27 08:56:29 UTC (rev 818) @@ -1071,6 +1071,13 @@ // ÏÝè $date = date('Y/m/d (D) G:i:s'); + // IPAhXðæ¾ + if (array_key_exists('REMOTE_ADDR', $_SERVER)) { + $remote_addr = $_SERVER['REMOTE_ADDR']; + } else { + $remote_addr = ''; + } + // HOSTðæ¾ if (array_key_exists('REMOTE_HOST', $_SERVER)) { $remote_host = $_SERVER['REMOTE_HOST']; @@ -1084,12 +1091,24 @@ $remote_host = ''; } + // UAðæ¾ + if (array_key_exists('HTTP_USER_AGENT', $_SERVER)) { + $user_agent = $_SERVER['HTTP_USER_AGENT']; + } else { + $user_agent = ''; + } + + // t@ðæ¾ + if (array_key_exists('HTTP_REFERER', $_SERVER)) { + $referrer = $_SERVER['HTTP_REFERER']; + } else { + $referrer = ''; + } + $user = (isset($_login->user_u)) ? $_login->user_u : ''; // Vµ¢OsðÝè - $newdata = implode('<>', array($date, $_SERVER['REMOTE_ADDR'], $remote_host, - $_SERVER['HTTP_USER_AGENT'], $_SERVER['HTTP_REFERER'], - '', $user)); + $newdata = implode('<>', array($date, $remote_addr, $remote_host, $user_agent, $referrer, '', $user)); //$newdata = htmlspecialchars($newdata, ENT_QUOTES); // ܸ^uðSÄOµÄ Modified: p2ex/trunk/lib/post_form_options.inc.php =================================================================== --- p2ex/trunk/lib/post_form_options.inc.php 2010-01-27 02:26:56 UTC (rev 817) +++ p2ex/trunk/lib/post_form_options.inc.php 2010-01-27 08:56:29 UTC (rev 818) @@ -135,6 +135,10 @@ // Ql NVbN COLS='60' ROWS='8' $mobile = Net_UserAgent_Mobile::singleton(); $wrap_at = ''; // wrap®«ÍW3C HTML 4.01dlɶݵȢ +$name_size_at = ''; +$mail_size_at = ''; +$msg_cols_at = ''; + // PC if (!$_conf['ktai']) { $name_size_at = ' size="19"'; @@ -146,7 +150,6 @@ // gÑ } else { $STYLE['post_msg_rows'] = 5; - $msg_cols_at = ''; $wrap_at = ' wrap="soft"'; } Modified: p2ex/trunk/menu_k.php =================================================================== --- p2ex/trunk/menu_k.php 2010-01-27 02:26:56 UTC (rev 817) +++ p2ex/trunk/menu_k.php 2010-01-27 08:56:29 UTC (rev 818) @@ -12,7 +12,9 @@ //============================================================== $_conf['ktai'] = 1; $brd_menus = array(); -$GLOBALS['menu_show_ita_num'] = 0; +$menu_show_ita_num = 0; +$list_navi_ht = ''; +$modori_url_ht = ''; // {{{ Âõ̽ßÌÝè Modified: p2ex/trunk/post.php =================================================================== --- p2ex/trunk/post.php 2010-01-27 02:26:56 UTC (rev 817) +++ p2ex/trunk/post.php 2010-01-27 08:56:29 UTC (rev 818) @@ -595,6 +595,8 @@ // vgpÏ =============== if (!$_conf['ktai']) { $class_ttitle = ' class="thre_title"'; + } else { + $class_ttitle = ''; } $ttitle_ht = "<b{$class_ttitle}>{$ttitle}</b>"; // 2005/03/01 aki: jiguEUÉηé½ßA& ÅÍÈ & Å Modified: p2ex/trunk/post_form.php =================================================================== --- p2ex/trunk/post_form.php 2010-01-27 02:26:56 UTC (rev 817) +++ p2ex/trunk/post_form.php 2010-01-27 08:56:29 UTC (rev 818) @@ -43,6 +43,10 @@ $class_ttitle = ' class="thre_title"'; $target_read = ' target="read"'; $sub_size_at = ' size="40"'; +} else { + $class_ttitle = ''; + $target_read = ''; + $sub_size_at = ''; } // {{{ X§ÄÈç Added: p2ex/trunk/style/title_css.inc =================================================================== --- p2ex/trunk/style/title_css.inc (rev 0) +++ p2ex/trunk/style/title_css.inc 2010-01-27 08:56:29 UTC (rev 818) @@ -0,0 +1,42 @@ +<?php +/** + * rep2 - X^CÝè + * for title.php ^Cgy[W + */ + +echo <<<EOSTYLE + +table caption { + text-align: left; + font-size: {$STYLE['fontsize']}; +} + +table th { + padding-right: 0.25em; + text-align: right; + vertical-align: top; + white-space: nowrap; + line-height: 100%; + font-weight: normal; + font-size: {$STYLE['fontsize']}; +} + +table td { + text-align: left; + vertical-align: top; + line-height: 100%; + font-size: {$STYLE['fontsize']}; +} + +EOSTYLE; + +/* + * Local Variables: + * mode: php + * coding: cp932 + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ +// vim: set syn=php fenc=cp932 ai et ts=4 sw=4 sts=4 fdm=marker: Modified: p2ex/trunk/title.php =================================================================== --- p2ex/trunk/title.php 2010-01-27 02:26:56 UTC (rev 817) +++ p2ex/trunk/title.php 2010-01-27 08:56:29 UTC (rev 818) @@ -66,16 +66,58 @@ $url_b = $base_url . '?user=' . rawurlencode($_login->user_u) . '&b='; $url_b_ht = htmlspecialchars($url_b, ENT_QUOTES); +// gÑpr [ðJubN}[Nbg +$bookmarklet = <<<JS +(function (u, w, v, x, y) { + var t; + if (typeof window.outerHeight === 'number') { + t = y + window.outerHeight; + if (v < t){ + v = t; + } + } + t = window.open(u, '', 'width=' + w + ',height=' + v + ',' + + 'scrollbars=yes,resizable=yes,toolbar=no,menubar=no,status=no' + ); + if (t) { + t.resizeTo(w, v); + t.focus(); + return false; + } else { + return true; + } +}) +JS; +$bookmarklet = preg_replace('/\\b(var|return|typeof) +/', '$1{%space%}', $bookmarklet); +$bookmarklet = preg_replace('/\\s+/', '', $bookmarklet); +$bookmarklet = str_replace('{%space%}', ' ', $bookmarklet); + +$bookmarklet_k = $bookmarklet . "('{$url_b}k',240,320,20,-100)"; +$bookmarklet_i = $bookmarklet . "('{$url_b}i',320,480,20,-100)"; +$bookmarklet_k_ht = htmlspecialchars($bookmarklet_k, ENT_QUOTES); +$bookmarklet_i_ht = htmlspecialchars($bookmarklet_i, ENT_QUOTES); +$bookmarklet_k_en = rawurlencode($bookmarklet_k); +$bookmarklet_i_en = rawurlencode($bookmarklet_i); + $htm['ktai_url'] = <<<EOT <table border="0" cellspacing="0" cellpadding="1"> <tbody> - <tr><th>gÑpURL:</th><td><a href="{$url_b_ht}k" target="_blank">{$url_b_ht}k</a></td></tr> - <tr><th>iPhonepURL:</th><td><a href="{$url_b_ht}i" target="_blank">{$url_b_ht}i</a></td></tr> + <tr> + <th>gÑpURL:</th> + <td><a href="{$url_b_ht}k" target="_blank" onclick="return {$bookmarklet_k_ht};">{$url_b_ht}k</a></td> + <td>[<a href="javascript:{$bookmarklet_k_en};">bookmarklet</a>]</td> + </tr> + <tr> + <th>iPhonepURL:</th> + <td><a href="{$url_b_ht}i" target="_blank" onclick="return {$bookmarklet_i_ht};">{$url_b_ht}i</a></td> + <td>[<a href="javascript:{$bookmarklet_i_en};">bookmarklet</a>]</td> + </tr> </tbody> </table> EOT; // OñÌOCîñ +$htm['log'] = ''; $htm['last_login'] = ''; if ($_conf['login_log_rec'] && $_conf['last_login_log_show']) { if (($log = P2Util::getLastAccessLog($_conf['login_log_file'])) !== false) { @@ -99,7 +141,7 @@ //========================================================= // HTMLvg //========================================================= -$ptitle = "rep2 - title"; +$ptitle = 'rep2 - title'; echo $_conf['doctype']; echo <<<EOP @@ -113,30 +155,8 @@ <title>{$ptitle}</title> <base target="read"> <link rel="stylesheet" type="text/css" href="css.php?css=style&skin={$skin_en}"> + <link rel="stylesheet" type="text/css" href="css.php?css=title&skin={$skin_en}"> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> - <style type="text/css"> - /* <![CDATA[ */ - table caption { - text-align: left; - font-size: {$STYLE['fontsize']}; - } - table th { - padding-right: 0.25em; - text-align: right; - vertical-align: top; - white-space: nowrap; - line-height: 100%; - font-weight: normal; - font-size: {$STYLE['fontsize']}; - } - table td { - text-align: left; - vertical-align: top; - line-height: 100%; - font-size: {$STYLE['fontsize']}; - } - /* ]]> */ - </style> </head> <body>\n EOP;