Ejemplo n.º 1
0
            }
            break;
        }
    }
}
$paldo = $isPalace ? 0 : 1;
$pal_a_ht = "info_i.php?host={$aThread->host}&bbs={$aThread->bbs}&key={$aThread->key}&setpal={$paldo}{$popup_ht}{$ttitle_en_ht}{$_conf['k_at_a']}";
if ($isPalace) {
    $pal_ht = "<a href=\"{$pal_a_ht}\" title=\"DAT落ちしたスレ用のお気に入り\">★</a>";
} else {
    $pal_ht = "<a href=\"{$pal_a_ht}\" title=\"DAT落ちしたスレ用のお気に入り\">+</a>";
}
// }}}
// {{{ スレッドあぼーんチェック
// スレッドあぼーんリスト読込
$idx_host_dir = P2Util::idxDirOfHost($host);
$taborn_file = $idx_host_dir . '/' . $bbs . '/p2_threads_aborn.idx';
if ($tabornlist = @file($taborn_file)) {
    foreach ($tabornlist as $l) {
        $tarray = explode('<>', rtrim($l));
        if ($aThread->key == $tarray[1]) {
            $isTaborn = true;
            break;
        }
    }
}
$taborndo_title_at = '';
if (!empty($isTaborn)) {
    $tastr1 = "あぼーん中";
    $tastr2 = "あぼーん解除する";
    $taborndo = 0;
Ejemplo n.º 2
0
Archivo: post.php Proyecto: poppen/p2
    ${$pk} = isset($_POST[$pk]) ? $_POST[$pk] : null;
}
// 引数エラー
if (empty($host)) {
    p2die('引数の指定が変です');
}
if (P2Validate::host($host) || $bbs && P2Validate::bbs($bbs) || $key && P2Validate::host($key)) {
    p2die('不正な引数です');
}
if ($bbs and _isThreTateSugi()) {
    p2die('スレ立て杉です(しばし待たれよ)');
}
$_conf['last_post_time_file'] = $_conf['pref_dir'] . '/last_post_time.txt';
if (P2Util::isHost2chs($host)) {
    $server_id = preg_replace('{\\.2ch\\.net$}', '', $host);
    $_conf['last_post_time_file'] = P2Util::idxDirOfHost($host, true) . rawurlencode($server_id) . '_' . 'last_post_time.txt';
}
if (!isset($ttitle)) {
    if ($ttitle_en) {
        $ttitle = base64_decode($ttitle_en);
    } elseif ($subject) {
        $ttitle = $subject;
    } else {
        $ttitle = '';
    }
}
// (設定に応じて)ソースコードがHTML上でもきれいに再現されるように、POSTメッセージを変換する
$MESSAGE = _formatCodeToPost($MESSAGE);
// したらばのlivedoor移転に対応。post先をlivedoorとする。
$host = P2Util::adjustHostJbbsShitaraba($host);
// machibbs、JBBS@したらば なら
Ejemplo n.º 3
0
}
//============================================================
// メイン
//============================================================
$aThreadList =& new ThreadList();
// 板とモードのセット ===================================
if ($spmode) {
    if ($spmode == 'taborn' or $spmode == 'soko') {
        $aThreadList->setIta($host, $bbs, P2Util::getItaName($host, $bbs));
    }
    $aThreadList->setSpMode($spmode);
} else {
    // if(!$p2_setting['itaj']){$p2_setting['itaj'] = P2Util::getItaName($host, $bbs);}
    $aThreadList->setIta($host, $bbs, $p2_setting['itaj']);
    // {{{ スレッドあぼーんリスト読込
    $idx_host_dir = P2Util::idxDirOfHost($aThreadList->host);
    $taborn_file = $idx_host_dir . '/' . $aThreadList->bbs . '/p2_threads_aborn.idx';
    $ta_num = 0;
    if ($tabornlines = @file($taborn_file)) {
        $ta_num = sizeof($tabornlines);
        foreach ($tabornlines as $l) {
            $data = explode('<>', rtrim($l));
            $ta_keys[$data[1]] = true;
        }
    }
    // }}}
}
// ソースリスト読込
$lines = $aThreadList->readList();
// お気にスレリスト 読込
$favlines = @file($_conf['favlist_file']);
Ejemplo n.º 4
0
Archivo: P2Util.php Proyecto: poppen/p2
 /**
  * host,bbsからidxの保存ディレクトリを返す
  * デフォルトでディレクトリ区切り文字を追加する
  *
  * @access  public
  * @param string $host
  * @param string $bbs
  * @param bool $dir_sep
  * @return string
  * @see P2Util::_p2DirOfHost()
  */
 function idxDirOfHostBbs($host, $bbs, $dir_sep = true)
 {
     $dir = P2Util::idxDirOfHost($host, true) . $bbs;
     if ($dir_sep) {
         $dir .= DIRECTORY_SEPARATOR;
     }
     return $dir;
 }