时间:2021-07-21人气:-
//内容摘要 include_once libfile('function/post'); include_once libfile('function/attachment'); $thread['post'] = C::t('forum_post')->fetch_all_by_tid_position($thread['posttableid'],$thread['tid'],1); $thread['post'] = array_shift($thread['post']); $thread['preview'] = messagecutstr($thread['post']['message'], 200); $attachments = C::t('forum_attachment_n')->fetch_all_by_id('tid:'.$thread['post']['tid'], 'pid', $thread['post']['pid']); $attachs = $imgattachs = array(); foreach(C::t('forum_attachment')->fetch_all_by_id('pid', $thread['post']['pid'], 'aid') as $attach) { $attach = array_merge($attach, $attachments[$attach['aid']]); $attach['filenametitle'] = $attach['filename']; $attach['ext'] = fileext($attach['filename']); getattach_row($attach, $attachs, $imgattachs); } $thread['attachments'] = $imgattachs; //内容摘要END
<!--{eval require_once(DISCUZ_ROOT."./source/function/function_post.php");}--><!--{echo messagecutstr(DB::result_first('SELECT `message` FROM '.DB::table('forum_post').' WHERE `tid` ='.$thread[tid].' AND `first` =1'),300);}-->
<!--{eval $threadlist_message = DB::result(DB::query("SELECT message FROM ".DB::table('forum_post')." WHERE `tid` = $thread[tid] AND `first` =1"));}--><!--{echo cutstr($threadlist_message,300)}-->