Ejemplo n.º 1
0
         $dores_atag = P2View::tagA($dores_uri, hs($dores_st), array_merge(array('accesskey' => $_conf['pc_accesskey']['dores'], 'title' => 'アクセスキー[' . $_conf['pc_accesskey']['dores'] . ']', 'target' => '_self', 'onClick' => sprintf("return !openSubWin('%s',%s,1,0)", str_replace("'", "\\'", $dores_onclick_uri), $STYLE['post_pop_size'])), $onmouse_showform_attrs));
     }
     $dores_html = '<span style="white-space: nowrap;">' . $dores_atag . '</span>';
     $res_form_html_pb = $res_form_html;
 }
 $q_ichi_ht = '';
 if (isset($res1['body'])) {
     $q_ichi_ht = $res1['body'] . " | ";
 }
 // レスのすばやさ
 $spd_ht = '';
 if ($spd_st = $aThread->getTimePerRes() and $spd_st != '-') {
     $spd_ht = '<span class="spd" style="white-space: nowrap;" title="すばやさ=時間/レス">' . $spd_st . '</span>';
 }
 // DAT容量
 $datsize_ht = sprintf('<span class="datsize" style="white-space: nowrap;" title="DAT容量">%s</span>', P2Util::getTranslatedUnitFileSize($aThread->getDatBytesFromLocalDat(false), 'KB'));
 // 500KB以上で強調表示
 if ($datsize / 1024 >= 500) {
     $datsize_ht = '<b>' . $datsize_ht . '</b>';
 }
 // {{{ フィルタヒットがあった場合、次Xと続きを読むを更新する
 if (!empty($GLOBALS['last_hit_resnum'])) {
     $read_navi_next_anchor = "";
     if ($GLOBALS['last_hit_resnum'] == $aThread->rescount) {
         $read_navi_next_anchor = "#r{$aThread->rescount}";
     }
     $after_rnum = $GLOBALS['last_hit_resnum'] + $rnum_range;
     $read_navi_next_ht = P2View::tagA(UriUtil::buildQueryUri($_conf['read_php'], array_merge(array('host' => $aThread->host, 'bbs' => $aThread->bbs, 'key' => $aThread->key, 'ls' => "{$GLOBALS['last_hit_resnum']}-{$after_rnum}", 'nt' => date('gis')), $offline_range_qs)) . $read_navi_next_anchor, hs("{$next_st}{$rnum_range}"));
     // 「続きを読む」
     $read_footer_navi_new_ht = _getTudukiATag($aThread, $tuduki_st);
 }
Ejemplo n.º 2
0
// メイン
//======================================================================
$karappoMsgHtml = 'p2 - 書き込み履歴内容は空っぽのようです。';
if (!$_conf['res_write_rec']) {
    $karappoMsgHtml .= sprintf('<p>現在、書き込み内容ログは記録しない設定になっています。<br>設定は、%sのページで変更可能\です。</p>', P2View::tagA(UriUtil::buildQueryUri('edit_conf_user.php', array(UA::getQueryKey() => UA::getQueryValue())), hs('設定編集'), array('target' => 'subject')));
}
// 特殊DAT読み
if (!file_exists($_conf['p2_res_hist_dat'])) {
    P2Util::printSimpleHtml($karappoMsgHtml);
    exit;
}
$res_hist_dat_size = filesize($_conf['p2_res_hist_dat']);
$logSizeSt = P2Util::getTranslatedUnitFileSize($res_hist_dat_size);
$maxLogSize = 0;
//1024*1024*10;
$maxLogSizeSt = P2Util::getTranslatedUnitFileSize($maxLogSize);
if ($maxLogSize and $res_hist_dat_size > $maxLogSize) {
    P2Util::printSimpleHtml(sprintf('書き込みログ容量(%s/%s)が大き過ぎるため、表\示できません。<br>
            %sのページより、書き込みログの一括削除を行って下さい。', hs($logSizeSt), hs($maxLogSizeSt), P2View::tagA($_conf['editpref_php'], hs('設定管理'), array('target' => 'subject'))));
    exit;
}
if (false === ($datlines = file($_conf['p2_res_hist_dat']))) {
    p2die('書き込み履歴ログファイルを読み込めませんでした');
} elseif (!$datlines) {
    P2Util::printSimpleHtml($karappoMsgHtml);
    exit;
}
// ファイルの下に記録されているものが新しいので反転させる
$datlines = array_reverse($datlines);
$datlines_num = count($datlines);
$ResHist = new ResHist();