[P2-php-svn] [948]

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2013年 6月 5日 (水) 15:28:31 JST


Revision: 948
          http://sourceforge.jp/projects/p2-php/scm/svn/commits/948
Author:   akid
Date:     2013-06-05 15:28:30 +0900 (Wed, 05 Jun 2013)
Log Message:
-----------


Modified Paths:
--------------
    p2/trunk/iphone/ShowThreadK.php
    p2/trunk/iphone/js/iphone.js
    p2/trunk/iphone/post_form.inc.php
    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/iui/read.css
    p2/trunk/lib/ThreadRead.php
    p2/trunk/lib/post_form.inc.php
    p2/trunk/lib/post_options_loader.inc.php
    p2/trunk/lib/read_footer.inc.php
    p2/trunk/lib/sb_print.inc.php
    p2/trunk/lib/sb_print_k.func.php
    p2/trunk/lib/sb_toolbar_k.funcs.php
    p2/trunk/post_form.php
    p2/trunk/post_form_i.php
    p2/trunk/read_filter_i.php
    p2/trunk/read_new_i.php

Added Paths:
-----------
    p2/trunk/lib/loadPostOptions.func.php

-------------- next part --------------
Modified: p2/trunk/iphone/ShowThreadK.php
===================================================================
--- p2/trunk/iphone/ShowThreadK.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/iphone/ShowThreadK.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -339,23 +339,25 @@
             $is = $i;
         }
         // \x83\x8C\x83X\x83|\x83b\x83v\x83A\x83b\x83v\x97p\x88\xF8\x97p
-        $tores .= $rpop; 
+        $tores .= $rpop;
+        
+        $tores .= '<div class="nameline">'; // \x83\x8C\x83X\x94ԍ\x86\x81A\x96\xBC\x91O\x81A\x93\xFA\x95t\x8Ds
+        
         // \x94ԍ\x86\x81i\x83I\x83\x93\x83U\x83t\x83\x89\x83C\x8E\x9E\x81j
         if ($this->thread->onthefly) {
             $GLOBALS['newres_to_show_flag'] = true;
-            $tores .= "<div id=\"r{$i}\" name=\"r{$i}\">[<font color=\"#00aa00\">{$i}</font>]";
+            $rnum_ht = "<font color=\"#00aa00\">{$i}</font>";
         // \x94ԍ\x86\x81i\x90V\x92\x85\x83\x8C\x83X\x8E\x9E\x81j
         } elseif ($i > $this->thread->readnum) {
             $GLOBALS['newres_to_show_flag'] = true;
-            $tores .= "<div id=\"r{$i}\" name=\"r{$i}\">[<font color=\"{$STYLE['read_newres_color']}\">{$is}</font>]";
+            $rnum_ht = "<font color=\"{$STYLE['read_newres_color']}\">{$is}</font>";
         // \x94ԍ\x86
         } else {
-            // iPhone\x97p\x82ɃN\x83\x89\x83X\x92lj\xC1  thread \x88ȉ\xBA\x82\xE0\x93\xAF\x97l
-            // \x81\xAA\x82\xB1\x82\xCCclass thread \x82\xAA\x82ǂ\xB1\x82ŗ\x98\x97p\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9\x82̂\xA9\x82킩\x82\xE7\x82Ȃ\xA2\x81B\x8Eg\x82\xED\x82ꂢ\x82Ȃ\xA2\x82悤\x82ȋC\x82\xAA\x82\xB7\x82\xE9\x81B
-            // \x82\xB1\x82\xB1\x82\xC5class\x96\xBC\x82\xC9thread\x82\xF0\x8Eg\x82\xA4\x82̂͂ӂ\xB3\x82킵\x82\xAD\x82Ȃ\xA2\x82̂ŁA\x8AO\x82\xB5\x82\xBD\x82\xA2\x82Ƃ\xB1\x82\xEB\x81B
-            $tores .= "<div class=\"thread\" id=\"r{$i}\" name=\"r{$i}\">[{$is}]";
+            $rnum_ht = $is;
         }
         
+        $tores .= sprintf('<span class="trnum">[%s]</span> ', $rnum_ht);
+        
         //$tores .= ' ';
         
         // \x96\xBC\x91O
@@ -423,9 +425,10 @@
             //$tores .= '<font class="sage"> sage</font>';
         }
         
-        $tores .="<br>\n"; // \x93\xFA\x95t\x82\xC6ID
+        $tores .="</div>\n"; // End of \x96\xBC\x91O\x82Ɠ\xFA\x95t\x82\xC6ID\x82̍s
         
-        $tores .= "{$msg}</div>$hr\n"; // \x93\xE0\x97e  // iPhone\x97p\x82\xC9hr\x8D폜
+        $tores .= sprintf('<div class="rbody" id="r%s" name="r%s">%s</div>', $i, $i, $msg); // \x83\x8C\x83X\x96{\x95\xB6
+        $tores .= "\n";
         
         // \x82܂Ƃ߂ăt\x83B\x83\x8B\x83^\x90F\x95\xAA\x82\xAF
         if (strlen($GLOBALS['word_fm']) && $GLOBALS['res_filter']['match'] != 'off') {

Modified: p2/trunk/iphone/js/iphone.js
===================================================================
--- p2/trunk/iphone/js/iphone.js	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/iphone/js/iphone.js	2013-06-05 06:28:30 UTC (rev 948)
@@ -3,15 +3,15 @@
 	var gopos = document.getElementById(ancId);
 	if (gopos.offsetTop) {
 		document.body.scrollTop = parseInt(gopos.offsetTop);
-		//window.scrollBy(0, gopos.offsetTop);
+		//window.scrollTo(0, arseInt(gopos.offsetTop));
 	}
 }
 
 // iPhone\x82\xCCURL\x95\\x8E\xA6\x95\x94\x95\xAA\x82\xF0\x88\xF8\x82\xC1\x8D\x9E\x82܂\xB9\x82邽\x82߁A\x82킸\x82\xA9\x82ɃX\x83N\x83\x8D\x81[\x83\x8B\x82\xB7\x82\xE9
 function scrollForHideIPhoneUrlMenu()
 {
-	scrollBy(0, 1);
-	//setTimeout(scrollBy, 100, 0, 1); // \x82Ȃ\xBA setTimeout \x82\xB5\x82Ă\xA2\x82\xE9\x82̂\xA9\x95s\x96\xBE
+	scrollTo(0, 1); // scrollBy\x82ɂ\xB5\x82\xBD\x82\xA2\x82\xAA\x81A\x82\xBB\x82\xA4\x82\xB7\x82\xE9\x82\xC6Android\x82̃f\x83t\x83H\x83\x8B\x83g\x83u\x83\x89\x83E\x83U\x82Łu\x8E\x9F\x81v\x88ړ\xAE\x82\xB5\x82\xBD\x8E\x9E\x82ɁA\x89\xBA\x82̕\xFB\x82փW\x83\x83\x83\x93\x83v\x82\xB5\x82Ă\xB5\x82܂\xA4
+	//setTimeout(scrollTo, 100, 0, 1); // \x82Ȃ\xBA setTimeout \x82\xB5\x82Ă\xA2\x82\xE9\x82̂\xA9\x95s\x96\xBE
 }
 
 // \x81ibody\x82\xAAonload\x82\xB5\x82Ă\xA9\x82\xE7\x8E\xC0\x8Ds\x82\xB7\x82\xE9\x81j

Modified: p2/trunk/iphone/post_form.inc.php
===================================================================
--- p2/trunk/iphone/post_form.inc.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/iphone/post_form.inc.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -3,6 +3,8 @@
  *  p2 \x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80
  */
 
