function checkcloudstatus($showMessage = true) { global $_G; $res = false; $cloudStatus = $_G['setting']['cloud_status']; $site_id = $_G['setting']['my_siteid']; $site_key = $_G['setting']['my_sitekey']; if ($site_id && $site_key) { switch ($cloudStatus) { case 1: $res = 'cloud'; break; case 2: $res = 'unconfirmed'; break; default: $res = 'upgrade'; } } elseif (!$cloudStatus && !$site_id && !$site_key) { $res = 'register'; } elseif ($showMessage) { if (defined('IN_ADMINCP')) { cpmsg_error('cloud_status_error'); } else { showmessage('cloud_status_error'); } } return $res; }
function article_edit() { global $_G; include_once libfile('function/portalcp'); include_once libfile('function/spacecp'); include_once libfile('function/home'); require_once libfile('function/forumlist'); pload('F:spider'); if ($_GET['submit']) { $setarr = $_GET['set']; if (check_uid($setarr['uid']) == 'no') { cpmsg_error(milu_lang('user_no_exists')); } $pick_common_set = get_pick_set(); $pid = intval($_GET['pid']); $p_arr = get_pick_info($pid); $setarr['portal_cid'] = $_GET['portal']; $setarr['forum_fid'] = $_GET['forums']; $setarr['forum_typeid'] = $_GET['threadtypeid']; $setarr['blog_big_cid'] = $_GET['blog']; $setarr['blog_small_cid'] = $_GET['classid']; $setarr['title'] = getstr(trim($setarr['title']), 80, 1, 1); if (strlen($setarr['title']) < 1) { cpmsg_error(milu_lang('title_no_empty')); } if (empty($setarr['summary'])) { $setarr['summary'] = portalcp_get_summary(stripslashes($_GET['message'])); } $set_arr['summary'] = addslashes($setarr['summary']); $setarr['public_time'] = strtotime($setarr['public_time']); $setarr['from'] = dhtmlspecialchars($setarr['from']); $setarr['article_tag'] = dhtmlspecialchars($setarr['article_tag']); $setarr['fromurl'] = str_replace('&', '&', dhtmlspecialchars($setarr['fromurl'])); $aid = intval($_GET['aid']); $pid = intval($_GET['pid']); $status = intval($_GET['status']); $relatedarr = array(); if ($_GET['raids']) { $relatedarr = array_map('intval', $_GET['raids']); $relatedarr = array_unique($relatedarr); $relatedarr = array_filter($relatedarr); $setarr['raids'] = serialize($relatedarr); } $setarr['tag'] = article_make_tag($_GET['tag']); $setarr['last_modify'] = $_G['timestamp']; $user_info = get_user_info($setarr['uid']); $setarr['username'] = $user_info['username']; $article_arr = $setarr; DB::update('strayer_article_title', paddslashes($setarr), array('aid' => $aid)); $article_arr['is_download_img'] = $setarr['is_download_img']; $article_arr['is_water_img'] = $setarr['is_water_img']; $setarr = array(); $content = $_GET['message']; if (!$_GET['is_bbs']) { $regexp = '/(###NextPage(\\[title=(.*?)\\])?###)+/'; preg_match_all($regexp, $content, $arr); $contents = preg_split($regexp, $content); DB::delete('strayer_article_content', "aid='{$aid}'"); foreach ($contents as $k => $v) { $v = dstripslashes($v); $setarr['content'] = trim($v); $setarr['pageorder'] = $k + 1; $setarr['aid'] = $aid; $setarr['dateline'] = $_G['timestamp']; $article_arr['content_arr'][$k] = $setarr; DB::insert("strayer_article_content", paddslashes($setarr), true); } } else { //如果是带回复的 $setarr['content'] = trim($content); $setarr = dstripslashes($setarr); DB::update("strayer_article_content", paddslashes($setarr), array('aid' => $aid, 'pageorder' => 1)); } //var_dump($aid);exit(); $setarr = array(); $article_view_url = ''; if ($_GET['public_flag']) { $select = $_GET['select']; $article_arr['is_bbs'] = $_GET['is_bbs']; $article_arr['contents'] = $article_arr['is_bbs'] ? 1 : count($contents); $article_arr['content'] = dstripslashes(clear_ad_html($_GET['message'])); $article_arr['public_reply_seq'] = $p_arr['public_reply_seq']; $article_arr['is_public_reply'] = $p_arr['is_public_reply']; $article_arr['reply_uid'] = $p_arr['reply_uid']; $article_arr['is_page_public'] = $p_arr['is_page_public']; if ($p_arr['is_word_replace'] == 1) { //同义词替换 if ($article_arr['is_bbs'] != 1 && $article_arr['contents'] > 0) { //有几页的文章 $article_arr['content_arr'] = article_words_replace($article_arr['content_arr']); } $article_arr['content'] = article_words_replace($article_arr['content']); $article_arr['title'] = article_words_replace($article_arr['title']); if ($article_arr['reply']) { $article_arr['reply'] = article_words_replace($article_arr['reply']); } } $article_arr['content'] = str_replace("###NextPage###", "<\\br>", $article_arr['content']); $arr['content'] = htmlspecialchars_decode($arr['content'], ENT_QUOTES); $arr['content'] = format_html($arr['content']); $data_article_arr = article_info($aid); $is_timing = $pick_common_set['is_timing']; //if(!VIP) $is_timing = 0; //发布时间大于当前时间,放入定时发布中 if ($article_arr['public_time'] > $_G['timestamp'] && $is_timing == 1 && $aid) { if ($select == 1) { //门户 $timing_public_arr['portal'] = $article_arr['portal_cid']; } else { if ($select == 2) { //论坛 $timing_public_arr['forums'] = $article_arr['forum_fid']; $timing_public_arr['threadtypeid'] = $article_arr['forum_typeid']; } else { $timing_public_arr['blog'] = $article_arr['blog_big_cid']; $timing_public_arr['classid'] = $article_arr['blog_small_cid']; } } $timing_setarr = array('public_type' => $select, 'data_id' => $aid, 'content_type' => 1, 'public_dateline' => $article_arr['public_time'], 'pid' => $pid, 'public_info' => serialize($timing_public_arr)); article_timing_add($timing_setarr); cpmsg(milu_lang('article_public_timming', array('d' => dgmdate($article_arr['public_time'], 'u'))), PICK_GO . 'picker_manage&myfunc=article_edit&aid=' . $aid . '&pid=' . $pid, 'succeed'); return; } if ($select == 1) { //门户 $old_arr['portal_id'] = intval($_GET['old_portal_id']); $article_arr['relatedarr'] = $relatedarr; $setarr['portal_id'] = $article_arr['aid'] = article_move_portal($article_arr, $old_arr); //var_dump($setarr['portal_id']);exit(); $article_arr['cookie'] = $p_arr['login_cookie']; $article_arr['page_url'] = $data_article_arr['url']; $article_arr['is_download_file'] = $p_arr['is_download_file']; $article_arr['content_filter_html'] = unserialize(dstripslashes($p_arr['content_filter_html'])); downremotefile($article_arr, 'portal', $old_arr); article_thumb($setarr['portal_id']); $article_view_url = 'portal.php?mod=view&aid=' . $setarr['portal_id']; } else { if ($select == 2) { //论坛 if ($article_arr['contents'] > 1 && $article_arr['is_bbs'] == 0 && $p_arr['is_page_public'] == 1) { $article_arr['is_public_reply'] = 1; $article_arr['public_reply_seq'] = 0; $article_arr['is_content_reply'] = 1; $article_arr['is_bbs'] = 1; $article_arr['content'] = $article_arr['content_arr'][0]['content']; } else { if ($article_arr['is_bbs'] != 1) { $article_arr['reply'] = array(); } } if ($article_arr['is_bbs']) { $article_arr['reply'] = $data_article_arr['reply']; } $article_arr['cookie'] = $p_arr['login_cookie']; $article_arr['page_url'] = $data_article_arr['url']; $old_arr['forum_id'] = intval($_GET['old_forum_id']); $forum_arr = article_move_forums($article_arr, $old_arr); if ($forum_arr['is_download_img'] == 1) { //下载图片 $forum_arr['cookie'] = $p_arr['login_cookie']; $forum_arr['is_download_img'] = $article_arr['is_download_img']; $forum_arr['is_download_file'] = $p_arr['is_download_file']; $forum_arr['is_water_img'] = $article_arr['is_water_img']; forum_downremotefile($forum_arr, $old_arr); } $setarr['forum_id'] = $article_arr['tid'] = $forum_arr['tid']; $article_view_url = 'forum.php?mod=viewthread&tid=' . $setarr['forum_id']; } else { //博客 $old_arr['catid'] = intval($_GET['old_blog_big_cid']); $old_arr['classid'] = intval($_GET['old_blog_small_cid']); $old_arr['uid'] = intval($_GET['old_uid']); $old_arr['username'] = $_GET['old_username']; $old_arr['blog_id'] = $_GET['old_blog_id']; $setarr['blog_id'] = $article_arr['aid'] = article_move_blog($article_arr, $old_arr); $article_arr['cookie'] = $p_arr['login_cookie']; $article_arr['page_url'] = $data_article_arr['url']; $arr['is_download_file'] = $p_arr['is_download_file']; $arr['content_filter_html'] = unserialize(dstripslashes($p_arr['content_filter_html'])); downremotefile($article_arr, 'album', $old_arr); $article_view_url = 'home.php?mod=space&do=blog&uid=' . $article_arr['uid'] . '&id=' . $setarr['blog_id']; } } $setarr['status'] = 2; DB::update('strayer_article_title', $setarr, array('aid' => $aid)); } $msg = $_GET['public_flag'] ? milu_lang('public') : milu_lang('save'); $return_url = '?' . PICK_GO . 'picker_manage&myac=article_manage&p=1&pid=' . $pid . $_GET['url_args']; $return_list_html = '<a href="' . $return_url . '">' . milu_lang('return_list') . '</a>'; if ($article_view_url) { $article_view_output = ' <span class="pipe">|</span> <a target="_blank" href="' . $article_view_url . '">' . milu_lang('view_article') . '</a>'; } cpmsg(milu_lang('save_success', array('msg' => $msg)) . '<br><br><a href="?' . PICK_GO . 'picker_manage&myfunc=article_edit&aid=' . $aid . '&pid=' . $pid . '">' . milu_lang('continue_edit') . '</a> <span class="pipe">|</span> ' . $return_list_html . $article_view_output, PICK_GO . 'picker_manage&myfunc=article_edit&aid=' . $aid . '&pid=' . $pid, 'succeed'); } else { $pid = intval($_GET['pid']); $p_arr = get_pick_info($pid); $p_arr['public_class'] = unserialize($p_arr['public_class']); $aid = intval($_GET['aid']); $data = article_info($aid); $data['p_arr'] = $p_arr; $data['status'] = intval($_GET['status']); if (!$data['view_num']) { $view_arr = format_wrap($p_arr['view_num'], ','); if ($view_arr) { $data['view_num'] = rand($view_arr[0], $view_arr[1]); } } if ($data['contents'] > 1) { if ($data['content_arr']) { $data['content'] = content_merge($data['content_arr'], 1); } } $time_arr = create_public_time($data, 1); $data['public_time'] = array_pop($time_arr); $data['public_time'] = dgmdate($data['public_time'], 'Y-m-d H:i'); if (!$data['uid']) { $rand_arr = get_rand_uid($p_arr); $data['uid'] = $rand_arr[0]['uid']; } $data['raids'] = unserialize($data['raids']); if ($data['raids']) { $query = DB::query("SELECT title,aid FROM " . DB::table('portal_article_title') . " WHERE aid IN (" . dimplode($data['raids']) . ")"); $list = array(); while ($value = DB::fetch($query)) { $list[$value['aid']] = $value; $data['raids_html'] .= '<li id="raid_li_' . $value['aid'] . '"><input type="hidden" name="raids[]" value="' . $value['aid'] . '" size="5"><a href="portal.php?mod=view&aid=' . $value['aid'] . '" target="_blank">' . $value['title'] . '</a>(' . milu_lang('article') . ' ID: ' . $value['aid'] . ')<a href="javascript:;" onclick="raid_delete(' . $value['aid'] . ');" class="xg1">' . milu_lang('del') . '</a></li>'; } } if (!$data['forum_typeid']) { $data['forum_typeid'] = $p_arr['public_class'][1]; } $data['threadtypes'] = getthreadtypes(array('typeid' => $p_arr['public_class'][1], 'fid' => $p_arr['public_class'][0])); $data['forumselect'] = '<select id="forums" name="forums" onchange="getthreadtypes(this.value, 0)">' . forumselect(FALSE, 0, $p_arr['public_class'][0], TRUE) . '</select> <span id="threadtypes">' . $data['threadtypes'] . '</span>'; $data['portalselect'] = category_showselect('portal', 'portal', $p_arr['public_class'][0]); $data['blogselect'] = category_showselect('blog', 'blog', $p_arr['public_class'][0]); $data['article_tags'] = article_parse_tags($data['tag']); $data['tag_names'] = article_tagnames(); $data['show_blog_class'] = get_person_blog_class($data['uid'], $data['blog_small_cid']); $data['pid'] = $pid; $data['public_type'] = $p_arr['public_type']; $data['content'] = dhtmlspecialchars($data['content']); $data['url_args'] = $_GET['url_args']; return $data; } }
if (!$massid) { cpmsg_error('wechat:mass_not_exist'); } $msg = C::t('#wechat#mobile_wechat_masssend')->fetch($massid); if (!$msg) { cpmsg_error('wechat:mass_not_exist'); } if ($msg['type'] == 'media' && $msg['created_at'] + 86400 * 3 < TIMESTAMP) { cpmsg_error('wechat:mass_send_expire'); } $res = $wechat_client->sendMassMsg($msg); if ($res) { C::t('#wechat#mobile_wechat_masssend')->update($massid, array('msg_id' => $res['msg_id'], 'sent_at' => TIMESTAMP)); $updatedata = array('receiveEvent::masssendjobfinish' => array('plugin' => 'wechat', 'include' => 'response.class.php', 'class' => 'WSQResponse', 'method' => 'masssendFinish')); $responsehook = WeChatHook::updateResponse($updatedata); cpmsg('wechat:mass_sent_succ', PMODURL, 'succeed'); } else { cpmsg_error($wechat_client->error()); } } else { if (submitcheck('delsubmit')) { $massid = intval($_GET['massid']); $msg = C::t('#wechat#mobile_wechat_masssend')->fetch($massid); if (!$msg) { cpmsg_error('wechat:mass_not_exist'); } C::t('#wechat#mobile_wechat_masssend')->delete($massid); cpmsg('wechat:mass_oper_succ', PMODURL, 'succeed'); } } }
$forumselect = "<select name=\"%s\">\n<option value=\"\"> > " . cplang('select') . "</option><option value=\"\"> </option>" . str_replace('%', '%%', forumselect(FALSE, 0, 0, TRUE)) . '</select>'; shownav('forum', 'forums_merge'); showsubmenu('forums_merge'); showformheader('forums&operation=merge'); showtableheader(); showsetting('forums_merge_source', '', '', sprintf($forumselect, 'source')); showsetting('forums_merge_target', '', '', sprintf($forumselect, 'target')); showsubmit('mergesubmit'); showtablefooter(); showformfooter(); } else { if (C::t('forum_forum')->check_forum_exists(array($source, $target)) != 2) { cpmsg_error('forums_nonexistence'); } if (C::t('forum_forum')->fetch_forum_num('', $source)) { cpmsg_error('forums_merge_source_sub_notnull'); } C::t('forum_thread')->update_by_fid($source, array('fid' => $target)); loadcache('posttableids'); $posttableids = $_G['cache']['posttableids'] ? $_G['cache']['posttableids'] : array('0'); foreach ($posttableids as $id) { C::t('forum_post')->update_fid_by_fid($id, $source, $target); } $sourceforum = C::t('forum_forum')->fetch_info_by_fid($source); $targetforum = C::t('forum_forum')->fetch_info_by_fid($target); $sourcethreadtypes = (array) dunserialize($sourceforum['threadtypes']); $targethreadtypes = (array) dunserialize($targetforum['threadtypes']); $targethreadtypes['types'] = array_merge((array) $targethreadtypes['types'], (array) $sourcethreadtypes['types']); $targethreadtypes['icons'] = array_merge((array) $targethreadtypes['icons'], (array) $sourcethreadtypes['icons']); C::t('forum_forum')->update($target, array('threads' => $targetforum['threads'] + $sourceforum['threads'], 'posts' => $targetforum['posts'] + $sourceforum['posts'])); C::t('forum_forumfield')->update($target, array('threadtypes' => serialize($targethreadtypes)));
showsubmit('permsubmit', 'submit', 'del'); showtablefooter(); showformfooter(); } else { $users = array(); if (!empty($_G['gp_newuser'])) { $value = DB::fetch_first("SELECT uid FROM " . DB::table('common_member') . " WHERE username='******'gp_newuser']}'"); if ($value) { $user = array(); $user['uid'] = $value['uid']; $user['allowmanage'] = $_G['gp_newallowmanage'] ? 1 : 0; $user['allowrecommend'] = $_G['gp_newallowrecommend'] ? 1 : 0; $user['needverify'] = $_G['gp_newneedverify'] ? 1 : 0; $users[] = $user; } else { cpmsg_error($_G['gp_newuser'] . cplang('block_has_no_allowauthorizedblock'), dreferer()); } } if (is_array($_G['gp_perm'])) { foreach ($_G['gp_perm'] as $uid => $value) { if (empty($_G['gp_delete']) || !in_array($uid, $_G['gp_delete'])) { $user = array(); $user['allowmanage'] = $_G['gp_allowmanage'][$uid] ? 1 : 0; $user['allowrecommend'] = $_G['gp_allowrecommend'][$uid] ? 1 : 0; $user['needverify'] = $_G['gp_needverify'][$uid] ? 1 : 0; if ($value['allowmanage'] != $user['allowmanage'] || $value['allowrecommend'] != $user['allowrecommend'] || $value['needverify'] != $user['needverify']) { $user['uid'] = intval($uid); $users[] = $user; } } }
cpmsg_error($langs['error_bid']); } $setarr['bid'] = $brand['bid']; $setarr['uid'] = $brand[uid]; $setarr['username'] = $brand[username]; if ($albumid) { C::t('#sanree_brand#sanree_brand_album')->update($albumid, $setarr); } else { $picdata = array(); if ($_FILES['pic']) { if ($_FILES['pic']['error'] == 0) { $picdata = mypic_save($_FILES['pic'], $albumid); } } if (empty($picdata['filepath'])) { cpmsg_error($langs['error_pictip']); } $setarr['pic'] = $picdata['filepath']; $setarr['dateline'] = TIMESTAMP; $albumid = C::t('#sanree_brand#sanree_brand_album')->insert($setarr, TRUE); fixalbumpic($catid, $setarr); } if (intval($_G['sr_istop']) == 1) { $data = C::t('#sanree_brand#sanree_brand_album')->get_by_albumid($albumid); C::t('#sanree_brand#sanree_brand_album_category')->update($data['catid'], array('pic' => $data['pic'])); } cpmsg($langs['succeed'], $gotourl . 'album', 'succeed'); } else { showsubmenu($menustr); showtableheader('', 'nobottom'); showtablerow('', array(), array('<ul class="tab1">' . '<li><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=album_category&identifier=sanree_brand&pmod=admincp"><span>' . $langs['albumcate'] . '</span></a></li>' . '<li class="current"><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=album&identifier=sanree_brand&pmod=admincp"><span>' . $langs['piclist'] . '</span></a></li></ul>'));
@set_time_limit(600); cpheader(); if (empty($admincp) || !is_object($admincp)) { exit('Access Denied'); } $adminscript = ADMINSCRIPT; $cloudDomain = 'http://cp.discuz.qq.com'; $utilService = Cloud::loadClass('Service_Util'); $appService = Cloud::loadClass('Service_App'); $cloudClient = Cloud::loadClass('Service_Client_Cloud'); try { $cloudstatus = $appService->checkCloudStatus(); } catch (Cloud_Service_AppException $e) { if ($operation == 'doctor' || $operation == 'siteinfo') { } else { cpmsg_error('cloud_status_error'); } } $forceOpen = !empty($_GET['force_open']) ? true : false; if (!$operation || $operation == 'open') { if ($cloudstatus == 'cloud' && !$forceOpen) { cpmsg('cloud_turnto_applist', '', 'succeed', array(), '<p class="marginbot"><a href="###" onclick="top.location = \'' . ADMINSCRIPT . '?frames=yes&action=cloud&operation=applist\'" class="lightlink">' . cplang('message_redirect') . '</a></p><script type="text/JavaScript">setTimeout("top.location = \'' . ADMINSCRIPT . '?frames=yes&action=cloud&operation=applist\'", 3000);</script>'); } else { if ($_GET['getConfirmInfo']) { ajaxshowheader(); ajaxshowfooter(); } $step = max(1, intval($_GET['step'])); $type = $cloudstatus == 'upgrade' ? 'upgrade' : 'open'; if ($step == 1) { $utilService->generateUniqueId();
cpmsg_error($langs['error_nametip']); } if ($diystyleid < 1) { $count = C::t('#sanree_brand#sanree_brand_diystyle')->count_by_where(" AND name='{$name}'"); } else { $count = C::t('#sanree_brand#sanree_brand_diystyle')->count_by_where(" AND name='{$name}' AND diystyleid <> '{$diystyleid}'"); } if ($count > 0) { cpmsg_error($langs['ishavename']); } if (!isstylename($name)) { cpmsg_error($langs['errorstylename']); } $content = dhtmlspecialchars(trim($_G['sr_content'])); if (empty($content)) { cpmsg_error($langs['error_stylecontenttip']); } $setarr['name'] = $name; $setarr['content'] = $content; $setarr['displayorder'] = intval(trim($_G['sr_displayorder'])); $setarr['status'] = intval(trim($_G['sr_status'])); if ($diystyleid) { C::t('#sanree_brand#sanree_brand_diystyle')->srupdate($diystyleid, $setarr, 'issys<>1'); } else { $setarr['dateline'] = TIMESTAMP; $setarr['uid'] = $_G[uid]; $setarr['username'] = $_G[username]; C::t('#sanree_brand#sanree_brand_diystyle')->insert($setarr); } diystyle(); cpmsg($langs['succeed'], $gotourl . 'diystyle', 'succeed');
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; } }
foreach ($likekeys as $k) { $_GET[$k] = dhtmlspecialchars($_GET[$k]); } $wherearr = $results['wherearr']; $mpurl .= '&' . implode('&', $results['urls']); $wherearr[] = $operation == 'jscall' ? "blocktype='1'" : "blocktype='0'"; if ($_GET['permname']) { $bids = ''; $uid = ($uid = C::t('common_member')->fetch_uid_by_username($_GET['permname'])) ? $uid : C::t('common_member_archive')->fetch_uid_by_username($_GET['permname']); if ($uid) { $bids = array_keys(C::t('common_block_permission')->fetch_all_by_uid($uid)); } if ($bids = dimplode($bids)) { $wherearr[] = 'bid IN (' . $bids . ')'; } else { cpmsg_error($_GET['permname'] . cplang('block_the_username_has_not_block')); } $mpurl .= '&permname=' . $_GET['permname']; } $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $wheresql = str_replace(array('bid', 'blockclass', ' name', 'blocktype', 'targettplname'), array('b.bid', 'b.blockclass', ' b.name', 'b.blocktype', 'tb.targettplname'), $wheresql); $orders = getorders(array('bid', 'dateline'), 'bid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(10, 20, 50, 100))) { $perpage = 20;
function rules_import() { global $_G, $header_config, $head_url; $data['header'] = pick_header_output($header_config, $head_url); $submit = $_GET['addsubmit']; $update_flag = $_GET['update_flag']; num_limit('strayer_rules', 3000, 's_num_limit'); if ($submit) { $rules_code = $_GET['rules_code']; if ($rules_code) { $data = $rules_code; } else { $file_name = str_iconv($_FILES['rules_file']['tmp_name']); $fp = fopen($file_name, 'r'); $data = fread($fp, $_FILES['rules_file']['size']); } $arr = pimportfile($data); //采集器名称为空,则对将当前的时间戳做为采集器文件名 if (empty($arr['rules_name'])) { $arr['rules_name'] = $_G['timestamp']; } unset($arr['rid'], $arr['version']); //销毁采集器记录的ID与 版本号 $arr = daddslashes($arr); //对值重新addslashes操作 if ($arr['pick']['pid']) { cpmsg_error(milu_lang('import_error2', array('url' => PICK_GO))); } if (!$arr['rules_hash']) { cpmsg_error(milu_lang('rules_error_data')); } $check = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table('strayer_rules') . " WHERE rules_hash='{$arr['rules_hash']}'"), 0); if ($check && !$update_flag) { if (!$rules_code) { $rules_code = $data; } cpmsg(milu_lang('cover_notice') . '?<input type="hidden" value="' . dstripslashes($data) . '" name="rules_code">', PICK_GO . 'system_rules&myac=rules_import&pid=' . $pid . '&addsubmit=1&update_flag=1', 'form'); } $arr = get_table_field_name('strayer_rules', $arr); unset($arr['rid']); //去掉主键 if ($update_flag) { $rules_hash = $arr['rules_hash']; rules_update($rules_hash); unset($arr['rules_hash']); DB::update('strayer_rules', $arr, array('rules_hash' => $rules_hash)); } else { DB::insert('strayer_rules', $arr, TRUE); } del_search_index(2); cpmsg(milu_lang('import_finsh'), PICK_GO . "system_rules&myac=rules_list", 'succeed'); } return $data; }
function num_limit($table_name, $limit_num, $lang) { $f_num = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table($table_name)), 0); if (!VIP && $f_num > $limit_num) { cpmsg_error(milu_lang($lang, array('n' => $limit_num))); } }
function chkformtitle($fid, $setconfig = NULL) { global $_G; $config = isset($setconfig) ? $setconfig : $_G['cache']['plugin']['sanree_brand']; $forumdat = C::t('#sanree_brand#forum_forum')->fetch_info_by_fid($fid); $forumname = $forumdat['name']; $haveforumtitle = trim($config['haveforumtitle']); if (strpos($forumname, $haveforumtitle) === false || empty($haveforumtitle)) { $warningforumtitle = srlang('warningforumtitle'); $warningforumtitle = str_replace('{haveforumtitle}', $haveforumtitle, $warningforumtitle); if (defined('IN_ADMINCP')) { cpmsg_error($warningforumtitle); } else { showmessage($warningforumtitle); } } }
$setarr['reply_is_extend'] = 0; } $setarr = paddslashes($setarr); $data_info = get_pick_info(); if ($data_info['cron_day'] == 0) { $data_info['cron_day'] = -1; } //数据库中的字段类型为未签署,导致没法小于0 if ($data_info['cron_minute'] != $setarr['cron_minute'] || $data_info['cron_hour'] != $setarr['cron_hour'] || $data_info['cron_day'] != $setarr['cron_day'] || $data_info['cron_weekday'] != $setarr['cron_weekday']) { //计划任务修改时,把下次执行时间清空 save_syscache('pick_run', TIMESTAMP); $setarr['lastrun'] = $setarr['nextrun'] = 0; } DB::update('strayer_picker', $setarr, array('pid' => $pid)); $url = PICK_GO . 'picker_manage'; } else { $msg = milu_lang('add'); $setarr = paddslashes($setarr); $setarr['picker_hash'] = create_hash(); $pid = DB::insert('strayer_picker', $setarr, TRUE); } $url = PICK_GO . 'picker_manage&myaction=edit_pick&pid=' . $pid . '&step=' . $_GET['step']; if (!$pid) { cpmsg_error($msg . milu_lang('fail')); } cpmsg(milu_lang('pick_op_finsh', array('msg' => $msg)), $url, 'succeed'); } if (!$info['jump_num']) { $info['jump_num'] = $pick_config['pick_num']; } include template('milu_pick:picker_edit');
cpmsg_error($langs['error_nametip']); } $setarr['name'] = $name; $setarr['cateid'] = $cateid; $setarr['keywords'] = dhtmlspecialchars(trim($_G['sr_keywords'])); $setarr['description'] = dhtmlspecialchars(trim($_G['sr_description'])); $setarr['status'] = intval(trim($_G['sr_status'])); $setarr['displayorder'] = intval(trim($_G['sr_displayorder'])); $setarr['syngroupid'] = intval(trim($_G['sr_syngroupid'])); $user = dhtmlspecialchars(trim($_G['sr_user'])); if ($user) { $t = C::t('#sanree_brand#xcommon_member')->fetch_uid_by_username($user); if ($t) { $setarr['uid'] = $t; } else { cpmsg_error($langs['error_nouser']); } } if ($cateid) { C::t('#sanree_brand#sanree_brand_category')->update($cateid, $setarr); } else { $setarr['dateline'] = TIMESTAMP; C::t('#sanree_brand#sanree_brand_category')->insert($setarr); } sanreeupdatecache('category'); cpmsg($langs['succeed'], $gotourl . 'list', 'succeed'); } else { showsubmenu($menustr); if ($cateid > 0) { $menustr = $langs['editcate']; $result = C::t('#sanree_brand#sanree_brand_category')->get_by_cateid($cateid);
function export_article() { global $_G; $pid = intval($_GET['pid']); $pick_info = get_pick_info($pid, 'name'); $query = DB::query("SELECT aid FROM " . DB::table('strayer_article_title') . " WHERE pid ='{$pid}' ORDER BY aid DESC"); while ($v = DB::fetch($query)) { $a_info = article_info($v['aid']); //print_r($a_info);exit(); if ($a_info) { $data[] = array('title' => $a_info['title'], 'summary' => $a_info['summary'], 'url_hash' => $a_info['url_hash'], 'url' => $a_info['url'], 'dateline' => $a_info['dateline'], 'content_arr' => $a_info['content_arr'], 'reply' => $a_info['content_arr'], 'is_bbs' => $a_info['is_bbs'], 'from' => $a_info['from'], 'fromurl' => $a_info['fromurl'], 'author' => $a_info['author'], 'article_tag' => $a_info['article_tag'], 'tag' => $a_info['tag'], 'pic' => $a_info['pic'], 'contents' => $a_info['contents'], 'reply_num' => $a_info['reply_num']); } } if (!$data) { cpmsg_error(milu_lang('no_article_export')); } $filename = $pick_info['name'] . milu_lang('export_article_count', array('c' => count($data))); export_article_file($data, $filename); }
function fastpick_del() { global $_G; $id = $_GET['id']; if (!$id) { cpmsg_error(milu_lang('select_rules')); } $confirm = $_GET['confirm']; if ($confirm || is_array($id)) { $id_arr = is_array($id) ? $id : array($id); foreach ($id_arr as $id) { DB::query('DELETE FROM ' . DB::table('strayer_fastpick') . " WHERE id= '{$id}'"); } cpmsg(milu_lang('rules_del_success') . '!', PICK_GO . 'fast_pick&myac=fastpick_manage', 'succeed'); } else { cpmsg(milu_lang('del_confirm'), PICK_GO . 'fast_pick&myac=fastpick_del&id=' . $id . '&confirm=1', 'form'); } }
} $do = $_G['sr_do']; $doarray = array('list', 'upgrading', 'copyrow'); $do = !in_array($do, $doarray) ? 'list' : $do; $_G['sr_page'] = isset($_G['sr_page']) ? $_G['sr_page'] : 0; if ($do == 'upgrading') { $diytemplateid = intval($_G['sr_diytemplateid']); if (submitcheck('addsubmit')) { $setarr = array(); $name = dhtmlspecialchars(trim($_G['sr_name'])); if (empty($name)) { cpmsg_error($langs['error_templatenametip']); } $content = dhtmlspecialchars(trim($_G['sr_content'])); if (empty($content)) { cpmsg_error($langs['error_templatecontenttip']); } $setarr['name'] = $name; $setarr['content'] = $content; $setarr['displayorder'] = intval(trim($_G['sr_displayorder'])); $setarr['status'] = intval(trim($_G['sr_status'])); if ($diytemplateid) { C::t('#sanree_brand#sanree_brand_diytemplate')->srupdate($diytemplateid, $setarr, 'issys<>1'); } else { $setarr['dateline'] = TIMESTAMP; $setarr['uid'] = $_G[uid]; $setarr['username'] = $_G[username]; C::t('#sanree_brand#sanree_brand_diytemplate')->insert($setarr); } cpmsg($langs['succeed'], $gotourl . 'diytemplate', 'succeed'); } else {
* $Id: sanree_brand_friendly_link.php 2014-07-29 10:20:00 sanree checkedby liuhuan $ */ if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('2014042523s4K4QUOUT9||5057||1411992002'); } $do = $_G['sr_do']; $doarray = array('list', 'upgrading'); $do = !in_array($do, $doarray) ? 'list' : $do; $_G['sr_page'] = isset($_G['sr_page']) ? $_G['sr_page'] : 0; if ($do == 'upgrading') { $flid = intval($_G['sr_flid']); if (submitcheck('addsubmit')) { $setarr = array(); $title = dhtmlspecialchars(trim($_G['sr_title'])); if (empty($title)) { cpmsg_error($langs['error_title']); } $setarr['title'] = $title; $setarr['url'] = dhtmlspecialchars(trim($_G['sr_url'])); $setarr['displayorder'] = intval(trim($_G['sr_displayorder'])); $setarr['status'] = intval(trim($_G['sr_status'])); if ($flid) { C::t('#sanree_brand#sanree_brand_friendly_link')->update($flid, $setarr); } else { $setarr['dateline'] = TIMESTAMP; C::t('#sanree_brand#sanree_brand_friendly_link')->insert($setarr); } cpmsg($langs['succeed'], $gotourl . 'friendly_link', 'succeed'); } else { showsubmenu($menustr); if ($flid > 0) {
<?php if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } global $_G; require_once dirname(__FILE__).'/function/function_baidu.php'; if (!baidu_table_exists('baidusubmit_setting')) { cpmsg_error(lang('plugin/baidusubmit', 'tablenotexists')); } $url = $_G['siteurl'] . substr($_SERVER['REQUEST_URI'], (int)strrpos($_SERVER['REQUEST_URI'], '/') + 1); if (!$_G['uid']) { showmessage('not_loggedin', NULL, array(), array('login' => 1)); } if (isset($_POST['ping'])) { C::t('#baidusubmit#baidusubmit_setting')->update('openping', intval((bool)$_POST['openping'])); cpmsg('setting_update_succeed', $url , 'succeed'); } else if (isset($_POST['auth'])) { include dirname(__FILE__) . '/auth.inc.php'; } else if (empty($_GET['inajax'])) { if (!($siteUrl = baidu_get_plugin_setting('siteurl'))) { $siteUrl = $_G['siteurl']; } $keyExist = baidu_get_plugin_setting('pingtoken') ? true : false;
function member_import_online() { $step = $_GET['step']; $url = GET_URL . 'plugin.php?id=pick_user:member&myac=download&tpl=no'; $go_url = PICK_GO . 'member&myac=member_import_online'; if (!$_GET['step']) { cpmsg(milu_lang('get_user_dataing'), $go_url . '&step=1&tpl=no', 'loading', '', false); } if ($step == 1) { if (!function_exists('gzinflate')) { cpmsg_error(milu_lang('disable_func', array('f' => 'gzinflate'))); } $msg_arr = get_contents($url . '&get_type=1&v=' . urlencode(PICK_VERSION), array('cache' => -1)); //echo $url.'&get_type=1&v='.urlencode(PICK_VERSION); if ($msg_arr < 0) { cpmsg_error(milu_lang('no_conn_server')); } $msg_arr = json_decode(base64_decode($msg_arr)); echo '<table class="tb tb2 "> <tbody><tr class="header hover"><td>' . milu_lang('hove_user_data') . '</td><td></td><td></td></tr> <tr class="hover"><td><div class="tipsblock"><ul id="tipslis"><li>' . milu_lang('user_data_size') . ':' . $msg_arr->size . '</li ><li>' . milu_lang('update_dateline') . ': ' . dgmdate($msg_arr->modify_dateline) . ' </li ><li>' . milu_lang('member_count') . ': ' . $msg_arr->count . milu_lang('tiao') . '</li ></ul></div></td><td><input type="button" class="btn" onclick="window.location.href=\'?' . $go_url . '&step=2&tpl=no&c=' . $msg_arr->count . '\'" value="' . milu_lang('confirm_download') . '"></td></tr></tbody></table>'; } else { if ($step == 2) { cpmsg(milu_lang('data_downloading'), $go_url . '&step=3&tpl=no&c=' . $_GET['c'], 'loading', '', false); } else { if ($step == 3) { if ($_GET['finished']) { cpmsg(milu_lang('run_finsh'), PICK_GO . "member&myac=member_list", 'succeed'); } pload('F:spider'); $snoopy_obj = get_snoopy_obj(); $data_text = get_img_content($url . '&get_type=2&v=' . urlencode(PICK_VERSION), $snoopy_obj); if (!$data_text) { cpmsg_error(milu_lang('download_fail')); } $file_name = PICK_CACHE . '/temp_m.zip'; file_put_contents($file_name, $data_text); require_once libfile('class/zip'); $zip_obj = new SimpleUnzip($file_name); foreach ($zip_obj->Entries as $k => $v) { $data = unserialize(base64_decode(dstripslashes($v->Data))); } @unlink($file_name); $data = serialize(serialize_iconv($data)); file_put_contents(PICK_CACHE . '/temp_m.txt', $data); $per_num = 250; pcpmsg_loading(milu_lang('importing'), PICK_GO . "member&myac=member_import_online&tpl=no&step=3&finished=1", 'loadingform', '', '<div id="percent">0%</div>', FALSE); $ajax_url = "admin.php?" . PICK_GO . "member&myac=ajax_func&inajax=1&af=member_import_online&step=4&tpl=no&confirmed=1"; $finsh_url = "admin.php?" . PICK_GO . "member&myac=member_list"; //echo $ajax_url;exit(); echo pick_loading($ajax_url, $finsh_url, $_GET['c'], array('bat_num' => $per_num)); } else { if ($step == 4) { $file_name = PICK_CACHE . '/temp_m.txt'; ob_end_clean(); $pp = intval($_GET['pp']); $currow = intval($_GET['currow']); $data = file_get_contents($file_name); if (!$data) { echo 'TRUE'; exit; } //$data = dstripslashes($data); $data = unserialize($data); $i = 1; foreach ((array) $data as $k => $v) { if ($i > $pp) { break; } import_member_data($v); $i++; unset($data[$k]); } if (!$data) { echo 'TRUE'; @unlink($file_name); exit; } $data = file_put_contents($file_name, serialize($data)); echo 'GO'; exit; } } } } }
if (empty($catname)) { cpmsg_error($langs['error_nametip']); } $setarr['catname'] = $catname; $setarr['description'] = dhtmlspecialchars(trim($_G['sr_description'])); $setarr['displayorder'] = intval(trim($_G['sr_displayorder'])); if ($catid) { C::t('#sanree_brand#sanree_brand_album_category')->update($catid, $setarr); } else { $brandname = dhtmlspecialchars(trim($_G['sr_brandname'])); if (empty($brandname)) { cpmsg_error($langs['error_brandnametip']); } $brand = C::t('#sanree_brand#sanree_brand_businesses')->fetch_by_brandname($brandname); if (!$brand) { cpmsg_error($langs['error_bid']); } $setarr['bid'] = $brand[bid]; $setarr['uid'] = $brand[uid]; $setarr['dateline'] = TIMESTAMP; C::t('#sanree_brand#sanree_brand_album_category')->insert($setarr); } cpmsg($langs['succeed'], $gotourl . 'album_category', 'succeed'); } else { showsubmenu($menustr); showtableheader('', 'nobottom'); showtablerow('', array(), array('<ul class="tab1">' . '<li class="current"><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=album_category&identifier=sanree_brand&pmod=admincp"><span>' . $langs['albumcate'] . '</span></a></li>' . '<li><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=album&identifier=sanree_brand&pmod=admincp"><span>' . $langs['piclist'] . '</span></a></li></ul>')); showtablefooter(); $view = ''; if ($catid > 0) { $menustr = $langs['editalbumcate'];
* [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: wsq_stat.inc.php 35168 2014-12-25 02:29:36Z nemohou $ */ if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) { exit('Access Denied'); } require_once DISCUZ_ROOT . './source/plugin/wechat/wsq.class.php'; require_once DISCUZ_ROOT . './source/plugin/wechat/setting.class.php'; WeChatSetting::menu(); showtips(lang('plugin/wechat', 'discuzqr_tips')); $data = wsq::stat(); $d = date('Ymd', TIMESTAMP); if (!$data || $data->code != 0) { cpmsg_error('wechat:stat_failed'); } $xa = $uv = $pv = $newthread = $reply = $share = $reflow = array(); foreach ($data->res as $d) { $xa[$d->ftime] = substr($d->ftime, 4, 2) . '<br/>' . substr($d->ftime, 6, 2); $uv[$d->ftime] = intval($uv[$d->ftime]) + intval($d->uv); $pv[$d->ftime] = intval($pv[$d->ftime]) + intval($d->pv); $newthread[$d->ftime] = intval($newthread[$d->ftime]) + intval($d->newthread_num); $reply[$d->ftime] = intval($reply[$d->ftime]) + intval($d->reply_num); $share[$d->ftime] = intval($share[$d->ftime]) + intval($d->share_num); $reflow[$d->ftime] = intval($reflow[$d->ftime]) + intval($d->reflow_num); } $xas = "'" . implode('\',\'', $xa) . "'"; $uvs = implode(',', $uv); $pvs = implode(',', $pv); $newthreads = implode(',', $newthread);
$t = C::t('#sanree_brand#xcommon_member')->fetch_uid_by_username($user); if ($t) { $uid = $setarr['uid'] = $t; } else { cpmsg_error($langs['error_nouser']); } } else { cpmsg_error($langs['error_nouser']); } $owner = dhtmlspecialchars(trim($_G['sr_owner'])); if ($owner) { $t = C::t('#sanree_brand#xcommon_member')->fetch_uid_by_username($owner); if ($t) { $ownerid = $setarr['ownerid'] = $t; } else { cpmsg_error($langs['error_noowner']); } } else { $setarr['ownerid'] = 0; } if ($bid > 0) { C::t('#sanree_brand#sanree_brand_businesses')->update($bid, $setarr); fixalbum($bid, $setarr['uid']); } else { $setarr['dateline'] = TIMESTAMP; $setarr['ip'] = $_G['clientip']; $setarr['status'] = 1; $bid = C::t('#sanree_brand#sanree_brand_businesses')->insert($setarr, TRUE); } $setarr = array(); if ($_FILES['poster']) {
if ($value['allowpublish'] != $user['allowpublish'] || $value['allowmanage'] != $user['allowmanage']) { $user['uid'] = intval($uid); $users[] = $user; } } } } if (!empty($_GET['newuser'])) { $newuid = C::t('common_member')->fetch_uid_by_username($_GET['newuser']); if ($newuid) { $user['uid'] = $newuid; $user['allowpublish'] = $_GET['newpublish'] ? 1 : 0; $user['allowmanage'] = $_GET['newmanage'] ? 1 : 0; $users[$user['uid']] = $user; } else { cpmsg_error($_GET['newuser'] . cplang('portalcategory_has_no_allowauthorizedarticle')); } } require_once libfile('class/portalcategory'); $categorypermsission =& portal_category::instance(); if (!empty($users)) { $categorypermsission->add_users_perm($catid, $users); } if (!empty($_GET['delete'])) { $categorypermsission->delete_users_perm($catid, $_GET['delete']); } $notinherited = !$_POST['inherited'] ? '1' : '0'; if ($notinherited != $portalcategory[$catid]['notinheritedarticle']) { if ($notinherited) { $categorypermsission->delete_inherited_perm_by_catid($catid, $portalcategory[$catid]['upid']); } else {
DB::query("UPDATE " . DB::table('forum_alliance_pl') . " SET display='1' WHERE id='{$id}'"); cpmsg($php_lang['lshengheok'], 'action=plugins&operation=config&do=' . $pluginid . '&identifier=dz55625_haodian&pmod=haodian_pl'); } elseif ($_GET['sh'] == 'no') { $id = intval($_GET['id']); DB::query("UPDATE " . DB::table('forum_alliance_pl') . " SET display='0' WHERE id='{$id}'"); cpmsg($php_lang['lpingbiok'], 'action=plugins&operation=config&do=' . $pluginid . '&identifier=dz55625_haodian&pmod=haodian_pl'); } } elseif ($_GET['haodian_pl'] == 'del') { $del_id = explode('|', $_GET['del_id']); $nums = 0; foreach ($del_id as $aid) { $aid = intval($aid); //-------------------- $pl = DB::fetch_first("SELECT * FROM " . DB::table('forum_alliance_pl') . " WHERE id ='{$aid}'"); $pid = $pl["sid"]; $total = $pl["total"]; $pls = DB::fetch_first("SELECT * FROM " . DB::table('forum_alliance_ar') . " WHERE id ='{$pid}'"); if ($pls["voter"] != 0) { DB::query("UPDATE " . DB::table('forum_alliance_ar') . " SET total=total-{$total},voter=voter-1 WHERE id='{$pid}'"); } //-------------------- $deichek = DB::result_first("SELECT COUNT(*) FROM " . DB::table('forum_alliance_pl') . " WHERE id='{$aid}'"); if (!$deichek) { cpmsg_error(dz55625_haodian($php_lang['weixuanzs'])); } else { DB::query("DELETE FROM " . DB::table('forum_alliance_pl') . " WHERE id='{$aid}' LIMIT 1 "); $nums++; } } cpmsg(dz55625_haodian($php_lang['lshanchuok']), 'action=plugins&operation=config&do=' . $pluginid . '&identifier=dz55625_haodian&pmod=haodian_pl'); }
foreach ($members as $value) { $vuids[$value['uid']] = $value['uid']; } $verifyusers = C::t('common_member_verify')->fetch_all($vuids); foreach ($members as $member) { if (isset($verifyusers[$member['uid']])) { C::t('common_member_verify')->update($member['uid'], array("verify{$vid}" => 1)); } else { C::t('common_member_verify')->insert(array('uid' => $member['uid'], "verify{$vid}" => 1)); } $haveuser = true; } if ($haveuser) { cpmsg('members_verify_add_user_succeed', 'action=verify&operation=verify&do=' . $vid . '&anchor=pass', 'succeed'); } else { cpmsg_error('members_verify_add_user_failure', 'action=verify&operation=add&vid=' . $vid); } } } else { if ($anchor != 'pass') { $_GET['verifytype'] = $vid; } else { $_GET['verify' . $vid] = 1; $_GET['orderby'] = 'uid'; } require_once libfile('function/profile'); if (!submitcheck('verifysubmit', true)) { $menutitle = $vid ? $_G['setting']['verify'][$vid]['title'] : $lang['members_verify_profile']; $navmenu[0] = array('members_verify_nav_authstr', 'verify&operation=verify&anchor=authstr&do=' . $vid, $current['authstr']); $navmenu[1] = array('members_verify_nav_refusal', 'verify&operation=verify&anchor=refusal&do=' . $vid, $current['refusal']); if ($vid) {
foreach ($actlist as $k => $v) { $navbar[$k] = in_array($act, $v) ? $current : ''; if ($k == 'card') { $menustr .= '<li' . $navbar[$k] . '><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=' . $v[0] . '&identifier=sanree_brand&pmod=admincp"><span>' . $cardname . '</span></a></li>'; } $menustr .= '<li' . $navbar[$k] . '><a href="' . ADMINSCRIPT . '?action=plugins&operation=config&act=' . $v[0] . '&identifier=sanree_brand&pmod=admincp"><span>' . $langs[$k] . '</span></a></li>'; } $menustr .= '</ul>'; $thisurl = "plugins&operation=config&identifier=sanree_brand&pmod=admincp&act={$act}"; $gotourl = 'action=plugins&operation=config&identifier=sanree_brand&pmod=admincp&act='; $adminurl = ADMINSCRIPT . '?action=plugins&operation=config&identifier=sanree_brand&pmod=admincp'; $menustr = $rightlink . $menustr; cpheader(); $cateid = intval($_G['sr_cateid']); if ($cateid) { $thisurl .= '&cateid=' . $cateid; } $actfile = sanree_libfile('admincp/' . $plugin['identifier'] . '/' . $act, $plugin['identifier']); if (!file_exists($actfile)) { cpmsg($langs['isbusiness'], 'action=plugins&operation=config&identifier=sanree_brand&pmod=admincp&act=list', 'error'); } $bindingforum = intval($config['bindingforum']); if ($bindingforum < 1) { cpmsg_error($langs['nobindingforum']); } chkformtitle($bindingforum); $creditunit = $config['creditunit']; if (empty($creditunit)) { cpmsg_error($langs['nocreditunit']); } require_once $actfile;
$mpurl .= '&' . implode('&', $results['urls']); $wherearr[] = $operation == 'jscall' ? "blocktype='1'" : "blocktype='0'"; if ($_GET['permname']) { $bids = ''; $uid = DB::result_first('SELECT uid FROM ' . DB::table('common_member') . " WHERE username='******'permname']}'"); if ($uid) { $query = DB::query('SELECT bid FROM ' . DB::table('common_block_permission') . " WHERE uid='{$uid}' GROUP BY bid"); while ($v = DB::fetch($query)) { $bids[] = $v['bid']; } $bids = dimplode($bids); } if ($bids) { $wherearr[] = 'bid IN (' . $bids . ')'; } else { cpmsg_error(stripslashes($_GET['permname']) . cplang('block_the_username_has_not_block')); } $mpurl .= '&permname=' . $_GET['permname']; } $wheresql = empty($wherearr) ? '1' : implode(' AND ', $wherearr); $wheresql = str_replace(array('bid', 'blockclass', ' name', 'blocktype', 'targettplname'), array('b.bid', 'b.blockclass', ' b.name', 'b.blocktype', 'tb.targettplname'), $wheresql); $orders = getorders(array('bid', 'dateline'), 'bid'); $ordersql = $orders['sql']; if ($orders['urls']) { $mpurl .= '&' . implode('&', $orders['urls']); } $orderby = array($_GET['orderby'] => ' selected'); $ordersc = array($_GET['ordersc'] => ' selected'); $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']); if (!in_array($perpage, array(10, 20, 50, 100))) { $perpage = 20;
$entryversion = dhtmlspecialchars($pluginarray['plugin']['version']); if (strexists(strtolower($entryversion), 'vip')) { //vip版本 $zend_check = zend_check(); if ($zend_check == -1) { cpmsg_error(temp_lang('http_visit', array('file' => PICK_URL . '/zend/zendcheck.php'))); } else { if ($zend_check == -2) { cpmsg_error(temp_lang('zend_enable')); } } } } } if (!dir_writeable(PICK_PATH . '/data/cache')) { cpmsg_error(temp_lang('dir_no_write', array('dir' => './source/plugin/milu_pick/data/cache'))); } } } function temp_lang($langvar = null, $vars = array()) { global $_G; $key = 'milu_pick'; $returnvalue = $_G['cache']['pluginlanguage_script']; $return = $langvar !== null ? isset($returnvalue[$key][$langvar]) ? $returnvalue[$key][$langvar] : null : $returnvalue[$key]; $return = $return === null ? $default !== null ? $default : $langvar : $return; $searchs = $replaces = array(); if ($vars && is_array($vars)) { foreach ($vars as $k => $v) { $searchs[] = '{' . $k . '}'; $replaces[] = $v;