1)); } $tid = intval($_GET['tid']); $seccode = intval($_GET['seccode']); $siteid = $_G['wechat']['setting']['wsq_siteid']; $items = DB::fetch_first("SELECT * FROM ".DB::table('xj_event')." WHERE tid=$tid"); $thread = DB::fetch_first("SELECT * FROM ".DB::table('forum_thread')." WHERE tid=$tid"); $setting = unserialize($items['setting']); //判断是不是管理团队 $event_admin = false; if($_G['username']){ if(in_array($_G['username'],$setting['event_admin'])){ $event_admin = true; } } if($thread['authorid'] != $_G['uid'] && $event_admin == false){ showmessage('quickclear_noperm'); } $apply = DB::fetch_first("SELECT * FROM ".DB::table('xj_eventapply')." WHERE seccode=$seccode"); if(!$apply){ showmessage('undefined_action'); } $applyid = intval($_GET['applyid']); $thread = DB::fetch(DB::query("SELECT subject FROM ".DB::table('forum_thread')." WHERE tid = $tid")); if($_GET['action'] == 'use'){ $result = array(); require_once DISCUZ_ROOT.'./source/plugin/wechat/wechat.lib.class.php'; if($apply['secstate']>0){ $result['showmessage'] = $_G['charset']=='gbk'?iconv('GBK','UTF-8',lang('plugin/xj_event', 'rcjwxhysy')):lang('plugin/xj_event', 'rcjwxhysy'); $result['tourl'] = WeChatHook::getPluginUrl('xj_event:wsq_join_validation', array('tid' => $tid,'seccode'=>$seccode)); $result['full'] = 2; echo json_encode($result); exit; } DB::update("xj_eventapply",array('secstate'=>1),"seccode=$seccode"); $result['showmessage'] = $_G['charset']=='gbk'?iconv('GBK','UTF-8',lang('plugin/xj_event', 'rcjsycg')):lang('plugin/xj_event', 'rcjsycg'); $result['tourl'] = WeChatHook::getPluginUrl('xj_event:wsq_join_validation', array('tid' => $tid,'seccode'=>$seccode)); $result['full'] = 1; echo json_encode($result); exit; } ?>
:
:
: