- $attachcount = C::t('forum_attachment_n')->count_by_id('tid:'.$tid, $pid ? 'pid' : 'tid', $pid ? $pid : $tid);
- $attachment = 0;
- $boolean = true;
- if($attachcount) {
- if((C::t('forum_attachment_n')->count_image_by_id('tid:'.$tid, $pid ? 'pid' : 'tid', $pid ? $pid : $tid)) && $boolean=true)
- {
- $attachment = 4;
- }
- else if ($boolean=true)
- {
- $attachment = 3;
- }
- else if (C::t('forum_attachment_n')->count_image_by_id('tid:'.$tid, $pid ? 'pid' : 'tid', $pid ? $pid : $tid))
- {
- $attachment = 2;
- }
- else
- {
- $attachment = 1;
- }
-
- } else {
- $attachment = 0;
- }
复制代码
函数不会改了。。。
|