$hot_like_isfirst = true; } else { $hot_like_isfirst = false; } $haya_post_like_hot_post_isfirst = false; foreach ($haya_post_like_hot_posts as $haya_post_like_hot_post_key => $haya_post_like_hot_post) { if ($haya_post_like_hot_post['isfirst'] == 1 && !$hot_like_isfirst) { unset($haya_post_like_hot_posts[$haya_post_like_hot_post_key]); $haya_post_like_hot_post_isfirst = true; } else { $haya_post_like_post_ids[] = $haya_post_like_hot_post['pid']; // 移除楼层 $haya_post_like_hot_posts[$haya_post_like_hot_post_key]['floor'] = ''; } } if (!$haya_post_like_hot_post_isfirst && (count($haya_post_like_hot_posts)) >= $hot_like_post_size) { array_pop($haya_post_like_hot_posts); } } $haya_post_like_pids = haya_post_like_find_by_pids_and_uid($haya_post_like_post_ids, $uid, count($haya_post_like_post_ids)); } if($thread['OK']!='1' && $group['see_check']!='1' && $uid!=$thread['uid']) { if($thread['OK']=='0') message(-1, "本帖正在审核中,您无权查看!"); elseif($thread['OK']=='-1') message(-1, "本帖未审核通过,您无权查看!"); elseif($thread['OK']=='-2') message(-1, "本帖正在回收站中,您无权查看!"); die(); } $spay_url = url('thread-sPay-'.$tid); if($thread['content_buy_type']=='3') {$thread['content_buy']/=100.0;} if($route=='mip') $html_pay='您好,本帖含有付费内容,请您点击下方“查看完整版网页”获取!'; else $html_pay=''; $preg_pay = preg_match_all('/\[ttPay\](.*?)\[\/ttPay\]/i',$first['message_fmt'],$array); $first['purchased']='1'; $content_pay = db_find_one('paylist', array('tid' => $tid, 'uid' => $uid, 'type' => 1)); $is_set=0; if($thread['content_buy']){ if($preg_pay){ $array_count = count($array[0]); for($i=0;$i<$array_count;$i++){ $a = $array[0][$i]; $b = ''; if($content_pay||$thread['uid']==$uid) $first['message_fmt'] = str_replace($a,$b,$first['message_fmt']); else $first['message_fmt'] = str_replace($a,$is_set==0?$html_pay:'',$first['message_fmt']); $is_set=1;$first['purchased']='0'; } } }else{ $first['message_fmt'] = str_replace('[ttPay]','',$first['message_fmt']); $first['message_fmt'] = str_replace('[/ttPay]','',$first['message_fmt']); } $gid=isset($user['gid'])?$user['gid']:'0'; $my_p=$group['readp']; $target_p=$thread['readp']; $need_refresh=0; if(($gid!=1)&& $my_p<$target_p ){ message(-1, jump(lang('dear_p'), http_referer(), 2));die();} $preg_login = preg_match_all('/\[ttlogin\](.*?)\[\/ttlogin\]/i',$first['message_fmt'],$array); if($preg_login) { $array_count = count($array[0]); $html_hide=''; for($i=0;$i<$array_count;$i++){ $a = $array[0][$i]; $b = ''; if($uid)$first['message_fmt'] = str_replace($a,$b,$first['message_fmt']); else $first['message_fmt'] = str_replace($a,$html_hide,$first['message_fmt']); } } $preg_reply = preg_match_all('/\[ttreply\](.*?)\[\/ttreply\]/i',$first['message_fmt'],$array); if($preg_reply) { $array_count = count($array[0]); $html_reply =''; if($uid) $replied=db_find_one('post',array('uid'=>$uid,'tid'=>$thread['tid'])); else $replied=array(); for($i=0;$i<$array_count;$i++){ $a = $array[0][$i]; $b = ''; if($uid AND $replied)$first['message_fmt'] = str_replace($a,$b,$first['message_fmt']); if($uid AND isset($gid) AND $gid==1)$first['message_fmt'] = str_replace($a,$b,$first['message_fmt']); else {$first['message_fmt'] = str_replace($a,$html_reply,$first['message_fmt']);$need_refresh=1;} } } $set = setting_get('tt_read'); if($set&& $set['old']==1) { $preg_reply2 = preg_match_all('/\[reply\](.*?)\[\/reply\]/i',$first['message_fmt'],$array2); if($preg_reply2) { $array2_count = count($array2[0]); $html_reply =''; if($uid) $replied=db_find_one('post',array('uid'=>$uid,'tid'=>$thread['tid'])); else $replied=array(); for($i=0;$i<$array2_count;$i++){ $a = $array2[0][$i]; $b = ''; if($uid AND $replied)$first['message_fmt'] = str_replace($a,$b,$first['message_fmt']); else {$first['message_fmt'] = str_replace($a,$html_reply,$first['message_fmt']);$need_refresh=1;} } } } include _include(APP_PATH.'view/htm/thread.htm'); } ?>