+$csrfid = P2Util::getCsrfId();
+
 // \x8Cg\x91\xD1
 if (UA::isK()) {
     $htm['k_br'] = '<br>';
@@ -51,7 +53,7 @@
     
     <input type="hidden" name="bbs" value="{$bbs}">
     <input type="hidden" name="key" value="{$key}">
-    <input type="hidden" name="time" value="{$time}">
+    <input type="hidden" name="time" value="{$time_for_post}">
     
     <input type="hidden" name="host" value="{$host}">
     <input type="hidden" name="popup" value="{$popup_hs}">

Modified: p2/trunk/iphone/post_form_popup.inc.php
===================================================================
--- p2/trunk/iphone/post_form_popup.inc.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/iphone/post_form_popup.inc.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -3,32 +3,53 @@
  *  p2 \x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80 \x83|\x83b\x83v\x83A\x83b\x83v
  */
 
-// \x8Cg\x91\xD1
-/*
-if (UA::isK()) {
-    $htm['k_br'] = '<br>';
-    $htm['kakiko_on_js'] = '';
-// PC
-} else {
-*/
-    $htm['k_br'] = '';
-    $htm['kakiko_on_js'] = ' onFocus="adjustTextareaRows(this, 2);" onKeyup="adjustTextareaRows(this, 2);'
-        . " autoSavePostForm('$host', '$bbs', '$key');\"";
-//}
+/**
+ * @access  public
+ * @return  string  HTML
+ */
+function getPostFormPopupIPhone($host, $bbs, $key, $ttitle_en, $rescount)
+{
+    global $_conf, $STYLE; // readonly
+    global $html, $hs; // readonly
+    // $htm['src_fix'], $htm['be2ch'], $htm['title_need_be'], $htm['maru_kakiko']
+    // $hs['mail'], $hs['FROM']
+    global $time_for_post, $res_disabled_at, $MESSAGE_hs, $wrap, $msg_cols_at, $sage_cb_ht, $on_check_sage, $mail_size_at, $name_size_at; // readonly
+    
+    // $sid_q = (defined('SID') && strlen(SID)) ? '&amp;' . hs(SID) : '';
+    
+    $csrfid = P2Util::getCsrfId();
+    
+    $submit_value = '\x8F\x91\x82\xAB\x8D\x9E\x82\xDE';
+    
+    // \x83X\x83\x8C\x83b\x83h\x83^\x83C\x83g\x83\x8B\x82̍쐬
+    $resform_ttitle_ht = sprintf('<p><b class="thre_title">%s</b></p>', $aThread->ttitle_hs);
 
-$htm['subject']         = isset($htm['subject'])        ? $htm['subject'] : '';
-$popup_hs               = isset($popup)                 ? hs($popup) : '';
-$newthread_hidden_ht    = isset($newthread_hidden_ht)   ? $newthread_hidden_ht : '';
-$readnew_hidden_ht      = isset($readnew_hidden_ht)     ? $readnew_hidden_ht : '';
+    // \x8Cg\x91\xD1
+    /*
+    if (UA::isK()) {
+        $k_br_ht = '<br>';
+        $kakiko_on_js_ht = '';
+    // PC
+    } else {
+    */
+        $k_br_ht = '';
+        $kakiko_on_js_ht = ' onFocus="adjustTextareaRows(this, 2);" onKeyup="adjustTextareaRows(this, 2);'
+            . " autoSavePostForm('$host', '$bbs', '$key');\"";
+    //}
 
-// \x95\xB6\x8E\x9A\x83R\x81[\x83h\x94\xBB\x92\xE8\x97p\x95\xB6\x8E\x9A\x97\xF1\x82\xF0\x90擪\x82Ɏd\x8D\x9E\x82ނ\xB1\x82Ƃ\xC5mb_convert_variables()\x82̎\xA9\x93\xAE\x94\xBB\x92\xE8\x82\xF0\x8F\x95\x82\xAF\x82\xE9
+    $htm['subject']         = isset($htm['subject'])        ? $htm['subject'] : '';
+    $popup_hs               = isset($popup)                 ? hs($popup) : '';
+    $newthread_hidden_ht    = isset($newthread_hidden_ht)   ? $newthread_hidden_ht : '';
+    $readnew_hidden_ht      = isset($readnew_hidden_ht)     ? $readnew_hidden_ht : '';
 
-// <fieldset>\x82\xCDorder-top\x82\xAA\x92\xB4\x8Fc\x92\xB7
-$htm['post_form'] = <<<EOP
+    // \x95\xB6\x8E\x9A\x83R\x81[\x83h\x94\xBB\x92\xE8\x97p\x95\xB6\x8E\x9A\x97\xF1\x82\xF0\x90擪\x82Ɏd\x8D\x9E\x82ނ\xB1\x82Ƃ\xC5mb_convert_variables()\x82̎\xA9\x93\xAE\x94\xBB\x92\xE8\x82\xF0\x8F\x95\x82\xAF\x82\xE9
+
+    // <fieldset>\x82\xCDorder-top\x82\xAA\x92\xB4\x8Fc\x92\xB7
+    $post_form_html = <<<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="\x81\x9D\x81\x9E">
     <fieldset>
-<!--    <h5>{$htm['resform_ttitle']}</h5>
+<!--    <h5>{$resform_ttitle_ht}</h5>
     {$htm['subject']}
 -->
 <div id="writeFormCloseBtn" style="display:none;margin:0;"><img src="iui/icon_close.png" onClick="popUpFootbarFormIPhone(0, 1)"></div>
@@ -41,7 +62,7 @@
 <span>sage: {$sage_cb_ht}</span>
 <br>
 <label>Message:</label>
-    <textarea id="MESSAGE" name="MESSAGE" rows="{$STYLE['post_msg_rows']}"{$msg_cols_at} wrap="{$wrap}"{$htm['kakiko_on_js']}>{$MESSAGE_hs}</textarea>
+    <textarea id="MESSAGE" name="MESSAGE" rows="{$STYLE['post_msg_rows']}"{$msg_cols_at} wrap="{$wrap}"{$kakiko_on_js_ht}>{$MESSAGE_hs}</textarea>
     <br>
 
     <input id="submit" type="submit" name="submit" value="{$submit_value}"{$res_disabled_at}{$htm['title_need_be']} onClick="setHiddenValue(this); popUpFootbarFormIPhone(1, 1);">
@@ -49,13 +70,13 @@
    {$htm['src_fix']}
     </fieldset>
 
-    
 
-    
+
+
     <input type="hidden" name="bbs" value="{$bbs}">
     <input type="hidden" name="key" value="{$key}">
-    <input type="hidden" name="time" value="{$time}">
-    
+    <input type="hidden" name="time" value="{$time_for_post}">
+
     <input type="hidden" name="host" value="{$host}">
     <input type="hidden" name="popup" value="{$popup_hs}">
     <input type="hidden" name="rescount" value="{$rescount}">
@@ -63,15 +84,15 @@
     <input type="hidden" name="csrfid" value="{$csrfid}">
     {$newthread_hidden_ht}{$readnew_hidden_ht}
     {$_conf['k_input_ht']}
-    
+
     <!-- <input type="submit" value="\x95\x9C\x8A\x88\x82̎\xF4\x95\xB6" onclick="hukkatuPostForm('{$host}', '{$bbs}', '{$key}'); return false;"> -->
     <span id="status_post_form" style="font-size:10pt;"></span>
 </form>\n
 EOP;
 
 
-if (!UA::isK()) {
-    $htm['post_form'] .= <<<EOP
+    if (!UA::isK()) {
+        $htm['post_form'] .= <<<EOP
 <script type="text/javascript">
 <!--
 var messageObj = document.getElementById('MESSAGE');
@@ -81,6 +102,9 @@
 -->
 </script>\n
 EOP;
+    }
+    
+    return $post_form_html;
 }
 
 /*

Modified: p2/trunk/iphone/post_options_loader_popup.inc.php
===================================================================
--- p2/trunk/iphone/post_options_loader_popup.inc.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/iphone/post_options_loader_popup.inc.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -1,122 +1,154 @@
 <?php
-/* vim: set fileencoding=cp932 autoindent noexpandtab ts=4 sw=4 sts=0: */
-/* mi: charset=Shift_JIS */
+// 2013/06/05 loadPostOptions.php \x82Ɉڍs\x93\x9D\x8D\x87\x82\xB5\x82Ĕp\x8E~
 
 // p2 - \x83\x8C\x83X\x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80\x82̋@\x94\\x93ǂݍ\x9E\x82\xDD
+// post_options_loader_popup()
 
 // \x8E\x96\x91O\x95ϐ\x94
 // $host, $bbs, $key ($rescount, $popup, $ttitle_en)
 
-$fake_time = -10; // time \x82\xF010\x95\xAA\x91O\x82ɋU\x91\x95
-$time = time() - 9*60*60;
-$time = $time + $fake_time * 60;
+// post_options_loader_popup($host, $bbs, $key);
 
-$csrfid = P2Util::getCsrfId();
 
-$res_disabled_at = '';
+/**
+ * @access  public
+ * @return  void
+ */
+function post_options_loader_popup($host, $bbs, $key)
+{
+    global $_conf, $STYLE;
+    global $hs, $htm;
+    global $time_for_post, $res_disabled_at, $MESSAGE_hs, $name_size_at, $mail_size_at, $msg_cols_at, $wrap, $on_check_sage, $sage_cb_ht;
+    
+    $fake_time = -10; // time \x82\xF010\x95\xAA\x91O\x82ɋU\x91\x95
+    $time_for_post = time() - 9*60*60;
+    $time_for_post = $time_for_post + $fake_time * 60;
 
-// $resv 'FROM', 'mail', 'MESSAGE, 'subject'
-$resv = P2Util::getDefaultResValues($host, $bbs, $key);
+    $res_disabled_at = '';
 
-$hs = array(
-    'FROM'    => hs($resv['FROM']),
-    'mail'    => hs($resv['mail']),
-    'subject' => hs($resv['subject'])
-);
-$MESSAGE_hs = hs($resv['MESSAGE']);
+    // $resv 'FROM', 'mail', 'MESSAGE, 'subject'
+    $resv = P2Util::getDefaultResValues($host, $bbs, $key);
 
-// \x82\xB1\x82\xEA\x82Ƀ\x8C\x83X
-$htm['orig_msg'] = _getOrigMsgHtmlAndSetMessageHs(
-    $host, $bbs, $key, geti($_GET['resnum']), geti($_GET['inyou']), $MESSAGE_hs
-);
+    //$hs = array_map(create_function('$n', 'return hs($n);'), $resv);
+    $hs = array(
+        'FROM'    => hs($resv['FROM']),
+        'mail'    => hs($resv['mail']),
+        'subject' => hs($resv['subject'])
+    );
+    $MESSAGE_hs = hs($resv['MESSAGE']);
 
+    // \x82\xB1\x82\xEA\x82Ƀ\x8C\x83X
+    $htm['orig_msg'] = _getOrigMsgHtmlAndSetMessageHs(
+        $host, $bbs, $key, geti($_GET['resnum']), geti($_GET['inyou']), $MESSAGE_hs
+    );
 
-// \x95\\x8E\xA6\x8Ew\x92\xE8
-// \x8EQ\x8Dl \x83N\x83\x89\x83V\x83b\x83N COLS='60' ROWS='8'
-$mobile = &Net_UserAgent_Mobile::singleton();
 
-$name_size_at = '';
-$mail_size_at = '';
+    // \x95\\x8E\xA6\x8Ew\x92\xE8
+    // \x8EQ\x8Dl \x83N\x83\x89\x83V\x83b\x83N COLS='60' ROWS='8'
+    $mobile = &Net_UserAgent_Mobile::singleton();
 
-// PC
-if (UA::isPC()) {
-    $name_size_at = ' size="19"';
-    $mail_size_at = ' size="19"';
-    $msg_cols_at = sprintf(' cols="%d"', $STYLE['post_msg_cols']);
-    $wrap = 'off';
+    $name_size_at = '';
+    $mail_size_at = '';
 
-// willcom
-// \x92ʏ\xED\x82\xCDPC\x97p\x90ݒ\xE8\x82ɏ\x80\x82\xB6\x82邪\x81A\x8Cg\x91їp\x90ݒ肪\x83Z\x83b\x83g\x82\xB3\x82\xEA\x82Ă\xA2\x82\xEA\x82΁A\x82\xBB\x82\xBF\x82\xE7\x82ɏ\x80\x82\xB6\x82\xE9\x81B
-} elseif($mobile && $mobile->isWillcom()) {
-    if ($_conf['k_post_msg_cols']) {
-        $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
-    } else {
+    // PC
+    if (UA::isPC()) {
+        $name_size_at = ' size="19"';
+        $mail_size_at = ' size="19"';
         $msg_cols_at = sprintf(' cols="%d"', $STYLE['post_msg_cols']);
-    }
-    // $STYLE['post_msg_rows'] => 10
-    if ($_conf['k_post_msg_rows']) {
-        $STYLE['post_msg_rows'] = (int)$_conf['k_post_msg_rows'];
-    }
+        $wrap = 'off';
+
+    // willcom
+    // \x92ʏ\xED\x82\xCDPC\x97p\x90ݒ\xE8\x82ɏ\x80\x82\xB6\x82邪\x81A\x8Cg\x91їp\x90ݒ肪\x83Z\x83b\x83g\x82\xB3\x82\xEA\x82Ă\xA2\x82\xEA\x82΁A\x82\xBB\x82\xBF\x82\xE7\x82ɏ\x80\x82\xB6\x82\xE9\x81B
+    } elseif($mobile && $mobile->isWillcom()) {
+        if ($_conf['k_post_msg_cols']) {
+            $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
+        } else {
+            $msg_cols_at = sprintf(' cols="%d"', $STYLE['post_msg_cols']);
+        }
+        // $STYLE['post_msg_rows'] => 10
+        if ($_conf['k_post_msg_rows']) {
+            $STYLE['post_msg_rows'] = (int)$_conf['k_post_msg_rows'];
+        }
     
-    $wrap = 'soft';
+        $wrap = 'soft';
+	
+	} elseif (UA::isIPhoneGroup()) {
+        $msg_cols_at = '';
+        $STYLE['post_msg_rows'] = 5;
+		$wrap = 'soft';
 
-// \x8Cg\x91\xD1
-} else {
-    $msg_cols_at = '';
-    $STYLE['post_msg_rows'] = 5;
-    $wrap = 'soft';
-}
+    // \x8Cg\x91\xD1
+    } else {
+		$msg_cols_at = '';
+        if ($_conf['k_post_msg_cols']) {
+            $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
+        }
+        if ($_conf['k_post_msg_rows']) {
+            $STYLE['post_msg_rows'] = (int)$_conf['k_post_msg_rows'];
+        } else {
+            $STYLE['post_msg_rows'] = 5; // \x8Cg\x91їp\x83f\x83t\x83H\x83\x8B\x83g\x92l
+        }
+    
+        $wrap = 'soft';
+    }
 
+    // Be\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
+    $htm['be2ch'] = '';
+    if (P2Util::isHost2chs($host) and P2Util::enableBe2ch()) {
+		if (UA::isIPhoneGroup()) {
+        	$htm['be2ch'] = '<input style="margin-right:16px;" id="submit_beres" type="submit" name="submit_beres" value="BE\x82ŏ\x91\x82\xAB\x8D\x9E\x82\xDE" onClick="setHiddenValue(this); popUpFootbarFormIPhone(1, 1);"><br>';
+		} else {
+        	$htm['be2ch'] = '\x81@<input id="submit_beres" type="submit" name="submit_beres" value="BE\x82ŏ\x91\x82\xAB\x8D\x9E\x82\xDE"' . $res_disabled_at . ' onClick="setHiddenValue(this);">';
+		}
+    }
 
-// Be\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
-$htm['be2ch'] = '';
-if (P2Util::isHost2chs($host) and P2Util::enableBe2ch()) {
-    $htm['be2ch'] = '<input style="margin-right:16px;" id="submit_beres" type="submit" name="submit_beres" value="BE\x82ŏ\x91\x82\xAB\x8D\x9E\x82\xDE" onClick="setHiddenValue(this); popUpFootbarFormIPhone(1, 1);"><br>';
-}
-
-// be\x94‚ł͏\x91\x82\xAB\x8D\x9E\x82݂𖳌\xF8\x82ɂ\xB7\x82\xE9
-$htm['title_need_be'] = '';
-if (P2Util::isBbsBe2chNet($host, $bbs)) {
-    // \x82\xE2\x82\xC1\x82ς薳\x8C\xF8\x82ɂ\xB5\x82Ȃ\xA2\x81B\x8F\x91\x82\xAB\x8D\x9E\x82ݎ\xB8\x94s\x8E\x9E\x82ɁA2ch\x91\xA4\x82\xC5Be\x83\x8D\x83O\x83C\x83\x93\x82ւ̗U\x93\xB1\x82\xAA\x82\xA0\x82\xE9\x82̂ŁB
-    //$res_disabled_at = ' disabled';
-    if (P2Util::enableBe2ch()) {
-        $htm['title_need_be'] = ' title="Be\x94‚ɂ‚\xAB\x81A\x8E\xA9\x93\xAEBe\x8F\x91\x82\xAB\x8D\x9E\x82݂\xB5\x82܂\xB7"';
-    } else {
-        $htm['title_need_be'] = ' title="\x8F\x91\x82\xAB\x8D\x9E\x82ނɂ\xCDBe\x83\x8D\x83O\x83C\x83\x93\x82\xAA\x95K\x97v\x82ł\xB7"';
+    // be\x94‚ł͏\x91\x82\xAB\x8D\x9E\x82݂𖳌\xF8\x82ɂ\xB7\x82\xE9
+    $htm['title_need_be'] = '';
+    if (P2Util::isBbsBe2chNet($host, $bbs)) {
+        // \x82\xE2\x82\xC1\x82ς薳\x8C\xF8\x82ɂ\xB5\x82Ȃ\xA2\x81B\x8F\x91\x82\xAB\x8D\x9E\x82ݎ\xB8\x94s\x8E\x9E\x82ɁA2ch\x91\xA4\x82\xC5Be\x83\x8D\x83O\x83C\x83\x93\x82ւ̗U\x93\xB1\x82\xAA\x82\xA0\x82\xE9\x82̂ŁB
+        //$res_disabled_at = ' disabled';
+        if (P2Util::enableBe2ch()) {
+            $htm['title_need_be'] = ' title="Be\x94‚ɂ‚\xAB\x81A\x8E\xA9\x93\xAEBe\x8F\x91\x82\xAB\x8D\x9E\x82݂\xB5\x82܂\xB7"';
+        } else {
+            $htm['title_need_be'] = ' title="\x8F\x91\x82\xAB\x8D\x9E\x82ނɂ\xCDBe\x83\x8D\x83O\x83C\x83\x93\x82\xAA\x95K\x97v\x82ł\xB7"';
+        }
     }
-}
 
 
-// sage checkbox
-$on_check_sage = '';
-$sage_cb_ht = '';
-if (UA::isPC() || UA::isIPhoneGroup()) {
-    $on_check_sage = ' onChange="checkSage();"';
-    $sage_cb_ht = '<input id="sage" type="checkbox" onClick="mailSage();">';
-}
+    // sage checkbox
+    $on_check_sage = '';
+    $sage_cb_ht = '';
+    if (UA::isPC() || UA::isIPhoneGroup()) {
+        $on_check_sage = ' onChange="checkSage();"';
+        $sage_cb_ht = '<input id="sage" type="checkbox" onClick="mailSage();">';
+		if (UA::isPC()) {
+			$sage_cb_ht .= '<label for="sage">sage</label><br>';
+		}
+    }
 
-// 2ch\x81\x9C\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
-$htm['maru_kakiko'] = _getMaruKakikoHtml($host);
+    // 2ch\x81\x9C\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
+    $htm['maru_kakiko'] = _getMaruKakikoHtml($host);
 
-// \x83\\x81[\x83X\x83R\x81[\x83h\x95␳\x97p\x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X
-$htm['src_fix'] = _getSrcFixHtml($host);
+    // \x83\\x81[\x83X\x83R\x81[\x83h\x95␳\x97p\x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X
+    $htm['src_fix'] = _getSrcFixHtml($host);
 
-/*
-// {{{ \x96{\x95\xB6\x82\xAA\x8B\xF3\x82̂Ƃ\xAB\x82\xE2sage\x82ĂȂ\xA2\x82Ƃ\xAB\x82ɑ\x97\x90M\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƒ\x8D\x88ӂ\xB7\x82\xE9
+    /*
+    // {{{ \x96{\x95\xB6\x82\xAA\x8B\xF3\x82̂Ƃ\xAB\x82\xE2sage\x82ĂȂ\xA2\x82Ƃ\xAB\x82ɑ\x97\x90M\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƒ\x8D\x88ӂ\xB7\x82\xE9
 
-$onsubmit_ht = '';
+    $onsubmit_ht = '';
 
-if (UA::isPC() || UA::isIPhoneGroup()) {
-    if ($_exconf['editor']['check_message'] || $_exconf['editor']['check_sage']) {
-        $_check_message = (int) $_exconf['editor']['check_message'];
-        $_check_sage = (int) $_exconf['editor']['check_sage'];
-        $onsubmit_ht = " onsubmit=\"return validateAll({$_check_message},{$_check_sage})\"";
+    if (UA::isPC() || UA::isIPhoneGroup()) {
+        if ($_exconf['editor']['check_message'] || $_exconf['editor']['check_sage']) {
+            $check_message = (int)$_exconf['editor']['check_message'];
+            $check_sage = (int)$_exconf['editor']['check_sage'];
+            $onsubmit_ht = " onsubmit=\"return validateAll({$check_message},{$check_sage})\"";
+        }
     }
+
+    // }}}
+    */
 }
 
-// }}}
-*/
-
 //==================================================================================
 // \x8A֐\x94\x81i\x82\xB1\x82̃t\x83@\x83C\x83\x8B\x93\xE0\x82݂̂ŗ\x98\x97p\x81j
 //==================================================================================
@@ -134,7 +166,7 @@
     // inyou:1 \x88\xF8\x97p
     // inyou:2 \x83v\x83\x8C\x83r\x83\x85\x81[
     // inyou:3 \x88\xF8\x97p\x81{\x83v\x83\x8C\x83r\x83\x85\x81[
-    if ((basename($_SERVER['SCRIPT_NAME']) == 'post_form_i.php' || $inyou) && $resnum) {
+    if ((in_array(basename($_SERVER['SCRIPT_NAME']), array('post_form.php', 'post_form_i.php')) || $inyou) && $resnum) {
         if (!($inyou == 2 && strlen($MESSAGE_hs))) {
             $MESSAGE_hs = '&gt;&gt;' . $resnum . "\r\n";
         }
@@ -208,7 +240,9 @@
     
     if (P2Util::isHost2chs($host) and file_exists($_conf['sid2ch_php'])) {
         $maru_kakiko_ht = sprintf(
-            '<span>2ch\x81\x9CID: <input id="maru_kakiko" name="maru_kakiko" type="checkbox" value="1"%s></span>',
+			UA::isIPhoneGroup()
+				? '<span title="2ch\x81\x9CID\x82̎g\x97p">2ch\x81\x9CID: <input id="maru_kakiko" name="maru_kakiko" type="checkbox" value="1"%s></span>'
+				:'<span title="2ch\x81\x9CID\x82̎g\x97p"><input id="maru_kakiko" name="maru_kakiko" type="checkbox" value="1"%s><label for="maru_kakiko">\x81\x9C</label></span>',
             $_conf['maru_kakiko'] ? ' checked' : ''
         );
     }
@@ -231,7 +265,7 @@
             $_conf['editor_srcfix'] == 1
             or $_conf['editor_srcfix'] == 2 && preg_match('/pc\d+\.2ch\.net/', $host)
         ) {
-            $src_fix_ht = '<input type="checkbox" id="fix_source" name="fix_source" value="1">\x83\\x81[\x83X\x83R\x81[\x83h\x95␳';
+            $src_fix_ht = '<input type="checkbox" id="fix_source" name="fix_source" value="1"><label for="fix_source">\x83\\x81[\x83X\x83R\x81[\x83h\x95␳</label>';
         }
     }
     return $src_fix_ht;

Modified: p2/trunk/iphone/read_footer_k.inc.php
===================================================================
--- p2/trunk/iphone/read_footer_k.inc.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/iphone/read_footer_k.inc.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -71,26 +71,29 @@
     }
     
     $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, $read_range_hs);
     ?>
 <?php echo $toolbar_back_board_ht; ?>
+
+<?php echo P2View::getHrHtmlK(); ?>
+
 <div id="footform">
 <a id="footer" name="footer"></a>
 <?php echo $goto_select_ht, $goto_next_ht; ?>
 </div>
-<div id="footbar01">
-	<div class="footbar">
-		<ul>
-		<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="writeButton" title="off"><a onclick="popUpFootbarFormIPhone(1); document.getElementById('footbar02').style.visibility='hidden';">\x8F\x91\x82\xAB\x8D\x9E\x82\xDD</a></li>
-		<li class="other"><a onclick="document.getElementById('footbar02').style.visibility='visible';if (document.getElementById('footbar01').offsetTop < 280) { document.getElementById('footbar02').style.top = 0; }  popUpFootbarFormIPhone(0, 1);popUpFootbarFormIPhone(1, 1);">\x82\xBB\x82̑\xBC</a></li>
-		<?php echo $read_navi_next_btm_tab_ht; ?>
-		</ul>
-	</div>
+
+<div id="footbar01" class="footbar">
+	<ul>
+	<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="writeButton" title="off"><a onclick="popUpFootbarFormIPhone(1); document.getElementById('footbar02').style.visibility='hidden';">\x8F\x91\x82\xAB\x8D\x9E\x82\xDD</a></li>
+	<li class="other"><a onclick="document.getElementById('footbar02').style.visibility='visible'; if (document.getElementById('footbar01').offsetTop < 280) { document.getElementById('footbar02').style.top = 0; }  popUpFootbarFormIPhone(0, 1);popUpFootbarFormIPhone(1, 1);">\x82\xBB\x82̑\xBC</a></li>
+	<?php echo $read_navi_next_btm_tab_ht; ?>
+	</ul>
 </div>
+
 <?php // \x81u\x82\xBB\x82̑\xBC\x81v\x82̃|\x83b\x83v\x83A\x83b\x83v\x83\x81\x83j\x83\x85\x81[\x81Bfootbar02 \x82\xCDfootbarEtc\x82Ƃ\xA9\x82ɖ\xBC\x8F̕ύX\x82\xB5\x82\xBD\x82\xA2\x8BC\x95\xAA ?>
 <div id="footbar02" class="dialog_other">
 <filedset>
@@ -101,58 +104,31 @@
 </ul>
 </filedset>
 </div>
+
 <?php echo $seafrm_ht; ?>
-<?php
 
-    // {{{ \x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80
+<?php
+    // \x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80\x82̃I\x83v\x83V\x83\x87\x83\x93\x93ǂݍ\x9E\x82\xDD
+    require_once P2_LIB_DIR . '/loadPostOptions.func.php';
+    loadPostOptions($host, $bbs, $key);
     
-    $bbs        = $aThread->bbs;
-    $key        = $aThread->key;
-    $host       = $aThread->host;
-    $rescount   = $aThread->rescount;
-    $ttitle_en  = base64_encode($aThread->ttitle);
-    
-    $submit_value = '\x8F\x91\x82\xAB\x8D\x9E\x82\xDE';
+    // \x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80HTML\x82\xF0\x8Fo\x97\xCD
+    require_once P2_IPHONE_LIB_DIR . '/post_form_popup.inc.php'; // getPostFormPopupIPhone()
+    echo getPostFormPopupIPhone($aThread->host, $aThread->bbs, $aThread->key, $ttitle_en = base64_encode($aThread->ttitle), $aThread->rescount);
 
-    $key_idx = $aThread->keyidx;
 
-    // \x83t\x83H\x81[\x83\x80\x82̃I\x83v\x83V\x83\x87\x83\x93\x93ǂݍ\x9E\x82\xDD
-    require_once P2_IPHONE_LIB_DIR . '/post_options_loader_popup.inc.php';
-
-    // \x83X\x83\x8C\x83b\x83h\x83^\x83C\x83g\x83\x8B\x82̍쐬
-    $htm['resform_ttitle'] = <<<EOP
-<p><b class="thre_title">{$aThread->ttitle_hs}</b></p>
-EOP;
-
-    // \x83t\x83H\x81[\x83\x80\x82̍쐬
-    require_once P2_IPHONE_LIB_DIR . '/post_form_popup.inc.php';
-
-    $sid_q = (defined('SID') && strlen(SID)) ? '&amp;' . hs(SID) : '';
-
-    // \x83v\x83\x8A\x83\x93\x83g
-    echo $htm['post_form'];
-    
-    // }}}
-    
     if ($diedat_msg_ht) {
         //echo '<hr>';
         echo $diedat_msg_ht;
         echo "<p>$motothre_atag</p>";
     }
 }
