本文整理汇总了PHP中Activity::getRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::getRecord方法的具体用法?PHP Activity::getRecord怎么用?PHP Activity::getRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity::getRecord方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doMobileRedShared
public function doMobileRedShared()
{
global $_W, $_GPC;
$modulePublic = '../addons/wwx_fxxt/style/static/';
require_once WWX_FXXT_ROOT . '/class/Activity.class.php';
require_once WWX_FXXT_ROOT . '/class/Fans.class.php';
require_once WWX_FXXT_ROOT . '/class/Shared.class.php';
$a = new Activity();
$f = new Fans();
$user = $this->redauth();
///74.判断红包领取及用户信息记录。
$id = $_GPC['actid'];
$id = intval($id);
$activity = $a->getOne($id);
/**Activity:2.根据活动ID查询活动内容及设置等**/
$prepare = $this->prepareActivity($activity, array('user' => $user));
///75.查询红包活动的所有限制条件并输出。
if (is_error($prepare)) {
header('Location: ' . $this->createMobileUrl('redactivity', array('actid' => $activity['actid'])));
exit;
}
$uid = intval($_GPC['owner']);
$owner = $f->getOne($uid);
/**FANS:3.根据用户UID或OPENID查询记录中的用户信息**/
if (empty($owner)) {
message('访问错误', $activity['guide'], 'info');
}
if ($owner['uid'] == $user['uid']) {
header('Location: ' . $this->createMobileUrl('redactivity', array('actid' => $activity['actid'])));
exit;
}
require_once WWX_FXXT_ROOT . '/class/Shared.class.php';
$s = new Shared($activity);
if ($_W['ispost']) {
$input = array();
$input['owner'] = $owner['uid'];
$input['helper'] = $user['uid'];
$input['dateline'] = TIMESTAMP;
$ret = $s->createHelp($input);
/**Shared:4.增加一次助力记录**/
if (is_error($ret)) {
exit($ret['message']);
} else {
exit('success');
}
}
$footer_off = true;
$_W['page']['title'] = $activity['title'];
$mid = $this->getMid();
///11.查询自身wwx_fxxt_member分销表会员ID
$_share = array();
$_share['title'] = $activity['share']['title'];
$_share['desc'] = $activity['share']['content'];
$_share['imgUrl'] = tomedia($activity['share']['image']);
$_share['link'] = $_W['siteroot'] . 'app/' . substr($this->createMobileUrl('redshared', array('actid' => $activity['actid'], 'owner' => $user['uid'], 'mid' => $mid, 'joinway' => 2)), 2);
$got = $a->getRecord($user['uid'], $id);
/**Activity:8.查询活动红包领取信息。**/
//分享集红包
$help = array();
$help['total'] = $activity['tag']['helps'];
$help['already'] = $s->helpsCount($owner['uid']);
/**Shared:2.获取指定用户的被助力总数**/
$help['isok'] = $help['already'] >= $help['total'];
$help['rank'] = $s->getHelpRank($owner['uid'], $user['uid']);
/**Shared:5.获取指定用户助力特定用户的名次**/
$activity['tag']['label'] = htmlspecialchars_decode($activity['tag']['label']);
$activity['tag']['label'] = str_replace('{nickname}', $owner['nickname'], $activity['tag']['label']);
$activity['tag']['request'] = htmlspecialchars_decode($activity['tag']['request']);
$activity['tag']['request'] = str_replace('{nickname}', $owner['nickname'], $activity['tag']['request']);
include $this->template('redactivity_shared_help');
}
示例2: array
if ($_W['ispost']) {
$input = array();
$input['owner'] = $owner['uid'];
$input['helper'] = $user['uid'];
$input['dateline'] = TIMESTAMP;
$ret = $s->createHelp($input);
if (is_error($ret)) {
exit($ret['message']);
} else {
exit('success');
}
}
$footer_off = true;
$_W['page']['title'] = $activity['title'];
$_share = array();
$_share['title'] = $activity['share']['title'];
$_share['desc'] = $activity['share']['content'];
$_share['imgUrl'] = tomedia($activity['share']['image']);
$_share['link'] = $_W['siteroot'] . 'app/' . substr($this->createMobileUrl('shared', array('actid' => $activity['actid'], 'owner' => $user['uid'])), 2);
$got = $a->getRecord($user['uid'], $id);
//分享集红包
$help = array();
$help['total'] = $activity['tag']['helps'];
$help['already'] = $s->helpsCount($owner['uid']);
$help['isok'] = $help['already'] >= $help['total'];
$help['rank'] = $s->getHelpRank($owner['uid'], $user['uid']);
$activity['tag']['label'] = htmlspecialchars_decode($activity['tag']['label']);
$activity['tag']['label'] = str_replace('{nickname}', $owner['nickname'], $activity['tag']['label']);
$activity['tag']['request'] = htmlspecialchars_decode($activity['tag']['request']);
$activity['tag']['request'] = str_replace('{nickname}', $owner['nickname'], $activity['tag']['request']);
include $this->template('activity-shared-help');
示例3: intval
$id = $_GPC['actid'];
$id = intval($id);
$a = new Activity();
$activity = $a->getOne($id);
$prepare = $this->prepareActivity($activity, array('user' => $user));
if (is_error($prepare)) {
$error = $prepare;
if ($error['errno'] != '-2') {
exit($error['message']);
}
}
if (!$this->checkSubscribe()) {
exit('请关注我们后参加活动');
}
if ($activity['type'] == 'direct') {
$got = $a->getRecord($user['uid'], $activity['actid']);
if (empty($got)) {
if (empty($error)) {
$ret = $a->grap($user, $activity);
if (is_error($ret)) {
exit($ret['message']);
} elseif ($ret['status'] == 'none') {
exit('这一轮没有抢到红包, 请期待我们下一次活动');
} else {
$got = $a->getRecord($user['uid'], $activity['actid']);
$ret = $this->send($activity, $got, $user);
if (is_error($ret)) {
exit('红包发放失败, 你可以在活动结束之前重新领取. 活动结束后无法领取, 请注意');
exit($ret['message']);
}
exit('success');