<ul class="img_one"><?php echo showattach($post, 1); ?> </ul> <?php } else { ?> <ul class="img_list cl vm"><?php echo showattach($post, 1); ?> </ul> <?php } } ?> <?php if ($post['attachlist']) { ?> <ul><?php echo showattach($post); ?> </ul> <?php } } } ?> </div> </div> <!-- main postlist end -->
<h3><strong>本帖子中包含更多资源</strong></h3> <p><?php if($_G['uid']) { ?>您所在的用户组无法下载或查看附件<?php } elseif($_G['connectguest']) { ?>您需要 <a href="member.php?mod=connect" class="xi2">完善帐号信息</a> 或 <a href="member.php?mod=connect&ac=bind" class="xi2">绑定已有帐号</a> 后才可以下载或查看<?php } else { ?>您需要 <a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href);return false;">登录</a> 才可以下载或查看,没有帐号?<a href="member.php?mod=<?php echo $_G['setting']['regname'];?>" title="注册帐号"><?php echo $_G['setting']['reglinkname'];?></a> <?php if(!empty($_G['setting']['pluginhooks']['global_login_text'])) echo $_G['setting']['pluginhooks']['global_login_text'];?><?php } ?></p> </div> <span class="atips_close" onclick="this.parentNode.style.display='none'">x</span> </div> <?php } elseif($post['imagelist'] || $post['attachlist']) { ?> <div class="pattl"> <?php if($post['imagelist'] && $_G['setting']['imagelistthumb'] && $post['imagelistcount'] >= $_G['setting']['imagelistthumb']) { if(!isset($imagelistkey)) { $imagelistkey = rawurlencode(dsign($_G[tid].'|100|100'))?><script type="text/javascript" reload="1">var imagelistkey = '<?php echo $imagelistkey;?>';</script> <?php } $post['imagelistthumb'] = true;?><div class="bbda cl mtw mbm pbm"> <strong>更多图片</strong> <a href="javascript:;" onclick="attachimglst('<?php echo $post['pid'];?>', 0)" class="xi2 attl_g">小图</a> <a href="javascript:;" onclick="attachimglst('<?php echo $post['pid'];?>', 1, <?php echo intval($_G['setting']['lazyload']); ?>)" class="xi2 attl_m">大图</a> </div> <div id="imagelist_<?php echo $post['pid'];?>" class="cl" style="display:none"><?php echo showattach($post, 1); ?></div> <div id="imagelistthumb_<?php echo $post['pid'];?>" class="pattl_c cl"><img src="<?php echo IMGDIR;?>/loading.gif" width="16" height="16" class="vm" /> 组图打开中,请稍候......</div> <?php } else { echo showattach($post, 1); } if($post['attachlist']) { echo showattach($post); } ?> </div> <?php } if($_G['setting']['allowfastreply'] && $post['first'] && $fastpost && $allowpostreply && !$_G['forum_thread']['archiveid'] && $_GET['from'] != 'preview') { ?> <form method="post" autocomplete="off" id="vfastpostform" action="forum.php?mod=post&action=reply&fid=<?php echo $_G['fid'];?>&tid=<?php echo $_G['tid'];?>&fromvf=1&extra=<?php echo $_G['gp_extra'];?>&replysubmit=yes<?php if($_G['gp_ordertype'] != 1) { ?>&infloat=yes&handlekey=vfastpost<?php } if($_G['gp_from']) { ?>&from=<?php echo $_G['gp_from'];?><?php } ?>" onsubmit="this.message.value = parseurl(this.message.value);ajaxpost('vfastpostform', 'return_reply', 'return_reply', 'onerror');return false;"> <div id="vfastpost" class="fullvfastpost"> <input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" /> <table cellspacing="0" cellpadding="0" id="vfastposttb"> <tr> <td id="vf_l"></td> <td id="vf_m"><input type="text" name="message" id="vmessage" onKeyDown="seditor_ctlent(event, '$(\'vfastpostform\').submit()');"/></td> <td id="vf_r"></td> <td id="vf_b"> <button type="submit" class="pn pnc" name="replysubmit" id="vreplysubmit" value="true" style="">post_newreply</button> </td> </tr> </table>
<?php } else { ?> <?php echo $post['message'];?> <?php } } ?> </div> <?php if($_G['setting']['mobile']['mobilesimpletype'] == 0) { if($post['attachment']) { ?> <div class="grey quote"> 附件: <em><?php if($_G['uid']) { ?>您所在的用户组无法下载或查看附件<?php } else { ?>您需要<a href="member.php?mod=logging&action=login">登录</a>才可以下载或查看附件。没有帐号?<a href="member.php?mod=<?php echo $_G['setting']['regname'];?>" title="注册帐号"><?php echo $_G['setting']['reglinkname'];?></a><?php } ?></em> </div> <?php } elseif($post['imagelist'] || $post['attachlist']) { ?> <?php if($post['imagelist']) { if(count($post['imagelist']) == 1) { ?> <ul class="img_one"><?php echo showattach($post, 1); ?></ul> <?php } else { ?> <ul class="img_list cl vm"><?php echo showattach($post, 1); ?></ul> <?php } } ?> <?php if($post['attachlist']) { ?> <ul><?php echo showattach($post); ?></ul> <?php } } } if($_G['uid'] && $allowpostreply && !$post['first']) { ?> <div id="replybtn_<?php echo $post['pid'];?>" class="replybtn" display="true" style="display:none;position:absolute;right:0px;top:5px;"> <input type="button" class="redirect button" href="forum.php?mod=post&action=reply&fid=<?php echo $_G['fid'];?>&tid=<?php echo $_G['tid'];?>&repquote=<?php echo $post['pid'];?>&extra=<?php echo $_GET['extra'];?>&page=<?php echo $page;?>" value="回复"> </div> <?php } ?> </div> </div> <?php if(!empty($_G['setting']['pluginhooks']['viewthread_postbottom_mobile'][$postcount])) echo $_G['setting']['pluginhooks']['viewthread_postbottom_mobile'][$postcount];?> <?php $postcount++;?> <?php } ?> <div class="plc cl"> <form method="post" autocomplete="off" id="fastpostform" action="forum.php?mod=post&action=reply&fid=<?php echo $_G['fid'];?>&tid=<?php echo $_G['tid'];?>&extra=<?php echo $_GET['extra'];?>&replysubmit=yes&mobile=2"> <input type="hidden" name="formhash" value="<?php echo FORMHASH;?>" /> <span class="avatar"><img style="height:32px;width:32px;" src="<?php echo avatar($_G[uid], small, true);?>" /></span> <div class="pi"> <ul class="fastpost">
public static function transPostContentToHtml($post) { Mobcent::import(sprintf('%s/forum_viewthread_%s.php', MOBCENT_APP_ROOT . '/components/discuz/forum', MobcentDiscuz::getMobcentDiscuzVersion())); ForumUtils::initForum($post['fid'], $post['tid']); loadcache('usergroups'); $userInfo = UserUtils::getUserInfo($post['authorid']); $post = array_merge($userInfo, $post); global $_G; // 处理主题价格 $_G['forum_threadpay'] = FALSE; if ($post['first']) { if ($_G['forum_thread']['price'] > 0 && $_G['forum_thread']['special'] == 0) { if ($_G['setting']['maxchargespan'] && TIMESTAMP - $_G['forum_thread']['dateline'] >= $_G['setting']['maxchargespan'] * 3600) { C::t('forum_thread')->update($_G['tid'], array('price' => 0), false, false, $archiveid); $_G['forum_thread']['price'] = 0; } else { $exemptvalue = $_G['forum']['ismoderator'] ? 128 : 16; if (!($_G['group']['exempt'] & $exemptvalue) && $_G['forum_thread']['authorid'] != $_G['uid']) { if (!C::t('common_credit_log')->count_by_uid_operation_relatedid($_G['uid'], 'BTC', $_G['tid'])) { require_once libfile('thread/pay', 'include'); $_G['forum_threadpay'] = TRUE; } } } } } $lastvisit = $_G['member']['lastvisit']; $ordertype = $maxposition = 0; // 处理附件 $_G['forum_attachpids'] = $_G['forum_attachtags'] = ''; $_G['tid'] = $post['tid']; // 去掉干扰码 $_G['forum']['jammer'] = 0; $post = viewthread_procpost($post, $lastvisit, $ordertype, $maxposition); $postlist[$post['pid']] = $post; if ($_G['forum_attachpids'] && !defined('IN_ARCHIVER')) { require_once libfile('function/attachment'); if (is_array($threadsortshow) && !empty($threadsortshow['sortaids'])) { $skipaids = $threadsortshow['sortaids']; } parseattach($_G['forum_attachpids'], $_G['forum_attachtags'], $postlist, $skipaids); } if (empty($postlist)) { showmessage('post_not_found'); } elseif (!defined('IN_MOBILE_API')) { foreach ($postlist as $pid => $post) { // 取出没有插入的附件 if (!empty($post['imagelist'])) { $postlist[$pid]['message'] .= showattach($post, 1); } if ($post['attachlist']) { $postlist[$pid]['message'] .= showattach($post); } $postlist[$pid]['message'] = preg_replace("/\\[attach\\]\\d+\\[\\/attach\\]/i", '', $postlist[$pid]['message']); } } if ($post['first'] && $_G['forum_threadpay']) { $postlist[$pid]['message'] = $thread['freemessage']; } // 处理屏蔽 if (!$_G['forum']['ismoderator'] && $postlist[$pid]['status'] & 1) { $postlist[$pid]['message'] = WebUtils::t('该帖被管理员或版主屏蔽'); } return $postlist[$post['pid']]; }
<?php } else { ?> <div id="postmessage_<?php echo $post['pid'];?>" class="postmessage"><?php echo $post['message'];?></div> <?php } ?> <?php } else { ?> <div id="postmessage_<?php echo $post['pid'];?>" class="postmessage"><?php echo $post['message'];?></div> <?php } if($_G['setting']['mobile']['mobilesimpletype'] == 0) { ?> <?php if($post['attachment']) { ?> <div class="warning"> 附件: <em><?php if($_G['uid']) { ?>您所在的用户组无法下载或查看附件<?php } else { ?>您需要<a href="member.php?mod=logging&action=login">登录</a>才可以下载或查看附件。没有帐号?<a href="member.php?mod=<?php echo $_G['setting']['regname'];?>" title="注册帐号"><?php echo $_G['setting']['reglinkname'];?></a><?php } ?></em> </div> <?php } elseif($post['imagelist'] || $post['attachlist']) { ?> <div class="bm_h attach_h">附件列表</div> <?php if($post['imagelist']) { ?> <?php echo showattach($post, 1); ?> <?php } ?> <?php if($post['attachlist']) { ?> <?php echo showattach($post); ?> <?php } ?> <?php } } ?> <?php } ?> </div> </div> <?php $fastreply = <<<EOF EOF; if($_G['uid'] && $allowpostreply) { if($post['first']) { $fastreply .= <<<EOF <a href="forum.php?mod=post&action=reply&fid={$_G['fid']}&tid={$_G['tid']}&reppost={$post['pid']}&page={$page}">回复</a>