本文整理汇总了PHP中WeAccount::create方法的典型用法代码示例。如果您正苦于以下问题:PHP WeAccount::create方法的具体用法?PHP WeAccount::create怎么用?PHP WeAccount::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WeAccount
的用法示例。
在下文中一共展示了WeAccount::create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: respond
public function respond()
{
global $_W;
$rid = $this->rule;
$sql = "SELECT * FROM " . tablename('wxcard_reply') . " WHERE rid = :rid ORDER BY RAND() LIMIT 1";
$reply = pdo_fetch($sql, array(':rid' => $rid));
if (empty($reply)) {
return false;
}
load()->classs('weixin.account');
load()->classs('coupon');
$coupon = new coupon($_W['acid']);
if (is_error($coupon)) {
$this->error($reply, $coupon['message']);
die;
}
$card = $coupon->BuildCardExt($reply['cid']);
if (is_error($card)) {
$this->error($reply, $card['message']);
die;
}
$data = array('touser' => $_W['openid'], 'msgtype' => 'wxcard', 'wxcard' => array('card_id' => $card['card_id'], 'card_ext' => $card['card_ext']));
$acc = WeAccount::create($_W['acid']);
$status = $acc->sendCustomNotice($data);
if (is_error($status)) {
$this->error($reply, $status['message']);
die;
}
if (!empty($reply['success'])) {
return $this->respText($reply['success']);
die;
}
return true;
}
示例2: __construct
function __construct()
{
global $_W, $_GPC;
$this->_fromuser = $_W['fans']['from_user'];
//debug
if ($_SERVER['HTTP_HOST'] == '127.0.0.1') {
$this->_fromuser = 'debug';
}
$this->_weid = $_W['uniacid'];
$account = account_fetch($this->_weid);
$this->_auth2_openid = 'auth2_openid_' . $_W['uniacid'];
$this->_auth2_nickname = 'auth2_nickname_' . $_W['uniacid'];
$this->_auth2_headimgurl = 'auth2_headimgurl_' . $_W['uniacid'];
$this->_appid = '';
$this->_appsecret = '';
$this->_accountlevel = $account['level'];
//是否为高级号
if ($this->_accountlevel == 4) {
$this->_appid = $account['key'];
$this->_appsecret = $account['secret'];
}
if (!empty($this->_appid) && !empty($this->_appsecret)) {
require_once IA_ROOT . '/framework/class/account.class.php';
$acc = WeAccount::create($this->_weid);
$_W['account']['jssdkconfig'] = $acc->getJssdkConfig();
$accountInfo = $acc->fetchAccountInfo();
$_W['account']['access_token'] = $accountInfo['access_token'];
$_W['account']['jsapi_ticket'] = $accountInfo['jsapi_ticket'];
}
}
示例3: doWebChatlog
public function doWebChatlog()
{
global $_GPC, $_W;
load()->func('tpl');
$acids = uni_accounts($_W['uniacid']);
if (!empty($acids)) {
$data = array();
foreach ($acids as $acid) {
if (in_array($acid['level'], array(3, 4))) {
$data[] = $acid;
}
}
}
$starttime = empty($_GPC['starttime']) ? strtotime(date('Y-m-d')) : strtotime($_GPC['starttime']);
if (!empty($_GPC['token'])) {
unset($_GPC['token']);
$avatar = '';
$endtime = $starttime + 23 * 3600 + 3599;
$acid = intval($_GPC['acid']);
if (!empty($_GPC['nickname']) && empty($_GPC['openid'])) {
$user = pdo_fetch('SELECT b.openid,a.avatar FROM ' . tablename('mc_members') . ' AS a LEFT JOIN ' . tablename('mc_mapping_fans') . ' AS b ON a.uid = b.uid WHERE a.nickname = :nickname', array(':nickname' => trim($_GPC['nickname'])));
if (empty($user['openid'])) {
message('没有找到昵称为 "' . $_GPC['nickname'] . '" 的用户', $this->createWebUrl('chatlog', array('acid' => $acid, 'nickname' => $_GPC['nickname'], 'openid' => $_GPC['openid'], 'starttime' => $_GPC['starttime'])), 'error');
} else {
if (!empty($user['avatar'])) {
$avatar = tomedia($user['avatar']);
$nickname = $user['nickname'];
}
}
} else {
$openid = trim($_GPC['openid']);
$user = pdo_fetch('SELECT b.openid,a.avatar,a.nickname FROM ' . tablename('mc_members') . ' AS a LEFT JOIN ' . tablename('mc_mapping_fans') . ' AS b ON a.uid = b.uid WHERE b.openid = :openid', array(':openid' => trim($_GPC['openid'])));
if (!empty($user['avatar'])) {
$avatar = tomedia($user['avatar']);
$nickname = $user['nickname'];
}
}
if ($acid > 0 && !empty($starttime) && !empty($endtime) && !empty($openid)) {
$pindex = max(1, intval($_GPC['page']));
$acc = WeAccount::create($acid);
$params = array('openid' => trim($_GPC['openid']), 'starttime' => $starttime, 'endtime' => $endtime, 'pageindex' => $pindex, 'pagesize' => 1000);
$logs = $acc->fetchChatLog($params);
$next = 1;
if (is_error($logs) || empty($logs['recordlist']) || count($logs['recordlist']) < $params['pagesize']) {
$next = 0;
}
$codedata = array();
$codedata[1000] = '创建未接入会话';
$codedata[1001] = '接入会话';
$codedata[1002] = '主动发起会话';
$codedata[1004] = '关闭会话';
$codedata[1005] = '抢接会话';
$codedata[2001] = '公众号收到消息';
$codedata[2002] = '客服发送消息';
$codedata[2003] = '客服收到消息';
}
}
include $this->template('chatlog');
}
示例4: __construct
public function __construct()
{
global $_W;
$this->account = WeAccount::create($_W['account']);
$this->modules = array_keys($_W['modules']);
$this->modules[] = 'cover';
$this->modules[] = 'default';
$this->modules = array_unique($this->modules);
}
示例5: getAccessToken
public function getAccessToken()
{
global $_W;
load()->model('account');
$acid = $_W['acid'];
if (empty($acid)) {
$acid = $_W['uniacid'];
}
$account = WeAccount::create($acid);
$token = $account->fetch_available_token();
return $token;
}
示例6: doMobileIndex
public function doMobileIndex()
{
global $_W, $_GPC;
$account = account_fetch($_W['uniacid']);
if (!empty($account['key']) && !empty($account['secret'])) {
require_once IA_ROOT . '/framework/class/account.class.php';
$acc = WeAccount::create($_W['uniacid']);
$_W['account']['jssdkconfig'] = $acc->getJssdkConfig();
$accountInfo = $acc->fetchAccountInfo();
$_W['account']['access_token'] = $accountInfo['access_token'];
$_W['account']['jsapi_ticket'] = $accountInfo['jsapi_ticket'];
}
$setting = pdo_fetch("select * from " . tablename($this->modulename . '_setting') . " where weid =:weid LIMIT 1", array(':weid' => $_W['uniacid']));
$share_image = empty($setting['share_image']) ? $_W['siteroot'] . '../addons/weiyun_shuqian/icon.jpg' : tomedia($setting['share_image']);
$share_title = empty($setting['share_title']) ? '数钱数到手抽筋' : $setting['share_title'];
$share_desc = empty($setting['share_desc']) ? '数钱数到手抽筋' : $setting['share_desc'];
$share_url = empty($setting['share_url']) ? $_W['siteroot'] . 'app/' . $this->createMobileUrl('index') : $setting['share_url'];
include $this->template('index');
}
示例7: doMobilelikePage
public function doMobilelikePage()
{
global $_GPC, $_W;
$uniacid = $_W['uniacid'];
$openid = $_W['openid'];
load()->func('logging');
logging_run($openid, '', 'openid');
if (empty($openid)) {
echo "error";
exit;
}
$acid = intval($_W['account']['uniacid']);
$acc = WeAccount::create($acid);
$fan = $acc->fansQueryInfo($_W['openid'], true);
if (intval($fan['errno']) == -1) {
echo "noway";
exit;
}
if ($fan['subscribe'] != '1') {
echo "unsub";
exit;
}
$type = 1;
$result = $this->pic_limit($type);
if ($result) {
echo 'liked';
} else {
$param = array('uniacid' => $uniacid, 'openid' => $openid, 'tousername' => $tousername, 'time' => date("Y-m-d H:i:s", time()), 'picid' => $_GPC['personalPicWallId']);
pdo_insert('ice_picWallLikelist', $param);
$param2 = array(':uniacid' => $uniacid, 'picid' => $_GPC['personalPicWallId']);
$sql = 'SELECT count(openid) FROM ' . tablename('ice_picWallLikelist') . ' WHERE uniacid = :uniacid and picid = :picid';
$column = pdo_fetchcolumn($sql, $param2);
load()->func('logging');
logging_run('点赞数据更新:' . $column, '', 'column');
if (intval($column) > 0) {
pdo_update('ice_picWallMain', array('likenum' => $column), array('id' => $_GPC['personalPicWallId']));
}
echo $column;
}
}
示例8: receive
public function receive()
{
global $_W;
load()->model('mc');
$type = $this->message['type'];
$event = $this->message['event'];
$openid = $this->message['from'];
$config = $this->module['config'];
$acc = WeAccount::create($_W['acid']);
if ($event == 'subscribe' && $config['sub_num'] != 0 && !empty($config['sub_type'])) {
$log = pdo_fetch("SELECT id FROM " . tablename('ju_credit_log') . " WHERE uniacid=:uniacid and openid=:openid", array(':uniacid' => $_W['uniacid'], ':openid' => $openid));
if (empty($log)) {
$uid = mc_openid2uid($openid);
$result = mc_credit_update($uid, $config['sub_type'], $config['sub_num'], array('0' => '1', '1' => '关注平台奖励'));
if ($result) {
$insert = array('uniacid' => $_W['uniacid'], 'openid' => $openid, 'subscribetime' => time(), 'unsubscribetime' => 0, 'follow' => 1);
pdo_insert('ju_credit_log', $insert);
$this->sendText($acc, $this->message['from'], '感谢您的关注,赠送您' . $config['sub_num'] . '!');
}
} else {
pdo_update('ju_credit_log', array('follow' => 1, 'subscribetime' => time()), array('id' => $log['id']));
}
} elseif ($event == 'unsubscribe' && $config['unsub_num'] != 0) {
$log = pdo_fetch("SELECT id FROM " . tablename('ju_credit_log') . " WHERE uniacid=:uniacid and openid=:openid", array(':uniacid' => $_W['uniacid'], ':openid' => $openid));
$uid = mc_openid2uid($openid);
if (empty($log)) {
$result = mc_credit_update($uid, $config['unsub_type'], '-' . $config['unsub_num'], array('0' => '1', '1' => '取消关注平台扣除'));
if ($result) {
$insert = array('uniacid' => $_W['uniacid'], 'openid' => $openid, 'subscribetime' => 0, 'unsubscribetime' => time(), 'follow' => 0);
pdo_insert('ju_credit_log', $insert);
}
} else {
$result = mc_credit_update($uid, $config['unsub_type'], '-' . $config['unsub_num'], array('0' => '1', '1' => '取消关注平台扣除'));
pdo_update('ju_credit_log', array('follow' => 0, 'subscribetime' => 0, 'unsubscribetime' => time()), array('id' => $log['id']));
}
}
}
示例9: payResult
public function payResult($params)
{
global $_W;
$fee = intval($params['fee']);
$data = array('status' => $params['result'] == 'success' ? 1 : 0);
$paytype = array('credit' => 1, 'wechat' => 2, 'alipay' => 2, 'delivery' => 3);
$data['pay_type'] = $paytype[$params['type']];
if ($params['result'] == 'success') {
$data['pay_time'] = TIMESTAMP;
}
pdo_update('daijia_orders', $data, array('ordersn' => $params['tid']));
if ($params['from'] == 'return') {
$setting = uni_setting($_W['uniacid'], array('creditbehaviors'));
$credit = $setting['creditbehaviors']['currency'];
//支付成功,打印订单
$order = pdo_fetch("SELECT * FROM " . tablename('daijia_orders') . "where ordersn={$params['tid']}");
//获取所有打印机
$prints = pdo_fetchall('SELECT * FROM ' . tablename('daijia_print') . ' WHERE uniacid = :aid AND status = 1', array(':aid' => $_W['uniacid']));
if (empty($prints)) {
// exit('没有有效的打印机');
}
$paytype = $order['paytype'] == '3' ? '货到付款' : '已付款';
$ordertype = $order['type'] == 'daijia' ? '代驾' : '代劳、代步';
//邮件提醒
$orderinfo = '';
$orderinfo .= '订单编号 起始地址 目的地址 价格 备注<BR>';
$orderinfo .= '--------------------------------<BR>';
$orderInfo .= "{$order['ordersn']}{$order['start_address']}{$order['end_address']}{$order['price']}{$order['remark']}<br />";
$orderInfo .= '--------------------------------<BR>';
$orderinfo .= "合计:{$order['price']}元<BR>";
$orderinfo .= "联系电话:{$order['mobile']}<BR>";
$orderinfo .= "支付方式:{$paytype}<BR>";
//微信提醒
$sendinfo = '您的订单支付成功,请等待处理:\\n';
$sendinfo .= '--------------------\\n';
$sendinfo .= "{$ordertype}详情:\n";
$sendinfo .= '--------------------\\n';
$sendinfo .= "订单编号:{$order['ordersn']}\n";
$sendinfo .= "起始地址: {$order['start_address']}\n";
$sendinfo .= "目的地址: {$order['end_address']}\n";
$sendinfo .= "备注: {$order['remark']}\n";
$sendinfo .= '--------------------\\n';
$sendinfo .= "合计:{$order['price']}元\n";
$sendinfo .= "联系电话:{$order['mobile']}\n";
$sendinfo .= "支付方式:{$paytype}\n";
//发送微信提醒
$send['msgtype'] = 'text';
$send['text'] = array('content' => urlencode($sendinfo));
$acc = WeAccount::create($_W['account']['acid']);
$send['touser'] = trim($_W['openid']);
$s_mess = $acc->sendCustomNotice($send);
include 'wprint.class.php';
//遍历所有打印机
foreach ($prints as $li) {
if (!empty($li['qrcode_link'])) {
$orderinfo .= "<QR>{$li['qrcode_link']}</QR>";
}
if (!empty($li['print_no']) && !empty($li['key'])) {
$wprint = new wprint();
$status = $wprint->StrPrint($li['print_no'], $li['key'], $orderinfo, 1);
if (!is_error($status)) {
$i++;
$data2 = array('uniacid' => $_W['uniacid'], 'sid' => $sid, 'pid' => $li['id'], 'oid' => $id, 'status' => 1, 'aid' => $status, 'addtime' => TIMESTAMP);
pdo_insert('daijia_order_print', $data2);
}
}
}
// if($i > 0) {
// pdo_query('UPDATE ' . tablename('str_order') . " SET print_nums = print_nums + {$i} WHERE uniacid = {$_W['uniacid']} AND id = {$id}");
// } else {
// exit('发送打印指令失败。没有有效的机器号');
// }
// exit('success');
//打印结束
if ($params['type'] == $credit) {
message('支付成功!', $this->createMobileUrl('daijia', array('op' => 'yes')), 'success');
} else {
message('支付成功!', '../../app/' . $this->createMobileUrl('daijia', array('op' => 'yes')), 'success');
}
}
}
示例10: doWebhotelset
public function doWebhotelset()
{
global $_GPC, $_W;
$acc = WeAccount::create($_W['acid']);
$id = intval($_GPC['id']);
if (checksubmit('submit')) {
$data = array('weid' => $_W['uniacid'], 'location_p' => $_GPC['district']['province'], 'location_c' => $_GPC['district']['city'], 'location_a' => $_GPC['district']['district'], 'version' => $_GPC['version'], 'user' => $_GPC['user'], 'reg' => $_GPC['reg'], 'regcontent' => $_GPC['regcontent'], 'bind' => $_GPC['bind'], 'ordertype' => $_GPC['ordertype'], 'paytype1' => $_GPC['paytype1'], 'paytype2' => $_GPC['paytype2'], 'paytype3' => $_GPC['paytype3'], 'is_unify' => $_GPC['is_unify'], 'tel' => $_GPC['tel'], 'email' => $_GPC['email'], 'mobile' => $_GPC['mobile'], 'template' => $_GPC['template'], 'templateid' => trim($_GPC['templateid']));
if ($data['template'] && $data['templateid'] == '') {
message('请输入模板ID', referer(), 'info');
}
if (!empty($id)) {
pdo_update("hotel2_set", $data, array("id" => $id));
} else {
pdo_insert("hotel2_set", $data);
}
message("保存设置成功!", referer(), "success");
}
$sql = 'SELECT * FROM ' . tablename('hotel2_set') . ' WHERE `weid` = :weid';
$set = pdo_fetch($sql, array(':weid' => $_W['uniacid']));
if (empty($set)) {
$set = array('user' => 1, 'reg' => 1, 'bind' => 1);
}
include $this->template("hotelset");
}
示例11: changeWechatSend
private function changeWechatSend($id, $status, $msg = '')
{
global $_W;
$paylog = pdo_fetch("SELECT plid, openid, tag FROM " . tablename('core_paylog') . " WHERE tid = '{$id}' AND status = 1 AND type = 'wechat'");
if (!empty($paylog['openid'])) {
$paylog['tag'] = iunserializer($paylog['tag']);
$acid = $paylog['tag']['acid'];
$account = account_fetch($acid);
$payment = uni_setting($account['uniacid'], 'payment');
if ($payment['payment']['wechat']['version'] == '2') {
return true;
}
$send = array('appid' => $account['key'], 'openid' => $paylog['openid'], 'transid' => $paylog['tag']['transaction_id'], 'out_trade_no' => $paylog['plid'], 'deliver_timestamp' => TIMESTAMP, 'deliver_status' => $status, 'deliver_msg' => $msg);
$sign = $send;
$sign['appkey'] = $payment['payment']['wechat']['signkey'];
ksort($sign);
$string = '';
foreach ($sign as $key => $v) {
$key = strtolower($key);
$string .= "{$key}={$v}&";
}
$send['app_signature'] = sha1(rtrim($string, '&'));
$send['sign_method'] = 'sha1';
$account = WeAccount::create($acid);
$response = $account->changeOrderStatus($send);
if (is_error($response)) {
message($response['message']);
}
}
}
示例12: pdo_fetch
$groups = pdo_fetch('SELECT * FROM ' . tablename('mc_fans_groups') . ' WHERE uniacid = :uniacid AND acid = :acid', array(':uniacid' => $_W['uniacid'], ':acid' => $_W['acid']));
if (!empty($groups)) {
$groups = iunserializer($groups['groups']);
}
$record = array('uniacid' => $_W['uniacid'], 'acid' => $_W['acid'], 'groupname' => $groups[$group]['name'], 'fansnum' => $groups[$group]['count'], 'msgtype' => $type, 'group' => $group, 'attach_id' => $id, 'status' => 0, 'type' => 0, 'sendtime' => TIMESTAMP, 'createtime' => TIMESTAMP);
pdo_insert('mc_mass_record', $record);
exit('success');
}
if ($do == 'del') {
$id = intval($_GPC['id']);
$media = pdo_get('wechat_attachment', array('uniacid' => $_W['uniacid'], 'id' => $id));
if (empty($media)) {
exit('素材不存在或已经删除');
}
$media_id = trim($media['media_id']);
$acc = WeAccount::create();
$data = $acc->delMaterial($media_id);
if (is_error($data)) {
exit($data['message']);
} else {
pdo_delete('wechat_attachment', array('uniacid' => $_W['uniacid'], 'id' => $id));
if ($type == 'image' || $type == 'voice') {
$path = ATTACHMENT_ROOT . "/{$media['type']}s/{$_W['uniacid']}/material/{$media['$media_id']}";
@unlink($path);
} elseif ($type == 'news') {
pdo_delete('wechat_news', array('uniacid' => $_W['uniacid'], 'attach_id' => $id));
}
exit('success');
}
}
template('material/display');
示例13: mc_fansinfo
$fan = mc_fansinfo($auth['openid'], $auth['acid'], $_W['uniacid']);
if (!empty($fan)) {
$hash = md5("{$auth['openid']}{$auth['time']}{$fan['salt']}{$_W['config']['setting']['authkey']}");
if ($auth['hash'] == $hash) {
if ($_W['setting']['authmode'] == 2) {
$rec = array();
do {
$rec['salt'] = random(8);
} while ($rec['salt'] == $fan['salt']);
pdo_update('mc_mapping_fans', $rec, array('uniacid' => $_W['uniacid'], 'acid' => $auth['acid'], 'openid' => $auth['openid']));
}
$_SESSION['uniacid'] = $_W['uniacid'];
$_SESSION['acid'] = $auth['acid'];
$_SESSION['openid'] = $auth['openid'];
if ($_W['account']['level'] == '3' && empty($fan['nickname'])) {
$account_obj = WeAccount::create($_W['account']);
$userinfo = $account_obj->fansQueryInfo($auth['openid']);
if (!is_error($userinfo) && is_array($userinfo) && !empty($userinfo['nickname'])) {
$record = array();
$record['updatetime'] = TIMESTAMP;
$record['nickname'] = stripslashes($userinfo['nickname']);
$record['tag'] = base64_encode(iserializer($userinfo));
pdo_update('mc_mapping_fans', $record, array('openid' => $fan['openid']));
if (!empty($fan['uid'])) {
$user = mc_fetch($fan['uid'], array('nickname', 'gender', 'residecity', 'resideprovince', 'nationality', 'avatar'));
$record = array();
if (empty($user['nickname']) && !empty($userinfo['nickname'])) {
$record['nickname'] = stripslashes($userinfo['nickname']);
}
if (empty($user['gender']) && !empty($userinfo['sex'])) {
$record['gender'] = $userinfo['sex'];
示例14: message
} else {
message("公众平台返回接口错误. <br />错误代码为: {$result['errorcode']} <br />错误信息为: {$result['message']}");
}
}
$id = intval($_GPC['id']);
$row = pdo_fetch("SELECT * FROM " . tablename('qrcode') . " WHERE uniacid = {$_W['uniacid']} AND id = '{$id}'");
template('platform/qr-post');
}
if ($do == 'extend') {
load()->func('communication');
$id = intval($_GPC['id']);
if (!empty($id)) {
$qrcrow = pdo_fetch("SELECT * FROM " . tablename('qrcode') . " WHERE uniacid = {$_W['uniacid']} AND id = '{$id}'");
$update = array();
if ($qrcrow['model'] == 1) {
$uniacccount = WeAccount::create($qrcrow['acid']);
$barcode['action_info']['scene']['scene_id'] = $qrcrow['qrcid'];
$barcode['expire_seconds'] = 1800;
$barcode['action_name'] = 'QR_SCENE';
$result = $uniacccount->barCodeCreateDisposable($barcode);
if (is_error($result)) {
message($result['message'], '', 'error');
}
$update['ticket'] = $result['ticket'];
$update['expire'] = $result['expire_seconds'];
$update['createtime'] = TIMESTAMP;
pdo_update('qrcode', $update, array('id' => $id, 'uniacid' => $_W['uniacid']));
}
message('恭喜,延长临时二维码时间成功!', referer(), 'success');
}
}
示例15: defined
* [WEIZAN System] Copyright (c) 2015 012WZ.COM
* WeiZan is NOT a free software, it under the license terms, visited http://www.012wz.com/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
if (!empty($_W['uniacid'])) {
load()->model('account');
load()->model('mc');
$setting = uni_setting($_W['uniacid'], 'sync');
$sync = $setting['sync'];
if ($sync != 1) {
exit;
}
if ($_W['account']['type'] == 1 && $_W['account']['level'] >= 3) {
$data = pdo_fetchall('SELECT fanid, openid, acid, uid, uniacid FROM ' . tablename('mc_mapping_fans') . " WHERE uniacid = :uniacid AND acid = :acid AND follow = 1 ORDER BY updatetime ASC, fanid DESC LIMIT 10", array(':uniacid' => $_W['uniacid'], ':acid' => $_W['acid']));
if (!empty($data)) {
$acc = WeAccount::create($_W['acid']);
foreach ($data as $row) {
$fan = $acc->fansQueryInfo($row['openid'], true);
if (!is_error($fan) && $fan['subscribe'] == 1) {
$group = $acc->fetchFansGroupid($row['openid']);
$record = array();
if (!is_error($group)) {
$record['groupid'] = $group['groupid'];
}
$record['updatetime'] = time();
$record['followtime'] = $fan['subscribe_time'];
$record['follow'] = 1;
$fan['nickname'] = stripcslashes($fan['nickname']);
$record['nickname'] = stripslashes($fan['nickname']);
if (!empty($fan['remark'])) {
$fan['remark'] = stripslashes($fan['remark']);