Ejemplo n.º 1
0
Archivo: Thread.php Proyecto: poppen/p2
 /**
  * @access  private
  * @return  array
  */
 function getMobile2chUriValues()
 {
     // http://qb5.2ch.net/test/read.cgi/operate/1188907861/38-
     //$aas3 = $_conf['k_use_aas'] ? '3' : '';
     $aas3 = '3';
     $resv = P2Util::getDefaultResValues($this->host, $this->bbs, $this->key);
     $FROM = $resv['FROM'];
     $mail = $resv['mail'];
     /*
     $mail_opt = (strlen($mail) == 0) ? '' : "&mail=" . rawurlencode($mail);
     
     //$FROM = str_replace(array('?', '/'), array('?', '/'), $FROM);
     $FROM_opt = (strlen($FROM) == 0) ? '' : "&FROM=" . rawurlencode($FROM);
     
     //$motothre_url = "http://{$c2chHost}/test/-3{$aas3}!{$mail_opt}{$FROM_opt}/{$this->bbs}/{$this->key}/{$ls}";
     */
     // '?', '/' が含まれているとc.2chで通らないようだ。
     //$c2chHost = 'c.2ch.net';
     /*
     // 2008/02/14 振り分けは必要なくなったらしい
     $mobile = &Net_UserAgent_Mobile::singleton();
     if ($mobile->isDoCoMo()) {
         $c2chHost = 'c-docomo.2ch.net';
     } elseif ($mobile->isEZweb()) {
         $c2chHost = 'c-au.2ch.net';
     } else {
         $c2chHost = 'c-others.2ch.net';
     }
     */
     // c.2chはl指定に非対応なので、代わりにnとする
     if (substr($this->ls, 0, 1) == 'l') {
         $ls = 'n';
     } else {
         $ls = $this->ls;
         // c.2chではnが含まれていたら、最新10件表示となっている。2chのnは>>1を表示しないという指定。
         $ls = str_replace('n', '', $ls);
     }
     return array('host' => $this->host, 'bbs' => $this->bbs, 'key' => $this->key, 'ls' => $ls, 'aas3' => $aas3, 'mail' => rawurlencode($mail), 'FROM' => rawurlencode($FROM));
 }
Ejemplo n.º 2
0
<?php

/* vim: set fileencoding=cp932 autoindent noexpandtab ts=4 sw=4 sts=0: */
/* mi: charset=Shift_JIS */
// p2 - レス書き込みフォームの機能読み込み
// 事前変数
// $host, $bbs, $key ($rescount, $popup, $ttitle_en)
$fake_time = -10;
// time を10分前に偽装
$time = time() - 9 * 60 * 60;
$time = $time + $fake_time * 60;
$csrfid = P2Util::getCsrfId();
$res_disabled_at = '';
// $resv 'FROM', 'mail', 'MESSAGE, 'subject'
$resv = P2Util::getDefaultResValues($host, $bbs, $key);
$hs = array('FROM' => hs($resv['FROM']), 'mail' => hs($resv['mail']), 'subject' => hs($resv['subject']));
$MESSAGE_hs = hs($resv['MESSAGE']);
// これにレス
$htm['orig_msg'] = _getOrigMsgHtmlAndSetMessageHs($host, $bbs, $key, geti($_GET['resnum']), geti($_GET['inyou']), $MESSAGE_hs);
// 表示指定
// 参考 クラシック 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