Example #1
0
    $topicvalue = $postTopic->getTopicvalue($read['modelid']);
    $initSearchHtml = $postTopic->initSearchHtml($read['modelid']);
    foreach ($postTopic->topicmodeldb as $key => $value) {
        if ($value['cateid'] == $foruminfo['cateid']) {
            $modeldb[$key] = $value;
        }
    }
}
//团购主题帖
if ($read['special'] > 20) {
    $pcid = $read['special'] - 20;
    list($fieldone, $topicvalue) = $postCate->getCatevalue($pcid);
    $initSearchHtml = $postCate->initSearchHtml($pcid);
    is_array($fieldone) && ($read = array_merge($read, $fieldone));
    $isadminright = $postCate->getAdminright($pcid, $read['authorid']);
    list($pcuid) = $postCate->getViewright($pcid, $tid);
    $payway = $fieldone['payway'];
    $ifend = $read['endtime'] < $timestamp ? 1 : 0;
}
//活动主题帖
if ($read['special'] == 8) {
    $actmid = $postActForBbs->getActmid($tid);
    //获取子分类id
    list($topicvalue, $activityValue) = $postActForBbs->getActValue($actmid);
    $orderMemberList = $postActForBbs->getOrderMemberList($actmid, $tid, $fid, $activityValue['paymethod'], $read['authorid']);
    //报名列表
    $actRecommendHtml = $postActForBbs->getActRecommendHtml($actmid, $tid, $activityValue['recommend']);
    //推荐
}
//特殊主题帖
if ($read['special'] == 1 && $foruminfo['allowtype'] & 2 && ($page == 1 || $numofpage == 1)) {
Example #2
0
<?php

!defined('P_W') && exit('Forbidden');
S::gp(array('page', 'tid', 'jointype', 'payway', 'ifend', 'pcid'));
$isadminright = $jointype == 3 ? 0 : 1;
L::loadClass('postcate', 'forum', false);
$postCate = new postCate($data);
list(, $isviewright) = $postCate->getViewright($pcid, $tid);
$memberdb = array();
$count = $sum = $paysum = 0;
$query = $db->query("SELECT ifpay,nums FROM pw_pcmember WHERE tid=" . S::sqlEscape($tid));
while ($rt = $db->fetch_array($query)) {
    $count++;
    if ($rt['ifpay']) {
        $paysum += $rt['nums'];
    }
    $sum += $rt['nums'];
}
$page < 1 && ($page = 1);
$numofpage = ceil($count / $db_perpage);
if ($numofpage && $page > $numofpage) {
    $page = $numofpage;
}
$start = ($page - 1) * $db_perpage;
$limit = S::sqlLimit($start, $db_perpage);
$pages = numofpage($count, $page, $numofpage, "pw_ajax.php?action={$action}&tid={$tid}&jointype={$jointype}&payway={$payway}&", null, 'ajaxview');
$i = $pcid = 0;
$query = $db->query("SELECT pcmid,uid,pcid,username,nums,totalcash,phone,mobile,address,extra,ifpay,jointime FROM pw_pcmember WHERE tid=" . S::sqlEscape($tid) . " ORDER BY (uid=" . S::sqlEscape($winduid) . ") DESC,ifpay ASC,pcmid DESC {$limit}");
while ($rt = $db->fetch_array($query)) {
    if ($i == 0) {
        $pcid = $rt['pcid'];