+
 //echo "<hr>" . P2View::getBackToIndexKATag() . "\n";
-/*
-080726 \x83t\x83b\x83^\x95ύX\x82̂\xBD\x82ߍ폜\x82\xB5\x82\xBD\x82\xE0\x82\xCC
-<ul><li class="group">{$hs['read_range']}</li></ul>
-<div class="panel">
-<div class="row"><label>
-{$goto_ht}\n
-</label>
-</div>
-</div>
-*/
 
-?></body></html><?php
+?>
+</body></html>
+<?php
 
 
 // \x82\xB1\x82̃t\x83@\x83C\x83\x8B\x82ł̏\x88\x97\x9D\x82͂\xB1\x82\xB1\x82܂\xC5

Modified: p2/trunk/iphone/read_header_k.inc.php
===================================================================
--- p2/trunk/iphone/read_header_k.inc.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/iphone/read_header_k.inc.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -229,7 +229,7 @@
     hs($aThread->itaj),
     array('class' => 'button', 'id' => 'backButton')
 );
-$toolbar_back_board_ht = "<p>$atag</p>";
+$toolbar_back_board_ht = "<p>$atag</p>\n";
     
 // }}}
 
@@ -253,7 +253,7 @@
 	<script type="text/javascript" src="iphone/js/setfavjs.js?v=20090428"></script>
 	<script type="text/javascript" src="js/post_form.js?v=201209"></script>
 	<script type="text/javascript" src="js/delelog.js?v=20100127"></script>
