Esempio n. 1
0
/**
 * 右侧会员空间导航模块
 * @param $uid
 */
function getHomeNav($args)
{
    list($uid, $active) = explode(',', $args);
    unset($args);
    $args = array('uid' => $uid, 'active' => $active, 'user' => FS('User')->getUserById($uid), 'user_show_name' => FS('User')->getUserShowName($uid));
    return tplFetch('inc/u/home_nav', $args);
}
 public function getImageServer($server = '', $request = array())
 {
     global $_FANWE;
     $result = array();
     $result['status'] = 0;
     if ($_FANWE['uid'] == 0) {
         return $result;
     }
     $type = $request['type'];
     switch ($type) {
         case 'uploadphoto':
             $server = FS("Image")->formatServer($server, 'DE');
             break;
         case 'uploadavatar':
             $server = FS("Image")->getServer($_FANWE['user']['server_code']);
             break;
     }
     $server = FS("Image")->getImageUrlToken($request['args'], $server);
     if ($server === false) {
         return $result;
     }
     switch ($type) {
         case 'uploadphoto':
             $cache_file = getTplCache('services/image/pic_item');
             $args = array();
             $result['html'] = base64_encode(tplFetch("services/image/pic_item", $args, '', $cache_file));
             break;
     }
     $result['status'] = 1;
     $result['max_upload'] = (int) $_FANWE['setting']['max_upload'];
     $result['url'] = $server['url'];
     $result['token'] = $server['token'];
     $result['image_server'] = $server['image_server'];
     return $result;
 }
Esempio n. 3
0
 public function templetsave()
 {
     FS("emailtxt", $_POST['email'], "Webconfig/");
     FS("smstxt", $_POST['sms'], "Webconfig/");
     FS("msgtxt", $_POST['msg'], "Webconfig/");
     $this->success("操作成功", __URL__ . "/templet/");
 }
