function pick_seo_replace($info, $bbs = 1) { if (!$info) { return; } include_once libfile('function/home'); $set = pick_common_get(); $key_arr = array('push_title_header', 'push_title_footer', 'push_content_header', 'push_content_body', 'push_content_footer', 'push_reply_header', 'push_reply_body', 'push_reply_footer'); foreach ($key_arr as $v) { ${$v} = format_wrap($set[$v]); } $info_key = array('title', 'content', 'reply'); $hide = $bbs == 1 ? 0 : 1; foreach ($info_key as $v) { if (!$info[$v]) { continue; } if ($v != 'title') { //添加随机隐藏内容 $rand_arr_key = 'push_' . $v . '_body'; if (${$rand_arr_key}) { $rand_arr = implode('*_*', ${$rand_arr_key}); $info[$v] = preg_replace("/\r\n|\n|\r/e", "pick_jammer('', '{$rand_arr}', {$bbs})", $info[$v]); $info[$v] = preg_replace("/<\\/p>|<\\/P>/e", "pick_jammer('</p>', '{$rand_arr}', {$bbs})", $info[$v]); } } $header_arr = 'push_' . $v . '_header'; $header_arr = ${$header_arr}; $header = $header_arr[array_rand($header_arr)]; $footer_arr = 'push_' . $v . '_footer'; $footer_arr = ${$footer_arr}; $footer = $footer_arr[array_rand($footer_arr)]; $info[$v] = $header . $info[$v]; $info[$v] .= $footer; if ($v == 'title') { $info[$v] = getstr(trim($info[$v]), 80, 1, 1); } } return $info; }
function virtualdata_set() { global $head_url, $header_config; if (!submitcheck('submit')) { require_once libfile('function/forumlist'); $info = pick_common_get(); $info['vir_cache_time'] = $info['vir_cache_time'] ? $info['vir_cache_time'] : 10; $info['vir_data_forum'] = unserialize($info['vir_data_forum']); $info['vir_data_usergroup'] = unserialize($info['vir_data_usergroup']); $info['forumselect'] = '<select name="set[vir_data_forum][]" size="10" multiple="multiple"><option value="">' . cplang('plugins_empty') . '</option>' . forumselect(FALSE, 0, $info['vir_data_forum'], TRUE) . '</select>'; return $info; } else { $set = $_GET['set']; if (!$set['vir_data_forum'][0] && count($set['vir_data_forum']) == 1) { $set['vir_data_forum'] = ''; } pick_common_set($set); save_syscache('milu_pick_vir_postdata', ''); save_syscache('milu_pick_vir_data', ''); save_syscache('milu_pick_vir_online', ''); cpmsg(milu_lang('op_success'), PICK_GO . "virtual_data", 'succeed'); } }
function cloud_match_rules($get_type, $url, $content) { global $_G; pload('F:fastpick'); $setting = get_pick_set(); $pick_config = $_G['cache']['evn_milu_pick']['pick_config']; $server_cache_time = $pick_config['index_server_cache_time']; if ($get_type == '3') { //智能学习规则索引过期时间比较短 $server_cache_time = $pick_config['evo_index_server_cache_time']; } $milu_set = pick_common_get(); if ($setting['open_cloud_pick'] != 1) { return FALSE; } pload('F:copyright'); $host_info = GetHostInfo($url); $domain = $host_info['host']; $domain_hash = md5($domain); $url_temp = preg_replace('/\\d+/', '', $url); $arr_temp = parse_url($url_temp); $path_hash = md5($arr_temp['path']); $over_dateline = $_G['timestamp'] - $server_cache_time; $count = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table('strayer_searchindex') . " WHERE domain_hash='" . $domain_hash . "' AND path_hash='" . $path_hash . "' AND type='" . $get_type . "3' AND dateline > {$over_dateline}"), 0); //3是服务端 4是本地的缓存 if ($count) { return FALSE; } $args = array('get_type' => $get_type, 'url' => $url); $rpcClient = rpcClient(); $client_info = get_client_info(); $re = $rpcClient->cloud_match_rules($args, $client_info); if (is_object($re) || $re->Number == 0) { if ($re->Message) { return milu_lang('phprpc_error', array('msg' => $re->Message)); } $re = (array) $re; } $data = array(); if ($re['data_type'] == 1) { //返回规则 $rules_info = $re['data']; if ($get_type == 3) { $data = evo_rules_get_article($content, $rules_info); } else { $data = rules_get_article($content, $rules_info); } if ($data || $data['content'] && $get_type == 3) { //规则验证有效,下载到本地 if ($get_type == 3) { $data_id = import_evo_data($rules_info); } else { $data_id = import_fastpick_data($rules_info); } if ($data_id) { //先清除之前的索引 DB::query('DELETE FROM ' . DB::table('strayer_searchindex') . " WHERE domain_hash='" . $domain_hash . "' AND path_hash='" . $path_hash . "'"); add_search_index($domain_hash, $path_hash, $get_type . '4', $data_id); //添加索引 } } } else { if ($re['data_type'] == 2) { //返回内容 $data = $re['data']; } else { //一无所获,那也要告诉客户端,别再骚扰服务端了 add_search_index($domain_hash, $path_hash, $get_type . '3', 0); } } return $data; }
function no_member_tips() { $tips_arr = dunserialize(pick_common_get(0, 'pick_tips')); if ($tips_arr['no_user']) { return; } $check = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table('strayer_member')), 0); if ($check) { return; } return show_tips('<div class="tipsblock"><li>' . milu_lang('no_member_tips', array('url' => '?' . PICK_GO . 'member&myac=member_import_online&tpl=no')) . '</li></ul></div>', array('key' => 'no_user', 'w' => 380, 'h' => 250)); }
function fast_pick() { global $_G; d_s('f_g'); d_s('g_t'); pload('F:spider'); $url = $_GET['url']; $content = get_contents($url, array('cache' => -1)); $get_time = d_e(0, 'g_t'); $type = $_GET['type'] ? $_GET['type'] : 'bbs'; $milu_set = pick_common_get(); $data = (array) get_single_article($content, $url); if ($milu_set['fp_word_replace_open'] == 1 && !VIP) { //开启同义词替换 $words = get_replace_words(); if ($data['title']) { $data['title'] = strtr($data['title'], $words); } if ($data['content']) { $data['content'] = strtr($data['content'], $words); } } if ($milu_set['fp_article_from'] == 1) { //开启来源 $data['fromurl'] = $url; if ($type == 'bbs' && $data['content']) { $data['content'] .= "[p=30, 2, left]" . milu_lang('article_from') . ':' . $url . "[/p]"; } } $data['get_text_time'] = $get_time; $data['all_get_time'] = d_e(0, 'f_g'); $data = $data ? $data : array(); $data = js_base64_encode($data); $re = json_encode($data); return $re; }
function article_batch() { global $_G; $aid_arr = $_GET['aid']; $is_public_del = $_GET['is_public_del']; if (!VIP) { $today_arr = dunserialize(pick_common_get('', 'pick_today')); if ($today_arr['day'] != date('md', $_G['timestamp'])) { $c_set['pick_today'] = array(); pick_common_set($c_set); } else { $article_public_num = $today_arr['article_public_num']; if ($article_public_num > 10000) { cpmsg_error(milu_lang('article_public_limit', array('n' => 10000))); } } } extract($_GET); extract($set); $public_start_time = strtotime($public_start_time); $public_end_time = strtotime($public_end_time); $args_arr = array('optype', 'pid', 'is_public_del', 'article_public_sort', 'is_public_del', 'public_start_time', 'public_end_time', 'status', 's', 'ordersc', 'orderby', 'time_public', 'portal', 'forums', 'threadtypeid', 'blog', 'perpage', 'oparea', 'article_batch_num', 'move_pid', 'p'); $args_url = ''; foreach ($args_arr as $k => $v) { $args_url .= '&' . $v . '=' . ${$v}; } //$args_url .= '&myac=' //echo $args_url;exit(); $from_url = PICK_GO . "picker_manage&myac=article_manage&finished=1" . $args_url; if ($_GET['finished']) { cpmsg(milu_lang('run_finsh'), $from_url, 'succeed'); } if (!$_GET['confirmed']) { $article_batch_num = $setrr['article_batch_num'] = $article_batch_num ? $article_batch_num : 15; pick_common_set($setrr); if (!$optype) { cpmsg_error(milu_lang('must_select_optype')); } if ($oparea == 'selected') { if (!$aid_arr) { cpmsg_error(milu_lang('must_select_data')); } $aid_str = base64_encode(serialize($aid_arr)); $total = count($aid_arr); } else { if ($oparea == 'all') { $total = article_count($pid, $status, array('s' => $s)); } } pcpmsg_loading(milu_lang('bat_import_article', array('a' => $article_batch_num, 't' => $total)), $from_url, 'loadingform', '', '<div id="percent">0%</div>', FALSE); $ajax_url = "admin.php?" . PICK_GO . "picker_manage&myac=ajax_func&inajax=1&af=" . $myac . "&tpl=no&confirmed=1&oparea={$oparea}&aid={$aid_str}" . $args_url; $finsh_url = "admin.php?" . PICK_GO . "picker_manage&myac=article_manage&finished=1" . $args_url; //echo $ajax_url;exit(); echo pick_loading($ajax_url, $finsh_url, $total, array('bat_num' => $article_batch_num)); } else { ob_end_clean(); $total = intval($_GET['total']); $pp = intval($_GET['pp']); $pid = intval($_GET['pid']); $currow = intval($_GET['currow']); $oparea = $_GET['oparea']; $public_sort = $_GET['public_sort']; $public_sort = $public_sort == 1 ? 'asc' : 'desc'; if ($oparea == 'selected') { $aid_arr = unserialize(base64_decode($aid)); $where = $optype == 'timing_delete' ? " AND t.id IN (" . dimplode($aid_arr) . ") " : " AND aid IN (" . dimplode($aid_arr) . ") "; } else { if ($oparea == 'all') { $where = $optype == 'timing_delete' ? " AND a.title like '%" . $_GET['s'] . "%' " : " AND title like '%" . $_GET['s'] . "%' "; } } $aid_arr = array(); if ($is_public_del == 1 && ($optype == 'move_portal' || $optype == 'move_forums' || $optype == 'move_blog') || $optype == 'delete') { $currow = 0; } if ($optype == 'timing_delete') { $query = DB::query("SELECT a.aid,t.id, t.data_id FROM " . DB::table('strayer_timing') . " t Inner Join " . DB::table('strayer_article_title') . " a ON a.aid = t.data_id WHERE t.pid='{$pid}' {$where} ORDER by t.data_id LIMIT {$currow},{$pp}"); while ($rs = DB::fetch($query)) { if ($rs['aid']) { DB::update('strayer_article_title', array('status' => 1), array('aid' => $rs['aid'])); } $aid_arr[] = $rs['id']; } } else { $query = DB::query("SELECT aid FROM " . DB::table('strayer_article_title') . " WHERE pid='{$pid}' {$where} ORDER by dateline " . $public_sort . " LIMIT {$currow},{$pp}"); while ($rs = DB::fetch($query)) { $aid_arr[] = $rs['aid']; } } if ($optype == 'move_portal' || $optype == 'move_forums' || $optype == 'move_blog') { article_import($_GET['optype'], array('aid' => $aid_arr)); } else { $action = 'article_' . $optype; $action($aid_arr, $pid); } if ($currow + $pp > $total) { echo 'TRUE'; exit; } echo 'GO'; exit; } }
function evo_set($info) { global $_G; if (!$info) { return; } if (strlen($info['text']['html']) < 200 || strlen($info['title']['html']) < 10) { return; } //标题和内容太短都不行 $link_count = own_link_count($info['text']['html'], $this->url); if ($link_count > 10) { return FALSE; } //有10个指向自己的链接,就不行 $milu_set = pick_common_get(); if ($milu_set['fp_open_evo'] != 1) { return FALSE; } $text_info = $this->dom_info_arr[$info['text']['key']]; $title_info = $this->dom_info_arr[$info['title']['key']]; $text_info['html'] = $info['text']['html']; $title_info['html'] = $info['title']['html']; $info['title_split_arr'] = $this->get_split_arr($title_info); $info['text_split_arr'] = $split_arr = $this->get_split_arr($text_info); unset($text_info['outertext'], $text_info['parent']['outertext'], $title_info['outertext'], $title_info['parent']['outertext'], $text_info['html'], $title_info['html']); if (strlen($split_arr[0]) < 14) { return FALSE; } pload('F:copyright'); $host_info = GetHostInfo($this->url); $domain = $host_info['host']; $domain_hash = md5($domain); if (preg_match('/\\d+/', $split_arr[0])) { $s_arr = preg_split("/[\\d]+/", $split_arr[0]); $split_arr[0] = $s_arr[0]; foreach ((array) $s_arr as $k => $v) { if (strlen($v) > strlen($split_arr[0])) { $split_arr[0] = $v; } } } if (!$title_info) { return FALSE; } $result_info['evo_title_info'] = $title_info; $setarr = array('content_get_type' => 0, 'detail_ID' => $split_arr[0], 'detail_ID_hash' => md5($split_arr[0]), 'detail_ID_test' => $this->url, 'content_rules' => '', 'evo_text_info' => serialize($text_info), 'evo_title_info' => serialize($title_info), 'domain_hash' => $domain_hash, 'domain' => $domain, 'status' => 0, 'dateline' => $_G['timestamp']); $setarr = paddslashes($setarr); $base_sql = "SELECT * FROM " . DB::table('strayer_evo') . " WHERE domain_hash='{$domain_hash}' AND detail_ID_hash='" . $setarr['detail_ID_hash'] . "' AND status=0"; $data_info = DB::fetch_first($base_sql . " AND detail_ID_test!='{$this->url}'"); $data_info = pstripslashes($data_info); if (!$data_info) { //还没有资料 if (!($check = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table('strayer_evo') . " WHERE domain_hash='{$domain_hash}' AND detail_ID_hash='" . $setarr['detail_ID_hash'] . "' AND status=0 AND detail_ID_test='{$this->url}'"), 0))) { DB::insert('strayer_evo', $setarr, TRUE); } $result_info['status'] = 'no'; return $result_info; } else { //有了资料 $title_rules = $this->get_rules($info, $title_info, $data_info, 'title'); $text_rules = $this->get_rules($info, $text_info, $data_info, 'text'); //删除之前的一些记录,防止没有索引的情况下重复生成规则 $check_info = DB::fetch_first("SELECT * FROM " . DB::table('strayer_evo') . " WHERE domain_hash='{$domain_hash}' AND detail_ID_hash='" . $setarr['detail_ID_hash'] . "' AND status=1"); DB::query('DELETE FROM ' . DB::table('strayer_evo') . " WHERE id='{$check_info['id']}'"); DB::query('DELETE FROM ' . DB::table('strayer_searchindex') . " WHERE id='{$check_info['id']}' AND type='34'"); if ($text_rules) { $setarr = array('content_get_type' => $text_rules['get_type'], 'content_rules' => $text_rules['rules'], 'theme_get_type' => $title_rules['get_type'], 'theme_rules' => $title_rules['rules'], 'status' => 1); DB::update("strayer_evo", $setarr, array("id" => $data_info['id'])); $pash_hash = get_path_hash($this->url); add_search_index($domain_hash, $path_hash, 34, $data_info['id']); //添加索引 4是本地缓存 $pick_set = get_pick_set(); if ($pick_set['open_cloud_pick'] == 1) { //开启云采集,将规则上传到服务端 $rpcClient = rpcClient(); unset($setarr['status']); $data_info['content_get_type'] = $setarr['content_get_type']; $data_info['content_rules'] = $setarr['content_rules']; $data_info['theme_get_type'] = $setarr['theme_get_type']; $data_info['theme_rules'] = $setarr['theme_rules']; $client_info = get_client_info(); $re = $rpcClient->upload_evo_data($data_info, $client_info); } del_search_index(3); $result_info['status'] = 'ok'; return $result_info; } } }
function version_check() { global $_G; $check = $_G['cache']['plugin']['milu_pick']['check_version']; if (!VIP || $check != 1) { return FALSE; } $get_site = GET_URL; $client_info = get_client_info(); if (!$client_info || !$client_info['domain']) { return; } $tips_arr = dunserialize(pick_common_get(0, 'pick_tips')); if ($tips_arr['check_version']) { return; } if (load_cache('check_version')) { return; } $url = GET_URL . 'plugin.php?id=pick_user:upgrade&myac=check_version&tpl=no&php_version=' . phpversion() . '&dxc_version=' . $client_info['dxc_version'] . '&dxc_release=' . $client_info['dxc_release']; $result = get_contents($url, array('cache' => -1)); cache_data('check_version', 'ok', 5 * 3600); if ($result == 'ok') { return show_tips('<div class="tipsblock"><li>' . milu_lang('have_new_version', array('url' => '?' . PICK_GO . 'pick_info&ac=pick_check&checking=1')) . '</li></ul></div>', array('key' => 'check_version', 'w' => 380, 'h' => 250)); } }
function article_import($action, $args) { global $_G; $pick_common_set = get_pick_set(); $is_timing = $pick_common_set['is_timing']; //if(!VIP) $is_timing = 0; pload('F:spider'); $aid_arr = $args['aid'] ? $args['aid'] : $_GET['aid']; $op = 'article_' . $action; $type_arr = explode('_', $action); $type = $type_arr[1]; $pid = $args['pid'] ? $args['pid'] : intval($_GET['pid']); $p_arr = get_pick_info($pid); $view_arr = format_wrap($p_arr['view_num'], ','); $public_type = 1; if ($type == 'blog') { $public_type = 3; $type = 'album'; } if ($type == 'forums') { $public_type = 2; $type = 'forum'; } $today_public_num = 0; foreach ($aid_arr as $k => $aid) { $arr = $old_arr = article_info($aid); if (!$arr) { continue; } $arr['p_arr'] = $p_arr; $arr['public_start_time'] = $_GET['public_start_time'] ? $_GET['public_start_time'] : $p_arr['public_start_time']; $arr['public_end_time'] = $_GET['public_end_time'] ? $_GET['public_end_time'] : $p_arr['public_end_time']; $arr['public_time'] = 0; $time_arr = create_public_time($arr, 1); $arr['public_time'] = array_pop($time_arr); if ($args['cron_run'] && $args['public_time']) { $arr['public_time'] = $args['public_time'][$aid]; } $arr['title'] = htmlspecialchars_decode($arr['title'], ENT_QUOTES); $arr['content'] = htmlspecialchars_decode($arr['content'], ENT_QUOTES); $arr['title'] = format_html($arr['title']); $arr['content'] = format_html($arr['content']); unset($arr['pic']); $arr['view_num'] = rand($view_arr[0], $view_arr[1]); $rand_arr = get_rand_uid($p_arr); $arr['uid'] = $setarr['uid'] = $rand_arr[0]['uid'] ? $rand_arr[0]['uid'] : $_G['uid']; $arr['username'] = $setarr['username'] = $rand_arr[0]['username']; $arr['portal_cid'] = $timing_public_arr['portal'] = $args['portal'] ? $args['portal'] : $_GET['portal']; $arr['forum_fid'] = $timing_public_arr['forums'] = $args['forums'] ? $args['forums'] : $_GET['forums']; $arr['forum_typeid'] = $timing_public_arr['threadtypeid'] = $args['threadtypeid'] ? $args['threadtypeid'] : $_GET['threadtypeid']; $arr['blog_big_cid'] = $timing_public_arr['blog'] = $args['blog'] ? $args['blog'] : $_GET['blog']; $arr['blog_small_cid'] = $timing_public_arr['classid'] = $args['classid'] ? $args['classid'] : $_GET['classid']; $arr['is_download_img'] = $p_arr['is_download_img']; $arr['is_water_img'] = $p_arr['is_water_img']; $arr['content'] = clear_ad_html($arr['content']); $arr['summary'] = addslashes($arr['summary']); $arr['public_reply_seq'] = $p_arr['public_reply_seq']; $arr['is_public_reply'] = $p_arr['is_public_reply']; $arr['public_uid'] = $p_arr['public_uid']; $arr['reply_uid'] = $p_arr['reply_uid']; $arr['is_page_public'] = $p_arr['is_page_public']; $arr['page_url'] = $arr['url']; //发布时间大于当前时间,放入定时发布中 if ($arr['public_time'] > $_G['timestamp'] && $is_timing == 1) { $timing_setarr = array('public_type' => $public_type, 'data_id' => $aid, 'content_type' => 1, 'public_dateline' => $arr['public_time'], 'pid' => $pid, 'public_info' => serialize($timing_public_arr)); article_timing_add($timing_setarr); DB::update('strayer_article_title', array('status' => 4), array('aid' => $aid)); continue; } $arr['article_tag'] = $pick_common_set['open_tag'] == 1 && ($type == 'album' || $type == 'forum') && empty($arr['article_tag']) ? implode(',', dz_get_tag($arr['title'], $arr['content'], 1)) : $arr['article_tag']; $arr['cookie'] = $p_arr['login_cookie']; $arr['is_download_file'] = $p_arr['is_download_file']; $arr['content_filter_html'] = unserialize(dstripslashes($p_arr['content_filter_html'])); if ($arr['contents'] > 1 && $arr['is_bbs'] == 0 && $type == 'forum' && $p_arr['is_page_public'] == 2) { $arr['is_public_reply'] = 1; $arr['public_reply_seq'] = 0; $arr['is_content_reply'] = 1; $arr['is_bbs'] = 1; } else { if ($arr['is_bbs'] != 1) { $arr['reply'] = array(); } } if ($p_arr['is_word_replace'] == 1) { //同义词替换 if ($p_arr['is_bbs'] != 1 && $arr['contents'] > 1) { //有几页的文章 $arr['content_arr'] = article_words_replace($arr['content_arr']); } $arr['content'] = article_words_replace($arr['content']); if ($arr['reply']) { $arr['reply'] = article_words_replace($arr['reply']); } $arr['title'] = article_words_replace($arr['title']); } $arr['content'] = clear_ad_html($arr['content']); unset($arr['url']); //跟门户的跳转url重名 unset($arr['aid']); if ($type == 'forum') { $arr = $op($arr, $old_arr); $insert_aid = $setarr['forum_id'] = $arr['tid']; } else { $insert_aid = $op($arr, $old_arr); if ($type == 'portal') { $setarr['portal_id'] = $insert_aid; } else { $setarr['blog_id'] = $insert_aid; } } if ($insert_aid) { $arr['aid'] = $insert_aid; $arr['cookie'] = $p_arr['login_cookie']; if ($type == 'forum') { if ($arr['is_download_img'] == 1 || $arr['is_download_file'] == 1) { forum_downremotefile($arr, $old_arr); } } else { downremotefile($arr, $type, $old_arr); } if ($type == 'portal') { article_thumb($insert_aid); } } $p_arr['is_public_del'] = $p_arr['is_public_del'] ? $p_arr['is_public_del'] : intval($_GET['is_public_del']); $setarr['status'] = 2; $setarr['article_tag'] = $arr['article_tag']; $today_public_num++; if ($p_arr['is_public_del'] != 1 && $insert_aid) { DB::update('strayer_article_title', $setarr, array('aid' => $aid)); } } if (VIP) { $today_arr = dunserialize(pick_common_get('', 'pick_today')); $c_set['pick_today']['day'] = date('md', $_G['timestamp']); $c_set['pick_today']['article_public_num'] = $today_public_num + $today_arr['article_public_num']; pick_common_set($c_set); } if ($p_arr['is_public_del'] == 1) { article_delete($aid_arr); } //导入之后删除 return $insert_aid; }
function _ini_config($pid = 0, $is_cron = 0) { global $_G; $this->error = ''; if ($pid == 0 && $is_cron > 0) { $this->error = 1; return; } $this->pid = $pid > 0 ? intval($pid) : intval($_GET['pid']); $this->pick_cache_data = load_cache('pick' . $this->pid); $this->i = $this->pick_cache_data['i'] ? $this->pick_cache_data['i'] : 1; $this->v_i = $this->pick_cache_data['v_i'] ? $this->pick_cache_data['v_i'] : 0; $this->a = $this->pick_cache_data['a'] ? $this->pick_cache_data['a'] : 0; $this->v_a = $this->pick_cache_data['v_a'] ? $this->pick_cache_data['v_a'] : 0; $this->all_get_time = $this->pick_cache_data['all_get_time'] ? $this->pick_cache_data['all_get_time'] : 0; $this->temp_arr['have_reply'] = 0; $this->plugin_set = get_pick_set(); if ($is_cron > 0 && $this->plugin_set['is_log_cron'] > 0) { $is_log = 1; } $this->msg_args = array('is_cron' => $is_cron, 'pid' => $this->pid, 'is_log' => $is_log); if ($this->i == 1) { show_pick_info(milu_lang('pick_start'), '', $this->msg_args); } $p_arr = get_pick_info($this->pid); $p_arr = pstripslashes($p_arr); //if(!VIP) unset($p_arr['reply_rules'],$p_arr['reply_is_extend'], $p_arr['content_page_rules']); if ($p_arr['rules_type'] == 3) { $p_arr['url_range_type'] = ''; } //新增 $this->pick_set = pick_common_get(); //插件设置 $this->pick_config = $_G['cache']['evn_milu_pick']; $p_arr['rules_var'] = dstripslashes(unserialize($p_arr['rules_var'])); $p_arr['many_page_list'] = dstripslashes(unserialize($p_arr['many_page_list'])); $p_arr['title_filter_rules'] = dstripslashes(unserialize($p_arr['title_filter_rules'])); $p_arr['content_filter_rules'] = dstripslashes(unserialize($p_arr['content_filter_rules'])); $p_arr['reply_filter_rules'] = dstripslashes(unserialize($p_arr['reply_filter_rules'])); $p_arr['content_filter_html'] = dstripslashes(unserialize($p_arr['content_filter_html'])); $p_arr['reply_filter_html'] = dstripslashes(unserialize($p_arr['reply_filter_html'])); $p_arr['public_class'] = dstripslashes(unserialize($p_arr['public_class'])); //发布分类 //if(!VIP) $p_arr['is_auto_public'] = 0; if ($p_arr['is_login'] == 2) { $p_arr['login_cookie'] = ''; } if (!$p_arr['reply_max_num']) { $p_arr['reply_max_num'] = 200000; } //如果没有设置回复,这个就是最大数目了 if ($p_arr['reply_is_extend']) { //继承内容规则 $p_arr['reply_get_type'] = $p_arr['content_get_type']; $p_arr['reply_rules'] = $p_arr['content_rules']; if ($p_arr['is_fiter_content'] == 1) { //内容是过滤的 if ($p_arr['is_fiter_reply'] == 1) { //回复是过滤的 $p_arr['reply_replace_rules'] = array_merge((array) $p_arr['reply_replace_rules'], (array) $p_arr['content_replace_rules']); $p_arr['reply_filter_rules'] = array_merge((array) $p_arr['content_filter_rules'], (array) $p_arr['reply_filter_rules']); $p_arr['reply_filter_html'] = array_merge((array) $p_arr['content_filter_html'], (array) $p_arr['reply_filter_html']); } else { //内容过滤,回复不过滤 $p_arr['reply_replace_rules'] = $p_arr['content_replace_rules']; $p_arr['reply_filter_rules'] = $p_arr['content_filter_rules']; $p_arr['reply_filter_html'] = $p_arr['content_filter_html']; $p_arr['is_fiter_reply'] = 1; } } } $p_arr['stop_time'] = explode(',', $p_arr['stop_time']); $p_arr['stop_time'] = array_map('intval', $p_arr['stop_time']); $this->p_arr = $p_arr; $rules_hash = $this->p_arr['rules_hash']; if ($this->p_arr['is_auto_public'] == 1 && !$this->p_arr['public_class'][0]) { //既设置了自动发布,又没有设置发布栏目 $this->error = 1; show_pick_info(milu_lang('no_set_public_class'), 'exit', $this->msg_args); return; } if ($this->p_arr['is_auto_public'] == 1 && $this->p_arr['is_word_replace'] == 1) { //即自动发布,又设置了同义词替换 $this->words = get_replace_words(); } pload('F:rules'); if ($rules_hash) { $r_arr = get_rules_info($rules_hash); } $r_arr = pstripslashes($r_arr); $r_arr['url_var'] = dstripslashes(unserialize($r_arr['url_var'])); $this->r_arr = $r_arr; $this->rid = $r_arr['rid']; $this->now_level = $this->pick_cache_data['now_level']; $this->max_level = $this->pick_cache_data['max_level']; if (!$this->pick_cache_data) { update_times($this->pid); } if (!$this->pick_cache_data['start_time']) { $this->pick_cache_data['start_time'] = TIMESTAMP; } $this->cache_time = PICK_ENABLE_CACHE ? 3600 * 24 : -1; //缓存 }