Exemplo n.º 1
0
        $threadorder = bindec(getstatus($read['tpcstatus'], 4) . getstatus($read['tpcstatus'], 3));
        $threadorder && $threadorder != 3 && ($orderby = $threadorder == '1' ? 'asc' : 'desc');
    }
    !$orderby && ($orderby = 'asc');
    $ordertype = $orderby;
    unset($replayOrder);
}
/******** end *********/
$rewardtype = null;
/*** 悬赏 ***/
//过滤匿名作者相关动态
if ($db_threadrelated && $forumset['ifrelated'] && !($read['anonymous'] && in_array($forumset['relatedcon'], array('ownpost', 'owndigest', 'ownhits', 'ownreply', 'oinfo')))) {
    if ($forumset['relatedcon'] == 'custom') {
        $relatedb = $forumset['relatedcustom'];
    } else {
        $relatedb = threadrelated($forumset['relatedcon']);
    }
}
$isRobBuild = getstatus($read['tpcstatus'], 7) ? 1 : 0;
list(, , $downloadmoney, $downloadimg) = explode("\t", $forumset['uploadset']);
$subject = $read['subject'];
$authorid = $read['authorid'];
if ($read['ifmagic'] && $db_windmagic) {
    $ifmagic = 1;
    list($magicid, $magicname) = explode("\t", $read['magic']);
}
if ($uid > 0 && $read['replies'] > 0) {
    #只看作者回复数统计
    $rt = $db->get_one("SELECT COUNT(*) AS n FROM {$pw_posts} WHERE tid=" . S::sqlEscape($tid) . " AND authorid=" . S::sqlEscape($uid) . " AND anonymous='0' AND ifcheck='1'");
    $read['replies'] = $rt['n'];
    $sqladd = 'AND t.authorid=' . S::sqlEscape($uid) . " AND t.anonymous='0'";
Exemplo n.º 2
0
$db_maxtypenum == 0 && ($db_maxtypenum = 5);
$db_menuinit .= ",'td_post' : 'menu_post','td_post1' : 'menu_post','td_special' : 'menu_special'";
if ($winddb['shortcut']) {
    $myshortcut = 'true';
} else {
    $myshortcut = 'false';
}
//allowtype onoff
if ($foruminfo['allowtype'] && ($foruminfo['allowtype'] & 1 || $foruminfo['allowtype'] & 2 && $_G['allownewvote'] || $foruminfo['allowtype'] & 4 && $_G['allowactive'] || $foruminfo['allowtype'] & 8 && $_G['allowreward'] || $foruminfo['allowtype'] & 16 || $foruminfo['allowtype'] & 32 && $_G['allowdebate'])) {
    $N_allowtypeopen = true;
} else {
    $N_allowtypeopen = false;
}
$element_class = L::loadClass('element');
$hot_threads = $element_class->replySortWeek($fid, 10);
$related_threads = threadrelated('allpost');
function threadrelated($relatedcon)
{
    global $db, $db_iftag, $db_threadrelated, $forumset, $fid, $read, $tid, $db_modes, $db_dopen, $db_phopen, $db_share_open, $db_groups_open, $groupid, $timestamp;
    $relatedb = array();
    if (in_array($relatedcon, array('allpost', 'alldigest', 'allhits', 'allreply', 'forumpost', 'forumdigest', 'forumhits', 'forumreply'))) {
        //require_once(R_P.'require/element.class.php');
        //$element = new Element($forumset['relatednums']);
        $element = L::loadClass('element');
        $element->setDefaultNum($forumset['relatednums']);
        switch ($relatedcon) {
            case 'allpost':
                $relatedb = $element->newSubject();
                break;
            case 'alldigest':
                $relatedb = $element->digestSubject();