-	<script type="text/javascript" src="iphone/js/iphone.js?20130604"></script>
+	<script type="text/javascript" src="iphone/js/iphone.js?20130605"></script>
 	<script type="text/javascript"> 
 	<!-- 
 	window.onload = function() { 
@@ -288,7 +288,7 @@
 	// --> 
 	</script>
 
-	<link rel="stylesheet" type="text/css" href="./iui/read.css?201209">
+	<link rel="stylesheet" type="text/css" href="./iui/read.css?20130605">
 	<title><?php echo $ptitle_ht; ?></title>
 <?php
 
@@ -406,7 +406,7 @@
     ));
 }
 
-echo P2View::getHrHtmlK();
+//echo P2View::getHrHtmlK();
 
 // \x82\xB1\x82̃t\x83@\x83C\x83\x8B\x93\xE0\x82ł̏\x88\x97\x9D\x82͂\xB1\x82\xB1\x82܂\xC5
 
@@ -570,9 +570,6 @@
 
     $form .= sprintf('<select name="ls" action="%s" onChange="formReset()">', hs($_conf['read_php']));
 
-    $rnum_range = $_conf['k_rnum_range'];
-    $before_rnum = max($aThread->resrange['start'] - $rnum_range, 1);
-    
     if (!$read_range_hs) {
         $read_range_hs = "\x83X\x83\x8C\x93\xE0\x88ړ\xAE($aThread->rescount)";
     }

