本文整理汇总了PHP中P2Util::tagA方法的典型用法代码示例。如果您正苦于以下问题:PHP P2Util::tagA方法的具体用法?PHP P2Util::tagA怎么用?PHP P2Util::tagA使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类P2Util
的用法示例。
在下文中一共展示了P2Util::tagA方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: http_build_query
$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}&ls={$aThread->rescount}-n&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}&ls={$aThread->rescount}-n&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}&ls={$aThread->rescount}-n&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}&ls=l{$latest_show_res_num}{$_conf['k_at_a']}">{$latest_st}{$latest_show_res_num}</a>
EOP;
$time = time();
示例2: getReadNaviRangeHtml
/**
* 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;
}