Esempio n. 4
0
 /**
  * 保存参数
  * 
  */
 public function save()
 {
     FS("loanconfig", $_POST['loan'], "Webconfig/");
     alogs("Age", 0, 1, '托管设置操作成功!');
     //管理员操作日志
     $this->success("操作成功", __URL__ . "/index/");
 }
 public function run()
 {
     global $_FANWE;
     $root = array();
     $root['return'] = 1;
     //未登陆直接退出
     if ($_FANWE['uid'] == 0) {
         $root['status'] = -1;
         m_display($root);
     }
     $uid = (int) $_FANWE['requestData']['uid'];
     //没有关注的会员编号直接退出
     if ($uid == 0) {
         $root['status'] = -2;
         m_display($root);
     }
     //没有会员直接退出
     if (!FS('User')->getUserExists($uid)) {
         $root['status'] = -3;
         m_display($root);
     }
     if (FS('User')->followUser($uid)) {
         $root['is_follow'] = 1;
     } else {
         $root['is_follow'] = 0;
     }
     $root['status'] = 1;
     m_display($root);
 }
    public function run()
    {
        global $_FANWE;
        $root = array();
        $root['return'] = 1;
        $root['act'] = 'delcomment';
        if ($_FANWE['uid'] == 0) {
            exit;
        }
        $comment_id = intval($_FANWE['requestData']['id']);
        if ($comment_id == 0) {
            exit;
        }
        $share = FDB::fetchFirst('SELECT s.uid,s.share_id  
			FROM ' . FDB::table('share_comment') . ' AS sc 
			INNER JOIN ' . FDB::table('share') . ' AS s ON s.share_id = sc.share_id 
			WHERE sc.comment_id = ' . $comment_id);
        if (empty($share)) {
            exit;
        }
        $uid = intval($share['uid']);
        if ($uid != $_FANWE['uid']) {
            exit;
        }
        FS('Share')->deleteShareComment($comment_id);
        $root['return'] = 1;
        m_display($root);
    }
 public function save()
 {
     alogs("Loginonline", 0, 1, '执行了登陆接口管理参数编辑操作!');
     //管理员操作日志
     FS("loginconfig", $_POST['login'], "Webconfig/");
     $this->success("操作成功", __URL__ . "/index/");
 }
    /**  
     * 获取首页今日达人
     * @param int $num 数量
     * @return array
     */
    public function getIndexTodayDaren($num = 1)
    {
        global $_FANWE;
        $today_time = getTodayTime();
        $data = getCache('daren/index/today');
        if ($data === NULL || $data['time'] != $today_time) {
            $sql = 'SELECT uid,index_img,img  
				FROM ' . FDB::table('user_daren') . ' 
				WHERE status = 1 AND is_index = 1 AND index_img <> \'\' AND day_time = ' . $today_time;
            $data['list'] = FDB::fetchAll($sql);
            if (empty($data['list'])) {
                $sql = 'SELECT uid,index_img,img  
					FROM ' . FDB::table('user_daren') . ' 
					WHERE status = 1 AND is_index = 1 AND index_img <> \'\' ORDER BY day_time DESC LIMIT 0,5';
                $data['list'] = FDB::fetchAll($sql);
            }
            $data['time'] = $today_time;
            setCache('daren/index/today', $data);
        }
        if (empty($data['list'])) {
            return false;
        }
        $daren = $data['list'][array_rand($data['list'])];
        $_FANWE['index_today_daren'] = $daren['uid'];
        $daren['user'] = FS('User')->getUserCache($daren['uid']);
        return $daren;
    }
 public function run()
 {
     global $_FANWE;
     $root = array();
     $root['return'] = 0;
     FanweService::instance()->cache->loadCache(array('mindex', 'madv'));
     $advs = $_FANWE['cache']['madv']['index'];
     if ($advs) {
         foreach ($advs as $adv) {
             $adv['img'] = FS("Image")->getImageUrl($adv['img'], 2);
             if ($adv['type'] == 1) {
                 $tag_count = count($adv['data']['tags']);
                 unset($adv['data']);
                 $adv['data']['count'] = $tag_count;
             } elseif ($adv['type'] != 2 && $adv['type'] != 8) {
                 unset($adv['data']);
             }
             unset($adv['sort'], $adv['status'], $adv['page']);
             $root['advs'][] = $adv;
         }
     }
     foreach ($_FANWE['cache']['mindex'] as $index) {
         $index['img'] = FS("Image")->getImageUrl($index['img'], 2);
         if ($index['type'] == 1) {
             $tag_count = count($index['data']['tags']);
             unset($index['data']);
             $index['data']['count'] = $tag_count;
         } elseif ($index['type'] != 2 && $index['type'] != 8) {
             unset($index['data']);
         }
         unset($index['sort'], $index['status']);
         $root['indexs'][] = $index;
     }
     m_display($root);
 }
Esempio n. 10
0
 public function offline()
 {
     $this->getPaydetail();
     $this->paydetail['money'] = floatval($_POST['money_off']);
     //本地要保存的信息
     $payimg_arr = $_POST['swfimglist'];
     if (count($payimg_arr)) {
         $this->paydetail['payimg'] = serialize($payimg_arr);
     } else {
         $this->paydetail['payimg'] = '';
     }
     $config = FS("Webconfig/payoff");
     $bank_id = intval($_POST['bank']) - 1;
     $this->paydetail['fee'] = 0;
     $this->paydetail['nid'] = 'offline';
     $this->paydetail['way'] = 'off';
     $this->paydetail['tran_id'] = text($_POST['tran_id']);
     $this->paydetail['off_bank'] = $config['BANK'][$bank_id]['bank'] . ' 开户名:' . $config['BANK'][$bank_id]['payee'];
     $this->paydetail['off_way'] = text($_POST['off_way']);
     $newid = M('member_payonline')->add($this->paydetail);
     if ($newid) {
         $this->success("线下充值提交成功,请等待管理员审核", __APP__ . "/member/charge#fragment-2");
     } else {
         $this->success("线下充值提交失败,请重试");
     }
 }
Esempio n. 11
0
 public function save()
 {
     FS("id5", $_POST['id5'], "Webconfig/");
     alogs("id5", 0, 1, '执行了身份验证接口参数的编辑操作!');
     //管理员操作日志
     $this->success("操作成功", __URL__ . "/index/");
 }
Esempio n. 12
0
 public function offline()
 {
     $this->getPaydetail();
     $this->paydetail['money'] = floatval($_POST['money_off']);
     //本地要保存的信息
     $accept_bank = array(1 => '招商银行', 2 => '工商银行', 3 => '建设银行', 4 => '农业银行', 5 => '中国银行');
     $bank_id = intval($_POST['accept_bank']);
     $payimg_arr = $_POST['swfimglist'];
     if (count($payimg_arr)) {
         $this->paydetail['payimg'] = serialize($payimg_arr);
     } else {
         $this->paydetail['payimg'] = '';
     }
     $config = FS("Webconfig/payoff");
     $this->paydetail['fee'] = 0;
     $this->paydetail['nid'] = 'offline';
     $this->paydetail['way'] = 'off';
     $this->paydetail['tran_id'] = text($_POST['tran_id']);
     $this->paydetail['off_bank'] = $accept_bank[$bank_id];
     $this->paydetail['off_way'] = text($_POST['off_way']);
     $newid = M('member_payonline')->add($this->paydetail);
     if ($newid) {
         $this->success("线下充值提交成功,请等待管理员审核", __APP__ . "/member");
     } else {
         $this->error("线下充值提交失败,请重试");
     }
 }
 public function wapsave()
 {
     FS("wappayconfig", $_POST['pay'], "Webconfig/");
     alogs("Payonline", 0, 1, '执行了wap端第三方支付接口参数的编辑操作!');
     //管理员操作日志
     $this->success("操作成功le", __URL__ . "/wap");
 }
Esempio n. 14
0
 /**
  * 发送系统通知
  * @return
  */
 public function send($data)
 {
     $data['uid'] = (int) $data['uid'];
     $data['create_time'] = TIME_UTC;
     FDB::insert('sys_notice', $data);
     FS('User')->updateNotice($data['uid'], 5);
 }
 public function __construct()
 {
     $msgconfig = FS("Webconfig/msgconfig");
     $this->apiKey = $msgconfig['baidu']['apiKey'];
     $this->secretKey = $msgconfig['baidu']['secretKey'];
     parent::__construct();
 }
Esempio n. 16
0
 public function _MyInit()
 {
     $this->ismsinfo = C("ISMS_INFO");
     $msgconfig = FS("Webconfig/msgconfig");
     $this->assign("smsuid", $msgconfig['sms']['user']);
     $this->assign("smspwd", $msgconfig['sms']['pass']);
 }
Esempio n. 17
0
 public function save()
 {
     FS("ageconfig", $_POST['leve'], "Webconfig/");
     alogs("Age", 0, 1, '会员年龄别称操作成功!');
     //管理员操作日志
     $this->success("操作成功", __URL__ . "/index/");
 }
Esempio n. 18
0
 public function save()
 {
     FS("payconfig", $_POST['pay'], "Webconfig/");
     alogs("Payonline", 0, 1, '执行了第三方支付接口参数的编辑操作!');
     //管理员操作日志
     $this->success("操作成功", __URL__ . "/index/");
 }
Esempio n. 19
0
 public function investsave()
 {
     alogs("Leve", 0, 2, '执行了投资积分等级数据编辑操作!');
     //管理员操作日志
     FS("leveinvestconfig", $_POST['leve'], "Webconfig/");
     $this->success("操作成功", __URL__ . "/invest/");
 }
Esempio n. 20
0
 public function run()
 {
     global $_FANWE;
     $root = array();
     $root['return'] = 0;
     if ($_FANWE['uid'] == 0) {
         $root['info'] = "请先登陆";
         m_display($root);
     }
     $user = FS("User")->getUserById($_FANWE['uid']);
     $data = array('oldpassword' => $_FANWE['requestData']['oldpassword'], 'newpassword' => $_FANWE['requestData']['newpassword']);
     $vservice = FS('Validate');
     $validate = array(array('oldpassword', 'required', '请输入现在的密码'), array('newpassword', 'range_length', '请输入正确的新密码', 6, 32));
     if (!$vservice->validation($validate, $data)) {
         $root['info'] = $vservice->getError();
         m_display($root);
     } else {
         if (md5($data['oldpassword']) != $user['password']) {
             $root['info'] = '原密码不正确';
             m_display($root);
         } else {
             FDB::update('user', array('password' => md5($data['newpassword'])), 'uid = ' . $_FANWE['uid']);
             $root['info'] = '修改成功';
             $user_field = $_FANWE['setting']['integrate_field_id'];
             $sql = "SELECT {$user_field} FROM " . FDB::table('user') . " WHERE uid = '{$_FANWE['uid']}'";
             $integrate_id = intval(FDB::resultFirst($sql));
             if ($integrate_id > 0) {
                 FS("Integrate")->editUser($integrate_id, $data['newpassword'], '', '');
             }
         }
     }
     $root['return'] = 1;
     m_display($root);
 }
Esempio n. 21
0
function getShareByUserClickShareID()
{
    global $_FANWE;
    $share_id = (int) $_FANWE['user_click_share_id'];
    if ($share_id > 0) {
        $share = FS('Share')->getShareById($share_id);
        if ($share) {
            $temp_share[] = $share;
            $temp_share = FS('Share')->getShareDetailList($temp_share, false, false, false, true, 5);
            $temp_share = $temp_share[$share_id];
            $args = array('share' => &$temp_share);
            $result = array();
            $result['share_id'] = $share_id;
            switch (ACTION_NAME) {
                case 'dapei':
                    $result['html'] = tplFetch('inc/book/book_dapei', $args);
                    break;
                case 'look':
                    $result['html'] = tplFetch('inc/book/book_look', $args);
                    break;
                default:
                    $result['html'] = tplFetch('inc/book/book_index', $args);
                    break;
            }
            return "ShowUserClickShare(" . outputJson($result, false) . ");";
        }
    }
    return '';
}
 public function run()
 {
     global $_FANWE;
     $root = array();
     $root['return'] = 0;
     $data = array('email' => $_FANWE['requestData']['email'], 'user_name' => $_FANWE['requestData']['user_name'], 'password' => $_FANWE['requestData']['password'], 'gender' => intval($_FANWE['requestData']['gender']));
     $vservice = FS('Validate');
     $validate = array(array('email', 'required', lang('user', 'register_email_require')), array('email', 'email', lang('user', 'register_email_error')), array('user_name', 'required', lang('user', 'register_user_name_require')), array('user_name', 'range_length', lang('user', 'register_user_name_len'), 2, 20), array('user_name', '/^[\\x{4e00}-\\x{9fa5}a-zA-Z][\\x{4e00}-\\x{9fa5}a-zA-Z0-9]+$/u', lang('user', 'register_user_name_error')), array('password', 'range_length', lang('user', 'register_password_range'), 6, 20));
     if (!$vservice->validation($validate, $data)) {
         $root['info'] = "注册失败:" . $vservice->getError();
         m_display($root);
     }
     $uservice = FS('User');
     if ($uservice->getEmailExists($data['email'])) {
         $root['info'] = "注册失败:" . lang('user', 'register_email_exist');
         m_display($root);
     }
     if ($uservice->getUserNameExists($data['user_name'])) {
         $root['info'] = "注册失败:" . lang('user', 'register_user_name_exist');
         m_display($root);
     }
     //================add by chenfq 2011-10-14 =======================
     $user_field = $_FANWE['setting']['integrate_field_id'];
     $integrate_id = FS("Integrate")->addUser($data['user_name'], $data['password'], $data['email']);
     if ($integrate_id < 0) {
         $info = FS("Integrate")->getInfo();
         $root['info'] = "注册失败:" . $info;
         m_display($root);
     }
     //================add by chenfq 2011-10-14=======================
     $user = array('email' => $data['email'], 'user_name' => $data['user_name'], 'user_name_match' => segmentToUnicode($data['user_name']), 'password' => md5($data['password']), 'status' => 1, 'email_status' => 0, 'avatar_status' => 0, 'gid' => 7, 'invite_id' => FS('User')->getReferrals(), 'reg_time' => TIME_UTC, $user_field => $integrate_id);
     $uid = FDB::insert('user', $user, true);
     if ($uid > 0) {
         $_FANWE['uid'] = $uid;
         FDB::insert('user_count', array('uid' => $uid));
         if ($user['invite_id'] > 0) {
             FS('User')->insertReferral($uid, $user['invite_id'], $user['user_name']);
         }
         FS("User")->updateUserScore($uid, 'user', 'register');
         unset($user);
         $user_profile = array('uid' => $uid, 'gender' => $data['gender']);
         FDB::insert('user_profile', $user_profile);
         unset($user_profile);
         $user_status = array('uid' => $uid, 'reg_ip' => $_FANWE['client_ip'], 'last_ip' => $_FANWE['client_ip'], 'last_time' => TIME_UTC, 'last_activity' => TIME_UTC);
         FDB::insert('user_status', $user_status);
         $root['return'] = 1;
         $root['info'] = "用户注册成功";
         $root['uid'] = $uid;
         $root['user_name'] = $data['user_name'];
         $root['user_avatar'] = avatar($uid, 'm', '', 1, true);
         $root['user_email'] = $data['email'];
         $deviceuid = addslashes(trim($_FANWE['requestData']['deviceuid']));
         $sql = "update " . FDB::table('apns_devices') . " set clientid = " . $uid . " where clientid = 0 and deviceuid = '" . $deviceuid . "'";
         FDB::query($sql);
     } else {
         $root['info'] = lang('user', 'register_error');
     }
     m_display($root);
 }
    public function run()
    {
        global $_FANWE;
        $root = array();
        $root['return'] = 0;
        $uid = (int) $_FANWE['requestData']['uid'];
        $cid = (int) $_FANWE['requestData']['cid'];
        $album_title = trim($_FANWE['requestData']['title']);
        $data = array('title' => $album_title, 'cid' => $cid);
        $vservice = FS('Validate');
        $validate = array(array('title', 'required', lang('album', 'name_require')), array('title', 'max_length', lang('album', 'name_max'), 60), array('cid', 'min', lang('album', 'cid_min'), 1));
        if (!$vservice->validation($validate, $data)) {
            $root['info'] = $vservice->getError();
            m_display($root);
        }
        $check_result = FS('Share')->checkWord($album_title, 'title');
        if ($check_result['error_code'] == 1) {
            $root['info'] = $check_result['error_msg'];
            m_display($root);
        }
        if ($uid > 0) {
            if (!FS('User')->getUserExists($uid)) {
                $uid = 0;
            }
        }
        if ($cid == 0) {
            $uid == 0;
        }
        if ($uid == 0) {
            $root['info'] = "请先登录";
            m_display($root);
        }
        $share_data = array();
        $share_data['uid'] = $uid;
        $share_data['type'] = 'album';
        $share_data['content'] = $album_title;
        $share = FS('Share')->submit($share_data, false, true, true);
        if ($share['status']) {
            $data = array();
            $data['title'] = htmlspecialchars($album_title);
            $data['album_title_match'] = segmentToUnicode(clearSymbol($album_title));
            $data['uid'] = $uid;
            $data['cid'] = $cid;
            $data['share_id'] = $share['share_id'];
            $data['create_day'] = getTodayTime();
            $data['create_time'] = TIME_UTC;
            $data['show_type'] = 2;
            $aid = FDB::insert('album', $data, true);
            FDB::query('UPDATE ' . FDB::table('share') . ' SET rec_id = ' . $aid . ' 
				WHERE share_id = ' . $share['share_id']);
            FDB::query("update " . FDB::table("user_count") . " set albums = albums + 1 where uid = " . $uid);
            $root['aid'] = $aid;
            $root['album_name'] = $album_title;
            $root['return'] = 1;
        }
        m_display($root);
    }
Esempio n. 24
0
 public function chargeoff()
 {
     $this->assign("vo", M('article_category')->where("type_name='线下充值'")->find());
     $config = FS("Webconfig/payoff");
     $this->assign('bank', $config['BANK']);
     $this->assign('info', $config['BANK_INFO']);
     $data['html'] = $this->fetch();
     exit(json_encode($data));
 }
    public function run()
    {
        global $_FANWE;
        $root = array();
        $root['return'] = 0;
        $uid = (int) $_FANWE['requestData']['uid'];
        if ($uid > 0) {
            if (!FS('User')->getUserExists($uid)) {
                $uid = 0;
            }
        }
        if ($uid == 0) {
            $uid = $_FANWE['uid'];
            $root['home_user'] = $_FANWE['user'];
        }
        if ($uid == 0) {
            $root['info'] = "请选择要查看的会员";
            m_display($root);
        }
        if (!isset($root['home_user'])) {
            $root['home_user'] = FS("User")->getUserById($uid);
            unset($root['home_user']['user_name_match'], $root['home_user']['password'], $root['home_user']['active_hash'], $root['home_user']['reset_hash']);
            $root['home_user']['user_avatar'] = avatar($uid, 'm', $root['home_user']['server_code'], 1, true);
        }
        $page = (int) $_FANWE['requestData']['page'];
        $page = max(1, $page);
        $is_spare_flow = (int) $_FANWE['requestData']['is_spare_flow'];
        $img_size = 200;
        $scale = 2;
        if ($is_spare_flow == 1) {
            $img_size = 100;
            $scale = 1;
        }
        $total = FDB::resultFirst('SELECT COUNT(photo_id) FROM ' . FDB::table('share_photo') . ' WHERE uid = ' . $uid);
        $page_size = 20;
        //PAGE_SIZE;
        $page_total = max(1, ceil($total / $page_size));
        if ($page > $page_total) {
            $page = $page_total;
        }
        $limit = ($page - 1) * $page_size . "," . $page_size;
        $photo_list = array();
        $res = FDB::query('SELECT photo_id,share_id,img 
			FROM ' . FDB::table('share_photo') . ' 
			WHERE uid = ' . $uid . ' ORDER BY photo_id DESC LIMIT ' . $limit);
        while ($photo = FDB::fetch($res)) {
            $photo['img'] = getImgName($photo['img'], $img_size, $img_size, 1, true);
            $photo['height'] = round($img_size / $scale);
            $photo['url'] = FU('note/m', array('sid' => $photo['share_id'], 'id' => $photo['photo_id']), true);
            $photo_list[] = $photo;
        }
        $root['return'] = 1;
        $root['item'] = $photo_list;
        $root['page'] = array("page" => $page, "page_total" => $page_total);
        m_display($root);
    }
    public function run()
    {
        global $_FANWE;
        $root = array();
        $root['return'] = 1;
        $key = 'm/sharecate';
        $cache_list = getCache($key);
        if ($cache_list !== NULL || TIME_UTC - $cache_list['cache_time'] > 600) {
            $cate_list = array();
            $min_time = $this->getQuarterMinTime();
            $max_time = getTodayTime();
            FanweService::instance()->cache->loadCache('albums');
            $album_cate = $_FANWE['cache']['albums']['category'];
            foreach ($album_cate as $k => $v) {
                $cate = array();
                $cate['cate_id'] = $v['id'];
                $cate['cate_name'] = $v['name'];
                $cate['short_name'] = $v['name'];
                $cate['cate_code'] = $v['cate_code'];
                $cate['cate_icon'] = FS("Image")->getImageUrl($v['img'], 2);
                $cate['desc'] = $v['desc'];
                $cate['create_time'] = $v['create_time'];
                //获取本季分享数量
                $share_count_sql = 'select count(DISTINCT s.share_id) from ' . FDB::table("share") . ' as s 
					INNER JOIN ' . FDB::table("album_share") . ' as al on s.share_id = al.share_id where al.cid = ' . $v['id'] . " and s.day_time >= {$min_time} AND s.day_time <= {$max_time} ";
                $cate['share_count'] = FDB::resultFirst($share_count_sql);
                $cate['img_tags'] = array();
                $img_size = 320;
                $sql = 'select s.share_id,al.title,sp.img from ' . FDB::table("share") . ' as s
					INNER JOIN ' . FDB::table("album_share") . ' as als ON s.share_id = als.share_id 
					INNER JOIN ' . FDB::table("album") . ' as al ON als.album_id = al.id
					INNER JOIN ' . FDB::table("share_photo") . " as sp ON s.share_id = sp.share_id \r\n\t\t\t\t\tWHERE s.day_time >= {$min_time} AND s.day_time <= {$max_time} AND als.cid = " . $v['id'] . " GROUP BY s.share_id ORDER BY s.share_id desc limit 5";
                $res = FDB::query($sql);
                while ($data = FDB::fetch($res)) {
                    $img_data = array();
                    $img_data['share_id'] = $data['share_id'];
                    $img_data['tag_name'] = $data['title'];
                    $img_data['is_tag'] = 0;
                    $img_data['img'] = FS("Image")->getImageUrl(getImgName($data['img'], $img_size, $img_size, 1, true), 2);
                    $img_data['url_tag'] = urlencode($data['title']);
                    $cate['img_tags'][] = $img_data;
                    $img_size = 160;
                }
                $cate['txt_tags'] = array();
                $cate_list[] = $cate;
            }
            $cache_list = array();
            $cache_list['cate_list'] = $cate_list;
            $cache_list['cache_time'] = TIME_UTC;
            setCache($key, $cache_list);
        } else {
            $cate_list = $cache_list['cate_list'];
        }
        $root['item'] = $cate_list;
        m_display($root);
    }
Esempio n. 27
0
 public function _Myinit()
 {
     $url_prefix = "http://";
     $this->return_url = $url_prefix . $_SERVER['HTTP_HOST'] . "/Pay/payreturn";
     $this->notice_url = $url_prefix . $_SERVER['HTTP_HOST'] . "/Pay/paynotice";
     $this->tenpay_rtn_url = $url_prefix . $_SERVER['HTTP_HOST'] . "/Pay/tenpayreturn";
     $this->tenpay_notice_url = $url_prefix . $_SERVER['HTTP_HOST'] . "/Pay/tenpaynotice";
     $this->member_url = $url_prefix . $_SERVER['HTTP_HOST'] . "/member";
     $this->payConfig = FS("Webconfig/payconfig");
 }
Esempio n. 28
0
 public function update()
 {
     vendor("common");
     $res = FS("Image")->save($key = 'shop_logo', $dir = 'share', $is_thumb = false, $whs = array(), $is_delete_origin = false, $is_water = false);
     if ($res) {
         $_POST['shop_logo'] = $res['url'];
     }
     Cookie::set('_currentUrl_', null);
     parent::update();
 }
Esempio n. 29
0
function getBestFlashs($fid)
{
    global $_FANWE;
    $args = array();
    $cache_file = getTplCache('inc/club/flash_topic', array($fid), 1);
    if (getCacheIsUpdate($cache_file, 300)) {
        $args['best_list'] = FS('Topic')->getImgTopic('best', 6, 1, $fid);
    }
    return tplFetch('inc/club/flash_topic', $args, '', $cache_file);
}
Esempio n. 30
0
function getTipUserFollow($uid)
{
    global $_FANWE;
    $is_follow = false;
    if ($_FANWE['uid'] > 0 && $_FANWE['uid'] != $uid) {
        $is_follow = FS('User')->getIsFollowUId($uid);
    }
    $args = array('uid' => $uid, 'is_follow' => $is_follow);
    return tplFetch('services/user/tip_follow', $args);
}