Ejemplo n.º 1
0
 $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);
             }
         }
     }
     $attachmentLeft = $attachShow->parseAttachs($pid, $description, false);
 } else {
     $description = $attachShow->clearAttachTags($description);
 }
 if ($attachShow->isConfineView) {
     $description .= '<div style="margin-top: 10px;">';
     $description .= '<span style="background: none repeat scroll 0 0 #F3F9FB;border: 1px solid #A6CBE7;padding: 3px 10px;">本主题包含附件,请 <a style="color: #014C90;" href="' . $link . '" target="_blank">访问</a> 社区查看</span>';
     $description .= '</div>';
 } elseif ($rt['ifhide'] > 0) {
     $description .= '<div style="margin-top: 10px;">';
     $description .= '<span style="margin:0;background: none repeat scroll 0 0 #FFFAE1;border: 1px dotted #ECA46A;padding: 5px 10px 5px 28px;">附件设置隐藏,需要 <a style="color: #014C90;" href="' . $link . '" target="_blank">访问</a> 社区回复后才能看到</span>';
     $description .= '</div>';
 } elseif ($hasUnsetAttach || $attachmentLeft) {
     $description .= '<div style="margin-top: 10px;">';
     $description .= '<span style="background: none repeat scroll 0 0 #F3F9FB;border: 1px solid #A6CBE7;padding: 3px 10px;">本帖包含的部分附件只能  <a style="color: #014C90;" href="' . $link . '" target="_blank">访问</a> 社区查看</span>';
     $description .= '</div>';
Ejemplo n.º 2
0
     }
     $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)";
             }
         }
         $postdb[$rt['pid']] = $rt;
     }
 }
 require_once PrintEot('forumcp');
 footer();
Ejemplo n.º 3
0
     $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));
     ajax_footer();
 }
Ejemplo n.º 4
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);
 }
Ejemplo n.º 5
0
    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);
    $tmpUrlAdd = '&job=' . $job . '&id=' . $id;
    require_once A_P . 'groups/lib/active.class.php';