Esempio n. 1
0
 $rt['anonymous'] && ($rt['author'] = $db_anonymousname);
 if ($db_htmifopen) {
     $link = "{$db_bbsurl}/read{$db_dir}tid-{$rt['tid']}{$db_ext}";
 } else {
     $link = "{$db_bbsurl}/read.php?tid={$rt['tid']}";
 }
 $postTitle = decodeRssHtml($rt['subject']);
 $postTitle = xmlEscape($postTitle);
 $allow = is_array($db_windpost) ? $db_windpost : array();
 $allow['flash'] = 0;
 $allow['mpeg'] = 0;
 $allow['checkurl'] = 0;
 $description = $rt['content'];
 $pid = 0;
 //对附件做处理
 $attachShow = new attachShow(false, isset($forumset['uploadset']) ? $forumset['uploadset'] : '', isset($forumset['viewpic']) ? $forumset['viewpic'] : 0);
 $attachShow->init($rt['tid'], array($pid));
 if ($rt['aid']) {
     //存在附件
     $pid = 'tpc';
     $hasUnsetAttach = false;
     if (!$rt['ifhide'] && !$attachShow->isConfineView) {
         //不隐藏附件
         foreach ($attachShow->getAttachs($pid, false) as $type => $attachs) {
             if ($type == 'pic') {
             } else {
                 //对除图片外的其他附件做特殊处理
                 $hasUnsetAttach = true;
                 foreach ($attachs as $attachmentId => $attachRow) {
                     unset($attachShow->attachs[$pid][$attachmentId]);
                     $description = formatNotImageAttachs($description, $attachRow);
Esempio n. 2
0
    if ($isRobBuild) {
        $robFloors = $db->get_value("SELECT floor FROM pw_robbuildfloor WHERE tid = " . S::sqlEscape($tid) . " AND pid = " . S::sqlEscape($pid));
    }
    if ($isReplyReward) {
        $replyRewardRecordService = L::loadClass('ReplyRewardRecord', 'forum');
        $replyRewarRecord = $replyRewardRecordService->getRewardRecordByTidAndPid($tid, $pid);
        $readdb[0]['replyreward'] = $replyRewarRecord;
        unset($replyRewardRecordService, $replyRewarRecord);
    }
}
array_push($_pids, $pid);
$pwMembers = $colonydb = $customdb = array();
/**End Add by liaohu for addfloor**/
//读取帖子及回复的附件信息
if ($_pids) {
    $attachShow = new attachShow($isGM || $pwSystem['delattach'], $forumset['uploadset'], $forumset['viewpic']);
    $attachShow->init($tid, $_pids);
}
$showCustom = 0;
if ($db_showcustom && is_array($db_showcustom)) {
    foreach ($db_showcustom as $key => $value) {
        is_numeric($value) && ($showCustom = 1);
    }
}
//读取用户信息
/**
if ($_uids) {
	$skey = array();
	foreach ($_uids as $key=>$value) {
		$skey[$value] = $key;
		$db_showcolony && $skey['UID_GROUP_'.$key] = $key;
Esempio n. 3
0
     }
     $rt['postdate'] = get_date($rt['postdate']);
     $rt['content'] = str_replace("\n", "<br>", $rt['content']);
     $rt['ifconvert'] == 2 && ($rt['content'] = convert($rt['content'], $db_windpost));
     foreach ($alarm as $key => $value) {
         $rt['content'] = str_replace($key, '<span style="background-color:#ffff66">' . $key . '</span>', $rt['content']);
     }
     $postdb[$rt['pid']] = $rt;
     if ($rt['aid']) {
         $tids[] = $rt['tid'];
     }
 }
 if ($tids) {
     $pw_attachs = L::loadDB('attachs', 'forum');
     $attachs = $pw_attachs->gets(array('tid' => $tids, 'pid' => array_keys($postdb)));
     $attachShow = new attachShow(true);
     $attachShow->setData($attachs);
     foreach ($postdb as $key => $rt) {
         if (!$rt['aid']) {
             continue;
         }
         $rt += $attachShow->parseAttachs($rt['pid'], $rt['content'], 0);
         if ($rt['pic']) {
             foreach ($rt['pic'] as $k => $v) {
                 $rt['content'] .= '<br />' . $v['img'];
             }
         }
         if ($rt['downattach']) {
             foreach ($rt['downattach'] as $k => $v) {
                 $rt['content'] .= "<br />附件:<a href=\"job.php?action=download&aid={$v['aid']}\" onclick=\"return ajaxurl(this);\"> <font color=\"red\">{$v['name']}</font></a> ({$v['size']} K)";
             }
Esempio n. 4
0
//是否图酷、是否允许浏览
$isTucool = $forumset['iftucool'] && getstatus($read['tpcstatus'], 5);
$ptable = $read['ptable'];
$ifhide = $read['ifhide'] && !ifpost($tid) ? 1 : 0;
$isAllowViewPic = $admincheck || $read['authorid'] == $winduid || !$ifhide && ($winduid || !$forumset['viewpic']);
(!$isTucool || !$isAllowViewPic) && ObHeader("read.php?tid={$tid}&ds=1");
//禁言、屏蔽
$userService = L::loadClass('UserService', 'user');
$userInfo = $userService->get($read['authorid'], true, false, false);
$ifshieldThread = ($read['ifshield'] || $userInfo['groupid'] == 6 && $db_shield) && !$isGM ? 0 : 1;
!$ifshieldThread && ObHeader("read.php?tid={$tid}&ds=1");
$attachsService = L::loadClass('Attachs', 'forum');
$tucoolAttachs = $attachsService->getByTidAndUid($tid, $read['authorid']);
!$tucoolAttachs && ObHeader("read.php?tid={$tid}&ds=1");
if ($read['aid']) {
    $attachShow = new attachShow($isGM || $pwSystem['delattach'] || $read['authorid'] == $winduid, $forumset['uploadset'], $forumset['viewpic']);
    $attachShow->setData($tucoolAttachs);
    $tucoolAttachs = buildTucoolAttachs($tucoolAttachs);
    $contentAids = $attachShow->findPicAids($read['content']);
    $read['content'] = convert($read['content'], $db_windpost);
    if (strrpos($read['content'], 'attachment') !== false) {
        $haveAids = $attachShow->findPicAids($read['content']);
    }
}
$tmpKeyArray = array_diff(array_keys($tucoolAttachs), (array) $contentAids);
$tmpArray = array();
foreach ((array) $tmpKeyArray as $v) {
    $tmpArray[$v] = $tucoolAttachs[$v];
}
$contentAttachs = array();
if (S::isArray($haveAids)) {
Esempio n. 5
0
 function _getImageUrl($url, $ifthumb)
 {
     $pic = geturl($url, 'show');
     $ifdelete = 0;
     if (!is_array($pic)) {
         $ifdelete = 1;
     }
     $miniUrl = attachShow::getMiniUrl($url, $ifthumb, $pic[1], false);
     return array($miniUrl, $ifdelete);
 }
Esempio n. 6
0
 /**
  * 处理日志附件、内容图片
  *
  * @param $aid			日志里附件存储数据,unserialize格式类型	aid
  * @param $content  	日志内容
  * @param $authorid		日志作者
  */
 function _getAttachs($aid, &$content, $authorid)
 {
     global $winduid, $isGM;
     if (!$aid || !($attachs = unserialize($aid)) || !is_array($attachs)) {
         return array();
     }
     $GLOBALS += L::style();
     require_once R_P . 'require/bbscode.php';
     $attachShow = new attachShow($isGM, '', false, 'diary');
     $attachShow->setData($attachs);
     return $attachShow->parseAttachs('tpc', $content, $winduid == $authorid);
 }
Esempio n. 7
0
 function _getImageUrl($url, $ifthumb)
 {
     $pic = geturl($url, 'show');
     $miniUrl = attachShow::getMiniUrl($url, $ifthumb, $pic[1], false);
     return $miniUrl;
 }
Esempio n. 8
0
 $postmodify->execute($postdata);
 extract(L::style());
 $leaveword = $atcdb['leaveword'] ? leaveword($atcdb['leaveword']) : '';
 $content = convert($postdata->data['content'] . $leaveword, $db_windpost);
 if (strpos($content, '[p:') !== false || strpos($content, '[s:') !== false) {
     $content = showface($content);
 }
 if ($atcdb['ifsign'] < 2) {
     $content = str_replace("\n", '<br />', $content);
 }
 if ($postdata->data['ifwordsfb'] == 0) {
     $content = addslashes(wordsConvert(stripslashes($content)));
 }
 $creditnames = pwCreditNames();
 if ($atcdb['attachs']) {
     $attachShow = new attachShow($pwpost->isGM || pwRights($pwpost->isBM, 'delattach'), $pwforum->forumset['uploadset']);
     $attachShow->setData($atcdb['attachs']);
     $attachShow->parseAttachs($pid, $content, $winduid == $atcdb['authorid']);
 }
 $alterinfo && ($content .= "<div id=\"alert_{$pid}\" style=\"color:gray;margin-top:30px\">[ {$alterinfo} ]</div>");
 $atcdb['icon'] = $atcdb['icon'] ? "<img src=\"{$imgpath}/post/emotion/{$atcdb['icon']}.gif\" align=\"left\" border=\"0\" />" : '';
 if (!$postdata->getIfcheck()) {
     if ($postdata->filter->filter_weight == 2) {
         $banword = implode(',', $postdata->filter->filter_word);
         $pinfo = 'post_word_check';
     } elseif ($postdata->linkCheckStrategy) {
         $pinfo = 'post_link_check';
     }
     $pinfo && Showmsg($pinfo);
 }
 echo "success\t" . stripslashes($atcdb['icon'] . "&nbsp;" . $atc_title) . "\t" . str_replace(array("\r", "\t"), array("", ""), stripslashes($content));
Esempio n. 9
0
 function analyse(&$attach)
 {
     global $db_windpost, $db_sellset, $db_hash;
     $atype = '';
     if ($attach['type'] == 'img' && $attach['needrvrc'] == 0 && $this->isImgShow) {
         $a_url = geturl($attach['attachurl'], 'show');
         if (is_array($a_url)) {
             $atype = 'pic';
             $attach += array('url' => $a_url[0], 'img' => cvpic($a_url[0] . '?' . $attach['size'], 1, $db_windpost['picwidth'], $db_windpost['picheight'], $attach['ifthumb'] & 1, $attach['descrip']), 'miniUrl' => attachShow::getMiniUrl($attach['attachurl'], $attach['ifthumb'], $a_url[1]));
         } elseif ($a_url == 'imgurl') {
             $atype = 'picurl';
             $attach += array('verify' => md5("showimg{$attach[tid]}{$attach[pid]}{$attach[fid]}{$attach[aid]}{$db_hash}"));
         }
     } else {
         $atype = 'downattach';
         if ($attach['needrvrc'] > 0) {
             !$attach['ctype'] && ($attach['ctype'] = $attach['special'] == 2 ? 'money' : 'rvrc');
             if ($attach['type'] == 'img') {
                 $a_url = geturl($attach['attachurl'], 'show');
                 $attach['img'] = cvpic($a_url[0] . '?' . $attach['size'], 1, $db_windpost['picwidth'], $db_windpost['picheight'], $attach['ifthumb'] & 1, $attach['descrip']);
             }
             if ($attach['special'] == 2) {
                 $db_sellset['price'] > 0 && ($attach['needrvrc'] = min($attach['needrvrc'], $db_sellset['price']));
             }
         }
         $attach += array('cname' => pwCreditNames($attach['ctype']), 'ext' => strtolower(substr(strrchr($attach['name'], '.'), 1)));
     }
     return $atype;
 }
Esempio n. 10
0
    require_once A_P . 'groups/lib/active.class.php';
    $newActive = new PW_Active();
    if (!($active = $newActive->getActiveInfoById($id)) || $active['cid'] != $cyid) {
        Showmsg('data_error');
    }
    //检查是否是群组的成员
    $isJoin = $newActive->isJoin($id, $winduid);
    $tmpUrlAdd = '&job=view&id=' . $id;
    list($active['icon']) = showfacedesign($active['icon'], 1, 'm');
    $active = $newActive->convert($active);
    $actMembers = $newActive->getActMembers($id, 20);
    $active['content'] = str_replace("\n", '<br />', $active['content']);
    require_once R_P . 'require/bbscode.php';
    $active['content'] = convert($active['content'], $db_windpost);
    if ($attachs = $newActive->getAttById($id)) {
        $attachShow = new attachShow($isGM || $pwSystem['delattach'], '', 0, 'active');
        $attachShow->setData($attachs);
        $active += $attachShow->parseAttachs('tpc', $active['content'], $winduid == $active['uid']);
    }
    $newActive->updateHits($id);
    list($newactivedb) = $newActive->searchList(array('cid' => $cyid), 3, 0, 'id', 'DESC');
    $hotactivedb = $newActive->getHotActive(3);
    $relateactivedb = $newActive->getRelateActive($id, 3);
    list($commentdb, $subcommentdb, $pages, $count) = getCommentDbByTypeid('active', $id, $page, "{$basename}&job={$job}&id={$id}&");
    $comment_type = 'active';
    $comment_typeid = $id;
    require_once PrintEot('thread_active');
    footer();
} elseif ($job == 'actmember' || $job == 'membermanage') {
    S::gp(array('id', 'page'), '', 2);
    $page < 1 && ($page = 1);
Esempio n. 11
0
        Showmsg("该条消息不存在");
    }
    if ($relation['relation'] == 2) {
        $expand = isset($message['expand']) ? unserialize($message['expand']) : array();
        $message = $messageServer->getMessage($expand['parentid']);
        !$message && Showmsg("该条消息不存在");
        $mid = $message['mid'];
    }
    $message['rid'] = $rid;
    $userListHtml = getAllUsersHtml($message);
    $smsList = $messageServer->getReplies($userId, $mid, $rid);
    $attachs = $messageServer->showAttachs($userId, $mid);
    //parse attaches
    if ($attachs) {
        require_once R_P . 'require/bbscode.php';
        $attachShow = new attachShow(true);
        foreach ($attachs as $k => $v) {
            $atype = $attachShow->analyse($v);
            foreach ($smsList as $k2 => $v2) {
                $smsList[$k2]['content'] = $attachShow->parseContent($smsList[$k2]['content'], $atype, $v);
            }
        }
    }
} elseif ($action == 'unread') {
    $pageCount = ceil($notReadCount / $perpage);
    $page = validatePage($page, $pageCount);
    $smsList = $messageServer->getMessagesNotRead($userId, $page, $perpage);
    $pages = numofpage($notReadCount, $page, $pageCount, "{$normalUrl}&action=unread&");
    !$notReadCount && ($emptyListTip = "暂无任何未读消息");
} elseif ($action == 'previous') {
    S::gp(array('rid'), 'GP');