public function doMobileRedGet() { global $_W, $_GPC; $modulePublic = '../addons/wwx_fxxt/style/static/'; require_once WWX_FXXT_ROOT . '/class/Activity.class.php'; $footer_off = true; $_W['page']['title'] = $activity['title']; $user = $this->redauth(); ///74.判断红包领取及用户信息记录。 $a = new Activity(); $activity = $a->getOne($id); /**Activity:2.根据活动ID查询活动内容及设置等**/ $prepare = $this->prepareActivity($activity, array('user' => $user)); ///75.查询红包活动的所有限制条件并输出。 if (is_error($prepare)) { $error = $prepare; } $mid = $this->getMid(); ///11.查询自身wwx_fxxt_member分销表会员ID $_share = array(); $_share['title'] = $activity['stitle']; $_share['desc'] = $activity['content']; $_share['imgUrl'] = tomedia($activity['image']); $_share['link'] = $_W['siteroot'] . 'app/' . substr(substr($this->createMobileUrl('redentry', array('owner' => $user['uid'], 'mid' => $mid, 'joinway' => 2)), 2), 0, -39); require_once WWX_FXXT_ROOT . '/class/Shared.class.php'; $s = new Shared(); $got = $s->getOneRecord($user['uid']); /**Shared:3.查询一条领取记录**/ if ($activity['type'] == 'direct') { //直接发红包 } else { //分享集红包 $help = array(); $help['total'] = $activity['helps']; $help['already'] = $s->helpsCount($user['uid']); /**Shared:2.获取指定用户的被助力总数**/ $help['ok'] = $help['already'] >= $activity['helps']; } include $this->template('redget'); }
<?php global $_W, $_GPC; $modulePublic = '../addons/microb_redpack/static/'; $footer_off = true; $_W['page']['title'] = $activity['title']; $user = $this->auth(); $activity = $this->getActivity(true, array('user' => $user)); if (is_error($activity)) { message($activity['message']); } $_share = array(); $_share['title'] = $activity['stitle']; $_share['desc'] = $activity['content']; $_share['imgUrl'] = tomedia($activity['image']); $_share['link'] = $_W['siteroot'] . 'app/' . substr(substr($this->createMobileUrl('entry', array('owner' => $user['uid'])), 2), 0, -39); require_once MB_ROOT . '/source/Shared.class.php'; $s = new Shared(); $got = $s->getOneRecord($user['uid']); if ($activity['type'] == 'direct') { //直接发红包 } else { //分享集红包 $help = array(); $help['total'] = $activity['helps']; $help['already'] = $s->helpsCount($user['uid']); $help['ok'] = $help['already'] >= $activity['helps']; } include $this->template('get');
<?php global $_W, $_GPC; $modulePublic = '../addons/microb_redpack/static/'; $footer_off = true; $_W['page']['title'] = $activity['title']; require_once MB_ROOT . '/source/Shared.class.php'; require_once MB_ROOT . '/source/Fans.class.php'; $f = new Fans(); $s = new Shared(); $uid = intval($_GPC['owner']); $owner = $f->getOne($uid); if (empty($owner)) { message('访问错误', $activity['guide'], 'info'); } $got = $s->getOneRecord($owner['uid']); $user = $this->auth(); $activity = $this->getActivity(true, array('user' => $user)); if (is_error($activity)) { message($activity['message']); } if ($owner['uid'] == $user['uid']) { header('Location: ' . $this->createMobileUrl('get')); exit; } $_share = array(); $_share['title'] = $activity['stitle']; $_share['desc'] = $activity['content']; $_share['imgUrl'] = tomedia($activity['image']); $_share['link'] = $_W['siteroot'] . 'app/' . substr(substr($this->createMobileUrl('entry', array('owner' => $user['uid'])), 2), 0, -39); if ($activity['type'] == 'direct') {