="alert" style="border: 1px #f1c84c dashed;"> 本帖含有隐藏内容,请您 回复 后查看'; 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 && $replied){ $first['message_fmt'] = str_replace($a, $b, $first['message_fmt']); } if($uid && $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; } } } //解析B站链接 $foxmv = preg_match_all('#\[foxmv\]([\s\S]*?)\[\/foxmv\]#', $first['message_fmt'], $foxmv_arr); //$foxmvAV_find = '/http([s]?):\/\/(.*?)\/av(\d+)(.*?)/'; //foxmvBV_find2 = '/http([s]?):\/\/(.*?)\/BV(\w+)(.*?)/'; $foxmvAV = '
'; $foxmvBV = '
'; $first['message_fmt'] = str_replace(array('/?share_source=copy_web', '?share_source=copy_web'), array('', ''), $first['message_fmt']); //$first['message_fmt'] = preg_replace('/http([s]?):\/\/(.*?)\/av(\d+)(.*?)/', $foxmvAV, $first['message_fmt']); //$first['message_fmt'] = preg_replace('/http([s]?):\/\/(.*?)\/BV(\w+)(.*?)/', $foxmvBV, $first['message_fmt']); $first['message_fmt'] = preg_replace('#

\[foxmv]http([s]?):\/\/(.*?)\/av(\d+)(.*?)\[\/foxmv\]<\/p>#',$foxmvAV, $first['message_fmt']); $first['message_fmt'] = preg_replace('#

\[foxmv]http([s]?):\/\/(.*?)\/BV(\w+)(.*?)\[\/foxmv\]<\/p>#',$foxmvBV, $first['message_fmt']); if (isset($haya_post_like_config['open_post']) && $haya_post_like_config['open_post'] == 1 ) { $hot_like_post_size = intval($haya_post_like_config['hot_like_post_size']) + 1; $hot_like_post_low_count = intval($haya_post_like_config['hot_like_post_low_count']); $haya_post_like_post_ids = array(); if (!empty($postlist)) { foreach ($postlist as $haya_post_like_post) { $haya_post_like_post_ids[] = $haya_post_like_post['pid']; } } $haya_post_like_life_time = isset($haya_post_like_config['hot_like_life_time']) ? intval($haya_post_like_config['hot_like_life_time']) : 86400; $haya_post_like_hot_posts = haya_post_like_find_hot_posts_by_tid_cache($thread['tid'], $hot_like_post_size, $hot_like_post_low_count, $haya_post_like_life_time); if (!empty($haya_post_like_hot_posts)) { if (isset($haya_post_like_config['hot_like_isfirst']) && $haya_post_like_config['hot_like_isfirst'] == 1 ) { $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)); } $haya_sign_type = param('type', ''); if (!empty($haya_sign_type)) { if ($haya_sign_type == 'onlyhost') { $thread['posts'] = post_count(array( 'tid' => $thread['tid'], 'isfirst' => 0, 'uid' => $thread['uid'], )); } $pagination = pagination(url("thread-$tid-{page}$keywordurl", array('type' => $haya_sign_type)), $thread['posts'] + 1, $page, $pagesize); } $haya_sign_see_user = param('user', ''); if (!empty($haya_sign_see_user)) { $haya_sign_see_user_id = intval($haya_sign_see_user); if ($postlist) { foreach ($postlist as $haya_post_type_post_key => & $haya_post_type_post) { if ($haya_post_type_post['uid'] != $haya_sign_see_user_id) { unset($postlist[$haya_post_type_post_key]); } } } $pagination = pagination(url("thread-$tid-{page}$keywordurl", array('user' => $haya_sign_see_user_id)), $thread['posts'] + 1, $page, $pagesize); } 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); $mycredits_url = url('my-credits'); if($thread['content_buy_type']=='3') {$thread['content_buy']/=1.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']); elseif($uid && setting_get('tt_vip')['no_credits_see']=='1' && vip__isvip($user['vip_end'])==1) $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; $set_vip = setting_get('tt_vip'); if($uid && $set_vip['up_read']!='0' && vip__isvip($user['vip_end'])) $my_p += $set_vip['up_read']; 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']); elseif($uid && $set_vip['no_reply_see']!='0' && vip__isvip($user['vip_end']) && vip_getlevel($uid)>=$set_vip['no_reply_see']) $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']); elseif($uid && $set_vip['no_reply_see']!='0' && vip__isvip($user['vip_end']) && vip_getlevel($uid)>=$set_vip['no_reply_see']) $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;} } } } if($thread['red_num']>=0){ $first['message_fmt'].='
'; $load_redpacket_js=1; $red_info = db_find_one('thread_red',array('tid'=>$tid)); } if($thread['VIPonly']) { if (empty($user)) { message(-1, jump("您好,请先登录!", url('my-credits'), 5)); die(); } if ($user['gid'] != 1 && !(vip__isvip($user['vip_end']))) { message(-1, jump("您好,本帖为VIP专属帖子,仅限VIP用户查看,请您开通VIP后查看!", url('my-credits'), 5)); die(); } } include _include(APP_PATH.'view/htm/thread.htm'); } ?>