示例#1
0
    if ($rt['ifupload'] != 0) {
        $imgs = viewAids($tid, 0);
        $downloads = viewDownloads($tid, 0);
    }
    $yxqw = "";
    if ($maxp > 1) {
        $content = wap_substr($content, $db_waplimit * ($page - 1), $db_waplimit, $db_charset);
        $content = wap_img2($content);
        if (empty($content)) {
            wap_msg("已到最后一页", "index.php?a=read&tid={$tid}");
        }
        if ($page == 1) {
            $yxqw = "<a href='index.php?a=read&tid=" . $tid . "&amp;all=1&amp;page={$nextp}'>下一页</a>";
        } elseif ($page == $maxp) {
            $yxqw = "<a href='index.php?a=read&tid=" . $tid . "&amp;all=1&amp;page={$prep}'>上一页</a>&nbsp;";
        } else {
            $yxqw = "<a href='index.php?a=read&tid=" . $tid . "&amp;all=1&amp;page={$nextp}'>下一页</a>";
            $yxqw .= "<a href='index.php?a=read&tid=" . $tid . "&amp;all=1&amp;page={$prep}'>上一页</a>&nbsp;";
        }
        $yxqw .= "&nbsp;({$page}/{$maxp})<br/>";
    } else {
        $content = wap_img2($content);
    }
    $postdb = viewReply($tid, 1, $rt['replies'], 3, 90, $rt['ptable'], 2);
} else {
    wap_msg('illegal_tid');
}
Cookie("wap_scr", serialize(array("page" => "read", "extra" => array("tid" => $tid))));
wap_header();
require_once PrintWAP('read');
wap_footer();
示例#2
0
    }
    if (!$rt) {
        wap_msg('illegal_tid');
    }
    $fid = $rt['fid'];
    forumCheck($fid, 'read');
    $forumName = wap_cv(strip_tags($forum[$fid]['name']));
    $page == 'e' && ($page = 65535);
    (int) $page < 1 && ($page = 1);
    $content = $rt['content'];
    $replies = $rt['replies'];
    $per = 10;
    $total = ceil($replies / $per);
    $total == 0 ? $page = 1 : ($page > $total ? $page = $total : '');
    $nextp = $page + 1;
    if ($nextp > $total) {
        $nextp = 1;
    }
    $prep = $page - 1;
    if ($prep < 1) {
        $prep = $total;
    }
    $rt['subject'] = str_replace('&nbsp;', '', wap_cv($rt['subject']));
    $postdb = viewReply($tid, $page, $replies, $per, 90, $rt['ptable'], $order);
} else {
    wap_msg('illegal_tid');
}
Cookie("wap_scr", serialize(array("page" => "reply", "extra" => array("tid" => $tid))));
wap_header();
require_once PrintWAP('reply_all');
wap_footer();