Ejemplo n.º 1
0
    $q = http_build_query(array('host' => $aThread->host, 'bbs' => $aThread->bbs, 'key' => $aThread->key, 'offline' => '1', 'nt' => $newtime, 'b' => $_conf['b']));
    $html = "{$next_st}";
    $url = $_conf['read_php'] . '?' . $q;
    // $aThread->resrange['to'] > $aThread->resrange_readnum
    if ($aThread->resrange_multi and !empty($aThread->resrange_multi_exists_next)) {
        $html = $html . '*';
        $url .= '&ls=' . $aThread->ls;
        // http_build_query() を通して urlencode を掛けたくないので
        $page = isset($_REQUEST['page']) ? max(1, intval($_REQUEST['page'])) : 1;
        $next_page = $page + 1;
        $url .= '&page=' . $next_page;
    } else {
        $url .= '&ls=' . "{$aThread->resrange['to']}-{$after_rnum}n" . $read_navi_next_anchor;
    }
    $read_navi_next = P2Util::tagA($url, $html);
    $read_navi_next_btm = P2Util::tagA($url, $html, array($_conf['accesskey'] => $_conf['k_accesskey']['next']));
}
//----------------------------------------------
// $read_footer_navi_new  続きを読む 新着レスの表示
if ($aThread->resrange['to'] == $aThread->rescount) {
    // 新着
    $read_footer_navi_new = "<a href=\"{$_conf['read_php']}?host={$aThread->host}{$bbs_q}{$key_q}&amp;ls={$aThread->rescount}-n&amp;nt={$newtime}{$_conf['k_at_a']}\">{$shinchaku_st}</a>";
    //$read_footer_navi_new_btm = "<a href=\"{$_conf['read_php']}?host={$aThread->host}{$bbs_q}{$key_q}&amp;ls={$aThread->rescount}-n&amp;nt={$newtime}{$_conf['k_at_a']}#r{$aThread->rescount}\">{$shinchaku_st}</a>";
    $read_footer_navi_new_btm = "<a href=\"{$_conf['read_php']}?host={$aThread->host}{$bbs_q}{$key_q}&amp;ls={$aThread->rescount}-n&amp;nt={$newtime}{$_conf['k_at_a']}\">{$shinchaku_st}</a>";
}
if (!$read_navi_next_isInvisible) {
    // 最新
    $read_navi_latest = <<<EOP
<a class="blueButton" href="{$_conf['read_php']}?host={$aThread->host}{$bbs_q}{$key_q}&amp;ls=l{$latest_show_res_num}{$_conf['k_at_a']}">{$latest_st}{$latest_show_res_num}</a> 
EOP;
    $time = time();
Ejemplo n.º 2
0
/**
 * 1- 101- 201- のリンクHTMLを取得する
 * getHeadBarHtml() から呼ばれる
 *
 * @return  string  HTML
 */
function getReadNaviRangeHtml($aThread, $rnum_range)
{
    global $_conf;
    static $cache_;
    if (isset($cache_["{$aThread->host}/{$aThread->bbs}/{$aThread->key}"])) {
        return $cache_["{$aThread->host}/{$aThread->bbs}/{$aThread->key}"];
    }
    $read_navi_range_ht = '';
    for ($i = 1; $i <= $aThread->rescount; $i = $i + $rnum_range) {
        $ito = $i + $rnum_range - 1;
        $qs = array('host' => $aThread->host, 'bbs' => $aThread->bbs, 'key' => $aThread->key, 'ls' => "{$i}-{$ito}", 'b' => $_conf['b']);
        if ($ito <= $aThread->gotnum) {
            $qs['offline'] = '1';
        }
        $q = http_build_query($qs);
        $url = $_conf['read_php'] . '?' . $q;
        $read_navi_range_ht .= P2Util::tagA($url, "{$i}-") . "\n";
    }
    return $cache_["{$aThread->host}/{$aThread->bbs}/{$aThread->key}"] = $read_navi_range_ht;
}