irst_thread); } if (!empty($postlist)) { $floor = $thread['posts'] - ($page - 1) * $pagesize + 1; foreach ($postlist as & $post) { $post['floor'] = $floor--; post_format($post); } } return $postlist; } elseif (!empty($haya_post_info_see_user)) { $haya_post_info_cond = array('tid' => $tid, 'uid' => intval($haya_post_info_see_user)); $postlist = post__find($haya_post_info_cond, array('pid' => 1), $page, $pagesize); if ($page == 1) { $first_thread = post__read($thread['firstpid']); $postlist += array($thread['firstpid'] => $first_thread); } if (!empty($postlist)) { $floor = ($page - 1) * $pagesize + 1; foreach ($postlist as & $post) { $post['floor'] = $floor++; post_format($post); } } return $postlist; } } } $postlist = post__find(array('tid'=>$tid), array('pid'=>1), $page, $pagesize); if($postlist) { $floor = ($page - 1)* $pagesize + 1; foreach($postlist as &$post) { $post['floor'] = $floor++; post_format($post); } } return $postlist; } // //
function user_post_message_format(&$s) { if(xn_strlen($s) < 100) return; $s = preg_replace('#.*?
#is', '', $s); $s = str_ireplace(array('
', '
', '
', '

', '', '', '', ''. ''), "\r\n", $s); $s = str_ireplace(array(' '), " ", $s); $s = strip_tags($s); $s = preg_replace('#[\r\n]+#', "\n", $s); $s = xn_substr(trim($s), 0, 100); $s = str_replace("\n", '
', $s); } /* function post_list_cache_delete($tid) { global $conf; $r = cache_delete("postlist_$tid"); return $r; }*/ // ------------> 其他方法 function post_count($cond = array()) { $n = db_count('post', $cond); return $n; } function post_maxid() { $n = db_maxid('post', 'pid'); return $n; } function post_safe_info($post) { unset($post['userip']); if(!empty($post['user'])) { $post['user'] = user_safe_info($post['user']); } return $post; } function post_find_by_pids($pids, $order = array('pid'=>-1)) { if(!$pids) return array(); $postlist = db_find('post', array('pid'=>$pids), $order, 1, 1000, 'pid'); if($postlist) foreach($postlist as &$post) post_format($post); return $postlist; } function post_highlight_keyword($str, $k) { $r = str_ireplace($k, ''.$k.'', $str); return $r; } // 公用的附件模板,采用函数,效率比 include 高。 function post_file_list_html($filelist, $include_delete = FALSE) { if(empty($filelist)) return ''; $s = '
'."\r\n"; $s .= '上传的附件:'."\r\n"; $s .= ''."\r\n"; $s .= '
'."\r\n"; return $s; } function post_format(&$post) { global $conf, $uid, $sid, $gid, $longip; if(empty($post)) return; $post['create_date_fmt'] = humandate($post['create_date']); $user = user_read_cache($post['uid']); $post['username'] = array_value($user, 'username'); $post['user_avatar_url'] = array_value($user, 'avatar_url'); $post['user'] = $user ? $user : user_guest(); !isset($post['floor']) AND $post['floor'] = ''; $thread = thread_read_cache($post['tid']); // 权限判断 $post['allowupdate'] = ($uid == $post['uid']) || forum_access_mod($thread['fid'], $gid, 'allowupdate'); $post['allowdelete'] = ($uid == $post['uid']) || forum_access_mod($thread['fid'], $gid, 'allowdelete'); $post['user_url'] = url("user-$post[uid]".($post['uid'] ? '' : "-$post[pid]")); if($post['files'] > 0) { list($attachlist, $imagelist, $filelist) = attach_find_by_pid($post['pid']); $post['filelist'] = $filelist; } else { $post['filelist'] = array(); } $post['classname'] = 'post'; @include_once APP_PATH . 'plugin/tcy_cfr2/model/r2.func.php'; r2_on_model_post_format_end($post);if (!empty($post['user']['gid']) && intval($post['user']['gid']) == 7) { $post['message_fmt_fox'] = '
'.$post['message_fmt'].''; $post['message_fmt'] = ''; } $post['floormanage'] = forum_access_mod($thread['fid'], $gid, 'allowdelete'); if (isset($post['is_approved']) && $post['is_approved'] != 1) { global $uid, $gid; $is_owner = !empty($uid) && $post['uid'] == $uid; $_fid = isset($post['fid']) ? $post['fid'] : 0; if (empty($_fid)) { $_t = thread__read($post['tid']); $_fid = $_t ? $_t['fid'] : 0; } $is_mod = function_exists('moderate_can_moderate') && moderate_can_moderate($gid, $_fid); if ($is_owner || $is_mod) { if ($post['isfirst']) { } elseif ($post['is_approved'] == 0) { $post['message_fmt'] = '
回复审核中,仅自己和管理员可见
' . $post['message_fmt']; } elseif ($post['is_approved'] == 2) { $post['message_fmt'] = '
回复审核未通过,仅自己和管理员可见
' . $post['message_fmt']; } } else { if ($post['isfirst']) { } else { $post['message_fmt'] = ''; } } } } // 写入时格式化 function post_message_fmt(&$arr, $gid) { // 超长内容截取 $arr['message'] = xn_substr($arr['message'], 0, 2028000); // 格式转换: 类型,0: html, 1: txt; 2: markdown; 3: ubb $arr['message_fmt'] = htmlspecialchars($arr['message']); // 入库的时候进行转换,编辑的时候,自行调取 message, 或者 message_fmt $arr['doctype'] == 0 && $arr['message_fmt'] = ($gid == 1 ? $arr['message'] : xn_html_safe($arr['message'])); $arr['doctype'] == 1 && $arr['message_fmt'] = xn_txt_to_html($arr['message']); // 付费块入库前去掉  ,避免前台显示字面量   if (!empty($arr['message_fmt']) && function_exists('tt_pay_clean_message_fmt_blocks')) { $arr['message_fmt'] = tt_pay_clean_message_fmt_blocks($arr['message_fmt']); } // 对引用进行处理 !empty($arr['quotepid']) && $arr['quotepid'] > 0 && $arr['message_fmt'] = post_quote($arr['quotepid']).$arr['message_fmt']; } // 获取内容的简介 0: html, 1: txt; 2: markdown; 3: ubb function post_brief($s, $len = 100) { $s = strip_tags($s); $s = htmlspecialchars($s); $more = xn_strlen($s) > $len ? ' ... ' : ''; $s = xn_substr($s, 0, $len).$more; return $s; } // 对内容进行引用 function post_quote($quotepid) { $quotepost = post__read($quotepid); if(empty($quotepost)) return ''; $uid = $quotepost['uid']; $s = $quotepost['message']; $user = user_read_cache($uid); $user['gid'] == 7 AND $s = '【该用户被关禁闭,内容被隐藏'; $s = post_brief($s, 100); $userhref = url("user-$uid"); $user = user_read_cache($uid); $r = '
'.$user['username'].' '.$s.'
'; return $r; } // 对 $threadlist 权限过滤 function post_list_access_filter(&$postlist, $gid) { global $conf, $forumlist; if(empty($postlist)) return; foreach($postlist as $pid=>$post) { $thread = thread__read($post['tid']); $fid = $thread['fid']; if(empty($forumlist[$fid]['accesson'])) continue; if($thread['top'] > 0) continue; if(!forum_access_user($fid, $gid, 'allowread')) { unset($postlist[$pid]); } } // 勿用 return:会中断 post_list_access_filter(),导致审核插件等后续 hook 失效 @include_once APP_PATH.'plugin/xn_adguard/xnadguard_load.php'; if (function_exists('xnadguard_plugin_load')) { xnadguard_plugin_load(); } if (function_exists('xnadguard_config')) { $config = xnadguard_config(); if (!empty($config['enable']) && !empty($config['audit_hide']) && $config['mode'] === 'audit') { global $uid, $gid; if (!xnadguard_is_whitelist($gid, $uid) && $gid != 1) { foreach ($postlist as $pk => $post) { if (isset($post['OK']) && $post['OK'] != '1' && $post['uid'] != $uid) { unset($postlist[$pk]); } } } } } global $uid, $thread; if (empty($thread) && !empty($postlist)) { $first = reset($postlist); if ($first) { $thread = thread__read($first['tid']); } } if (!empty($postlist) && $thread && isset($thread['is_approved']) && $thread['is_approved'] == 0) { foreach ($postlist as $pkey => $post) { if ($post['is_approved'] != 1) { if ($uid && $post['uid'] == $uid) continue; if (moderate_can_moderate($gid, $thread['fid'])) continue; unset($postlist[$pkey]); } } } } ?>
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 189
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 189, ini_set(session.name , bbs_sid)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 191
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 191, ini_set(session.use_cookies , On)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 192
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 192, ini_set(session.use_only_cookies , On)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 193
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 193, ini_set(session.cookie_domain , )
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 194
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 194, ini_set(session.cookie_path , )
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 195
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 195, ini_set(session.cookie_secure , Off)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 196
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 196, ini_set(session.cookie_lifetime , 8640000)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 197
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 197, ini_set(session.cookie_httponly , On)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 199
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 199, ini_set(session.gc_maxlifetime , 3600)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 200
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 200, ini_set(session.gc_probability , 1)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 201
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 201, ini_set(session.gc_divisor , 500)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: session_set_save_handler(): Cannot change save handler when headers already sent, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 203
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 203, session_set_save_handler(sess_open , sess_close , sess_read , sess_write , sess_destroy , sess_gc)
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
Error[2]: session_start(): Cannot start session when headers already sent, File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 210
File: /www/wwwroot/xiuno/tmp/model_session.func.php, Line: 210, session_start()
File: /www/wwwroot/xiuno/tmp/index.inc.php, Line: 12, sess_start()
File: /www/wwwroot/xiuno/index.php, Line: 52, include(/www/wwwroot/xiuno/tmp/index.inc.php)
性息网-全国性息-免费楼凤论坛
首页 发现 发布 消息 我的
以任何名义让先交钱的请勿相信,以防被骗