Modified: p2/trunk/iui/read.css
===================================================================
--- p2/trunk/iui/read.css	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/iui/read.css	2013-06-05 06:28:30 UTC (rev 948)
@@ -1,10 +1,12 @@
-/* \x83X\x83\x8C\x96{\x95\xB6\x97p\x82\xCCCSS */
+/* \x83X\x83}\x83z \x83X\x83\x8C\x96{\x95\xB6\x97p\x82\xCCCSS */
 
 /*  
 \x95\\x8E\xA6\x83t\x83H\x83\x93\x83g\x83T\x83C\x83Y\x82͂\xB1\x82\xB1\x82\xCCbody\x82\xF0\x82\xA2\x82\xB6\x82\xC1\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B
 \x83t\x83H\x83\x93\x83g\x83t\x83@\x83~\x83\x8A\x81[\x82\xE0\x82\xB1\x82\xB1\x82ɒlj\xC1\x82\xC5
+\x81iread\x82ł\xCDiui.css\x82͓ǂݍ\x9E\x82܂\xEA\x82Ă\xA2\x82Ȃ\xA2\x81Bread.css\x82\xBE\x82\xAF\x81j
 */
 body{
+	line-height:132%;
 	background-color:#fff;
 	margin: 0;
 	/*
@@ -17,29 +19,56 @@
 	-webkit-text-size-adjust:none;
 }
 
+div, p {
+	margin-right: 5px; margin-left: 5px;
+}
+
 /* \x83X\x83\x8C\x83^\x83C */
-/*  \x90F\x82\xCDconf/conf_user_style.inc.php \x82\xC5 */
-h3 {
-	text-align: left;
-	width: 95%;
-	margin-left: auto;
-	margin-right: auto;
+.thread_title {
+	margin: 9px 5px 9px 5px;
+	color: #f40;
 }
-/* \x96{\x95\xB6\x82\xA0\x82\xBD\x82\xE8 */
-/*  1\x83\x8C\x83X\x82\xB2\x82Ƃ̊Ԋu\x82Ƃ\xA9 */
-div {
-	padding-right: 5px;
-	padding-left: 5px;
-	/*border-top: 1px solid #999999;*/
-	margin-bottom: 10px;
-	padding-top: 5px;
+
+/* \x83\x8C\x83X\x94ԍ\x86\x88ړ\xAE \x83i\x83r\x83Q\x81[\x83V\x83\x87\x83\x93 */
+div#footform {
+	margin: 8px 5px 8px 5px;;
+	/* border-top: 1px solid #999999; */
+	/* padding-top: 5px; */
+	/* padding-right: 5px; padding-left: 5px; */
 }
-/* \x96{\x95\xB6\x92\x86\x82\xCCURL */
-/* \x91΍􂵂\xBD\x82\xA9\x82\xE7\x82\xE0\x82\xA4\x82\xA2\x82\xE7\x82Ȃ\xA2\x82\xA9\x82\xE0 */
-div a { 
+
+hr {
+	margin:1px;
+	border:none;
+	border-top:1px solid #e0e0e0; /* #e0e0e0; */
+	height:1px;
+}
+
+/* \x83\x8C\x83X\x94ԍ\x86 \x96\xBC\x91O \x93\xFA\x95t\x8Ds */
+div.nameline {
+	margin: 1px 0 4px 0px;
+	border-top: 1px solid #e0e0e0;
+	padding: 7px 2px 0 2px;
+	line-height: 100%;
+}
+
+/* \x83\x8C\x83X\x96{\x95\xB6 */
+div.rbody {
+	margin: 3px 2px 9px 3px;
+	padding: 0px 4px 0px 4px;
+}
+
+/* URL \x91΍􂵂\xBD\x82\xA9\x82\xE7\x82\xE0\x82\xA4\x82\xA2\x82\xE7\x82Ȃ\xA2\x82\xA9\x82\xE0 */
+div.footbar a { 
 	max-width: 300px; 
 	display: inline-block; 
-} 
+}
+
+/* read_new_i \x82ł̃X\x83\x8C\x83b\x83h\x83t\x83b\x83^\x95\\x8E\xA6 */
+div.read_new_thre_footer {
+	margin-bottom:3px;
+}
+
 /***********************************************************/
 /* \x83w\x83b\x83_\x81[\x82̃c\x81[\x83\x8B\x83o\x81[ */
 /* @see iui.css */
@@ -295,45 +324,40 @@
 
 
 /********************************************/
-.thread_title{
-	color: #f40;
-}
 
-/*  \x83X\x83\x8C\x93\xE0\x8C\x9F\x8D\xF5 */
-.serch {
+/*  \x83X\x83\x8C\x93\xE0\x83\x8C\x83X\x8C\x9F\x8D\xF5 */
+.rsearch {
 	width: 180px;
 	font-size: 16px;
 }
-.tname {
-	font-weight: bold;
-	font-size: 14px;
+
+/* \x83\x8C\x83X\x94ԍ\x86 */
+span.trnum {
+	color: #333;
+	font-size:15px;
 }
+
 /* \x83X\x83\x8C\x93\xE0\x93\xFA\x8E\x9E\x81A\x96\xBC\x91O\x81A\x82߁[\x82\xE9 */
-div > .tname {
+
+span.tname {
+	font-weight: bold;
 	/* color: #006600; */
 	color: #1144aa;
+	font-size:14px;
 }
-div > .tmail {
-	color: #666666;
+span.tmail {
+	color: #555;
 	font-size:12px;
 }
-div > .tdate {
-	color: #666666;
-	line-height:140%;
+span.tdate {
+	color: #555;
 	font-size:12px;
 }
-div > .sage {
-	color: #aaa;
+font.sage {
+	color: #555;
 	font-size:12px;
 }
 
-hr {
-	margin:1px;
-	border:none;
-	border-top:1px solid #e0e0e0;
-	height:1px;
-}
-
 /* \x83\x8C\x83X\x83|\x83b\x83v\x83A\x83b\x83v */
 dd.respopup{
 	margin:8px 8px;

Modified: p2/trunk/lib/ThreadRead.php
===================================================================
--- p2/trunk/lib/ThreadRead.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/lib/ThreadRead.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -1354,6 +1354,10 @@
         if (UA::isPC()) {
             require_once P2_LIB_DIR . '/ShowThreadPc.php';
             $aShowThread = new ShowThreadPc($this);
+        // \x83X\x83}\x83z
+        } elseif (UA::isIPhoneGroup()) {
+            require_once P2_IPHONE_LIB_DIR . '/ShowThreadK.php';
+            $aShowThread = new ShowThreadK($this);
         // \x8Cg\x91\xD1
         } else {
             require_once P2_LIB_DIR . '/ShowThreadK.php';

Added: p2/trunk/lib/loadPostOptions.func.php
===================================================================
--- p2/trunk/lib/loadPostOptions.func.php	                        (rev 0)
+++ p2/trunk/lib/loadPostOptions.func.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -0,0 +1,281 @@
+<?php
+// p2 - \x83\x8C\x83X\x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80\x82̋@\x94\\x93ǂݍ\x9E\x82\xDD
+// read_footer.inc.php, iphone/read_footer_k.inc.php \x82\xC6 post_form.php, post_form_i.php \x82\xA9\x82\xE7\x8CĂ΂\xEA\x82Ă\xA2\x82\xE9
+// \x81i\x8B\x8C post_options_loader.php, iphone/post_options_loader_popup.php \x82\xA9\x82\xE7\x88ڍs\x93\x9D\x8D\x87\x82\xB5\x82\xBD\x81j
+
+// \x8E\x96\x91O\x95ϐ\x94
+// $host, $bbs, $key
+
+/**
+ * @access  public
+ * @return  void
+ */
+function loadPostOptions($host, $bbs, $key)
+{
+    global $_conf, $STYLE;
+    global $hs, $htm;
+    global $time_for_post, $res_disabled_at, $MESSAGE_hs, $name_size_at, $mail_size_at, $msg_cols_at, $wrap, $on_check_sage, $sage_cb_ht;
+
+    
+    $fake_time = -10; // time \x82\xF010\x95\xAA\x91O\x82ɋU\x91\x95
+    $time_for_post = time() - 9*60*60;
+    $time_for_post = $time_for_post + $fake_time * 60;
+
+    $res_disabled_at = '';
+
+
+    // $resv 'FROM', 'mail', 'MESSAGE, 'subject'
+    $resv = P2Util::getDefaultResValues($host, $bbs, $key);
+
+    //$hs = array_map(create_function('$n', 'return hs($n);'), $resv);
+    $hs = array(
+        'FROM'    => hs($resv['FROM']),
+        'mail'    => hs($resv['mail']),
+        'subject' => hs($resv['subject'])
+    );
+    $MESSAGE_hs = hs($resv['MESSAGE']);
+
+    // \x82\xB1\x82\xEA\x82Ƀ\x8C\x83X
+    $htm['orig_msg'] = _getOrigMsgHtmlAndSetMessageHs(
+        $host, $bbs, $key, geti($_GET['resnum']), geti($_GET['inyou']), $MESSAGE_hs
+    );
+
+
+    // \x95\\x8E\xA6\x8Ew\x92\xE8
+    // \x8EQ\x8Dl \x83N\x83\x89\x83V\x83b\x83N COLS='60' ROWS='8'
+    $mobile = &Net_UserAgent_Mobile::singleton();
+
+    $name_size_at = '';
+    $mail_size_at = '';
+
+    // PC
+    if (UA::isPC()) {
+        $name_size_at = ' size="19"';
+        $mail_size_at = ' size="19"';
+        $msg_cols_at = sprintf(' cols="%d"', $STYLE['post_msg_cols']);
+        $wrap = 'off';
+
+    // willcom
+    // \x92ʏ\xED\x82\xCDPC\x97p\x90ݒ\xE8\x82ɏ\x80\x82\xB6\x82邪\x81A\x8Cg\x91їp\x90ݒ肪\x83Z\x83b\x83g\x82\xB3\x82\xEA\x82Ă\xA2\x82\xEA\x82΁A\x82\xBB\x82\xBF\x82\xE7\x82ɏ\x80\x82\xB6\x82\xE9\x81B
+    } elseif($mobile && $mobile->isWillcom()) {
+        if ($_conf['k_post_msg_cols']) {
+            $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
+        } else {
+            $msg_cols_at = sprintf(' cols="%d"', $STYLE['post_msg_cols']);
+        }
+        // $STYLE['post_msg_rows'] => 10
+        if ($_conf['k_post_msg_rows']) {
+            $STYLE['post_msg_rows'] = (int)$_conf['k_post_msg_rows'];
+        }
+    
+        $wrap = 'soft';
+	
+	} elseif (UA::isIPhoneGroup()) {
+        $msg_cols_at = '';
+        $STYLE['post_msg_rows'] = 5;
+		$wrap = 'soft';
+
+    // \x8Cg\x91\xD1
+    } else {
+		$msg_cols_at = '';
+        if ($_conf['k_post_msg_cols']) {
+            $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
+        }
+        if ($_conf['k_post_msg_rows']) {
+            $STYLE['post_msg_rows'] = (int)$_conf['k_post_msg_rows'];
+        } else {
+            $STYLE['post_msg_rows'] = 5; // \x8Cg\x91їp\x83f\x83t\x83H\x83\x8B\x83g\x92l
+        }
+    
+        $wrap = 'soft';
+    }
+
+    // Be\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
+    $htm['be2ch'] = '';
+    if (P2Util::isHost2chs($host) and P2Util::enableBe2ch()) {
+		if (UA::isIPhoneGroup()) {
+        	$htm['be2ch'] = '<input style="margin-right:16px;" id="submit_beres" name="submit_beres" type="submit" value="BE\x82ŏ\x91\x82\xAB\x8D\x9E\x82\xDE"' . $res_disabled_at . ' onClick="setHiddenValue(this); popUpFootbarFormIPhone(1, 1);"><br>';
+		} else {
+        	$htm['be2ch'] = '\x81@<input id="submit_beres" name="submit_beres" type="submit" value="BE\x82ŏ\x91\x82\xAB\x8D\x9E\x82\xDE"' . $res_disabled_at . ' onClick="setHiddenValue(this);">';
+		}
+    }
+
+    // be\x94‚ł͏\x91\x82\xAB\x8D\x9E\x82݂𖳌\xF8\x82ɂ\xB7\x82\xE9
+    $htm['title_need_be'] = '';
+    if (P2Util::isBbsBe2chNet($host, $bbs)) {
+        // \x82\xE2\x82\xC1\x82ς薳\x8C\xF8\x82ɂ\xB5\x82Ȃ\xA2\x81B\x8F\x91\x82\xAB\x8D\x9E\x82ݎ\xB8\x94s\x8E\x9E\x82ɁA2ch\x91\xA4\x82\xC5Be\x83\x8D\x83O\x83C\x83\x93\x82ւ̗U\x93\xB1\x82\xAA\x82\xA0\x82\xE9\x82̂ŁB
+        //$res_disabled_at = ' disabled';
+        if (P2Util::enableBe2ch()) {
+            $htm['title_need_be'] = ' title="Be\x94‚ɂ‚\xAB\x81A\x8E\xA9\x93\xAEBe\x8F\x91\x82\xAB\x8D\x9E\x82݂\xB5\x82܂\xB7"';
+        } else {
+            $htm['title_need_be'] = ' title="\x8F\x91\x82\xAB\x8D\x9E\x82ނɂ\xCDBe\x83\x8D\x83O\x83C\x83\x93\x82\xAA\x95K\x97v\x82ł\xB7"';
+        }
+    }
+
+
+    // sage checkbox
+    $on_check_sage = '';
+    $sage_cb_ht = '';
+    if (UA::isPC() || UA::isIPhoneGroup()) {
+        $on_check_sage = ' onChange="checkSage();"';
+        $sage_cb_ht = '<input id="sage" type="checkbox" onClick="mailSage();">';
+		if (UA::isPC()) {
+			$sage_cb_ht .= '<label for="sage">sage</label><br>';
+		}
+    }
+
+    // 2ch\x81\x9C\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
+    $htm['maru_kakiko'] = _getMaruKakikoHtml($host);
+
+    // \x83\\x81[\x83X\x83R\x81[\x83h\x95␳\x97p\x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X
+    $htm['src_fix'] = _getSrcFixHtml($host);
+
+    /*
+    // {{{ \x96{\x95\xB6\x82\xAA\x8B\xF3\x82̂Ƃ\xAB\x82\xE2sage\x82ĂȂ\xA2\x82Ƃ\xAB\x82ɑ\x97\x90M\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƒ\x8D\x88ӂ\xB7\x82\xE9
+
+    $onsubmit_ht = '';
+
+    if (UA::isPC() || UA::isIPhoneGroup()) {
+        if ($_exconf['editor']['check_message'] || $_exconf['editor']['check_sage']) {
+            $check_message = (int)$_exconf['editor']['check_message'];
+            $check_sage = (int)$_exconf['editor']['check_sage'];
+            $onsubmit_ht = " onsubmit=\"return validateAll({$check_message},{$check_sage})\"";
+        }
+    }
+
+    // }}}
+    */
+}
+
+//==================================================================================
+// \x8A֐\x94\x81i\x82\xB1\x82̃t\x83@\x83C\x83\x8B\x93\xE0\x82݂̂ŗ\x98\x97p\x81j
+//==================================================================================
+/**
+ * \x82\xB1\x82\xEA\x82Ƀ\x8C\x83X
+ *
+ * @return  string  HTML
+ */
+function _getOrigMsgHtmlAndSetMessageHs($host, $bbs, $key, $resnum, $inyou, &$MESSAGE_hs)
+{
+    global $_conf;
+    
+    $orig_msg_ht = '';
+    
+    // inyou:1 \x88\xF8\x97p
+    // inyou:2 \x83v\x83\x8C\x83r\x83\x85\x81[
+    // inyou:3 \x88\xF8\x97p\x81{\x83v\x83\x8C\x83r\x83\x85\x81[
+    if ((in_array(basename($_SERVER['SCRIPT_NAME']), array('post_form.php', 'post_form_i.php')) || $inyou) && $resnum) {
+        if (!($inyou == 2 && strlen($MESSAGE_hs))) {
+            $MESSAGE_hs = '&gt;&gt;' . $resnum . "\r\n";
+        }
+        if (!empty($inyou)) {
+            $q_resar = _getExplodedDatLine($host, $bbs, $key, $resnum);
+            $prvwMsgHtml = _getPrvwMsgHtml($q_resar[3]);
+            if ($inyou == 1 || $inyou == 3) {
+                // \x88\xF8\x97p\x83\x8C\x83X\x94ԍ\x86\x82\xAA\x82ł\xAB\x82Ă\xB5\x82܂\xED\x82Ȃ\xA2\x82悤\x82ɁA\x93\xF1\x82‚̔\xBC\x8Ap\x83X\x83y\x81[\x83X\x82\xF0\x93\xFC\x82\xEA\x82Ă\xA2\x82\xE9
+                $MESSAGE_hs .= '&gt;  ';
+                $MESSAGE_hs .= preg_replace('/ *<br> ?/', "\r\n&gt;  ", $prvwMsgHtml);
+                $MESSAGE_hs .= "\r\n";
+            }
+            if ($inyou == 2 || $inyou == 3) {
+                // <table border="0" cellpadding="0" cellspacing="0"><tr><td>
+                $orig_msg_ht = <<<EOM
+<blockquote id="original_msg">
+	<div>
+		<span class="prvw_resnum">{$resnum}</span>
+		\x81F<b class="prvw_name">{$q_resar[0]}</b>
+		\x81F<span class="prvw_mail">{$q_resar[1]}</span>
+		\x81F<span class="prvw_dateid">{$q_resar[2]}</span>
+	<br>
+	<div class="prvw_msg">{$prvwMsgHtml}</div>
+</blockquote>
+EOM;
+                // </td></tr></table>
+            }
+        }
+    }
+    return $orig_msg_ht;
+}
+
+/**
+ * @return  array
+ */
+function _getExplodedDatLine($host, $bbs, $key, $resnum)
+{
+    require_once P2_LIB_DIR . '/Thread.php';
+    require_once P2_LIB_DIR . '/ThreadRead.php';
+    $ThreadRead = new ThreadRead;
+    $ThreadRead->setThreadPathInfo($host, $bbs, $key);
+    $ThreadRead->readDat($ThreadRead->keydat);
+    $explodedDatLine = $ThreadRead->explodeDatLine($ThreadRead->datlines[$resnum - 1]);
+    return array_map('trim', $explodedDatLine);
+}
+
+/**
+ * \x88\xF8\x97p\x83\x81\x83b\x83Z\x81[\x83W\x82̂\xBD\x82߂\xCCHTML
+ *
+ * @return  string  HTML
+ */
+function _getPrvwMsgHtml($datMsg)
+{
+    // transMsg(), removeResAnchorTagInDat()
+    $datMsg = str_replace('<br>', "\n", $datMsg);
+    $datMsg = strip_tags($datMsg);
+    $datMsg = str_replace("\n", '<br>', $datMsg);
+    return $datMsg;
+}
+
+/**
+ * 2ch\x81\x9C\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
+ *
+ * @return  string  HTML
+ */
+function _getMaruKakikoHtml($host)
+{
+    global $_conf;
+    
+    $maru_kakiko_ht = '';
+    
+    if (P2Util::isHost2chs($host) and file_exists($_conf['sid2ch_php'])) {
+        $maru_kakiko_ht = sprintf(
+			UA::isIPhoneGroup()
+				? '<span title="2ch\x81\x9CID\x82̎g\x97p">2ch\x81\x9CID: <input id="maru_kakiko" name="maru_kakiko" type="checkbox" value="1"%s></span>'
+				:'<span title="2ch\x81\x9CID\x82̎g\x97p"><input id="maru_kakiko" name="maru_kakiko" type="checkbox" value="1"%s><label for="maru_kakiko">\x81\x9C</label></span>',
+            $_conf['maru_kakiko'] ? ' checked' : ''
+        );
+    }
+    return $maru_kakiko_ht;
+}
+
+/**
+ * \x83\\x81[\x83X\x83R\x81[\x83h\x95␳\x97p\x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X
+ *
+ * @return  string  HTML
+ */
+function _getSrcFixHtml($host)
+{
+    global $_conf;
+    
+    $src_fix_ht = '';
+    
+    if (UA::isPC() || UA::isIPhoneGroup()) {
+        if (
+            $_conf['editor_srcfix'] == 1
+            or $_conf['editor_srcfix'] == 2 && preg_match('/pc\d+\.2ch\.net/', $host)
+        ) {
+            $src_fix_ht = '<input type="checkbox" id="fix_source" name="fix_source" value="1"><label for="fix_source">\x83\\x81[\x83X\x83R\x81[\x83h\x95␳</label>';
+        }
+    }
+    return $src_fix_ht;
+}
+
+/*
+ * 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: p2/trunk/lib/post_form.inc.php
===================================================================
--- p2/trunk/lib/post_form.inc.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/lib/post_form.inc.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -3,6 +3,8 @@
  *  p2 \x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80
  */
 
+$csrfid = P2Util::getCsrfId();
+
 // \x8Cg\x91\xD1
 if (UA::isK()) {
     $htm['k_br'] = '<br>';
@@ -40,7 +42,7 @@
     
     <input type="hidden" name="bbs" value="{$bbs}">
     <input type="hidden" name="key" value="{$key}">
-    <input type="hidden" name="time" value="{$time}">
+    <input type="hidden" name="time" value="{$time_for_post}">
     
     <input type="hidden" name="host" value="{$host}">
     <input type="hidden" name="popup" value="{$popup_hs}">

Modified: p2/trunk/lib/post_options_loader.inc.php
===================================================================
--- p2/trunk/lib/post_options_loader.inc.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/lib/post_options_loader.inc.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -1,132 +1,154 @@
 <?php
-/* vim: set fileencoding=cp932 autoindent noexpandtab ts=4 sw=4 sts=0: */
-/* mi: charset=Shift_JIS */
+// 2013/06/05 loadPostOptions.php \x82Ɉڍs\x93\x9D\x8D\x87\x82\xB5\x82Ĕp\x8E~
 
 // p2 - \x83\x8C\x83X\x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80\x82̋@\x94\\x93ǂݍ\x9E\x82\xDD
-// read_footer.inc.php \x82\xC6 post_form.php \x82\xA9\x82\xE7\x8CĂ΂\xEA\x82Ă\xA2\x82\xE9
+// read_footer.inc.php \x82\xC6 post_form.php, post_form_i.php \x82\xA9\x82\xE7\x8CĂ΂\xEA\x82Ă\xA2\x82\xE9
 
 // \x8E\x96\x91O\x95ϐ\x94
 // $host, $bbs, $key ($rescount, $popup, $ttitle_en)
 
-$fake_time = -10; // time \x82\xF010\x95\xAA\x91O\x82ɋU\x91\x95
-$time = time() - 9*60*60;
-$time = $time + $fake_time * 60;
+// post_options_loader($host, $bbs, $key);
 
-$csrfid = P2Util::getCsrfId();
+/**
+ * @access  public
+ * @return  void
+ */
+function post_options_loader($host, $bbs, $key)
+{
+    global $_conf, $STYLE;
+    global $hs, $htm;
+    global $time_for_post, $res_disabled_at, $MESSAGE_hs, $name_size_at, $mail_size_at, $msg_cols_at, $wrap, $on_check_sage, $sage_cb_ht;
 
-$res_disabled_at = '';
 
-// $resv 'FROM', 'mail', 'MESSAGE, 'subject'
-$resv = P2Util::getDefaultResValues($host, $bbs, $key);
+    $fake_time = -10; // time \x82\xF010\x95\xAA\x91O\x82ɋU\x91\x95
+    $time_for_post = time() - 9*60*60;
+    $time_for_post = $time_for_post + $fake_time * 60;
 
-//$hs = array_map(create_function('$n', 'return hs($n);'), $resv);
-$hs = array(
-    'FROM'    => hs($resv['FROM']),
-    'mail'    => hs($resv['mail']),
-    'subject' => hs($resv['subject'])
-);
-$MESSAGE_hs = hs($resv['MESSAGE']);
+    $res_disabled_at = '';
 
-// \x82\xB1\x82\xEA\x82Ƀ\x8C\x83X
-$htm['orig_msg'] = _getOrigMsgHtmlAndSetMessageHs(
-    $host, $bbs, $key, geti($_GET['resnum']), geti($_GET['inyou']), $MESSAGE_hs
-);
+    // $resv 'FROM', 'mail', 'MESSAGE, 'subject'
+    $resv = P2Util::getDefaultResValues($host, $bbs, $key);
 
+    //$hs = array_map(create_function('$n', 'return hs($n);'), $resv);
+    $hs = array(
+        'FROM'    => hs($resv['FROM']),
+        'mail'    => hs($resv['mail']),
+        'subject' => hs($resv['subject'])
+    );
+    $MESSAGE_hs = hs($resv['MESSAGE']);
 
-// \x95\\x8E\xA6\x8Ew\x92\xE8
-// \x8EQ\x8Dl \x83N\x83\x89\x83V\x83b\x83N COLS='60' ROWS='8'
-$mobile = &Net_UserAgent_Mobile::singleton();
+    // \x82\xB1\x82\xEA\x82Ƀ\x8C\x83X
+    $htm['orig_msg'] = _getOrigMsgHtmlAndSetMessageHs(
+        $host, $bbs, $key, geti($_GET['resnum']), geti($_GET['inyou']), $MESSAGE_hs
+    );
 
-$name_size_at = '';
-$mail_size_at = '';
 
-// PC
-if (UA::isPC()) {
-    $name_size_at = ' size="19"';
-    $mail_size_at = ' size="19"';
-    $msg_cols_at = sprintf(' cols="%d"', $STYLE['post_msg_cols']);
-    $wrap = 'off';
+    // \x95\\x8E\xA6\x8Ew\x92\xE8
+    // \x8EQ\x8Dl \x83N\x83\x89\x83V\x83b\x83N COLS='60' ROWS='8'
+    $mobile = &Net_UserAgent_Mobile::singleton();
 
-// willcom
-// \x92ʏ\xED\x82\xCDPC\x97p\x90ݒ\xE8\x82ɏ\x80\x82\xB6\x82邪\x81A\x8Cg\x91їp\x90ݒ肪\x83Z\x83b\x83g\x82\xB3\x82\xEA\x82Ă\xA2\x82\xEA\x82΁A\x82\xBB\x82\xBF\x82\xE7\x82ɏ\x80\x82\xB6\x82\xE9\x81B
-} elseif($mobile && $mobile->isWillcom()) {
-    if ($_conf['k_post_msg_cols']) {
-        $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
-    } else {
+    $name_size_at = '';
+    $mail_size_at = '';
+
+    // PC
+    if (UA::isPC()) {
+        $name_size_at = ' size="19"';
+        $mail_size_at = ' size="19"';
         $msg_cols_at = sprintf(' cols="%d"', $STYLE['post_msg_cols']);
-    }
-    // $STYLE['post_msg_rows'] => 10
-    if ($_conf['k_post_msg_rows']) {
-        $STYLE['post_msg_rows'] = (int)$_conf['k_post_msg_rows'];
-    }
+        $wrap = 'off';
+
+    // willcom
+    // \x92ʏ\xED\x82\xCDPC\x97p\x90ݒ\xE8\x82ɏ\x80\x82\xB6\x82邪\x81A\x8Cg\x91їp\x90ݒ肪\x83Z\x83b\x83g\x82\xB3\x82\xEA\x82Ă\xA2\x82\xEA\x82΁A\x82\xBB\x82\xBF\x82\xE7\x82ɏ\x80\x82\xB6\x82\xE9\x81B
+    } elseif($mobile && $mobile->isWillcom()) {
+        if ($_conf['k_post_msg_cols']) {
+            $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
+        } else {
+            $msg_cols_at = sprintf(' cols="%d"', $STYLE['post_msg_cols']);
+        }
+        // $STYLE['post_msg_rows'] => 10
+        if ($_conf['k_post_msg_rows']) {
+            $STYLE['post_msg_rows'] = (int)$_conf['k_post_msg_rows'];
+        }
     
-    $wrap = 'soft';
+        $wrap = 'soft';
+	
+	} elseif (UA::isIPhoneGroup()) {
+        $msg_cols_at = '';
+        $STYLE['post_msg_rows'] = 5;
+		$wrap = 'soft';
 
-// \x8Cg\x91\xD1
-} else {
-    if ($_conf['k_post_msg_cols']) {
-        $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
+    // \x8Cg\x91\xD1
     } else {
-        $msg_cols_at = '';
+		$msg_cols_at = '';
+        if ($_conf['k_post_msg_cols']) {
+            $msg_cols_at = sprintf(' cols="%d"', $_conf['k_post_msg_cols']);
+        }
+        if ($_conf['k_post_msg_rows']) {
+            $STYLE['post_msg_rows'] = (int)$_conf['k_post_msg_rows'];
+        } else {
+            $STYLE['post_msg_rows'] = 5; // \x8Cg\x91їp\x83f\x83t\x83H\x83\x8B\x83g\x92l
+        }
+    
+        $wrap = 'soft';
     }
-    if ($_conf['k_post_msg_rows']) {
-        $STYLE['post_msg_rows'] = (int)$_conf['k_post_msg_rows'];
-    } else {
-        $STYLE['post_msg_rows'] = 5; // \x8Cg\x91їp\x83f\x83t\x83H\x83\x8B\x83g\x92l
+
+    // Be\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
+    $htm['be2ch'] = '';
+    if (P2Util::isHost2chs($host) and P2Util::enableBe2ch()) {
+		if (UA::isIPhoneGroup()) {
+        	$htm['be2ch'] = '<input style="margin-right:16px;" id="submit_beres" type="submit" name="submit_beres" value="BE\x82ŏ\x91\x82\xAB\x8D\x9E\x82\xDE" onClick="setHiddenValue(this); popUpFootbarFormIPhone(1, 1);"><br>';
+		} else {
+        	$htm['be2ch'] = '\x81@<input id="submit_beres" type="submit" name="submit_beres" value="BE\x82ŏ\x91\x82\xAB\x8D\x9E\x82\xDE"' . $res_disabled_at . ' onClick="setHiddenValue(this);">';
+		}
     }
-    
-    $wrap = 'soft';
-}
 
-// Be\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
-$htm['be2ch'] = '';
-if (P2Util::isHost2chs($host) and P2Util::enableBe2ch()) {
-    $htm['be2ch'] = '\x81@<input id="submit_beres" type="submit" name="submit_beres" value="BE\x82ŏ\x91\x82\xAB\x8D\x9E\x82\xDE" onClick="setHiddenValue(this);">';
-}
-
-// be\x94‚ł͏\x91\x82\xAB\x8D\x9E\x82݂𖳌\xF8\x82ɂ\xB7\x82\xE9
-$htm['title_need_be'] = '';
-if (P2Util::isBbsBe2chNet($host, $bbs)) {
-    // \x82\xE2\x82\xC1\x82ς薳\x8C\xF8\x82ɂ\xB5\x82Ȃ\xA2\x81B\x8F\x91\x82\xAB\x8D\x9E\x82ݎ\xB8\x94s\x8E\x9E\x82ɁA2ch\x91\xA4\x82\xC5Be\x83\x8D\x83O\x83C\x83\x93\x82ւ̗U\x93\xB1\x82\xAA\x82\xA0\x82\xE9\x82̂ŁB
-    //$res_disabled_at = ' disabled';
-    if (P2Util::enableBe2ch()) {
-        $htm['title_need_be'] = ' title="Be\x94‚ɂ‚\xAB\x81A\x8E\xA9\x93\xAEBe\x8F\x91\x82\xAB\x8D\x9E\x82݂\xB5\x82܂\xB7"';
-    } else {
-        $htm['title_need_be'] = ' title="\x8F\x91\x82\xAB\x8D\x9E\x82ނɂ\xCDBe\x83\x8D\x83O\x83C\x83\x93\x82\xAA\x95K\x97v\x82ł\xB7"';
+    // be\x94‚ł͏\x91\x82\xAB\x8D\x9E\x82݂𖳌\xF8\x82ɂ\xB7\x82\xE9
+    $htm['title_need_be'] = '';
+    if (P2Util::isBbsBe2chNet($host, $bbs)) {
+        // \x82\xE2\x82\xC1\x82ς薳\x8C\xF8\x82ɂ\xB5\x82Ȃ\xA2\x81B\x8F\x91\x82\xAB\x8D\x9E\x82ݎ\xB8\x94s\x8E\x9E\x82ɁA2ch\x91\xA4\x82\xC5Be\x83\x8D\x83O\x83C\x83\x93\x82ւ̗U\x93\xB1\x82\xAA\x82\xA0\x82\xE9\x82̂ŁB
+        //$res_disabled_at = ' disabled';
+        if (P2Util::enableBe2ch()) {
+            $htm['title_need_be'] = ' title="Be\x94‚ɂ‚\xAB\x81A\x8E\xA9\x93\xAEBe\x8F\x91\x82\xAB\x8D\x9E\x82݂\xB5\x82܂\xB7"';
+        } else {
+            $htm['title_need_be'] = ' title="\x8F\x91\x82\xAB\x8D\x9E\x82ނɂ\xCDBe\x83\x8D\x83O\x83C\x83\x93\x82\xAA\x95K\x97v\x82ł\xB7"';
+        }
     }
-}
 
 
-// sage checkbox
-$on_check_sage = '';
-$sage_cb_ht = '';
-if (UA::isPC() || UA::isIPhoneGroup()) {
-    $on_check_sage = ' onChange="checkSage();"';
-    $sage_cb_ht = '<input id="sage" type="checkbox" onClick="mailSage();"><label for="sage">sage</label><br>';
-}
+    // sage checkbox
+    $on_check_sage = '';
+    $sage_cb_ht = '';
+    if (UA::isPC() || UA::isIPhoneGroup()) {
+        $on_check_sage = ' onChange="checkSage();"';
+        $sage_cb_ht = '<input id="sage" type="checkbox" onClick="mailSage();">';
+		if (UA::isPC()) {
+			$sage_cb_ht .= '<label for="sage">sage</label><br>';
+		}
+    }
 
-// 2ch\x81\x9C\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
-$htm['maru_kakiko'] = _getMaruKakikoHtml($host);
+    // 2ch\x81\x9C\x8F\x91\x82\xAB\x8D\x9E\x82\xDD
+    $htm['maru_kakiko'] = _getMaruKakikoHtml($host);
 
-// \x83\\x81[\x83X\x83R\x81[\x83h\x95␳\x97p\x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X
-$htm['src_fix'] = _getSrcFixHtml($host);
+    // \x83\\x81[\x83X\x83R\x81[\x83h\x95␳\x97p\x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X
+    $htm['src_fix'] = _getSrcFixHtml($host);
 
-/*
-// {{{ \x96{\x95\xB6\x82\xAA\x8B\xF3\x82̂Ƃ\xAB\x82\xE2sage\x82ĂȂ\xA2\x82Ƃ\xAB\x82ɑ\x97\x90M\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƒ\x8D\x88ӂ\xB7\x82\xE9
+    /*
+    // {{{ \x96{\x95\xB6\x82\xAA\x8B\xF3\x82̂Ƃ\xAB\x82\xE2sage\x82ĂȂ\xA2\x82Ƃ\xAB\x82ɑ\x97\x90M\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƒ\x8D\x88ӂ\xB7\x82\xE9
 
-$onsubmit_ht = '';
+    $onsubmit_ht = '';
 
-if (UA::isPC() || UA::isIPhoneGroup()) {
-    if ($_exconf['editor']['check_message'] || $_exconf['editor']['check_sage']) {
-        $_check_message = (int) $_exconf['editor']['check_message'];
-        $_check_sage = (int) $_exconf['editor']['check_sage'];
-        $onsubmit_ht = " onsubmit=\"return validateAll({$_check_message},{$_check_sage})\"";
+    if (UA::isPC() || UA::isIPhoneGroup()) {
+        if ($_exconf['editor']['check_message'] || $_exconf['editor']['check_sage']) {
+            $check_message = (int)$_exconf['editor']['check_message'];
+            $check_sage = (int)$_exconf['editor']['check_sage'];
+            $onsubmit_ht = " onsubmit=\"return validateAll({$check_message},{$check_sage})\"";
+        }
     }
+
+    // }}}
+    */
 }
 
-// }}}
-*/
-
 //==================================================================================
 // \x8A֐\x94\x81i\x82\xB1\x82̃t\x83@\x83C\x83\x8B\x93\xE0\x82݂̂ŗ\x98\x97p\x81j
 //==================================================================================
@@ -144,7 +166,7 @@
     // inyou:1 \x88\xF8\x97p
     // inyou:2 \x83v\x83\x8C\x83r\x83\x85\x81[
     // inyou:3 \x88\xF8\x97p\x81{\x83v\x83\x8C\x83r\x83\x85\x81[
-    if ((basename($_SERVER['SCRIPT_NAME']) == 'post_form.php' || $inyou) && $resnum) {
+    if ((in_array(basename($_SERVER['SCRIPT_NAME']), array('post_form.php', 'post_form_i.php')) || $inyou) && $resnum) {
         if (!($inyou == 2 && strlen($MESSAGE_hs))) {
             $MESSAGE_hs = '&gt;&gt;' . $resnum . "\r\n";
         }
@@ -218,7 +240,9 @@
     
     if (P2Util::isHost2chs($host) and file_exists($_conf['sid2ch_php'])) {
         $maru_kakiko_ht = sprintf(
-            '<span title="2ch\x81\x9CID\x82̎g\x97p"><input id="maru_kakiko" name="maru_kakiko" type="checkbox" value="1"%s><label for="maru_kakiko">\x81\x9C</label></span>',
+			UA::isIPhoneGroup()
+				? '<span title="2ch\x81\x9CID\x82̎g\x97p">2ch\x81\x9CID: <input id="maru_kakiko" name="maru_kakiko" type="checkbox" value="1"%s></span>'
+				:'<span title="2ch\x81\x9CID\x82̎g\x97p"><input id="maru_kakiko" name="maru_kakiko" type="checkbox" value="1"%s><label for="maru_kakiko">\x81\x9C</label></span>',
             $_conf['maru_kakiko'] ? ' checked' : ''
         );
     }

Modified: p2/trunk/lib/read_footer.inc.php
===================================================================
--- p2/trunk/lib/read_footer.inc.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/lib/read_footer.inc.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -23,7 +23,8 @@
     $submit_value = '\x8F\x91\x82\xAB\x8D\x9E\x82\xDE';
 
     // \x83t\x83H\x81[\x83\x80\x82̃I\x83v\x83V\x83\x87\x83\x93\x93ǂݍ\x9E\x82\xDD
-    require_once P2_LIB_DIR . '/post_options_loader.inc.php';
+    require_once P2_LIB_DIR . '/loadPostOptions.func.php';
+    loadPostOptions($host, $bbs, $key);
 
     $htm['resform_ttitle'] = sprintf(
         '<div style="padding:4px 0px;"><b class="thre_title">%s </b></div>',
@@ -113,11 +114,14 @@
     }
 
     // DAT\x97e\x97\xCA
+    $datsize_ht = '';
+    /*
     $datsize_ht = sprintf('<span class="datsize" style="white-space: nowrap;" title="DAT\x97e\x97\xCA">%s</span>', P2Util::getTranslatedUnitFileSize($aThread->getDatBytesFromLocalDat(false), 'KB'));
     // 500KB\x88ȏ\xE3\x82ŋ\xAD\x92\xB2\x95\\x8E\xA6
     if ($datsize / 1024 >= 500) {
         $datsize_ht = '<b>' . $datsize_ht . '</b>';
     }
+    */
     
     // {{{ \x83t\x83B\x83\x8B\x83^\x83q\x83b\x83g\x82\xAA\x82\xA0\x82\xC1\x82\xBD\x8Fꍇ\x81A\x8E\x9FX\x82Ƒ\xB1\x82\xAB\x82\xF0\x93ǂނ\xF0\x8DX\x90V\x82\xB7\x82\xE9
     

Modified: p2/trunk/lib/sb_print.inc.php
===================================================================
--- p2/trunk/lib/sb_print.inc.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/lib/sb_print.inc.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -15,7 +15,7 @@
     $GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('sb_print()');
     
     if (!$aThreadList->threads) {
-        echo '<tr><td>\x81@\x8AY\x93\x96\x83T\x83u\x83W\x83F\x83N\x83g\x82͂Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</td></tr>';
+        echo '<tr><td>\x81@\x8AY\x93\x96\x83X\x83\x8C\x82͂Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</td></tr>';
         $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('sb_print()');
         return;
     }

Modified: p2/trunk/lib/sb_print_k.func.php
===================================================================
--- p2/trunk/lib/sb_print_k.func.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/lib/sb_print_k.func.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -14,17 +14,17 @@
     global $sb_view;
     
     if (!$aThreadList->threads) {
-        if ($aThreadList->spmode == 'fav' && $sb_view == 'shinchaku') {
+        if ($sb_view == 'shinchaku') {
             if (UA::isIPhoneGroup()) {
-                ?><p>\x82\xA8\x8BC\x82ɃX\x83\x8C\x82ɐV\x92\x85\x82Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</p><?php
+                ?><p>\x83X\x83\x8C\x82ɐV\x92\x85\x82Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</p><?php
             } else {
-                ?><p>\x82\xA8\x8BC\x82ɽڂɐV\x92\x85\x82Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</p><?php
+                ?><p>\xBDڂɐV\x92\x85\x82Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</p><?php
             }
         } else {
             if (UA::isIPhoneGroup()) {
-                ?><p>\x8AY\x93\x96\x83T\x83u\x83W\x83F\x83N\x83g\x82͂Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</p><?php
+                ?><p>\x8AY\x93\x96\x83X\x83\x8C\x82͂Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</p><?php
             } else {
-                ?><p>\x8AY\x93\x96\xBB\xCC޼ު\xB8Ă͂Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</p><?php
+                ?><p>\x8AY\x93\x96\xBDڂ͂Ȃ\xA9\x82\xC1\x82\xBD\x82\xDB</p><?php
             }
         }
         return;

Modified: p2/trunk/lib/sb_toolbar_k.funcs.php
===================================================================
--- p2/trunk/lib/sb_toolbar_k.funcs.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/lib/sb_toolbar_k.funcs.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -8,6 +8,7 @@
 /**
  * \x90V\x92\x85\x82܂Ƃߓǂ\xDD <a>
  *
+ * @access  public
  * @return  string  HTML
  */
 function getShinchakuMatomeATag($aThreadList, $shinchaku_num)

Modified: p2/trunk/post_form.php
===================================================================
--- p2/trunk/post_form.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/post_form.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -33,8 +33,9 @@
     p2die('\x95s\x90\xB3\x82Ȉ\xF8\x90\x94\x82ł\xB7');
 }
 
-// \x83t\x83H\x81[\x83\x80\x82̃I\x83v\x83V\x83\x87\x83\x93\x93ǂݍ\x9E\x82\xDD
-require_once P2_LIB_DIR . '/post_options_loader.inc.php';
+// \x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80\x82̃I\x83v\x83V\x83\x87\x83\x93\x93ǂݍ\x9E\x82\xDD
+require_once P2_LIB_DIR . '/loadPostOptions.func.php';
+loadPostOptions($host, $bbs, $key);
 
 // \x95\\x8E\xA6\x8Ew\x92\xE8
 

Modified: p2/trunk/post_form_i.php
===================================================================
--- p2/trunk/post_form_i.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/post_form_i.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -38,10 +38,10 @@
     p2die('\x95s\x90\xB3\x82Ȉ\xF8\x90\x94\x82ł\xB7');
 }
 
-$keyidx = P2Util::getKeyIdxFilePath($host, $bbs, $key);
 
-// \x83t\x83H\x81[\x83\x80\x82̃I\x83v\x83V\x83\x87\x83\x93\x93ǂݍ\x9E\x82\xDD
-require_once P2_LIB_DIR . '/post_options_loader.inc.php';
+// \x8F\x91\x82\xAB\x8D\x9E\x82݃t\x83H\x81[\x83\x80\x82̃I\x83v\x83V\x83\x87\x83\x93\x93ǂݍ\x9E\x82\xDD
+require_once P2_LIB_DIR . '/loadPostOptions.func.php';
+loadPostOptions($host, $bbs, $key);
 
 // \x95\\x8E\xA6\x8Ew\x92\xE8
 $class_ttitle = '';
@@ -106,7 +106,7 @@
 //==========================================================
 // HTML \x95\\x8E\xA6\x8Fo\x97\xCD
 //==========================================================
-if (!$_conf['ktai']) {
+if (UA::isPC() || UA::isIPhoneGroup()) {
     $body_on_load = <<<EOP
  onLoad="setFocus('MESSAGE'); checkSage();"
 EOP;
@@ -130,14 +130,14 @@
 </script> 
 <title>{$ptitle}</title>\n
 EOHEADER;
-if (!$_conf['ktai']) {
+if (!UA::isK()) {
     P2View::printIncludeCssHtml('style');
     P2View::printIncludeCssHtml('post');
-    ?>
-    <script type="text/javascript" src="js/basic.js?2012"></script>
-    <script type="text/javascript" src="js/post_form.js?v=201209"></script>
-    <?php
 }
+if (UA::isPC() || UA::isIPhoneGroup()) {
+?><script type="text/javascript" src="js/basic.js?2012"></script><?php
+?><script type="text/javascript" src="js/post_form.js?v=201209"></script><?php
+}
 echo <<<EOP
 </head>
 <body{$body_on_load}>\n

Modified: p2/trunk/read_filter_i.php
===================================================================
--- p2/trunk/read_filter_i.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/read_filter_i.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -98,13 +98,13 @@
 <input type="hidden" name="key" value="{$key}">
 <input type="hidden" name="ls" value="all">
 <input type="hidden" name="offline" value="1">
-<input class="serch" id="word" name="word">
+<input class="rsearch" id="word" name="word">
 <input class="whitebutton" type="submit" name="s1" value="\x8C\x9F\x8D\xF5">
 </filedset>
 <br>
 <h2>\x8C\x9F\x8D\xF5\x83I\x83v\x83V\x83\x87\x83\x93</h2>
 <filedset>
-<select class="serch" id="field" name="field">
+<select class="rsearch" id="field" name="field">
  <option value="whole"{$field['whole']}>\x91S\x91\xCC</option>
  <option value="msg"{$field['msg']}>\x83\x81\x83b\x83Z\x81[\x83W</option>
  <option value="name"{$field['name']}>\x96\xBC\x91O</option>
@@ -114,14 +114,14 @@
  <!-- <option value="belv"{$field['belv']}>\x83|\x83C\x83\x93\x83g</option> -->
 </select>
 \x82\xC9
-<select class="serch" id="method" name="method">
+<select class="rsearch" id="method" name="method">
  <option value="or"{$method['or']}>\x82\xA2\x82\xB8\x82ꂩ</option>
  <option value="and"{$method['and']}>\x82\xB7\x82ׂ\xC4</option>
  <option value="just"{$method['just']}>\x82\xBB\x82̂܂\xDC</option>
  <option value="regex"{$method['regex']}>\x90\xB3\x8BK\x95\\x8C\xBB</option>
 </select>
 \x82\xF0
-<select class="serch" id="match" name="match">
+<select class="rsearch" id="match" name="match">
  <option value="on"{$match['on']}>\x8A܂\xDE</option>
  <option value="off"{$match['off']}>\x8A܂܂Ȃ\xA2</option>
 </select><br>

Modified: p2/trunk/read_new_i.php
===================================================================
--- p2/trunk/read_new_i.php	2013-06-04 09:06:33 UTC (rev 947)
+++ p2/trunk/read_new_i.php	2013-06-05 06:28:30 UTC (rev 948)
@@ -201,7 +201,7 @@
 	}
 	// --> 
 	</script>
-<link rel="stylesheet" type="text/css" href="./iui/read.css?201209"> 
+<link rel="stylesheet" type="text/css" href="./iui/read.css?2013"> 
 <?php
 
 echo "<title>{$ptitle_ht}</title>";
@@ -435,8 +435,7 @@
     }
     
     $read_header_ht = <<<EOP
-	<p id="ntt{$_newthre_num}" name="ntt{$_newthre_num}"><font color="{$STYLE['read_k_thread_title_color']}"><b>{$ttitle_hs}</b></font>{$read_header_itaj_ht} {$next_thre_ht}</p>
-	$hr\n
+	<p id="ntt{$_newthre_num}" name="ntt{$_newthre_num}"><font color="{$STYLE['read_k_thread_title_color']}"><b>{$ttitle_hs}</b></font>{$read_header_itaj_ht} {$next_thre_ht}</p>\n
 EOP;
 
     // {{{ \x83\x8D\x81[\x83J\x83\x8BDat\x82\xF0\x93ǂݍ\x9E\x82\xF1\x82\xC5HTML\x95\\x8E\xA6
@@ -520,7 +519,7 @@
     $read_atag = _getReadATag($aThread);
     
     $read_footer_ht = <<<EOP
-		<div id="ntt_bt{$_newthre_num}" name="ntt_bt{$_newthre_num}">
+		<div class="read_new_thre_footer" id="ntt_bt{$_newthre_num}" name="ntt_bt{$_newthre_num}">
 			$read_range_ht 
 			$read_atag{$toolbar_itaj_ht} 
 			<span style="white-space: nowrap;">[<span>$dele_atag</span>]</span>
@@ -532,6 +531,7 @@
     if ($GLOBALS['newres_to_show_flag']) {
         echo $read_header_ht;
         echo $read_cont_ht;
+        echo $hr;
         echo $read_footer_ht;
     }
 
@@ -569,9 +569,9 @@
 
 $index_uri = UriUtil::buildQueryUri('index.php', array(UA::getQueryKey() => UA::getQueryValue()));
 
+
 ?>
-<div id="footbar01">
-<div class="footbar">
+<div id="footbar01" class="footbar">
 <ul>
 <li class="home"><a name="ntt_bt1" href="<?php eh($index_uri); ?>">TOP</a></li>
 <li class="other"><a onclick="document.getElementById('footbar02').style.visibility='visible';">\x82\xBB\x82̑\xBC</a></li>
@@ -601,7 +601,8 @@
 //iphone 080801
 ?>
  </ul>
-</div></div>
+</div>
+
 <div id="footbar02" class="dialog_other">
 <filedset>
  <ul>



P2-php-svn メーリングリストの案内
アーカイブの一覧に戻る